发现优秀的 MCP 服务器

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

全部27,858
codecortex

codecortex

Persistent codebase knowledge layer for AI agents. Pre-digests codebases into structured knowledge (symbols, dependency graphs, co-change patterns, architectural decisions) and serves via MCP. 28 languages, 14 tools, ~85% token reduction.

Polymarket MCP Tool

Polymarket MCP Tool

A Model Context Protocol server that enables interaction with Polymarket prediction markets through Claude Desktop.

nvim-mcp

nvim-mcp

Enables AI assistants to control running Neovim sessions via RPC socket, supporting command execution, state inspection, and LSP actions. Automatically discovers Neovim instances and supports multi-instance management on Linux and macOS.

Aegis-ZK

Aegis-ZK

On-chain trust verification for AI agent tools. Agents query skill attestations, audit levels, and risk scores before running third-party MCP servers, so you know what's safe before you execute.

A Simple MCP Server and Client

A Simple MCP Server and Client

Okay, here's a simple example of an MCP (Minecraft Communications Protocol) client and server in Python. This is a very basic example and doesn't implement the full MCP protocol, but it demonstrates the core concepts of sending and receiving data. **Important Considerations:** * **Security:** This example is *not* secure. It doesn't include any encryption or authentication. Do not use this in a production environment. * **Error Handling:** The error handling is minimal. A real-world implementation would need much more robust error handling. * **MCP Complexity:** The actual MCP protocol used by Minecraft is significantly more complex than this example. This is a simplified illustration. * **Python:** This example uses Python 3. **Server (server.py):** ```python import socket HOST = '127.0.0.1' # Standard loopback interface address (localhost) PORT = 25565 # Port to listen on (non-privileged ports are > 1023) def handle_client(conn, addr): print(f"Connected by {addr}") while True: try: data = conn.recv(1024) # Receive up to 1024 bytes if not data: break # Client disconnected decoded_data = data.decode('utf-8') print(f"Received from {addr}: {decoded_data}") # Echo the data back to the client (in uppercase) response = decoded_data.upper().encode('utf-8') conn.sendall(response) except ConnectionResetError: print(f"Client {addr} forcibly disconnected.") break except Exception as e: print(f"Error handling client {addr}: {e}") break conn.close() print(f"Connection with {addr} closed.") def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() print(f"Server listening on {HOST}:{PORT}") while True: conn, addr = s.accept() handle_client(conn, addr) # Handle each client in the main thread (for simplicity) if __name__ == "__main__": main() ``` **Client (client.py):** ```python import socket HOST = '127.0.0.1' # The server's hostname or IP address PORT = 25565 # The port used by the server def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: try: s.connect((HOST, PORT)) print(f"Connected to {HOST}:{PORT}") message = "Hello, MCP Server!" s.sendall(message.encode('utf-8')) data = s.recv(1024) print(f"Received: {data.decode('utf-8')}") except ConnectionRefusedError: print("Connection refused. Is the server running?") except Exception as e: print(f"An error occurred: {e}") print("Client finished.") if __name__ == "__main__": main() ``` **How to Run:** 1. **Save:** Save the server code as `server.py` and the client code as `client.py`. 2. **Run the Server:** Open a terminal or command prompt and navigate to the directory where you saved the files. Run the server: ```bash python server.py ``` 3. **Run the Client:** Open another terminal or command prompt (in the same directory) and run the client: ```bash python client.py ``` **Explanation:** * **`socket` Module:** The `socket` module is Python's standard library for network communication. * **Server:** * Creates a socket, binds it to an address (IP and port), and listens for incoming connections. * `s.accept()`: Accepts a connection, creating a new socket (`conn`) for communication with that specific client. * `conn.recv(1024)`: Receives data from the client (up to 1024 bytes at a time). * `conn.sendall(response)`: Sends data back to the client. * `conn.close()`: Closes the connection with the client. * **Client:** * Creates a socket and connects to the server's address. * `s.sendall(message.encode('utf-8'))`: Sends a message to the server. The message is encoded into bytes using UTF-8. * `s.recv(1024)`: Receives data from the server. * `data.decode('utf-8')`: Decodes the received bytes back into a string. * `s.close()`: Closes the connection. * **Encoding/Decoding:** Data sent over a socket must be in bytes. The `.encode('utf-8')` method converts a string to bytes using UTF-8 encoding. The `.decode('utf-8')` method converts bytes back to a string. * **`with socket.socket(...) as s:`:** This uses a context manager to ensure that the socket is properly closed when the `with` block exits, even if errors occur. **What you'll see:** * **Server Output:** The server will print "Server listening..." and then, when the client connects, it will print "Connected by..." and the client's address. It will then print the message received from the client and the address of the client. Finally, it will print "Connection with... closed." * **Client Output:** The client will print "Connected to..." and then "Received:..." followed by the uppercase version of the message it sent. Finally, it will print "Client finished." **To make it more like MCP (but still simplified):** 1. **Data Structures:** Instead of just sending strings, you'd need to define data structures (e.g., using `struct` module in Python) to represent the different types of packets that MCP uses. 2. **Packet IDs:** Each packet type has an ID. The client and server need to agree on these IDs. 3. **Handshaking:** MCP has a handshake process where the client and server exchange information about the protocol version they are using. 4. **State Management:** The server needs to keep track of the client's state (e.g., whether the client is logged in, what world the client is in). 5. **Compression/Encryption:** MCP uses compression and encryption for performance and security. This example provides a basic foundation. Building a real MCP implementation is a complex task. --- **Chinese Translation (Simplified Chinese):** 这是一个简单的 MCP (Minecraft 通讯协议) 客户端和服务器的例子,使用 Python 编写。 这是一个非常基础的例子,并没有实现完整的 MCP 协议,但它演示了发送和接收数据的核心概念。 **重要注意事项:** * **安全性:** 这个例子 *不* 安全。 它不包含任何加密或身份验证。 请勿在生产环境中使用它。 * **错误处理:** 错误处理非常少。 实际应用需要更强大的错误处理。 * **MCP 复杂性:** Minecraft 实际使用的 MCP 协议比这个例子复杂得多。 这是一个简化的说明。 * **Python:** 这个例子使用 Python 3。 **服务器 (server.py):** ```python import socket HOST = '127.0.0.1' # 标准回环接口地址 (localhost) PORT = 25565 # 监听端口 (非特权端口 > 1023) def handle_client(conn, addr): print(f"Connected by {addr}") while True: try: data = conn.recv(1024) # 接收最多 1024 字节 if not data: break # 客户端断开连接 decoded_data = data.decode('utf-8') print(f"Received from {addr}: {decoded_data}") # 将数据回显给客户端 (转换为大写) response = decoded_data.upper().encode('utf-8') conn.sendall(response) except ConnectionResetError: print(f"Client {addr} forcibly disconnected.") break except Exception as e: print(f"Error handling client {addr}: {e}") break conn.close() print(f"Connection with {addr} closed.") def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.bind((HOST, PORT)) s.listen() print(f"Server listening on {HOST}:{PORT}") while True: conn, addr = s.accept() handle_client(conn, addr) # 在主线程中处理每个客户端 (为了简单起见) if __name__ == "__main__": main() ``` **客户端 (client.py):** ```python import socket HOST = '127.0.0.1' # 服务器的主机名或 IP 地址 PORT = 25565 # 服务器使用的端口 def main(): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: try: s.connect((HOST, PORT)) print(f"Connected to {HOST}:{PORT}") message = "Hello, MCP Server!" s.sendall(message.encode('utf-8')) data = s.recv(1024) print(f"Received: {data.decode('utf-8')}") except ConnectionRefusedError: print("Connection refused. Is the server running?") except Exception as e: print(f"An error occurred: {e}") print("Client finished.") if __name__ == "__main__": main() ``` **如何运行:** 1. **保存:** 将服务器代码保存为 `server.py`,将客户端代码保存为 `client.py`。 2. **运行服务器:** 打开终端或命令提示符,导航到保存文件的目录。 运行服务器: ```bash python server.py ``` 3. **运行客户端:** 打开另一个终端或命令提示符(在同一目录下),然后运行客户端: ```bash python client.py ``` **解释:** * **`socket` 模块:** `socket` 模块是 Python 的标准库,用于网络通信。 * **服务器:** * 创建一个套接字,将其绑定到地址(IP 和端口),并监听传入的连接。 * `s.accept()`:接受连接,创建一个新的套接字 (`conn`) 用于与该特定客户端通信。 * `conn.recv(1024)`:从客户端接收数据(一次最多 1024 字节)。 * `conn.sendall(response)`:将数据发送回客户端。 * `conn.close()`:关闭与客户端的连接。 * **客户端:** * 创建一个套接字并连接到服务器的地址。 * `s.sendall(message.encode('utf-8'))`:向服务器发送消息。 该消息使用 UTF-8 编码转换为字节。 * `s.recv(1024)`:从服务器接收数据。 * `data.decode('utf-8')`:将接收到的字节解码回字符串。 * `s.close()`:关闭连接。 * **编码/解码:** 通过套接字发送的数据必须是字节。 `.encode('utf-8')` 方法使用 UTF-8 编码将字符串转换为字节。 `.decode('utf-8')` 方法将字节转换回字符串。 * **`with socket.socket(...) as s:`:** 这使用上下文管理器来确保在 `with` 块退出时正确关闭套接字,即使发生错误也是如此。 **你会看到什么:** * **服务器输出:** 服务器将打印 "Server listening...",然后,当客户端连接时,它将打印 "Connected by..." 和客户端的地址。 然后它将打印从客户端收到的消息和客户端的地址。 最后,它将打印 "Connection with... closed." * **客户端输出:** 客户端将打印 "Connected to...",然后打印 "Received:...",后跟它发送的消息的大写版本。 最后,它将打印 "Client finished." **为了使其更像 MCP(但仍然简化):** 1. **数据结构:** 不是只发送字符串,你需要定义数据结构(例如,使用 Python 中的 `struct` 模块)来表示 MCP 使用的不同类型的包。 2. **数据包 ID:** 每种数据包类型都有一个 ID。 客户端和服务器需要就这些 ID 达成一致。 3. **握手:** MCP 有一个握手过程,客户端和服务器交换有关他们正在使用的协议版本的信息。 4. **状态管理:** 服务器需要跟踪客户端的状态(例如,客户端是否已登录,客户端位于哪个世界)。 5. **压缩/加密:** MCP 使用压缩和加密来提高性能和安全性。 这个例子提供了一个基本的基础。 构建真正的 MCP 实现是一项复杂的任务。

