Discover Awesome MCP Servers

Extend your agent with 17,113 capabilities via MCP servers.

All17,113
Shopify MCP Server

Shopify MCP Server

镜子 (jìng zi)

Todoist MCP Server

Todoist MCP Server

镜子 (jìng zi)

Compound Interest CalculatorCompound Interest Calculator

Compound Interest CalculatorCompound Interest Calculator

用于测试 MCP 服务器功能的存储库

OpenAI Web Search MCP Server

OpenAI Web Search MCP Server

使用 MCP (多配置协议) 处理 OpenAI 网络搜索的服务器

Simple_dart_mcp_server

Simple_dart_mcp_server

以下是一个用 Dart 编写的非常简单的模型上下文协议服务器实现: ```dart import 'dart:io'; import 'dart:convert'; void main() async { final server = await ServerSocket.bind('localhost', 4040); print('服务器已启动,监听端口 ${server.port}'); server.listen((client) { handleClient(client); }); } void handleClient(Socket client) { print('客户端连接:${client.remoteAddress.address}:${client.remotePort}'); client.listen( (List<int> data) { final message = utf8.decode(data); print('收到消息:$message'); try { // 尝试解析 JSON final request = jsonDecode(message); // 模拟处理请求并生成响应 final response = processRequest(request); // 将响应编码为 JSON 并发送回客户端 final responseJson = jsonEncode(response); client.write(responseJson); print('发送响应:$responseJson'); } catch (e) { print('错误:无法解析 JSON 或处理请求:$e'); client.write('{"error": "Invalid request"}'); } }, onError: (error) { print('客户端错误:$error'); client.close(); }, onDone: () { print('客户端断开连接'); client.close(); }, ); } // 模拟处理请求的函数 Map<String, dynamic> processRequest(dynamic request) { // 在这里实现你的模型上下文逻辑 // 例如,根据请求中的参数执行某些操作并返回结果 // 示例:如果请求包含 "query" 字段,则返回一个包含 "response" 字段的响应 if (request is Map && request.containsKey('query')) { final query = request['query']; return {'response': '您查询的是:$query'}; } else { return {'error': '无效的请求格式'}; } } ``` **代码解释:** 1. **`import 'dart:io';` 和 `import 'dart:convert';`**: 导入必要的库,`dart:io` 用于网络操作,`dart:convert` 用于 JSON 编码和解码。 2. **`main()` 函数**: - 使用 `ServerSocket.bind()` 绑定服务器到 `localhost` 的 `4040` 端口。你可以根据需要更改端口。 - 使用 `server.listen()` 监听客户端连接。 - 对于每个连接的客户端,调用 `handleClient()` 函数来处理。 3. **`handleClient()` 函数**: - 打印客户端的连接信息。 - 使用 `client.listen()` 监听客户端发送的数据。 - **数据处理**: - 使用 `utf8.decode()` 将接收到的字节数据解码为字符串。 - 使用 `jsonDecode()` 尝试将字符串解析为 JSON 对象。 - 调用 `processRequest()` 函数来模拟处理请求并生成响应。 - 使用 `jsonEncode()` 将响应编码为 JSON 字符串。 - 使用 `client.write()` 将 JSON 字符串发送回客户端。 - **错误处理**: - 使用 `onError` 回调函数处理客户端错误。 - 使用 `onDone` 回调函数处理客户端断开连接。 4. **`processRequest()` 函数**: - 这是一个模拟函数,用于处理客户端的请求。 - 你需要根据你的模型上下文协议的实际需求来实现这个函数。 - 示例代码检查请求是否包含 "query" 字段,如果包含,则返回一个包含 "response" 字段的响应。 - 如果请求格式无效,则返回一个包含 "error" 字段的响应。 **如何运行:** 1. 将代码保存为 `server.dart` 文件。 2. 在终端中运行 `dart server.dart`。 **如何测试:** 你可以使用 `telnet` 或 `curl` 等工具来测试服务器。 **使用 `telnet`:** 1. 打开终端并运行 `telnet localhost 4040`。 2. 输入以下 JSON 字符串并按 Enter 键: ```json {"query": "你好"} ``` 3. 你应该会收到服务器的响应: ```json {"response": "您查询的是:你好"} ``` **使用 `curl`:** 1. 打开终端并运行以下命令: ```bash curl -X POST -H "Content-Type: application/json" -d '{"query": "你好"}' http://localhost:4040 ``` 2. 你应该会收到服务器的响应: ```json {"response": "您查询的是:你好"} ``` **重要说明:** * 这是一个非常简单的示例,仅用于演示模型上下文协议服务器的基本概念。 * 你需要根据你的实际需求来实现 `processRequest()` 函数,并添加必要的错误处理和安全性措施。 * 实际的模型上下文协议可能需要更复杂的协议和数据格式。 * 考虑使用更健壮的库,例如 `shelf` 或 `aqueduct`,来构建更复杂的服务器应用程序。 **中文总结:** 这段代码创建了一个简单的 Dart 服务器,监听 4040 端口。当客户端连接时,服务器接收客户端发送的 JSON 消息,然后调用 `processRequest()` 函数来处理请求并生成响应。最后,服务器将响应编码为 JSON 字符串并发送回客户端。 `processRequest()` 函数是一个占位符,你需要根据你的模型上下文协议的实际需求来实现它。 你可以使用 `telnet` 或 `curl` 等工具来测试服务器。 请记住,这只是一个简单的示例,你需要根据你的实际需求进行修改和扩展。

