发现优秀的 MCP 服务器

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

研究与数据1,246
IoEHub MCP Time Server

IoEHub MCP Time Server

duck-duck-scrape-mcp

duck-duck-scrape-mcp

一个 MCP 服务器,用于通过 DuckDuckGo 提供(免费!)搜索结果

Recall Data Omnifeeds

Recall Data Omnifeeds

这个服务器使人工智能模型和代理能够通过统一的 MCP(模型上下文协议)服务器与多个精选来源的数据进行交互和搜索。

🌐 DocuMind MCP Server

🌐 DocuMind MCP Server

镜子 (jìng zi)

BioMed-MCP-Server

BioMed-MCP-Server

生物医学文献数据库的 MCP 服务器

Bocha AI Web Search MCP Server

Bocha AI Web Search MCP Server

Wandering RAG

Wandering RAG

一个个人 RAG 的 CLI 工具,可以从存储在 Qdrant 中的 Notion、Obsidian、Apple Notes 等数据中检索信息,并将其作为 MCP 服务器公开。

Whatismyip

Whatismyip

LLM_MCP

LLM_MCP

构建用于 LLM 的 MCP 客户端和服务器 (Gòu jiàn yòng yú LLM de MCP kèhùduān hé fúwùqì)

🚀 MCP Gemini Search

🚀 MCP Gemini Search

使用 Gemini 2.5 Pro 的模型上下文协议 (MCP)。使用 Gemini 的函数调用功能和 MCP 的航班搜索工具将对话式查询转换为航班搜索。

DeepSeek MCP Server

DeepSeek MCP Server