VeoMCP

VeoMCP

Google Veo AI video generation with text-to-video, image-to-video, multi-image fusion, 1080p upscaling, and multiple quality/speed models.

brainlayer

brainlayer

Local-first persistent memory layer for AI agents. Provides hybrid search (FTS5 keyword + vector embeddings) over 223K+ knowledge chunks via MCP. Tools: brain_search, brain_store, brain_entity, brain_subscribe. Features pub/sub with stable agent identity, delivery tracking, and Claude --channels integration. SQLite + BrainBar Swift daemon on Unix socket.

MCP-Typebot

MCP-Typebot

Powerful Model Context Protocol server for managing Typebot chatbots, enabling operations like authentication, creating, updating, listing, and publishing bots through a standardized JSON interface.

llm-mcp-server-template

llm-mcp-server-template

LLM-MCP 服务器的模板项目

mcptool

mcptool

A drop-in MCP proxy that aggregates multiple backend servers into two meta-tools for efficient tool discovery and execution. It enables AI clients to access hundreds of tools while minimizing context window usage through searchable indexing.

Z3 Theorem Prover with Functional Programming

Z3 Theorem Prover with Functional Programming

用于 z3 定理证明器的 MCP 服务器

MCP Servers Hub

MCP Servers Hub

发现有趣的 MCP 服务器和客户端。

