Discover Awesome MCP Servers

Extend your agent with 84,517 capabilities via MCP servers.

All84,517
big-mcp-b3

big-mcp-b3

MCP server for B3 (Brazilian stock exchange) data, offering tools for real-time quotes, historical prices, dividends, FIIs, fundamental analysis, options, and indices via natural language.

MCP Registry Server

MCP Registry Server

Enables searching and retrieving detailed information about MCP servers from the official MCP registry. Provides tools to list servers with filtering options and get comprehensive details about specific servers.

Simple MCP Server

Simple MCP Server

了解了。以下是用极简代码演示如何构建 MCP (Mesh Configuration Protocol) Server 的示例,并附带一些解释。请注意,这只是一个非常基础的示例,用于说明 MCP 的核心概念。实际的 MCP Server 实现会更加复杂,需要处理更多细节,例如身份验证、授权、错误处理、版本控制等。 ```python # 导入必要的库 (这里我们使用 gRPC) import grpc from concurrent import futures # 假设你已经定义了 MCP 的 protobuf 定义 (例如,mcp.proto) # 并使用 `protoc` 生成了 Python 代码 # 例如: # protoc -I. --python_out=. mcp.proto # 导入生成的 protobuf 代码 import mcp_pb2 import mcp_pb2_grpc # 定义一个简单的 MCP 服务 class McpService(mcp_pb2_grpc.AggregatedDiscoveryServiceServicer): def StreamAggregatedResources(self, request_iterator, context): """ 处理来自客户端的资源请求流。 """ for request in request_iterator: print(f"Received request: {request}") # 在这里,你需要根据请求的内容,从你的数据源获取相应的资源。 # 为了简化,我们这里返回一个空的响应。 response = mcp_pb2.AggregatedDiscoveryResponse( version_info="1", # 资源的当前版本 resources=[], # 返回的资源列表 (这里为空) type_url=request.type_url, # 资源类型 URL nonce="some-nonce" # 用于跟踪请求/响应的 nonce ) yield response # 创建 gRPC 服务器 def serve(): server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) mcp_pb2_grpc.add_AggregatedDiscoveryServiceServicer_to_server(McpService(), server) server.add_insecure_port('[::]:50051') # 监听所有接口的 50051 端口 server.start() print("MCP Server started, listening on port 50051") server.wait_for_termination() if __name__ == '__main__': serve() ``` **代码解释:** 1. **导入必要的库:** - `grpc`: gRPC 库,用于构建 gRPC 服务。 - `concurrent.futures`: 用于创建线程池,处理并发请求。 - `mcp_pb2` 和 `mcp_pb2_grpc`: 从你的 `mcp.proto` 文件生成的 Python 代码。 你需要先定义 MCP 的 protobuf 定义,然后使用 `protoc` 编译器生成这些文件。 2. **定义 MCP 服务 (`McpService`):** - 继承 `mcp_pb2_grpc.AggregatedDiscoveryServiceServicer` 类,这是 gRPC 为 MCP 服务生成的基类。 - 实现 `StreamAggregatedResources` 方法。 这是 MCP Server 必须实现的唯一方法。 它处理来自客户端的资源请求流。 - 在 `StreamAggregatedResources` 方法中: - 循环遍历客户端发送的每个请求 (`request_iterator`)。 - 打印接收到的请求 (用于调试)。 - **关键部分:** 根据 `request.type_url` (资源类型) 和其他请求参数,从你的数据源 (例如数据库、配置文件、API 等) 获取相应的资源。 **这个示例中,我们为了简化,直接返回一个空的资源列表。** - 创建一个 `AggregatedDiscoveryResponse` 对象,包含: - `version_info`: 资源的当前版本。 - `resources`: 返回的资源列表。 - `type_url`: 资源类型 URL (与请求中的 `type_url` 相同)。 - `nonce`: 一个随机字符串,用于跟踪请求/响应。 - 使用 `yield` 关键字返回响应。 因为 `StreamAggregatedResources` 是一个流式方法,所以需要使用 `yield` 来逐个返回响应。 3. **创建 gRPC 服务器 (`serve` 函数):** - 创建一个 gRPC 服务器实例。 - 使用 `mcp_pb2_grpc.add_AggregatedDiscoveryServiceServicer_to_server` 将你的 `McpService` 实例注册到服务器。 - 使用 `server.add_insecure_port` 添加一个监听端口 (这里使用 50051 端口,并且是不安全的,仅用于演示)。 **在生产环境中,你应该使用 TLS 加密。** - 使用 `server.start` 启动服务器。 - 使用 `server.wait_for_termination` 等待服务器终止。 4. **运行服务器:** - `if __name__ == '__main__':` 确保只有在直接运行脚本时才执行 `serve` 函数。 **如何运行:** 1. **安装 gRPC:** ```bash pip install grpcio grpcio-tools protobuf ``` 2. **定义 `mcp.proto` 文件:** 创建一个名为 `mcp.proto` 的文件,并定义 MCP 的 protobuf 消息。 一个简单的例子: ```protobuf syntax = "proto3"; package envoy.service.discovery.v3; message AggregatedDiscoveryRequest { string version_info = 1; repeated string resource_names = 2; string type_url = 3; string response_nonce = 4; string error_detail = 5; // google.rpc.Status as JSON } message AggregatedDiscoveryResponse { string version_info = 1; repeated bytes resources = 2; // Any as bytes string type_url = 3; string nonce = 4; } service AggregatedDiscoveryService { rpc StreamAggregatedResources(stream AggregatedDiscoveryRequest) returns (stream AggregatedDiscoveryResponse) {} } ``` 3. **生成 Python 代码:** 使用 `protoc` 编译器从 `mcp.proto` 文件生成 Python 代码: ```bash python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. mcp.proto ``` 这会生成 `mcp_pb2.py` 和 `mcp_pb2_grpc.py` 文件。 4. **运行 Python 脚本:** ```bash python your_script_name.py ``` **重要注意事项:** * **Protobuf 定义:** `mcp.proto` 文件是 MCP 的核心。 你需要根据你的需求定义正确的消息类型和服务。 上面的例子只是一个非常简化的版本。 你应该参考 MCP 的官方文档或 Envoy 的 xDS 文档来了解更详细的 protobuf 定义。 * **资源获取:** `StreamAggregatedResources` 方法中的资源获取逻辑是 MCP Server 的关键部分。 你需要根据 `request.type_url` 和其他请求参数,从你的数据源获取相应的资源,并将它们序列化为 `bytes` (通常使用 `google.protobuf.Any` 消息类型)。 * **错误处理:** 在实际的 MCP Server 中,你需要处理各种错误情况,例如无效的请求、资源不存在、数据源错误等。 * **身份验证和授权:** 为了安全起见,你需要对 MCP 客户端进行身份验证和授权,以防止未经授权的访问。 * **版本控制:** MCP 使用 `version_info` 字段来跟踪资源的版本。 你需要正确地管理资源的版本,并在响应中返回正确的 `version_info`。 * **Nonce:** `nonce` 字段用于跟踪请求/响应。 客户端应该在请求中包含一个随机的 `nonce`,服务器应该在响应中返回相同的 `nonce`。 这可以帮助客户端检测重复的响应或丢失的响应。 * **流式处理:** MCP 使用 gRPC 的流式 API,这意味着客户端和服务器可以双向发送和接收消息流。 这允许客户端动态地请求资源,并允许服务器推送更新的资源。 这个示例提供了一个基本的框架,你可以根据你的具体需求进行扩展和修改。 建议你阅读 MCP 和 xDS 的官方文档,以了解更多细节。

