发现优秀的 MCP 服务器
通过 MCP 服务器扩展您的代理能力,拥有 18,496 个能力。
Gorgias MCP Server
HubSpot MCP Server
mcp-server-gist
mariadb-mcp-server
一个提供对 MariaDB 只读访问权限的 MCP 服务器。
Servidor MCP para Claude Desktop
Figma MCP Server
镜子 (jìng zi)
kagi-server MCP Server
镜子 (jìng zi)
WCGW
Okay, I understand. Please provide the code snippet and the paths you want me to translate into Chinese. I will then provide the translated text. For example, you could provide something like this: **Code Snippet:** ```python def handle_request(request): """ This function processes the incoming request. """ data = request.get_json() user_id = data.get("user_id") item_id = data.get("item_id") # Perform some action based on user_id and item_id result = process_data(user_id, item_id) return jsonify({"result": result}) ``` **Paths:** * `/api/v1/recommendations` * `/data/models/trained_model.pkl` * `/logs/application.log` Once you provide the code and paths, I will translate them into Chinese. I will focus on providing translations that are appropriate for a technical context, keeping in mind the likely use case with the "wcgw mcp server."
GitHub MCP Server in Go
一个非官方的 Go 语言实现的 GitHub MCP 服务器。在 Metoro 内部使用。
MUXI Framework
一个可扩展的 AI 代理框架 (Yī gè kě kuòzhǎn de AI dàilǐ kuàngjià)
Echo MCP Server
Okay, here's a basic outline and code example for a Model Context Protocol (MCP) server implementing an echo service using .NET Core. Since MCP isn't a widely standardized protocol, I'll make some assumptions about its structure. I'll assume it's a text-based protocol where messages are delimited by a newline character (`\n`). You'll likely need to adapt this to your specific MCP definition. **Conceptual Overview** 1. **Server Setup:** Create a TCP listener to accept incoming connections. 2. **Connection Handling:** For each connection, create a new thread or task to handle it concurrently. 3. **Receive Data:** Read data from the client socket. 4. **Parse MCP Message:** Parse the received data according to your MCP specification. In this simple echo example, we'll just treat the entire line as the message. 5. **Echo Response:** Send the received message back to the client. 6. **Close Connection:** Close the socket when the client disconnects or an error occurs. **Code Example (.NET Core)** ```csharp using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; namespace McpEchoServer { class Program { private static int _port = 12345; // Change this to your desired port private static IPAddress _ipAddress = IPAddress.Any; // Listen on all interfaces static async Task Main(string[] args) { TcpListener listener = null; try { listener = new TcpListener(_ipAddress, _port); listener.Start(); Console.WriteLine($"MCP Echo Server started on {_ipAddress}:{_port}"); while (true) { TcpClient client = await listener.AcceptTcpClientAsync(); Console.WriteLine($"Accepted new client: {client.Client.RemoteEndPoint}"); _ = HandleClientAsync(client); // Fire and forget - handle client in a separate task } } catch (Exception e) { Console.WriteLine($"An error occurred: {e}"); } finally { listener?.Stop(); } Console.WriteLine("Server stopped."); } static async Task HandleClientAsync(TcpClient client) { try { using (NetworkStream stream = client.GetStream()) using (var reader = new System.IO.StreamReader(stream, Encoding.UTF8)) using (var writer = new System.IO.StreamWriter(stream, Encoding.UTF8) { AutoFlush = true }) // AutoFlush ensures data is sent immediately { string message; while ((message = await reader.ReadLineAsync()) != null) { Console.WriteLine($"Received: {message} from {client.Client.RemoteEndPoint}"); // Echo the message back await writer.WriteLineAsync(message); Console.WriteLine($"Sent: {message} to {client.Client.RemoteEndPoint}"); } Console.WriteLine($"Client disconnected: {client.Client.RemoteEndPoint}"); } } catch (Exception e) { Console.WriteLine($"Error handling client {client.Client.RemoteEndPoint}: {e}"); } finally { client.Close(); } } } } ``` **How to Use:** 1. **Create a new .NET Core Console Application:** In Visual Studio or using the .NET CLI (`dotnet new console`). 2. **Replace the `Program.cs` content:** Paste the code above into your `Program.cs` file. 3. **Adjust the Port:** Change the `_port` variable to the port you want the server to listen on. 4. **Run the Server:** Build and run the application. You should see the "MCP Echo Server started" message. **Client Example (Simple Telnet or Netcat)** You can test this server using a simple Telnet client or Netcat. * **Telnet:** Open a command prompt or terminal and type: `telnet localhost 12345` (replace `12345` with your port). Then type some text and press Enter. You should see the same text echoed back. * **Netcat (nc):** `nc localhost 12345`. Type some text and press Enter. **Explanation:** * **`TcpListener`:** Listens for incoming TCP connections on the specified IP address and port. * **`AcceptTcpClientAsync()`:** Asynchronously accepts a pending connection request. This returns a `TcpClient` object representing the connected client. * **`HandleClientAsync()`:** This `async` method handles the communication with a single client. It's launched as a separate task using `_ = HandleClientAsync(client);` so that the server can handle multiple clients concurrently. * **`NetworkStream`:** Provides access to the underlying network stream of the `TcpClient`. * **`StreamReader` and `StreamWriter`:** Used for reading and writing text data to the stream. `StreamReader.ReadLineAsync()` reads a line of text from the stream asynchronously. `StreamWriter.WriteLineAsync()` writes a line of text to the stream asynchronously. `AutoFlush = true` ensures that data is sent immediately. * **`Encoding.UTF8`:** Specifies the character encoding to use for reading and writing text. * **`client.Close()`:** Closes the connection to the client. * **Error Handling:** The `try...catch...finally` blocks provide basic error handling. **Important Considerations and Improvements:** * **MCP Specification:** This example assumes a very simple MCP protocol. You'll need to adapt the parsing and message handling logic to match your actual MCP specification. This might involve parsing headers, message types, data lengths, etc. * **Error Handling:** The error handling is basic. You should add more robust error handling to catch exceptions and handle them gracefully. Consider logging errors. * **Threading/Task Management:** The `_ = HandleClientAsync(client);` approach is a simple way to launch a task, but for a production server, you might want to use a more sophisticated task management strategy (e.g., using a `TaskScheduler` or a thread pool) to control the number of concurrent tasks. * **Security:** This example is not secure. If you're transmitting sensitive data, you should use TLS/SSL to encrypt the connection. * **Message Framing:** If your MCP protocol doesn't use newline characters as delimiters, you'll need to implement a different message framing mechanism (e.g., using a fixed-length header that specifies the message length). * **Asynchronous Operations:** The use of `async` and `await` makes the server more scalable by allowing it to handle multiple clients concurrently without blocking threads. * **Logging:** Implement a logging mechanism to record server events, errors, and client interactions. This is crucial for debugging and monitoring. * **Configuration:** Externalize configuration settings (e.g., port number, IP address) into a configuration file. **Chinese Translation of Key Concepts:** * **Model Context Protocol (MCP):** 模型上下文协议 (Móxíng shàngxiàwén xiéyì) * **Echo Service:** 回显服务 (Huíxiǎn fúwù) * **.NET Core:** .NET Core * **TCP Listener:** TCP 监听器 (TCP jiāntīng qì) * **Socket:** 套接字 (Tàojiēzì) * **Network Stream:** 网络流 (Wǎngluò liú) * **Asynchronous:** 异步 (Yìbù) * **Thread:** 线程 (Xiànchéng) * **Task:** 任务 (Rènwù) * **Client:** 客户端 (Kèhùduān) * **Server:** 服务器 (Fúwùqì) * **Port:** 端口 (Duānkǒu) * **IP Address:** IP 地址 (IP dìzhǐ) * **Encoding:** 编码 (Biānmǎ) * **Message:** 消息 (Xiāoxī) * **Delimiter:** 分隔符 (Fēngéfú) This comprehensive example should give you a good starting point for building your MCP echo server in .NET Core. Remember to adapt the code to your specific MCP protocol requirements. Good luck!
MCP Image Generation Server
镜子 (jìng zi)
mcp_server
MCP Server Collection
MCP 服务聚合
mcp-server-web3
基于 Anthropic 的 MCP 的 Web3 函数插件服务器。
Prompt Decorators
一个标准化的框架,旨在通过可组合的装饰器来增强大型语言模型(LLM)处理和响应提示的方式。该框架包含一个官方的开放标准规范和一个带有 MCP 服务器集成的 Python 参考实现。
Remote MCP Server on Cloudflare
artifacts-mcp
文物 MMO 的 MCP 服务器
STeLA MCP
用于本地系统操作的 MCP 服务器
mcp-server-bluesky
镜子 (jìng zi)
MCP Server Docker
Docker 的 MCP 服务器
MCP-Server-and-client-Implementation-on-Linux
Okay, here's the translation of "MCP Server and client Implementation on Linux (Rather then using Claude Desktop)" into Chinese, along with some considerations for clarity: **Option 1 (More Literal):** * **Linux 上的 MCP 服务器和客户端实现 (而不是使用 Claude Desktop)** * This is a fairly direct translation. It's understandable but might sound a bit technical. **Option 2 (Slightly More Natural):** * **在 Linux 上实现 MCP 服务器和客户端,无需使用 Claude Desktop** * This version uses "无需使用" (wú xū shǐ yòng) which means "without needing to use" or "without using," making it flow a bit better. **Option 3 (Emphasizing Alternatives):** * **在 Linux 上实现 MCP 服务器和客户端,作为 Claude Desktop 的替代方案** * This version uses "作为...的替代方案" (zuòwéi...de tìdài fāng'àn), meaning "as an alternative to..." This emphasizes that you're looking for a different approach than Claude Desktop. **Which one to choose depends on the context:** * If you're talking to someone very familiar with the technical terms, Option 1 is fine. * If you want a slightly more natural and common way of saying it, Option 2 is good. * If you want to emphasize that you're looking for an *alternative* to Claude Desktop, Option 3 is best. **Breakdown of the terms:** * **MCP Server:** MCP 服务器 (MCP fúwùqì) * **Client:** 客户端 (kèhùduān) * **Implementation:** 实现 (shíxiàn) * **Linux:** Linux (Linux) (This is often just kept as "Linux" in Chinese) * **Rather than:** 而不是 (ér bùshì) / 无需使用 (wú xū shǐ yòng) / 作为...的替代方案 (zuòwéi...de tìdài fāng'àn) * **Claude Desktop:** Claude Desktop (Claude Desktop) (Likely kept as is, unless there's a common Chinese translation for it) Therefore, I recommend **Option 2: 在 Linux 上实现 MCP 服务器和客户端,无需使用 Claude Desktop** as a good balance of accuracy and naturalness.
Model Context Protocol (MCP) Server 🚀
MCP client-server
Okay, I will translate "Make MCP Client & Server" into Chinese. Here are a few options, depending on the nuance you want to convey: * **最直接的翻译 (Most direct translation):** 制作 MCP 客户端和服务器 (Zhìzuò MCP kèhùduān hé fúwùqì) This is a literal translation and is suitable if you're talking about the *process* of creating them. * **更自然的翻译 (More natural translation, implying development):** 开发 MCP 客户端和服务器 (Kāifā MCP kèhùduān hé fúwùqì) This implies the *development* of the client and server. "开发" (kāifā) means "to develop" or "to create" in a more technical sense. * **如果指的是设置 (If referring to setting up):** 设置 MCP 客户端和服务器 (Shèzhì MCP kèhùduān hé fúwùqì) This means "Set up MCP Client and Server". Use this if you're talking about configuring existing software. * **如果指的是构建 (If referring to building):** 构建 MCP 客户端和服务器 (Gòujiàn MCP kèhùduān hé fúwùqì) This means "Build MCP Client and Server". Use this if you're talking about compiling or assembling the software. **Breakdown of the terms:** * **MCP:** MCP (保持不变 - Keep as is, unless you know the Chinese equivalent) * **Client:** 客户端 (kèhùduān) * **Server:** 服务器 (fúwùqì) * **Make/Create/Develop/Set up/Build:** 制作 (zhìzuò) / 开发 (kāifā) / 设置 (shèzhì) / 构建 (gòujiàn) Therefore, the best translation depends on the context. If you're talking about writing the code, use "开发". If you're talking about setting up existing software, use "设置". If you're talking about the general act of making them, use "制作". If you're talking about compiling them, use "构建". **In summary, I recommend using 开发 MCP 客户端和服务器 (Kāifā MCP kèhùduān hé fúwùqì) if you are talking about the development process.**
Figma MCP Server
镜子 (jìng zi)
Github Mcp Server Review Tools
扩展了 GitHub MCP 服务器,增加了用于拉取请求审查评论功能的额外工具。
Servidor MCP para CRM con IA
mcp-server-testWhat is MCP Server Test?How to use MCP Server Test?Key features of MCP Server Test?Use cases of MCP Server Test?FAQ from MCP Server Test?
测试 MCP 服务器 (Cèshì MCP fúwùqì)
figma-mcp-flutter-test
使用 Figma MCP 服务器,在 Flutter 中重现 Figma 设计的实验性项目。
mpc-csharp-semantickernel
Okay, here's an example demonstrating how to use Microsoft Semantic Kernel with OpenAI and a hypothetical "MCP Server" (assuming MCP stands for something like "My Custom Processing Server" or "Message Control Protocol Server"). Since "MCP Server" is vague, I'll make some assumptions about its functionality and how it might interact with Semantic Kernel. You'll need to adapt this to your specific MCP Server's capabilities. **Conceptual Overview** The core idea is to use Semantic Kernel to orchestrate interactions between OpenAI (for language understanding and generation) and your MCP Server (for specialized processing, data retrieval, or control actions). **Assumptions about the MCP Server** * **API Endpoint:** It exposes an API endpoint (e.g., REST API) for receiving requests and sending responses. * **Functionality:** Let's assume it can perform a specific task, like: * **Data Lookup:** Retrieve information from a database based on a query. * **System Control:** Execute a command on a system. * **Message Routing:** Route a message to a specific destination. * **Input/Output:** It expects structured input (e.g., JSON) and returns structured output (e.g., JSON). **Example Scenario: Smart Home Control** Let's imagine an MCP Server that controls smart home devices. We want to use Semantic Kernel and OpenAI to allow users to control their home with natural language. **Code Example (C#)** ```csharp using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Connectors.OpenAI; using System.Net.Http; using System.Text; using System.Text.Json; using System.Threading.Tasks; public class SmartHomePlugin { private readonly HttpClient _httpClient; private readonly string _mcpServerEndpoint; public SmartHomePlugin(string mcpServerEndpoint) { _httpClient = new HttpClient(); _mcpServerEndpoint = mcpServerEndpoint; } [KernelFunction, Description("Controls a smart home device.")] public async Task<string> ControlDevice( [Description("The device to control (e.g., lights, thermostat).")] string device, [Description("The action to perform (e.g., turn on, turn off, set temperature).")] string action, [Description("The value to set (e.g., 22 for temperature).")] string value = "" ) { // 1. Prepare the request to the MCP Server var requestData = new { device = device, action = action, value = value }; string jsonRequest = JsonSerializer.Serialize(requestData); var content = new StringContent(jsonRequest, Encoding.UTF8, "application/json"); // 2. Send the request to the MCP Server HttpResponseMessage response = await _httpClient.PostAsync(_mcpServerEndpoint, content); // 3. Handle the response from the MCP Server if (response.IsSuccessStatusCode) { string jsonResponse = await response.Content.ReadAsStringAsync(); // Deserialize the JSON response (assuming MCP Server returns JSON) try { var responseObject = JsonSerializer.Deserialize<Dictionary<string, string>>(jsonResponse); return responseObject?["status"] ?? "Unknown status"; // Assuming MCP returns a "status" field } catch (JsonException ex) { Console.WriteLine($"Error deserializing MCP Server response: {ex.Message}"); return "Error processing MCP Server response."; } } else { Console.WriteLine($"MCP Server request failed: {response.StatusCode}"); return $"MCP Server request failed with status code: {response.StatusCode}"; } } } public class Example { public static async Task Main() { // 1. Configure Semantic Kernel string apiKey = "YOUR_OPENAI_API_KEY"; string orgId = "YOUR_OPENAI_ORG_ID"; // Optional Kernel kernel = Kernel.CreateBuilder() .AddOpenAIChatCompletion("gpt-3.5-turbo", apiKey, orgId) // Or "gpt-4" .Build(); // 2. Define the MCP Server endpoint string mcpServerEndpoint = "http://your-mcp-server.com/api/control"; // Replace with your actual endpoint // 3. Import the SmartHomePlugin var smartHomePlugin = new SmartHomePlugin(mcpServerEndpoint); kernel.ImportPluginFromObject(smartHomePlugin, "SmartHome"); // 4. Create a Semantic Function (Prompt) string prompt = @" Control the smart home device. Device: {{$device}} Action: {{$action}} Value: {{$value}} {{SmartHome.ControlDevice $device $action $value}} "; var smartHomeFunction = kernel.CreateFunction(prompt); // 5. Run the Semantic Function with user input var arguments = new KernelArguments { ["device"] = "lights", ["action"] = "turn on", ["value"] = "" }; var result = await smartHomeFunction.InvokeAsync(kernel, arguments); Console.WriteLine($"Result: {result.GetValue<string>()}"); // Example 2: More natural language input using OpenAI to extract parameters string naturalLanguagePrompt = "Turn on the living room lights."; // Define a prompt to extract device, action, and value from the natural language input string extractionPrompt = @" Extract the device, action, and value from the following text: Text: {{$text}} Device: Action: Value: "; var extractionFunction = kernel.CreateFunction(extractionPrompt); var extractionResult = await extractionFunction.InvokeAsync(kernel, new KernelArguments { ["text"] = naturalLanguagePrompt }); string extractedText = extractionResult.GetValue<string>()!; // Parse the extracted text (this is a simplified example; you might need more robust parsing) string extractedDevice = extractedText.Split("Device:")[1].Split("Action:")[0].Trim(); string extractedAction = extractedText.Split("Action:")[1].Split("Value:")[0].Trim(); string extractedValue = extractedText.Split("Value:")[1].Trim(); Console.WriteLine($"Extracted Device: {extractedDevice}"); Console.WriteLine($"Extracted Action: {extractedAction}"); Console.WriteLine($"Extracted Value: {extractedValue}"); // Now use the extracted parameters with the SmartHome.ControlDevice function var controlArguments = new KernelArguments { ["device"] = extractedDevice, ["action"] = extractedAction, ["value"] = extractedValue }; var controlResult = await smartHomeFunction.InvokeAsync(kernel, controlArguments); Console.WriteLine($"Control Result: {controlResult.GetValue<string>()}"); } } ``` **Explanation:** 1. **`SmartHomePlugin`:** * This class represents a Semantic Kernel plugin that interacts with the MCP Server. * It takes the MCP Server endpoint as a constructor parameter. * The `ControlDevice` function is decorated with `[KernelFunction]` to make it available to Semantic Kernel. * It constructs a JSON request based on the input parameters (`device`, `action`, `value`). * It sends a POST request to the MCP Server. * It handles the response from the MCP Server, deserializing the JSON and returning a status message. Error handling is included. 2. **`Example.Main`:** * **Configure Semantic Kernel:** Sets up the Semantic Kernel with your OpenAI API key and organization ID. * **Define MCP Server Endpoint:** Replace `"http://your-mcp-server.com/api/control"` with the actual URL of your MCP Server's API endpoint. * **Import Plugin:** Creates an instance of the `SmartHomePlugin` and imports it into the Semantic Kernel. This makes the `ControlDevice` function available for use in prompts. * **Create Semantic Function (Prompt):** Defines a prompt that uses the `SmartHome.ControlDevice` function. The prompt takes `device`, `action`, and `value` as input parameters. * **Run Semantic Function:** Creates a `KernelArguments` object with the desired device, action, and value, and then invokes the semantic function. The result from the MCP Server is printed to the console. * **Natural Language Example:** Demonstrates how to use OpenAI to extract the device, action, and value from a natural language prompt. This allows users to control their smart home with more natural commands. A separate prompt is used for extraction. The extracted parameters are then used to call the `SmartHome.ControlDevice` function. **Key Points and Considerations:** * **MCP Server API:** The most important part is understanding the API of your MCP Server. You need to know the endpoint, the expected request format (JSON schema), and the format of the response. * **Error Handling:** The example includes basic error handling for network requests and JSON deserialization. You should add more robust error handling for production code. * **Security:** If your MCP Server requires authentication, you'll need to add authentication headers to the `HttpClient` requests. Never hardcode sensitive information like API keys directly in your code. Use environment variables or a secure configuration mechanism. * **Prompt Engineering:** The prompts are crucial for getting the desired behavior. Experiment with different prompts to improve the accuracy and reliability of the system. Consider using techniques like few-shot learning to provide examples to the language model. * **JSON Serialization/Deserialization:** The example uses `System.Text.Json`. You can use other JSON libraries like Newtonsoft.Json if you prefer. * **Dependency Injection:** For larger applications, consider using dependency injection to manage the `HttpClient` and other dependencies. * **Asynchronous Operations:** The example uses `async` and `await` for asynchronous operations. This is important for avoiding blocking the main thread and improving performance. * **Parameter Extraction:** The natural language example uses a simple string splitting approach to extract parameters. For more complex scenarios, you might need to use more sophisticated techniques like regular expressions or a dedicated natural language processing library. Semantic Kernel also offers more advanced techniques for parameter extraction. * **Semantic Kernel Plugins:** Consider breaking down your MCP Server functionality into multiple Semantic Kernel plugins for better organization and reusability. * **Testing:** Write unit tests to verify the functionality of your Semantic Kernel plugins and the interactions with the MCP Server. **How to Adapt This Example:** 1. **Replace Placeholders:** Replace `"YOUR_OPENAI_API_KEY"`, `"YOUR_OPENAI_ORG_ID"`, and `"http://your-mcp-server.com/api/control"` with your actual values. 2. **Implement MCP Server Interaction:** Modify the `SmartHomePlugin` to match the API of your MCP Server. Adjust the request format, response handling, and error handling accordingly. 3. **Customize Prompts:** Adjust the prompts to match the specific tasks you want to perform. 4. **Add Error Handling:** Implement more robust error handling to handle potential issues with the MCP Server or the OpenAI API. 5. **Add Security:** Implement appropriate security measures to protect your API keys and other sensitive information. **Chinese Translation of Key Concepts:** * **Microsoft Semantic Kernel:** 微软语义内核 (Wēiruǎn yǔyì kènèi) * **OpenAI:** 开放人工智能 (Kāifàng réngōng zhìnéng) * **MCP Server:** (You'll need to translate this based on what MCP stands for in your context. For example, if it's "My Custom Processing Server," you could translate it as: 我的自定义处理服务器 (Wǒ de zì dìngyì chǔlǐ fúwùqì)) * **Plugin:** 插件 (Chājiàn) * **Kernel Function:** 内核函数 (Nèihé hánshù) * **Prompt:** 提示 (Tíshì) * **Semantic Function:** 语义函数 (Yǔyì hánshù) * **API Endpoint:** 应用程序接口端点 (Yìngyòng chéngxù jiēkǒu duāndiǎn) * **Natural Language:** 自然语言 (Zìrán yǔyán) This comprehensive example should give you a solid foundation for using Microsoft Semantic Kernel with OpenAI and your MCP Server. Remember to adapt the code to your specific needs and to thoroughly test your implementation. Good luck!