发现优秀的 MCP 服务器
通过 MCP 服务器扩展您的代理能力,拥有 14,296 个能力。
MCP Server Runner
一个用于运行模型上下文协议(MCP)服务器的 WebSocket 服务器实现。此应用程序允许通过 WebSocket 连接访问 MCP 服务器,从而方便与 Web 应用程序和其他支持网络的客户端集成。
Model Context Protocol Community
轻松运行、部署和连接到 MCP 服务器
MCP Chess
一个用于下国际象棋的 MCP 服务器 (Yī gè yòng yú xià guójì xiàngqí de MCP fúwùqì) **Breakdown:** * **一个 (yī gè):** A * **用于 (yòng yú):** for * **下国际象棋 (xià guójì xiàngqí):** playing chess (literally "play international chess") * **的 (de):** a possessive particle, linking the preceding phrase to the following noun. * **MCP 服务器 (MCP fúwùqì):** MCP server
HexDocs MCP Server
myanimelist-mcp
为我的动漫列表集成大型语言模型的 MCP 服务器
むらっけ MPC Server
一个简易地再现了宝可梦特性“飘飘然”的 MPC Server
My MCP Servers 🛠
我的一些MCP服务器的集合。
MCP Middleware Adapter for Express Servers
Okay, here's a breakdown of how to run multiple Minecraft Protocol (MCP) clients on a NodeJS Express server, acting as an adapter or middleware. This is a complex topic, so I'll break it down into key concepts and provide code snippets to illustrate the ideas. **Core Concepts** 1. **Minecraft Protocol (MCP) Clients:** These are libraries (like `minecraft-protocol` or `prismarine-proxy`) that handle the low-level communication with Minecraft servers. You'll need to choose one and understand its API. 2. **NodeJS Express Server:** This provides the HTTP endpoint(s) that your users/applications will interact with. It acts as the intermediary between the outside world and your Minecraft clients. 3. **Client Management:** You need a way to keep track of each MCP client instance. A simple object or array can work, but for more complex scenarios, consider a more robust data structure. 4. **Proxying/Adapting:** The Express server will receive requests, determine which MCP client should handle the request, and then forward the request (or a modified version of it) to the appropriate Minecraft server. The response from the Minecraft server is then sent back to the original requester. 5. **Authentication/Authorization:** Crucially important. You need to ensure that only authorized users can control specific Minecraft clients. This might involve API keys, user accounts, or other authentication mechanisms. 6. **Error Handling:** Robust error handling is essential. Minecraft servers can be unreliable, and network issues can occur. Your Express server needs to gracefully handle these errors and provide informative feedback to the user. **Example Structure (Conceptual)** ``` / ├── server.js // Main Express server file ├── mcp_manager.js // Manages MCP client instances ├── routes/ │ └── minecraft.js // Routes for interacting with Minecraft clients └── config.js // Configuration settings ``` **1. Project Setup** ```bash mkdir minecraft-proxy cd minecraft-proxy npm init -y npm install express minecraft-protocol // Or prismarine-proxy, etc. ``` **2. `config.js` (Configuration)** ```javascript module.exports = { minecraftServers: [ { id: 'server1', host: 'minecraft.example.com', port: 25565 }, { id: 'server2', host: 'another.minecraft.net', port: 25565 } ], apiKeys: { 'user1': 'some-secret-key', 'user2': 'another-secret-key' } }; ``` **3. `mcp_manager.js` (MCP Client Management)** ```javascript const mc = require('minecraft-protocol'); const config = require('./config'); class MCPManager { constructor() { this.clients = {}; // Store MCP client instances } createClient(serverId, username, password) { const serverConfig = config.minecraftServers.find(s => s.id === serverId); if (!serverConfig) { throw new Error(`Server with ID ${serverId} not found.`); } const client = mc.createClient({ host: serverConfig.host, port: serverConfig.port, username: username, password: password // Handle authentication appropriately }); this.clients[serverId] = client; client.on('connect', () => { console.log(`Connected to ${serverId}`); }); client.on('disconnect', (packet) => { console.log(`Disconnected from ${serverId}: ${packet.reason}`); delete this.clients[serverId]; // Remove client on disconnect }); client.on('error', (err) => { console.error(`Error on ${serverId}: ${err}`); delete this.clients[serverId]; // Remove client on error }); return client; } getClient(serverId) { return this.clients[serverId]; } removeClient(serverId) { if (this.clients[serverId]) { this.clients[serverId].end(); // Disconnect the client delete this.clients[serverId]; } } } module.exports = new MCPManager(); ``` **4. `routes/minecraft.js` (Express Routes)** ```javascript const express = require('express'); const router = express.Router(); const mcpManager = require('../mcp_manager'); const config = require('../config'); // Middleware to authenticate API key const authenticate = (req, res, next) => { const apiKey = req.headers['x-api-key']; const userId = req.query.userId; // Or get from body, params, etc. if (!apiKey || !userId || config.apiKeys[userId] !== apiKey) { return res.status(401).json({ error: 'Unauthorized' }); } req.userId = userId; // Store user ID for later use next(); }; // Route to create a Minecraft client router.post('/client/:serverId', authenticate, (req, res) => { const serverId = req.params.serverId; const username = req.body.username; const password = req.body.password; try { const client = mcpManager.createClient(serverId, username, password); res.status(201).json({ message: `Client created for ${serverId}` }); } catch (error) { console.error(error); res.status(500).json({ error: error.message }); } }); // Route to send a chat message router.post('/client/:serverId/chat', authenticate, (req, res) => { const serverId = req.params.serverId; const message = req.body.message; const client = mcpManager.getClient(serverId); if (!client) { return res.status(404).json({ error: `Client for ${serverId} not found` }); } client.write('chat', { message: message }); res.json({ message: 'Chat message sent' }); }); // Route to disconnect a client router.delete('/client/:serverId', authenticate, (req, res) => { const serverId = req.params.serverId; mcpManager.removeClient(serverId); res.json({ message: `Client for ${serverId} disconnected` }); }); module.exports = router; ``` **5. `server.js` (Main Express Server)** ```javascript const express = require('express'); const app = express(); const minecraftRoutes = require('./routes/minecraft'); const port = 3000; app.use(express.json()); // Parse JSON request bodies app.use('/minecraft', minecraftRoutes); app.listen(port, () => { console.log(`Server listening on port ${port}`); }); ``` **Explanation and Key Points** * **`config.js`:** Stores configuration data like Minecraft server details and API keys. **Never hardcode sensitive information directly into your code.** * **`mcp_manager.js`:** * Manages the creation, retrieval, and removal of MCP client instances. * Uses a `clients` object to store the clients, keyed by `serverId`. * Handles connection, disconnection, and error events for each client. This is crucial for maintaining a stable system. * **`routes/minecraft.js`:** * Defines the Express routes for interacting with the Minecraft clients. * **`authenticate` middleware:** This is a *critical* security measure. It checks for a valid API key before allowing access to the routes. Adapt this to your authentication needs. * `/client/:serverId`: Creates a new MCP client for the specified server. * `/client/:serverId/chat`: Sends a chat message to the specified server. * `/client/:serverId`: Disconnects the client for the specified server. * **`server.js`:** * Sets up the Express server and mounts the `minecraftRoutes`. * Includes `express.json()` middleware to parse JSON request bodies. **How to Run** 1. Save all the files. 2. Open a terminal in the project directory. 3. Run `node server.js`. **Example API Usage (using `curl`)** * **Create a client:** ```bash curl -X POST -H "Content-Type: application/json" -H "X-API-Key: some-secret-key" -d '{"username": "MyBot", "password": "MyPassword"}' "http://localhost:3000/minecraft/client/server1?userId=user1" ``` * **Send a chat message:** ```bash curl -X POST -H "Content-Type: application/json" -H "X-API-Key: some-secret-key" -d '{"message": "Hello, world!"}' "http://localhost:3000/minecraft/client/server1/chat?userId=user1" ``` * **Disconnect a client:** ```bash curl -X DELETE -H "X-API-Key: some-secret-key" "http://localhost:3000/minecraft/client/server1?userId=user1" ``` **Important Considerations and Enhancements** * **Error Handling:** The example includes basic error handling, but you should add more robust error handling throughout the code. Use `try...catch` blocks, log errors, and provide informative error messages to the user. * **Authentication:** The API key authentication is a simple example. For production environments, use a more secure authentication method like JWT (JSON Web Tokens) or OAuth 2.0. * **Rate Limiting:** Implement rate limiting to prevent abuse of your API. This can be done using middleware like `express-rate-limit`. * **Logging:** Use a logging library (like `winston` or `morgan`) to log requests, errors, and other important events. This will help you debug and monitor your application. * **Scalability:** For high-traffic applications, consider using a message queue (like RabbitMQ or Kafka) to handle requests asynchronously. This will prevent your Express server from becoming overloaded. You could also use a load balancer to distribute traffic across multiple instances of your Express server. * **Minecraft Protocol Library:** The example uses `minecraft-protocol`. You can also use `prismarine-proxy` or other libraries. Choose the library that best suits your needs. `prismarine-proxy` is often used for more advanced proxying scenarios. * **Data Validation:** Validate the data that you receive from the user (e.g., username, password, message). This will help prevent errors and security vulnerabilities. Use a library like `joi` or `express-validator`. * **Minecraft Server Version Compatibility:** Minecraft protocols change with each version. Make sure your chosen library supports the Minecraft server versions you want to connect to. You might need to handle different protocol versions. * **Proxying vs. Adapting:** * **Proxying:** Simply forwards the raw Minecraft protocol packets between the client and the server. This is more efficient but requires more knowledge of the Minecraft protocol. `prismarine-proxy` is well-suited for this. * **Adapting:** Translates the requests into a different format (e.g., HTTP) and then converts them back into Minecraft protocol packets. This is easier to implement but can be less efficient. The example above is more of an adapter. * **Command Handling:** Instead of just sending chat messages, you can implement a more sophisticated command handling system. This would allow users to execute commands on the Minecraft server through your API. * **WebSockets:** Consider using WebSockets for real-time communication between the client and the Minecraft server. This would allow you to send updates to the client as they happen (e.g., player positions, chat messages). **Example using `prismarine-proxy` (Conceptual)** ```javascript const prismarineProxy = require('prismarine-proxy'); const express = require('express'); const app = express(); app.get('/proxy/:host/:port', (req, res) => { const host = req.params.host; const port = parseInt(req.params.port); prismarineProxy.createProxy({ host: host, port: port, // Options for the proxy (e.g., custom login handling) }); res.send(`Proxy created for ${host}:${port}`); }); app.listen(3000, () => { console.log('Proxy server listening on port 3000'); }); ``` This `prismarine-proxy` example is *very* basic. You'd need to add authentication, client management, and more sophisticated handling of the proxy events. `prismarine-proxy` gives you more control over the raw Minecraft protocol packets. **In summary, building a robust Minecraft proxy/adapter requires careful planning, security considerations, and a good understanding of the Minecraft protocol. Start with a simple example and gradually add features as needed.**
🚀 Build Custom MCP Servers 📝☀️📰
GitHub MCP Server
镜子 (jìng zi)
VLC MCP Server
一个 MCP (模型上下文协议) 服务器,用于使用 VLC 播放和控制电影。
MCP Server for cli-kintone
这是一个实验性的代码仓库,其验证的初衷是:是否可以将 cli-kintone 改造成 MCP (模型上下文协议) 服务器。
redis-mcp-server
Google Image Search MCP Server
用于集成谷歌图片搜索的 MCP 服务器 (Yòng yú jíchéng Gǔgē Túpian Sōusuǒ de MCP fúwùqì)
Linear MCP Server
镜子 (jìng zi)
mcp-server
一个基于 Nasdanika (AI) 能力构建的 MCP 服务器
Infactory MCP Server
Infactory MCP 服务器 (Infactory MCP fúwùqì)
MD2Card MCP 服务器
Blockscout MCP Server
MCP Notify Server
Quick Chart MCP Server
一个模型上下文协议 (MCP) 服务器,提供图表工具,使其可以通过标准化的接口与快速图表进行交互。 此实现基于图表定义,并使用户能够无缝打开快速图表页面。
kube-mcp
Kubernetes MCP (Machine Config Pool) servers can be translated as: **Kubernetes 机器配置池服务器** Here's a breakdown: * **Kubernetes (K8s):** Kubernetes (Kubernetes) * **MCP (Machine Config Pool):** 机器配置池 (Jīqì pèizhì chí) - This directly translates to "Machine Configuration Pool." * **servers:** 服务器 (Fúwùqì) Therefore, the complete translation is: **Kubernetes 机器配置池服务器**
zk-mcp
zk 的 MCP 服务器
MCP server implementation in Go
spring-ai-mcp-server
这个仓库包含用于 Spring AI Vibe 编码的演示 MCP 服务器。
MCP + openGauss
openGauss 数据库的 MCP 服务器及其工具
MCP Server
Neon MCP Server
镜子 (jìng zi)
zio-ella
Here are a few possible translations of "MCP framework for ZIO HTTP", depending on the specific nuance you want to convey. I'll provide explanations to help you choose the best fit: **1. (Most Literal, General): 用于 ZIO HTTP 的 MCP 框架** * **用于 (yòng yú):** Used for, for * **ZIO HTTP:** (Keeps the English name, as it's a specific library) * **的 (de):** Possessive particle (of) * **MCP 框架 (MCP kuàngjià):** MCP framework (Keeps the English name, as it's likely a specific framework) This is the safest and most straightforward translation. It's suitable if your audience is familiar with the terms "ZIO HTTP" and "MCP framework" or if you want to avoid any potential misinterpretations by translating them. **2. (Slightly More Descriptive): 基于 ZIO HTTP 的 MCP 框架** * **基于 (jī yú):** Based on, built upon * **ZIO HTTP:** (Keeps the English name) * **的 (de):** Possessive particle (of) * **MCP 框架 (MCP kuàngjià):** MCP framework (Keeps the English name) This emphasizes that the MCP framework *relies* on ZIO HTTP. It's a subtle difference, but it might be more appropriate if the framework is tightly integrated with ZIO HTTP. **3. (If "MCP" is an acronym and you know what it stands for, and it's commonly translated): 用于 ZIO HTTP 的 [Translated Acronym] 框架** * **用于 (yòng yú):** Used for, for * **ZIO HTTP:** (Keeps the English name) * **的 (de):** Possessive particle (of) * **[Translated Acronym] 框架 ([Translated Acronym] kuàngjià):** Replace `[Translated Acronym]` with the Chinese translation of what "MCP" stands for. For example, if MCP stood for "Message Control Protocol" and the Chinese translation of that was "消息控制协议 (xiāo xī kòng zhì xié yì)", then this would be: `用于 ZIO HTTP 的 消息控制协议 框架` **Important:** Only use this if you *know* the meaning of the acronym and there's a standard or widely accepted Chinese translation. Otherwise, stick with the English acronym. **4. (If you want to explain what MCP does in the context of ZIO HTTP): 用于 ZIO HTTP 的 [Description of MCP Functionality] 框架** * **用于 (yòng yú):** Used for, for * **ZIO HTTP:** (Keeps the English name) * **的 (de):** Possessive particle (of) * **[Description of MCP Functionality] 框架 ([Description of MCP Functionality] kuàngjià):** Replace `[Description of MCP Functionality]` with a brief description of what the MCP framework *does* in relation to ZIO HTTP. This is the most complex option and requires understanding the framework's purpose. For example, if the MCP framework is for managing request routing, you might say: `用于 ZIO HTTP 的 请求路由管理 框架` (qǐng qiú lù yóu guǎn lǐ kuàngjià - Request Routing Management Framework). **Recommendation:** Start with option **1 (用于 ZIO HTTP 的 MCP 框架)**. If you have more context about what "MCP" stands for and its function, consider options 3 or 4. Option 2 is a good alternative if the framework is tightly coupled with ZIO HTTP. To give you the *best* translation, please provide more information about what "MCP" stands for and what the framework does.
Webflow MCP Server Extension for Zed