MCPServer

MCPServer

Social Media Analytics

Social Media Analytics

Social media analytics toolkit that analyzes profiles, scores engagement, detects trending topics, researches hashtags, generates content calendars, and benchmarks against competitors. 6 tools across all major platforms.

K8s AI Assistant MCP Server

K8s AI Assistant MCP Server

Enables AI-powered Kubernetes management using natural language, supporting kubectl, Helm, diagnostics, and port forwarding via MCP protocol.

mcp-knowledge-server

mcp-knowledge-server

A production-grade RAG server with a centralized knowledge base, offering both MCP and REST APIs for semantic search, document ingestion, and RAG-based answers.

V.I.S.O.R.

V.I.S.O.R.

Smart MCP server that reads your code, understands file connections, and provides precise context to AI coding assistants, reducing token usage and preventing errors from outdated or irrelevant files.

Simple Python MCP Server

Simple Python MCP Server

A simple MCP server implementation in Python using FastMCP and FastAPI, providing streamable HTTP transport with optional OAuth authorization for tools like echo and math.

Security Scanner MCP Server

Security Scanner MCP Server

Enables comprehensive security scanning of code repositories to detect secrets, vulnerabilities, dependency issues, and configuration problems. Provides real-time security checks and best practice recommendations to help developers identify and prevent security issues.