Okay, here's a basic outline and code snippet for a simple MCP (presumably meaning something like "Message Control Protocol" or "Message Coordination Proxy" in this context) server in Go that redirects questions to Deepseek models. I'll focus on the core functionality: receiving a request, forwarding it to a Deepseek model (assuming a Deepseek API endpoint), and returning the response. **Important Considerations and Assumptions:** * **Deepseek API:** This code assumes you have access to a Deepseek API endpoint that accepts a question (likely as a JSON payload) and returns a response (also likely as JSON). You'll need to replace the placeholder URL (`"https://api.deepseek.com/v1/completions"`) with the actual Deepseek API endpoint. You'll also need to handle authentication (API keys, etc.) as required by the Deepseek API. * **Error Handling:** The code includes basic error handling, but you'll want to expand it for production use. Consider logging errors, implementing retry mechanisms, and providing more informative error responses to the client. * **JSON Handling:** The code uses JSON for request and response serialization. Adjust the data structures if the Deepseek API uses a different format. * **Concurrency:** The code handles each request in a separate goroutine, allowing the server to handle multiple requests concurrently. * **Dependencies:** You'll need the `net/http` and `encoding/json` packages, which are part of the Go standard library. You might also need a package like `io/ioutil` for reading the response body. * **Security:** This is a *very* basic example. For production, you'll need to consider security aspects like input validation, rate limiting, and authentication/authorization. * **MCP Definition:** I'm assuming "MCP" is a custom term in your context. This code provides a simple proxy/redirector. If MCP has more specific requirements (e.g., message queuing, transformation, routing rules), you'll need to adapt the code accordingly. **Code Example (main.go):** ```go package main import ( "bytes" "encoding/json" "fmt" "io" "log" "net/http" "os" ) // RequestPayload represents the structure of the incoming request. Adjust as needed. type RequestPayload struct { Question string `json:"question"` } // ResponsePayload represents the structure of the response from Deepseek. Adjust as needed. type ResponsePayload struct { Answer string `json:"answer"` } // deepseekAPIEndpoint is a placeholder. Replace with the actual Deepseek API URL. const deepseekAPIEndpoint = "https://api.deepseek.com/v1/completions" // Replace with the actual Deepseek API endpoint // deepseekAPIKey is a placeholder. Replace with your actual Deepseek API key. const deepseekAPIKey = "YOUR_DEEPSEEK_API_KEY" // Replace with your actual Deepseek API key func main() { http.HandleFunc("/", handleRequest) port := os.Getenv("PORT") if port == "" { port = "8080" // Default port } fmt.Printf("Server listening on port %s\n", port) log.Fatal(http.ListenAndServe(":"+port, nil)) } func handleRequest(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodPost { http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) return } // Decode the incoming JSON request var requestPayload RequestPayload err := json.NewDecoder(r.Body).Decode(&requestPayload) if err != nil { http.Error(w, "Invalid request body: "+err.Error(), http.StatusBadRequest) return } // Forward the request to the Deepseek API deepseekResponse, err := forwardToDeepseek(requestPayload) if err != nil { http.Error(w, "Error forwarding to Deepseek: "+err.Error(), http.StatusInternalServerError) return } // Encode the Deepseek response as JSON and send it back to the client w.Header().Set("Content-Type", "application/json") err = json.NewEncoder(w).Encode(deepseekResponse) if err != nil { http.Error(w, "Error encoding response: "+err.Error(), http.StatusInternalServerError) return } } func forwardToDeepseek(requestPayload RequestPayload) (ResponsePayload, error) { // Prepare the request to Deepseek requestBody, err := json.Marshal(map[string]string{"prompt": requestPayload.Question}) // Adjust the payload as needed for Deepseek if err != nil { return ResponsePayload{}, fmt.Errorf("error marshaling request to Deepseek: %w", err) } req, err := http.NewRequest(http.MethodPost, deepseekAPIEndpoint, bytes.NewBuffer(requestBody)) if err != nil { return ResponsePayload{}, fmt.Errorf("error creating Deepseek request: %w", err) } req.Header.Set("Content-Type", "application/json") req.Header.Set("Authorization", "Bearer "+deepseekAPIKey) // Add API key if required // Send the request to Deepseek client := &http.Client{} resp, err := client.Do(req) if err != nil { return ResponsePayload{}, fmt.Errorf("error sending request to Deepseek: %w", err) } defer resp.Body.Close() // Read the response from Deepseek body, err := io.ReadAll(resp.Body) if err != nil { return ResponsePayload{}, fmt.Errorf("error reading Deepseek response: %w", err) } if resp.StatusCode != http.StatusOK { return ResponsePayload{}, fmt.Errorf("Deepseek API returned error: %s, status code: %d", string(body), resp.StatusCode) } // Decode the Deepseek response var deepseekResponse ResponsePayload err = json.Unmarshal(body, &deepseekResponse) if err != nil { return ResponsePayload{}, fmt.Errorf("error unmarshaling Deepseek response: %w", err) } return deepseekResponse, nil } ``` **How to Run:** 1. **Save:** Save the code as `main.go`. 2. **Dependencies:** Make sure you have Go installed. You don't need to install any external dependencies for this example, as it uses only the standard library. 3. **Replace Placeholders:** **Crucially, replace `"https://api.deepseek.com/v1/completions"` and `"YOUR_DEEPSEEK_API_KEY"` with the actual Deepseek API endpoint and your API key.** 4. **Run:** Open a terminal, navigate to the directory where you saved `main.go`, and run `go run main.go`. 5. **Test:** Use a tool like `curl` or Postman to send a POST request to `http://localhost:8080/` (or the port you configured). The request body should be JSON like this: ```json { "question": "What is the capital of France?" } ``` **Example `curl` command:** ```bash curl -X POST -H "Content-Type: application/json" -d '{"question": "What is the capital of France?"}' http://localhost:8080/ ``` **Explanation:** 1. **`main` Function:** * Sets up an HTTP handler that listens for requests on the root path (`/`). * Starts the HTTP server on port 8080 (or the port specified by the `PORT` environment variable). 2. **`handleRequest` Function:** * Checks if the request method is POST. * Decodes the JSON request body into a `RequestPayload` struct. * Calls `forwardToDeepseek` to send the question to the Deepseek API. * Encodes the Deepseek response as JSON and sends it back to the client. * Handles errors appropriately. 3. **`forwardToDeepseek` Function:** * Marshals the `RequestPayload` into a JSON payload suitable for the Deepseek API. **You'll need to adjust the structure of this payload to match the Deepseek API's requirements.** * Creates an HTTP request to the Deepseek API endpoint. * Sets the `Content-Type` header to `application/json`. * **Adds the Deepseek API key to the `Authorization` header (if required).** * Sends the request to the Deepseek API. * Reads the response from the Deepseek API. * Decodes the JSON response into a `ResponsePayload` struct. * Handles errors appropriately. **Chinese Translation of Key Concepts:** * **MCP Server:** MCP 服务器 (MCP fúwùqì) * **Redirect:** 重定向 (chóngdìngxiàng) * **Deepseek Model:** Deepseek 模型 (Deepseek móxíng) * **API Endpoint:** API 端点 (API duāndiǎn) * **JSON:** JSON (pronounced the same in Chinese) * **Request:** 请求 (qǐngqiú) * **Response:** 响应 (xiǎngyìng) * **Error Handling:** 错误处理 (cuòwù chǔlǐ) * **Concurrency:** 并发 (bìngfā) * **Authentication:** 身份验证 (shēnfèn yànzhèng) * **Authorization:** 授权 (shòuquán) * **Payload:** 负载 (fùzài) * **Goroutine:** Goroutine (pronounced the same in Chinese) **Further Improvements:** * **Configuration:** Use environment variables or a configuration file to store the Deepseek API endpoint, API key, and other settings. * **Logging:** Implement more robust logging using a library like `logrus` or `zap`. * **Metrics:** Add metrics to track the number of requests, response times, and error rates. * **Rate Limiting:** Implement rate limiting to prevent abuse of the Deepseek API. * **Caching:** Cache responses from the Deepseek API to improve performance and reduce costs. * **Health Checks:** Add a health check endpoint to monitor the server's status. * **Load Balancing:** If you need to handle a large volume of traffic, consider using a load balancer to distribute requests across multiple instances of the server. * **Input Validation:** Thoroughly validate the incoming `question` to prevent injection attacks or other security vulnerabilities. Remember to adapt the code to the specific requirements of the Deepseek API you are using. Good luck!