CodeRAG

CodeRAG

A high-performance MCP server providing lightning-fast hybrid code search using TF-IDF and vector embeddings for AI assistants. It enables real-time codebase indexing and semantic retrieval with sub-50ms latency and offline support.

meta-mcp

meta-mcp

Enables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.

Trello MCP Server

Trello MCP Server

Enables seamless integration between Claude and Trello via Nango authentication. Allows managing boards, lists, cards, comments, and attachments through natural language commands with complete Trello API coverage.

Google Tasks MCP Server

Google Tasks MCP Server

Enables LLMs like Claude to manage Google Tasks by listing, creating, updating, completing, and deleting tasks and task lists, including setting due dates and notes.

WiseVision/mcp_server_ros_2

WiseVision/mcp_server_ros_2

Public implementation of MCP for ROS 2 enabling to interact with system visible various robots, capable of: List available topics List available services Call service Subscribe topic to get messages Publish message on topic and more

Union MCP

Union MCP

一个 MCP 服务器,允许 Claude 模型在对话中使用 Union 任务、工作流和应用程序作为工具。

MCP Server Example

MCP Server Example

A complete working example of Model Context Protocol servers that exposes tools and functions over streamable HTTP, allowing AI assistants like Cursor to access capabilities such as web search via Tavily.