self-healing-browser-mcp

self-healing-browser-mcp

Enables AI agents to control a browser with self-healing locators that automatically recover when selectors change, allowing reliable web automation through natural language.

mcp-reunion

mcp-reunion

MCP server providing 96 tools across 21 modules for La Réunion (French overseas region) open data: economy, demographics, geography, transport, health, education, elections, tourism, housing, and environment. Powered by data.regionreunion.com and data.gouv.fr.

aiowhitebit-mcp

aiowhitebit-mcp

MCP server for WhiteBit cryptocurrency exchange API, enabling market data retrieval, order book access, and real-time WebSocket streams.

SeniorCare MCP

SeniorCare MCP

This MCP server enables medicine management, stock/refill estimation, doctor search and availability checks, and appointment management for senior care scenarios.

ib-async-mcp

ib-async-mcp

An MCP server that provides an interface for the Interactive Brokers API via the ib_async library. It enables users to manage accounts, access real-time and historical market data, and execute or monitor trades through TWS or IB Gateway.

aws-mcp-connector

aws-mcp-connector

Talk to AWS CLI from an MCP-speaking agent. Run any aws <service> <operation> command through the Model Context Protocol, with read-only defaults and gated write access.

MCP Holyrics

MCP Holyrics

Enables control and automation of Holyrics presentation software through natural language commands for managing lyrics, media, schedules, and events. It provides specialized tools to search content and orchestrate church presentation workflows via the Holyrics API.

ap2-iso20022

ap2-iso20022

Bridges AP2 and x402 payment mandates into ISO 20022 pain.001/pacs.008 records with spending-cap, expiry and authorisation guardrails, via an MCP server.

C++ Graph-RAG MCP Server

C++ Graph-RAG MCP Server

A Model Context Protocol server for analyzing large C++ codebases with semantic search, crash dump analysis, and a web UI for configuration.

Oura Ring MCP Server

Oura Ring MCP Server

A Model Context Protocol server that provides access to Oura Ring health and fitness data through the Oura API v2, enabling retrieval of sleep, activity, readiness, and other health metrics.

GBrain for BOS

GBrain for BOS

This MCP server provides a cost-optimized personal-knowledge brain, enabling AI agents to query imported documents via hybrid search and synthesis at minimal monthly spend.

dbt-doctor

dbt-doctor

AI-driven MCP server that audits, profiles, detects schema drift, and auto-generates documentation for dbt projects, enabling natural language interaction with your dbt project's health.

mcp-pokemon

mcp-pokemon

Enables querying Pokémon data from PokéAPI, including stats, types, abilities, evolution chains, and type matchups, via natural language or direct tool calls.

ImHex MCP Integration

ImHex MCP Integration

Enables AI assistants to perform autonomous binary analysis, malware inspection, firmware analysis, and reverse engineering workflows through a production-ready Python MCP server connected to the ImHex hex editor.

agent-link

agent-link

Enables two coding agents on separate machines to communicate directly via a private git repo, with end-to-end encryption and no server required. Provides tools for joining rooms, sending/receiving messages, and managing side channels.

Drizz Voice Generator

Drizz Voice Generator

Enables text-to-speech audio generation using ElevenLabs voices directly from Claude conversations, supporting single and batch conversion, voice listing, and voice ID lookup.

agentkit-mesh

agentkit-mesh

Enables agent-to-agent discovery and delegation via MCP, with tools for registering agents, discovering them by keyword matching, and delegating tasks over HTTP.

memser

memser

Provides MCP agents with persistent memory operations (store, recall, forget, consolidate, list) backed by Redis, Postgres, and pgvector, including semantic search and background consolidation.

CAD MCP Server

CAD MCP Server

Enables reading, analyzing, and editing CAD files (DXF and DWG) via natural language, including entity queries, layer management, and safe copy-based edits.

Bridge MCP

Bridge MCP

A Model Context Protocol server that gives any AI full control over a Windows PC, enabling application control, mouse/keyboard automation, screen capture, browser automation, and more.