Agglayer MCP Server

Agglayer MCP Server

knowledge-graph-generator-mcp-server

knowledge-graph-generator-mcp-server

my-mcp-server

my-mcp-server

YouTube Transcript MCP Server

YouTube Transcript MCP Server

There are a few ways to approach building an MCP (Microservices Communication Protocol) server for fetching YouTube transcripts. Here's a breakdown of the concepts and potential implementations: **Understanding the Requirements** * **YouTube Data API:** You'll need to use the YouTube Data API to retrieve transcript information. This API requires authentication (API key or OAuth 2.0). * **Transcript Retrieval:** The API provides different ways to get transcripts: * **Automatic Transcripts (ASR):** Generated by YouTube's automatic speech recognition. These are often less accurate. * **Community Contributions:** Transcripts provided by the YouTube community. * **Official Transcripts:** Transcripts uploaded by the video creator. * **MCP (Microservices Communication Protocol):** This defines how your server will communicate with other microservices in your architecture. Common choices include: * **REST (HTTP):** Simple, widely understood. Good for basic operations. * **gRPC:** High-performance, uses Protocol Buffers for data serialization. Excellent for complex data structures and demanding performance. * **Message Queues (e.g., RabbitMQ, Kafka):** Asynchronous communication. Useful for decoupling services and handling large volumes of requests. * **Scalability and Reliability:** Consider how your server will handle a large number of requests and potential failures. * **Error Handling:** Implement robust error handling to gracefully deal with API errors, network issues, and invalid requests. **Implementation Options** Here are a few implementation options, focusing on different MCP approaches: **1. REST (HTTP) based MCP Server (Python with Flask/FastAPI)** * **Language:** Python (popular for API development) * **Framework:** Flask (simple) or FastAPI (modern, asynchronous) ```python # FastAPI example from fastapi import FastAPI, HTTPException from youtube_transcript_api import YouTubeTranscriptApi app = FastAPI() @app.get("/transcript/{video_id}") async def get_transcript(video_id: str, lang: str = 'en'): """ Fetches the transcript for a YouTube video. Args: video_id: The YouTube video ID. lang: The desired language of the transcript (default: 'en'). Returns: A list of transcript entries (text, start, duration). """ try: transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=[lang]) return transcript except Exception as e: raise HTTPException(status_code=500, detail=str(e)) if __name__ == "__main__": import uvicorn uvicorn.run(app, host="0.0.0.0", port=8000) ``` **Explanation:** * **`YouTubeTranscriptApi`:** This is a Python library that simplifies interacting with the YouTube transcript API. Install it with `pip install youtube-transcript-api`. * **`FastAPI`:** A modern, high-performance web framework for building APIs. * **`/transcript/{video_id}`:** An endpoint that accepts the YouTube video ID as a path parameter. * **`lang`:** An optional query parameter to specify the desired language. * **Error Handling:** The `try...except` block catches potential errors and returns an HTTP 500 error with a descriptive message. * **`uvicorn`:** An ASGI server to run the FastAPI application. **To use this:** 1. Install dependencies: `pip install fastapi uvicorn youtube-transcript-api` 2. Run the server: `python your_script_name.py` 3. Access the API: `http://localhost:8000/transcript/VIDEO_ID` (replace `VIDEO_ID` with the actual YouTube video ID). You can also specify the language: `http://localhost:8000/transcript/VIDEO_ID?lang=fr` **2. gRPC based MCP Server (Python with gRPC)** * **Language:** Python * **Framework:** gRPC **Steps:** 1. **Define the Protocol Buffer (.proto) file:** This defines the service and message structure. ```protobuf syntax = "proto3"; package youtube_transcript; service TranscriptService { rpc GetTranscript (TranscriptRequest) returns (TranscriptResponse) {} } message TranscriptRequest { string video_id = 1; string language = 2; } message TranscriptResponse { repeated TranscriptEntry entries = 1; } message TranscriptEntry { string text = 1; double start = 2; double duration = 3; } ``` 2. **Generate gRPC code:** Use the `grpc_tools.protoc` compiler to generate Python code from the `.proto` file. ```bash python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. youtube_transcript.proto ``` 3. **Implement the gRPC server:** ```python # youtube_transcript_server.py import grpc from concurrent import futures from youtube_transcript_api import YouTubeTranscriptApi import youtube_transcript_pb2 as youtube_transcript_pb2 import youtube_transcript_pb2_grpc as youtube_transcript_pb2_grpc class TranscriptServicer(youtube_transcript_pb2_grpc.TranscriptServiceServicer): def GetTranscript(self, request, context): try: transcript = YouTubeTranscriptApi.get_transcript(request.video_id, languages=[request.language]) entries = [] for entry in transcript: entries.append(youtube_transcript_pb2.TranscriptEntry( text=entry['text'], start=entry['start'], duration=entry['duration'] )) return youtube_transcript_pb2.TranscriptResponse(entries=entries) except Exception as e: context.abort(grpc.StatusCode.INTERNAL, str(e)) def serve(): server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) youtube_transcript_pb2_grpc.add_TranscriptServiceServicer_to_server(TranscriptServicer(), server) server.add_insecure_port('[::]:50051') server.start() server.wait_for_termination() if __name__ == '__main__': serve() ``` 4. **Implement the gRPC client (example):** ```python # youtube_transcript_client.py import grpc import youtube_transcript_pb2 as youtube_transcript_pb2 import youtube_transcript_pb2_grpc as youtube_transcript_pb2_grpc def get_transcript(video_id, language): with grpc.insecure_channel('localhost:50051') as channel: stub = youtube_transcript_pb2_grpc.TranscriptServiceStub(channel) request = youtube_transcript_pb2.TranscriptRequest(video_id=video_id, language=language) try: response = stub.GetTranscript(request) for entry in response.entries: print(f"[{entry.start:.2f} - {entry.start + entry.duration:.2f}] {entry.text}") except grpc.RpcError as e: print(f"Error: {e.details()}") if __name__ == '__main__': get_transcript("VIDEO_ID", "en") # Replace with a real video ID ``` **Explanation:** * **`.proto` file:** Defines the service (`TranscriptService`) and the messages (`TranscriptRequest`, `TranscriptResponse`, `TranscriptEntry`). * **`grpc_tools.protoc`:** Compiles the `.proto` file into Python code. * **`TranscriptServicer`:** Implements the `GetTranscript` method, which retrieves the transcript using `YouTubeTranscriptApi` and converts it into the gRPC response format. * **gRPC Client:** Connects to the server, sends a `TranscriptRequest`, and prints the received transcript entries. **To use this:** 1. Install dependencies: `pip install grpcio grpcio-tools protobuf youtube-transcript-api` 2. Compile the `.proto` file: `python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. youtube_transcript.proto` 3. Run the server: `python youtube_transcript_server.py` 4. Run the client: `python youtube_transcript_client.py` **3. Message Queue based MCP Server (Python with RabbitMQ/Kafka)** * **Language:** Python * **Message Queue:** RabbitMQ or Kafka **Conceptual Outline (RabbitMQ Example):** 1. **Producer (Client):** Sends a message to the queue with the video ID and language. 2. **Consumer (Server):** Listens to the queue, receives the message, fetches the transcript, and potentially publishes the transcript to another queue or stores it in a database. **RabbitMQ Example (Simplified):** * **Producer (Client):** ```python # producer.py import pika import json connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.queue_declare(queue='transcript_requests') message = {'video_id': 'VIDEO_ID', 'language': 'en'} # Replace with a real video ID channel.basic_publish(exchange='', routing_key='transcript_requests', body=json.dumps(message)) print(" [x] Sent %r" % message) connection.close() ``` * **Consumer (Server):** ```python # consumer.py import pika import json from youtube_transcript_api import YouTubeTranscriptApi connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.queue_declare(queue='transcript_requests') def callback(ch, method, properties, body): message = json.loads(body.decode('utf-8')) video_id = message['video_id'] language = message['language'] print(f" [x] Received request for video ID: {video_id}, language: {language}") try: transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=[language]) # Process the transcript (e.g., store in a database, publish to another queue) print(f" [x] Transcript fetched successfully for {video_id}") # Example: Print the first few lines for i in range(min(5, len(transcript))): print(transcript[i]) except Exception as e: print(f" [x] Error fetching transcript: {e}") channel.basic_consume(queue='transcript_requests', on_message_callback=callback, auto_ack=True) print(' [*] Waiting for messages. To exit press CTRL+C') channel.start_consuming() ``` **Explanation:** * **RabbitMQ:** A message broker that allows asynchronous communication between services. * **`transcript_requests` queue:** The queue where the client sends requests for transcripts. * **Producer:** Sends a JSON message containing the video ID and language to the queue. * **Consumer:** Listens to the queue, retrieves the message, fetches the transcript using `YouTubeTranscriptApi`, and processes the transcript. * **`auto_ack=True`:** Automatically acknowledges the message after it's processed. Consider using manual acknowledgements for more robust error handling. **To use this:** 1. Install RabbitMQ: Follow the instructions on the RabbitMQ website. 2. Install dependencies: `pip install pika youtube-transcript-api` 3. Run the consumer: `python consumer.py` 4. Run the producer: `python producer.py` **Key Considerations and Best Practices** * **API Key Management:** Store your YouTube Data API key securely (e.g., environment variables, secrets management). Never hardcode it in your code. * **Rate Limiting:** The YouTube Data API has rate limits. Implement retry logic with exponential backoff to handle rate limit errors gracefully. Consider caching transcripts to reduce API calls. * **Error Handling:** Implement comprehensive error handling to catch API errors, network issues, and invalid requests. Log errors for debugging. * **Asynchronous Operations:** For gRPC and message queue implementations, use asynchronous operations (e.g., `asyncio` in Python) to improve performance and scalability. * **Data Validation:** Validate the input (video ID, language) to prevent errors and security vulnerabilities. * **Logging:** Use a logging library (e.g., `logging` in Python) to log important events and errors. * **Monitoring:** Monitor the performance of your server (e.g., request latency, error rates) to identify and address issues. * **Security:** If your server handles sensitive data, implement appropriate security measures (e.g., authentication, authorization, encryption). * **Scalability:** Design your server to be scalable to handle a large number of requests. Consider using a load balancer and multiple instances of your server. * **Deployment:** Choose a suitable deployment environment (e.g., cloud platform, containerization with Docker). * **Caching:** Implement caching mechanisms (e.g., Redis, Memcached) to store frequently accessed transcripts and reduce the load on the YouTube Data API. Consider using a cache invalidation strategy. * **Transcript Availability:** Not all YouTube videos have transcripts available. Handle cases where a transcript is not found. * **Language Support:** The `YouTubeTranscriptApi` library supports multiple languages. Allow users to specify the desired language. * **Transcript Types:** Consider supporting different types of transcripts (automatic, community, official). The `YouTubeTranscriptApi` library provides methods to access different transcript types. **Choosing the Right Approach** * **REST (HTTP):** Good for simple use cases and when you need a widely accessible API. Easy to implement and debug. * **gRPC:** Best for high-performance communication between microservices. Requires more setup but offers significant performance benefits. * **Message Queue:** Ideal for asynchronous processing and decoupling services. Useful for handling large volumes of requests and ensuring that requests are processed even if one service is temporarily unavailable. The best approach depends on your specific requirements and the overall architecture of your microservices. Start with REST if you're unsure, and then consider gRPC or message queues if you need better performance or scalability. Remember to prioritize security, error handling, and rate limiting in all implementations.

