发现优秀的 MCP 服务器

通过 MCP 服务器扩展您的代理能力,拥有 14,364 个能力。

开发者工具3,065
mcp-servers-experiments

mcp-servers-experiments

这个仓库包含了我对 MCP 服务器的实验。

MCP Notes Server

MCP Notes Server

Cline Mcp Server Test

Cline Mcp Server Test

这是一个用于测试 Cline 和 MCP 服务器连接的仓库。

MCP Server Configuration

MCP Server Configuration

MCP 服务器配置文件 (MCP 服务器配置文件 could also be translated as: MCP 服务器配置檔案, which is more common in Traditional Chinese)

ms-365-mcp-server

ms-365-mcp-server

Microsoft 365 MCP 服务器

MCP-Go SDK

MCP-Go SDK

用 Go 编写的 MCP 服务器 SDK 以及我正在使用的一些服务器

MCP Server Example

MCP Server Example

Hello MCP Go 👋

Hello MCP Go 👋

用 Go 编写的 MCP 服务器 (Yòng Go biānxiě de MCP fúwùqì) This translates to: "MCP server written in Go"

Mcpserver

Mcpserver

一个 MCP 服务器示例

Gotoolkits_mcp Difyworkflow Server

Gotoolkits_mcp Difyworkflow Server

镜子 (jìng zi)

Model Context Protocol (MCP) Server

Model Context Protocol (MCP) Server

镜子 (jìng zi)

OpenAPI MCP ServerOpenAPI MCP Server

OpenAPI MCP ServerOpenAPI MCP Server

Slack MCP Server with SSE Transport

Slack MCP Server with SSE Transport

带有 SSE 传输的 Slack MCP 服务器

MCPInstructionServer

MCPInstructionServer

MCP HTTP Wrapper

MCP HTTP Wrapper

MCP Servers

MCP Servers