akhq-mcp-server

akhq-mcp-server

用于 Kafka 监控工具 AKHQ 的实验性模型上下文协议服务器

ScrapeLab MCP

ScrapeLab MCP

Enables undetectable web scraping and browser automation for AI agents with 84 tools including stealth navigation, element extraction, network interception, and auto cookie consent dismissal. Bypasses anti-bot systems like Cloudflare and DataDome while providing LLM-ready markdown output and full Chrome DevTools Protocol access.

ArXiv MCP Server

ArXiv MCP Server

Enables AI assistants to search arXiv's research repository, download papers, and access their content programmatically. Includes specialized prompts for comprehensive academic paper analysis covering methodology, results, and implications.

R Econometrics MCP Server

R Econometrics MCP Server

Provides econometric modeling capabilities through R, enabling AI assistants to perform sophisticated analyses including linear regression, panel data models, instrumental variables regression, and diagnostic tests.

only_mcp

only_mcp

一个简单的原型 MCP v0.2 客户端和服务器实现

Zerodha MCP Server

Zerodha MCP Server

Enables trading operations on Zerodha platform through natural language, supporting account management, order placement/modification, portfolio holdings, positions, margins, and stock news retrieval.

Claude-to-Gemini MCP Server

Claude-to-Gemini MCP Server

Enables Claude to use Google Gemini as a secondary AI through MCP for large-scale codebase analysis and complex reasoning tasks. Supports both Gemini Flash and Pro models with specialized functions for general queries and comprehensive code analysis.

GitHub-Jira MCP Server

GitHub-Jira MCP Server

Enables secure integration between GitHub and Jira with permission controls, allowing users to manage repositories, create issues and pull requests, and handle Jira project workflows through natural language. Supports OAuth authentication and comprehensive security enforcement for both platforms.

codeix

codeix

Fast semantic code search for AI agents — find symbols, references, and callers across any codebase.

Azure AI Foundry MCP Server

Azure AI Foundry MCP Server

Enables interaction with Azure AI Foundry services for model exploration, deployment, and performance evaluation. It provides tools for managing knowledge bases via AI Search Service, executing fine-tuning jobs, and orchestrating AI agents through natural language.

Pydantic MCP Agent with Chainlit

Pydantic MCP Agent with Chainlit

这个仓库利用 MCP 服务器来无缝集成多个代理工具。