FridayAI

FridayAI

帮助完成任务的AI游戏伙伴。

Multi-Model Advisor

Multi-Model Advisor

决策模型委员会 / 决策模型理事会

Clo MCP Plugin

Clo MCP Plugin

Clo MCP 插件是一个用 Clo3D SDK 构建的 C++ 应用程序。它在 Clo3D 中建立一个套接字服务器,允许大型语言模型 (LLM) 通过模型上下文协议 (MCP) 与 Clo3D 交互并控制它,从而实现高级 AI 辅助的服装设计和场景创建。

mcp-voice

mcp-voice

用于语音人工智能的 MCP 服务器,使用 OpenAI (Yòng yú yǔyīn réngōng zhìnéng de MCP fúwùqì, shǐyòng OpenAI)

A Pokedex web app!

A Pokedex web app!

宝可梦图鉴 Web 应用 (Bǎokěmèng tújiàn Web yìngyòng) Alternatively, a more concise translation: 宝可梦图鉴网页应用 (Bǎokěmèng tújiàn wǎngyè yìngyòng) Both translations convey the meaning of a Pokedex web application. The first is slightly more general, while the second specifically mentions it's a web *page* application.

Claud Coin ($CLAUD)

Claud Coin ($CLAUD)

$CLAUDE 去中心化 AI 开发生态系统