Here are my MCP servers and their support structure: (This is a direct translation, but depending on the context, you might want to add more nuance. For example, if you're talking about Minecraft servers, you might want to specify that.) 这是我的MCP服务器,以及它们的支持结构。 (Zhè shì wǒ de MCP fúwùqì, yǐjí tāmen de zhīchí jiégòu.) **Possible alternative, if you're talking about Minecraft servers:** 这是我的Minecraft服务器,以及它们的支持结构。 (Zhè shì wǒ de Minecraft fúwùqì, yǐjí tāmen de zhīchí jiégòu.)

Mcp_server_client

Mcp_server_client

Confluence MCP Server

Confluence MCP Server

镜子 (jìng zi)

Brewfather Mcp

Brewfather Mcp

MCP 服务器访问 Brewfather

Brand-to-Theme MCP Server

Brand-to-Theme MCP Server

用于将品牌标识 PDF 转换为 Shopify 主题的 MCP 服务器

Google Workspace MCP Server

Google Workspace MCP Server

MCP Servers

MCP Servers

Figma MCP Server

Figma MCP Server

Dynamics 365 MCP Server 🚀

Dynamics 365 MCP Server 🚀

Microsoft Dynamics 365 的 MCP 服务器 (Microsoft Dynamics 365 de MCP fúwùqì) Alternatively, depending on the context, you might also see: Microsoft Dynamics 365 的 MCP 服务器 (MCP 服务器通常指消息处理组件) (Microsoft Dynamics 365 de MCP fúwùqì (MCP fúwùqì tōngcháng zhǐ xiāoxī chǔlǐ zǔjiàn)) This second option adds a clarification that "MCP server" often refers to a message processing component. Choose the translation that best fits the specific situation.

Repo Explorer

Repo Explorer

MCP服务器,通过高级缓存实现高效的Git仓库探索。跨多个仓库搜索代码模式,管理参考代码库,并分析模式,性能提升95%以上。通过桌面应用程序或VSCode扩展与Claude AI集成。可配置且平台无关。

🚀 MCP-AI: Self-Learning API-to-cURL Model

🚀 MCP-AI: Self-Learning API-to-cURL Model

Linkup Model Context Protocol

Linkup Model Context Protocol

好的,这是 Linkup MCP 服务器的 JavaScript 版本: ```javascript const WebSocket = require('ws'); // Configuration const PORT = 8080; const HEARTBEAT_INTERVAL = 30000; // 30 seconds // Data Structures const clients = new Map(); // Map of client IDs to WebSocket objects const rooms = new Map(); // Map of room IDs to sets of client IDs // Helper Functions /** * Generates a unique ID. Simple for this example, but consider a more robust solution for production. * @returns {string} A unique ID. */ function generateId() { return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); } /** * Sends a message to a specific client. * @param {string} clientId The ID of the client to send the message to. * @param {object} message The message to send (will be JSON stringified). */ function sendMessage(clientId, message) { const client = clients.get(clientId); if (client && client.readyState === WebSocket.OPEN) { try { client.send(JSON.stringify(message)); } catch (error) { console.error(`Error sending message to client ${clientId}:`, error); } } else { console.warn(`Client ${clientId} not found or not connected.`); } } /** * Sends a message to all clients in a room. * @param {string} roomId The ID of the room. * @param {object} message The message to send (will be JSON stringified). * @param {string} [excludeClientId] Optional client ID to exclude from receiving the message. */ function broadcastToRoom(roomId, message, excludeClientId) { const room = rooms.get(roomId); if (room) { room.forEach(clientId => { if (clientId !== excludeClientId) { sendMessage(clientId, message); } }); } } /** * Handles client disconnection. * @param {string} clientId The ID of the disconnected client. */ function handleDisconnect(clientId) { console.log(`Client ${clientId} disconnected.`); // Remove client from clients map clients.delete(clientId); // Remove client from all rooms rooms.forEach((room, roomId) => { if (room.has(clientId)) { room.delete(clientId); if (room.size === 0) { rooms.delete(roomId); // Remove empty room console.log(`Room ${roomId} is now empty and has been removed.`); } else { // Notify other clients in the room about the departure broadcastToRoom(roomId, { type: 'clientLeft', clientId: clientId }, clientId); } } }); } // WebSocket Server Setup const wss = new WebSocket.Server({ port: PORT }); wss.on('connection', ws => { const clientId = generateId(); clients.set(clientId, ws); console.log(`Client ${clientId} connected.`); // Send the client their ID sendMessage(clientId, { type: 'clientId', clientId: clientId }); // Handle incoming messages ws.on('message', message => { try { const parsedMessage = JSON.parse(message); const type = parsedMessage.type; switch (type) { case 'createRoom': const roomId = generateId(); rooms.set(roomId, new Set([clientId])); sendMessage(clientId, { type: 'roomCreated', roomId: roomId }); console.log(`Client ${clientId} created room ${roomId}.`); break; case 'joinRoom': const roomIdToJoin = parsedMessage.roomId; if (rooms.has(roomIdToJoin)) { rooms.get(roomIdToJoin).add(clientId); sendMessage(clientId, { type: 'roomJoined', roomId: roomIdToJoin }); broadcastToRoom(roomIdToJoin, { type: 'clientJoined', clientId: clientId }, clientId); console.log(`Client ${clientId} joined room ${roomIdToJoin}.`); } else { sendMessage(clientId, { type: 'error', message: `Room ${roomIdToJoin} not found.` }); } break; case 'leaveRoom': const roomIdToLeave = parsedMessage.roomId; const roomToLeave = rooms.get(roomIdToLeave); if (roomToLeave && roomToLeave.has(clientId)) { roomToLeave.delete(clientId); sendMessage(clientId, { type: 'roomLeft', roomId: roomIdToLeave }); broadcastToRoom(roomIdToLeave, { type: 'clientLeft', clientId: clientId }, clientId); console.log(`Client ${clientId} left room ${roomIdToLeave}.`); if (roomToLeave.size === 0) { rooms.delete(roomIdToLeave); console.log(`Room ${roomIdToLeave} is now empty and has been removed.`); } } else { sendMessage(clientId, { type: 'error', message: `Client is not in room ${roomIdToLeave}.` }); } break; case 'message': const roomIdForMessage = parsedMessage.roomId; const messageContent = parsedMessage.content; broadcastToRoom(roomIdForMessage, { type: 'message', clientId: clientId, content: messageContent }, clientId); console.log(`Client ${clientId} sent message to room ${roomIdForMessage}: ${messageContent}`); break; case 'ping': // Respond to ping to keep the connection alive sendMessage(clientId, { type: 'pong' }); break; default: console.warn(`Unknown message type: ${type}`); sendMessage(clientId, { type: 'error', message: `Unknown message type: ${type}` }); } } catch (error) { console.error('Error parsing message:', error); sendMessage(clientId, { type: 'error', message: 'Invalid message format.' }); } }); // Handle client disconnection ws.on('close', () => { handleDisconnect(clientId); }); ws.on('error', error => { console.error(`WebSocket error for client ${clientId}:`, error); handleDisconnect(clientId); }); // Send a ping every HEARTBEAT_INTERVAL to keep the connection alive ws.isAlive = true; ws.on('pong', () => { ws.isAlive = true; }); }); // Heartbeat to check for dead connections setInterval(() => { wss.clients.forEach(ws => { if (ws.isAlive === false) { console.log("Terminating connection due to inactivity."); return ws.terminate(); } ws.isAlive = false; ws.ping(() => {}); }); }, HEARTBEAT_INTERVAL); console.log(`WebSocket server started on port ${PORT}`); ``` **Explanation and Key Improvements:** * **Dependencies:** Uses the `ws` package for WebSocket functionality. You'll need to install it: `npm install ws` * **Configuration:** `PORT` and `HEARTBEAT_INTERVAL` are configurable at the top. * **Data Structures:** * `clients`: A `Map` that stores client IDs as keys and their corresponding WebSocket objects as values. This allows you to easily look up a client's WebSocket connection by its ID. * `rooms`: A `Map` that stores room IDs as keys and `Set`s of client IDs as values. Using a `Set` ensures that each client ID appears only once in a room. * **`generateId()`:** A simple function to generate unique client and room IDs. **Important:** For production, use a more robust UUID generation library (e.g., `uuid`). The current implementation is sufficient for basic testing but is not guaranteed to be collision-free in a high-volume environment. * **`sendMessage(clientId, message)`:** A helper function to send a JSON-stringified message to a specific client. Includes error handling to catch potential issues during sending. Also checks if the client is still connected before attempting to send. * **`broadcastToRoom(roomId, message, excludeClientId)`:** A helper function to send a JSON-stringified message to all clients in a room, optionally excluding a specific client. * **`handleDisconnect(clientId)`:** Handles client disconnections gracefully. It removes the client from the `clients` map and from any rooms they were in. It also notifies other clients in the room that the client has left. Critically, it also removes empty rooms. * **WebSocket Server (`wss`)**: * **`connection` event:** Handles new WebSocket connections. * Generates a unique client ID. * Stores the client's WebSocket object in the `clients` map. * Sends the client their ID. * Sets up message handling, close handling, and error handling for the client. * **`message` event:** Handles incoming messages from clients. * Parses the message as JSON. * Uses a `switch` statement to handle different message types: * `createRoom`: Creates a new room and adds the client to it. * `joinRoom`: Adds the client to an existing room. * `leaveRoom`: Removes the client from a room. * `message`: Broadcasts a message to all other clients in the room. * `ping`: Responds to a ping message (for heartbeat). * Includes error handling for JSON parsing and unknown message types. * **`close` event:** Handles client disconnections. * **`error` event:** Handles WebSocket errors. * **Heartbeat (Ping/Pong):** Implements a heartbeat mechanism to detect and close dead connections. This is crucial for maintaining a stable connection with clients, especially in environments with unreliable networks. * A `setInterval` function sends a `ping` message to each client every `HEARTBEAT_INTERVAL`. * The `ws.isAlive` flag is set to `false` before sending the ping. * If the client responds with a `pong` message, the `ws.isAlive` flag is set back to `true`. * If the client doesn't respond within the interval, the connection is terminated. * **Error Handling:** Includes `try...catch` blocks to handle potential errors during message parsing and sending. Also logs errors to the console for debugging. * **Clear Logging:** Logs important events to the console, such as client connections, disconnections, room creation, joining, and leaving. * **Message Types:** Uses a consistent message format with a `type` field to identify the type of message. This makes it easier to handle different types of messages on both the server and the client. **How to Run:** 1. **Save:** Save the code as a `.js` file (e.g., `linkup_server.js`). 2. **Install `ws`:** `npm install ws` 3. **Run:** `node linkup_server.js` **Client-Side Example (Conceptual):** ```javascript // Client-side JavaScript (Conceptual - adapt to your framework) const ws = new WebSocket('ws://localhost:8080'); ws.onopen = () => { console.log('Connected to WebSocket server'); }; ws.onmessage = event => { const message = JSON.parse(event.data); console.log('Received message:', message); switch (message.type) { case 'clientId': console.log('My client ID is:', message.clientId); myClientId = message.clientId; // Store the client ID break; // Handle other message types (roomCreated, roomJoined, message, etc.) } }; ws.onclose = () => { console.log('Disconnected from WebSocket server'); }; ws.onerror = error => { console.error('WebSocket error:', error); }; function sendMessage(type, data) { ws.send(JSON.stringify({ type: type, ...data })); } // Example usage: // To create a room: // sendMessage('createRoom'); // To join a room: // sendMessage('joinRoom', { roomId: 'someRoomId' }); // To send a message to a room: // sendMessage('message', { roomId: 'someRoomId', content: 'Hello, everyone!' }); ``` **Important Considerations for Production:** * **Security:** * **HTTPS:** Use HTTPS (WSS) to encrypt the WebSocket connection. This is essential for protecting sensitive data. * **Authentication:** Implement authentication to verify the identity of clients. This can be done using various methods, such as JWTs or OAuth. * **Authorization:** Implement authorization to control what clients are allowed to do. For example, you might want to restrict access to certain rooms or features based on the client's role. * **Input Validation:** Validate all input from clients to prevent injection attacks. * **Scalability:** * **Load Balancing:** Use a load balancer to distribute traffic across multiple server instances. * **Horizontal Scaling:** Design the server to be horizontally scalable, so you can easily add more instances as needed. * **Message Broker:** Consider using a message broker (e.g., RabbitMQ, Kafka) to handle message distribution, especially if you need to support a large number of concurrent connections. * **Reliability:** * **Monitoring:** Implement monitoring to track the health and performance of the server. * **Logging:** Log all important events to a file or database for debugging and auditing. * **Error Handling:** Implement robust error handling to prevent crashes and ensure that the server can recover from errors gracefully. * **Heartbeats:** The heartbeat mechanism is crucial for detecting and closing dead connections. * **UUIDs:** Use a proper UUID library for generating unique IDs. * **Frameworks:** Consider using a WebSocket framework like Socket.IO or Primus. These frameworks provide higher-level abstractions and features that can simplify development and improve performance. However, for a basic MCP server, the `ws` library is often sufficient. This improved version provides a more robust and complete foundation for building a Linkup MCP server in JavaScript. Remember to adapt the code to your specific needs and requirements. Good luck!

MCP-Todoist Integration

MCP-Todoist Integration

用于自然语言任务管理的 Todoist 集成的 MCP 服务器

MCP Containers

MCP Containers

数百个 MCP 服务器的容器化版本 📡 🧠

Braintree MCP Server

Braintree MCP Server