GitHub PR MCP Server

GitHub PR MCP Server

用于 Github 的 Claude MCP 服务器,集成 Linear

Salesforce MCP Server

Salesforce MCP Server

镜子 (jìng zi)

Stability AI MCP Server

Stability AI MCP Server

镜子 (jìng zi)

Minecraft MCP Server

Minecraft MCP Server

一个早期原型,实现了模型上下文协议(MCP)服务器,并集成了 Mineflayer API 以与 Minecraft 互动。

Python MCP Server

Python MCP Server

Teamwork MCP

Teamwork MCP

连接到 Teamwork API 的 MCP 服务器

Tugboat MCP Server

Tugboat MCP Server

一个用于与 Tugboat API 交互的模型上下文协议 (MCP) 服务器。

MCP Magic UI

MCP Magic UI

一个模型上下文协议(Model Context Protocol,MCP)服务器,提供对 Magic UI 组件的访问,允许 AI 助手和其他 MCP 客户端发现和使用来自 Magic UI 设计系统的 UI 组件。

Anki MCP Server

Anki MCP Server

镜子 (jìng zi)

Google Search MCP Server

Google Search MCP Server

专为 VS Code / Cline / Anthropic 构建的 MCP 服务器 - 启用 Google 搜索并具备跟踪链接和研究网站的能力

Comfy MCP Server

Comfy MCP Server

镜子 (jìng zi)

VectorCode

VectorCode

一个代码仓库索引工具,可以增强你的大型语言模型(LLM)体验。

Dev Log MCP Component

Dev Log MCP Component

一个开发者日志 MCP 服务器,用于 Cline、Roo Code 或其他代理式 AI 工具。

Grafana MCP server

Grafana MCP server

Grafana 的 MCP 服务器 (Grafana de MCP fuwuqi)

MCP

MCP

MCP 服务器 (MCP fúwùqì)

minimum-mcp-server

minimum-mcp-server

Zotero MCP Server

Zotero MCP Server

Voxta MCP Bridge Provider

Voxta MCP Bridge Provider

能够与模型上下文协议 (MCP) 服务器通信的 Voxta 提供程序

File Operations MCP Server

File Operations MCP Server

镜子 (jìng zi)

Fubon MCP Server

Fubon MCP Server

mcp

mcp

Okay, here's a translation of "Python implementation of an Elasticsearch MCP server" into Chinese, along with some considerations for different nuances: **Option 1 (Most Literal and Common):** * **Python 实现的 Elasticsearch MCP 服务器** * (Pinyin: Python shíxiàn de Elasticsearch MCP fúwùqì) This is the most direct and common translation. It's easily understood. **Option 2 (More Emphasis on "Implementation"):** * **用 Python 实现的 Elasticsearch MCP 服务器** * (Pinyin: Yòng Python shíxiàn de Elasticsearch MCP fúwùqì) This adds "用" (yòng), meaning "using" or "with." It emphasizes that Python is the *tool* used for the implementation. It's slightly more descriptive. **Option 3 (Slightly More Formal):** * **基于 Python 的 Elasticsearch MCP 服务器实现** * (Pinyin: Jīyú Python de Elasticsearch MCP fúwùqì shíxiàn) This translates to "Elasticsearch MCP server implementation based on Python." It's a bit more formal and might be used in technical documentation. **Option 4 (Focus on Building/Developing):** * **使用 Python 构建的 Elasticsearch MCP 服务器** * (Pinyin: Shǐyòng Python gòujiàn de Elasticsearch MCP fúwùqì) This translates to "Elasticsearch MCP server built using Python." It emphasizes the act of building or developing the server. **Which one to choose?** * For general communication and clarity, **Option 1 (Python 实现的 Elasticsearch MCP 服务器)** is usually the best choice. * If you want to emphasize that Python is the *tool* used, choose **Option 2 (用 Python 实现的 Elasticsearch MCP 服务器)**. * For more formal documentation, **Option 3 (基于 Python 的 Elasticsearch MCP 服务器实现)** might be appropriate. * If you want to emphasize the act of building the server, choose **Option 4 (使用 Python 构建的 Elasticsearch MCP 服务器)**. **Important Notes:** * **Elasticsearch:** This is a proper noun and is generally kept as "Elasticsearch" in Chinese technical contexts. While there are Chinese transliterations, they are not commonly used. * **MCP:** If "MCP" is a well-known acronym within the specific Chinese-speaking community you're targeting, you can leave it as is. If not, you might consider providing a brief explanation of what it stands for in parentheses after the first mention. However, without knowing what MCP stands for in this context, I can't provide a suitable translation. * **服务器 (fúwùqì):** This is the standard Chinese word for "server." Therefore, my recommendation is **Python 实现的 Elasticsearch MCP 服务器** unless you have a specific reason to choose one of the other options. If you can tell me what "MCP" stands for, I can refine the translation further.

mcp-server-claude-desktop

mcp-server-claude-desktop

ConsultingAgents MCP Server

ConsultingAgents MCP Server

一个 MCP 服务器,它与 OpenAI 和 Anthropic 的 API 接口,为 Claude Code 提供“同事”来帮助它解决难题。

Trino MCP Server

Trino MCP Server

镜子 (jìng zi)

MQTTX SSE Server

MQTTX SSE Server

一个实现了模型-上下文协议 (MCP) 的方案,该方案支持通过服务器发送事件 (SSE) 传输 MQTT 操作。