LI.FI MCP Server

LI.FI MCP Server

集成了 [LI.FI API]( 的 MCP 服务器

DadMCP

DadMCP

用于提供更优质家庭教育的远程MCP服务器

MCP Server for Milvus

MCP Server for Milvus

用于 Milvus 的模型上下文协议服务器

tsrs-mcp-server

tsrs-mcp-server

图灵交易 Rust MCP 服务器 (Túlíng jiāoyì Rust MCP fúwùqì) Or, more literally: Tushare Rust MCP 服务器 (Tushare Rust MCP fúwùqì) Which one is more appropriate depends on the context. If "tushare" is a general term and "rust mcp server" is a specific type of server used for trading, then the first translation is better. If "tushare" is a specific product or company name, then the second translation is better.

ETH Security MCP

ETH Security MCP

用于安全分析师、审计员和事件响应的 ETH MCP 服务器。

MCP-LLM Bridge

MCP-LLM Bridge

Ollama 和 MCP 服务器之间的桥梁,使本地 LLM 能够使用模型上下文协议 (Model Context Protocol) 工具。

Agentic-AI-Projects

Agentic-AI-Projects

关于本仓库:本仓库收录了一系列自主智能体(Agentic AI)项目,涵盖多个领域,展示了人工智能体在不同框架、技术和工具下的实际应用。

Patent_mcp_server

Patent_mcp_server

用于美国专利商标局 (USPTO) 数据的 FastMCP 服务器

Mcp Directory

Mcp Directory

发现用于 Claude 集成的 MCP 服务器和客户端