发现优秀的 MCP 服务器
通过 MCP 服务器扩展您的代理能力,拥有 10,066 个能力。
McpRails
在你的 Rails 应用中使用 MCP 服务器
smithy-mcp-server
strava-mcp
There are a few ways to interpret "MCP server for Strava," depending on what you're trying to achieve. Here are a few possibilities and their translations: **1. If you're looking for a server that *manages* or *processes* Strava data (like a custom application that interacts with the Strava API):** * **Chinese Translation:** 用于 Strava 的 MCP 服务器 (Yòng yú Strava de MCP fúwùqì) * **Explanation:** This translates to "MCP server for Strava." It's a general translation that implies the server is designed to work with Strava data. You'd need to specify *what* the server does to be more precise. **2. If "MCP" refers to a specific technology or protocol (which is less likely in the context of Strava):** * You'd need to provide more context about what "MCP" means. Without knowing what MCP stands for, I can't provide an accurate translation. **3. If you're looking for a server to *host* a Strava-related application:** * **Chinese Translation:** 用于托管 Strava 相关应用的服务器 (Yòng yú tuōguǎn Strava xiāngguān yìngyòng de fúwùqì) * **Explanation:** This translates to "Server for hosting Strava-related applications." This implies you want a server to run a website or application that uses Strava data. **4. If you're looking for a server to *store* Strava data:** * **Chinese Translation:** 用于存储 Strava 数据的服务器 (Yòng yú chǔcún Strava shùjù de fúwùqì) * **Explanation:** This translates to "Server for storing Strava data." **In summary, the best translation depends on the specific function of the "MCP server." Please provide more details about what you want the server to *do* with Strava data, and I can give you a more accurate and helpful translation.**
local-command-server MCP Server
一个基于 TypeScript 的 MCP 服务器,用于执行命令并返回结构化输出。
Claude Connect
一个符合 MCP 规范的外部连接器服务器,使 Claude 和其他 LLM 能够与 Web API、文件系统和自定义资源进行交互。
mcp-kagi-search
一个使用 npx 实现的 MCP 服务器,用于 Kagi 的 API,以便它可以轻松地在 n8n 中运行。
Mcp K8s Eye
用于 Kubernetes 管理和分析工作负载状态的 MCP 服务器
isolated-commands-mcp-server MCP Server
镜子 (jìng zi)
ESA MCP Server
用于 Claude Desktop 的 ESA.io 模型上下文协议服务器
GDB MCP Server
用于 GDB 调试的 MCP 服务器。
die-mcp
Detect-It-Easy MCP 服务器 (Detect-It-Easy MCP fúwùqì)
MCP Server
MCP 服务器 (MCP fúwùqì)
AGE-MCP-Server
镜子 (jìng zi)
arduino-mcp-server
用 Go 编写的 Arduino MCP 服务器
🎯 Kubernetes AI Management System
AI驱动的Kubernetes管理系统:一个将自然语言处理与Kubernetes管理相结合的平台。用户可以进行实时诊断、资源监控和智能日志分析。它通过对话式AI简化了Kubernetes管理,提供了一种现代化的替代方案。
Vault Mcp Server
YZi Labs 黑客马拉松的 Vault MCP 服务器仓库
Fugle MCP Server
Demo de MCP Servers con Chainlit
Mcp Server
Okay, here's an example of how you might structure a simple MCP (Minecraft Protocol) server in Python, designed to interact with a client (like a Minecraft game client) and tailored for use with Claude (or any other LLM) for potential game logic or content generation. This is a simplified example and doesn't cover all the complexities of the Minecraft protocol. It focuses on the core concepts. **Important Considerations:** * **Minecraft Protocol Complexity:** The Minecraft protocol is complex and version-dependent. This example is highly simplified and likely won't work directly with a modern Minecraft client without significant modification. You'll need to research the specific protocol version you want to support. * **Libraries:** Using a library like `mcstatus` or `python-minecraft-nbt` can greatly simplify working with the Minecraft protocol. However, for this example, I'll try to keep it relatively library-free to illustrate the core concepts. * **Security:** This example is for demonstration purposes only and is not secure. Do not expose this to the internet without proper security measures. * **Claude Integration:** The Claude integration is represented by placeholder comments. You'll need to use a Claude API client (e.g., Anthropic's Python SDK) to actually interact with Claude. ```python import socket import struct import json import threading # Configuration HOST = '127.0.0.1' # Localhost PORT = 25565 # Default Minecraft port (can be changed) # --- Minecraft Protocol Helper Functions --- def read_varint(sock): """Reads a Minecraft VarInt from the socket.""" result = 0 shift = 0 while True: byte = sock.recv(1) if not byte: return None # Connection closed byte = byte[0] result |= (byte & 0x7F) << shift shift += 7 if not (byte & 0x80): break return result def write_varint(sock, value): """Writes a Minecraft VarInt to the socket.""" while True: byte = value & 0x7F value >>= 7 if value != 0: byte |= 0x80 sock.send(bytes([byte])) if value == 0: break def read_string(sock): """Reads a Minecraft string (prefixed with a VarInt length).""" length = read_varint(sock) if length is None: return None data = sock.recv(length) return data.decode('utf-8') def write_string(sock, string): """Writes a Minecraft string (prefixed with a VarInt length).""" encoded = string.encode('utf-8') write_varint(sock, len(encoded)) sock.send(encoded) def pack_data(data_type, data): """Packs data according to the Minecraft data type.""" if data_type == "varint": return write_varint(data) elif data_type == "string": return write_string(data) elif data_type == "byte": return struct.pack("!b", data) elif data_type == "ubyte": return struct.pack("!B", data) elif data_type == "short": return struct.pack("!h", data) elif data_type == "ushort": return struct.pack("!H", data) elif data_type == "int": return struct.pack("!i", data) elif data_type == "long": return struct.pack("!q", data) elif data_type == "float": return struct.pack("!f", data) elif data_type == "double": return struct.pack("!d", data) elif data_type == "bool": return struct.pack("!?", data) else: raise ValueError(f"Unknown data type: {data_type}") def create_packet(packet_id, data): """Creates a Minecraft packet.""" packet_data = b"" for data_type, value in data: if data_type == "varint": packet_data += value elif data_type == "string": packet_data += value else: packet_data += pack_data(data_type, value) packet = b"" write_varint(packet, packet_id) packet += packet_data length = len(packet) packet_length = b"" write_varint(packet_length, length) return packet_length + packet # --- Packet Handling Functions --- def handle_handshake(sock): """Handles the initial handshake packet.""" protocol_version = read_varint(sock) server_address = read_string(sock) server_port = struct.unpack("!H", sock.recv(2))[0] # Unpack unsigned short (2 bytes) next_state = read_varint(sock) print(f"Handshake: Protocol {protocol_version}, Address {server_address}:{server_port}, Next State {next_state}") return next_state def handle_status_request(sock): """Handles the status request (ping).""" print("Status Request received") # Example status response (replace with dynamic data if needed) status = { "version": { "name": "My Claude Server", "protocol": 757 # Example protocol version }, "players": { "max": 10, "online": 0, "sample": [] }, "description": { "text": "A Minecraft server powered by Claude!" } } status_json = json.dumps(status) write_string(sock, status_json) # Send the packet packet_id = 0x00 # Status Response packet ID packet_data = [("string", status_json)] packet = create_packet(packet_id, packet_data) write_varint(sock, len(packet)) sock.sendall(packet) def handle_ping(sock): """Handles the ping request.""" payload = sock.recv(8) # 8-byte payload print(f"Ping received with payload: {payload}") # Send back the same payload packet_id = 0x01 # Pong packet ID packet_data = [("long", struct.unpack("!q", payload)[0])] packet = create_packet(packet_id, packet_data) write_varint(sock, len(packet)) sock.sendall(packet) def handle_login_start(sock): """Handles the login start packet (username).""" username = read_string(sock) print(f"Login Start: Username {username}") # --- Claude Integration Point --- # Here, you would send the username (and potentially other data) to Claude. # Claude could then generate a response, such as a welcome message, # a custom world seed, or even modify the player's starting inventory. # # Example (replace with actual Claude API call): # claude_response = claude.generate_response(f"Minecraft player joined: {username}") # print(f"Claude response: {claude_response}") # For now, just send a simple login success packet. uuid = "00000000-0000-0000-0000-000000000000" # Dummy UUID packet_id = 0x02 # Login Success packet ID packet_data = [("string", uuid), ("string", username)] packet = create_packet(packet_id, packet_data) write_varint(sock, len(packet)) sock.sendall(packet) # Example: Send a chat message to the player (after login) chat_message = {"text": f"Welcome to the server, {username}!"} chat_json = json.dumps(chat_message) packet_id = 0x0F # Chat Message packet ID (example) packet_data = [("string", chat_json), ("byte", 0), ("string", "00000000-0000-0000-0000-000000000000")] packet = create_packet(packet_id, packet_data) write_varint(sock, len(packet)) sock.sendall(packet) def handle_client(sock, addr): """Handles a single client connection.""" print(f"Accepted connection from {addr}") try: state = handle_handshake(sock) if state == 1: # Status handle_status_request(sock) handle_ping(sock) elif state == 2: # Login handle_login_start(sock) # After login, you would enter the "play" state and handle game packets. # This is where you'd receive player actions (movement, chat, etc.) # and send world updates. This is a very complex part of the protocol. while True: # Example: Receive a packet and print its ID (for debugging) packet_length = read_varint(sock) if packet_length is None: break # Connection closed packet_id = read_varint(sock) print(f"Received packet with ID: 0x{packet_id:02X}") # --- Claude Integration Point --- # You could send the packet data to Claude for analysis or processing. # For example, Claude could analyze chat messages, detect suspicious # player behavior, or generate new game events. # # Example: # claude_analysis = claude.analyze_packet(packet_id, packet_data) # print(f"Claude analysis: {claude_analysis}") else: print(f"Unknown state: {state}") except Exception as e: print(f"Error handling client: {e}") finally: print(f"Closing connection from {addr}") sock.close() # --- Main Server Loop --- def main(): """Main server function.""" server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # Allow address reuse server_socket.bind((HOST, PORT)) server_socket.listen(5) # Listen for up to 5 connections print(f"Listening on {HOST}:{PORT}") try: while True: sock, addr = server_socket.accept() client_thread = threading.Thread(target=handle_client, args=(sock, addr)) client_thread.start() except KeyboardInterrupt: print("Shutting down server...") finally: server_socket.close() if __name__ == "__main__": main() ``` **Explanation and Key Points:** 1. **Socket Setup:** The code creates a basic TCP socket server. 2. **Minecraft Protocol Functions:** * `read_varint`, `write_varint`: Minecraft uses VarInts (variable-length integers) for packet lengths and IDs. These functions handle reading and writing them. * `read_string`, `write_string`: Handle reading and writing strings, which are prefixed with a VarInt length. * `pack_data`: Packs data into bytes according to the specified Minecraft data type. * `create_packet`: Creates a Minecraft packet by combining the packet ID and data. 3. **Packet Handling:** * `handle_handshake`: Handles the initial handshake packet, which determines the client's intended state (status or login). * `handle_status_request`, `handle_ping`: Handle the status request (used to get server information) and the ping (used to measure latency). * `handle_login_start`: Handles the login start packet, which contains the player's username. **This is a key integration point for Claude.** 4. **Claude Integration (Placeholders):** * The `handle_login_start` function contains comments indicating where you would integrate with the Claude API. You would: * Send the player's username (and potentially other data) to Claude. * Receive a response from Claude. * Use Claude's response to customize the player's experience (e.g., generate a welcome message, modify the world, etc.). * The `handle_client` function also has a placeholder for Claude integration during the "play" state, where you could analyze player actions and generate dynamic game events. 5. **Threading:** Each client connection is handled in a separate thread, allowing the server to handle multiple clients concurrently. 6. **Error Handling:** Includes basic `try...except` blocks to catch potential errors. 7. **Simplified Protocol:** This example only implements a very small subset of the Minecraft protocol. It's enough to get a basic connection and login working, but it doesn't handle the full game logic. **To use this code:** 1. **Install Python:** Make sure you have Python 3 installed. 2. **Install Anthropic's Python SDK (if using Claude):** ```bash pip install anthropic ``` 3. **Replace Placeholders:** Replace the Claude integration placeholders with your actual Claude API calls. You'll need to set up an Anthropic API key. 4. **Run the Server:** Run the Python script. 5. **Connect with a Minecraft Client:** You'll need to use a Minecraft client that supports the protocol version you're targeting. You might need to modify the client or use a proxy to connect to this simplified server. **This is the tricky part, as the protocol is complex.** **Chinese Translation of Key Concepts:** * **Minecraft Protocol:** Minecraft 协议 (Minecraft Xiéyì) * **Server:** 服务器 (Fúwùqì) * **Client:** 客户端 (Kèhùduān) * **Packet:** 数据包 (Shùjùbāo) * **Handshake:** 握手 (Wòshǒu) * **Status:** 状态 (Zhuàngtài) * **Login:** 登录 (Dēnglù) * **VarInt:** 变长整数 (Biàn cháng zhěngshù) * **Socket:** 套接字 (Tàojiēzì) * **Thread:** 线程 (Xiànchéng) * **Claude Integration:** Claude 集成 (Claude Jíchéng) * **Protocol Version:** 协议版本 (Xiéyì Bǎnběn) * **Username:** 用户名 (Yònghùmíng) * **UUID:** 通用唯一识别码 (Tōngyòng Wéiyī Shìbiémǎ) **Example Chinese Comments for the Code:** ```python # --- Minecraft 协议助手函数 --- (Minecraft Protocol Helper Functions) def read_varint(sock): """从套接字读取 Minecraft 变长整数。""" # Reads a Minecraft VarInt from the socket. # ... def handle_login_start(sock): """处理登录开始数据包(用户名)。""" # Handles the login start packet (username). username = read_string(sock) print(f"登录开始: 用户名 {username}") # Login Start: Username {username} # --- Claude 集成点 --- (Claude Integration Point) # 在这里,你可以将用户名(以及其他数据)发送给 Claude。 # Claude 可以生成一个响应,例如欢迎消息、自定义世界种子, # 甚至修改玩家的起始物品栏。 # ... ``` This provides a starting point. Building a fully functional Minecraft server is a significant undertaking, but this example gives you a basic framework and highlights the areas where you can integrate Claude to add AI-powered features to your Minecraft world. Remember to consult the Minecraft protocol documentation for the specific version you are targeting. Good luck!
Model Context Protocol .NET Template
这个仓库包含一个用于在 .NET 中创建模型上下文协议 (MCP) 应用程序的模板。
Polarion MCP Servers
Polarion 的 MCP 服务器
MCPHub
用于人工智能服务的可嵌入模型上下文协议(MCP)解决方案。通过统一的界面,将 MCP 服务器与 OpenAI Agents、LangChain 和 Autogen 框架无缝集成。简化了不同人工智能应用中 MCP 工具的配置、设置和管理。
MCP Server for Spotify
一个 Spotify MCP 服务器 (Yī gè Spotify MCP fúwùqì)
MCP Server PostgreDB Finder
Sample Model Context Protocol Demos
好的,这是关于如何将模型上下文协议与 AWS 结合使用的一些示例: **总览** 模型上下文协议 (Model Context Protocol, MCP) 是一种标准化方法,用于将上下文信息传递给机器学习模型。这使得模型能够根据手头的任务更好地理解和响应。在 AWS 环境中,MCP 可以与各种服务集成,以增强模型的性能和可解释性。 **使用场景和示例** 以下是一些使用 MCP 与 AWS 结合的常见场景和示例: * **个性化推荐:** * **场景:** 构建一个推荐系统,根据用户的历史行为、人口统计信息和当前上下文(例如,一天中的时间、位置)来推荐产品或内容。 * **如何使用 MCP:** * 将用户历史行为、人口统计信息和上下文信息编码为 MCP 格式。 * 将 MCP 数据传递给您的推荐模型(例如,在 Amazon SageMaker 上部署的模型)。 * 模型使用 MCP 数据来生成个性化推荐。 * **AWS 服务:** Amazon Personalize, Amazon SageMaker, Amazon DynamoDB (存储用户数据), Amazon Location Service (获取位置信息) * **示例代码 (伪代码):** ```python # 假设我们已经从 DynamoDB 获取了用户数据,并从 Location Service 获取了位置信息 user_id = "user123" user_data = get_user_data_from_dynamodb(user_id) location_data = get_location_data_from_location_service(user_id) # 构建 MCP 数据 mcp_data = { "user_id": user_id, "user_history": user_data["purchase_history"], "user_age": user_data["age"], "location": location_data["city"], "time_of_day": "evening" } # 将 MCP 数据传递给 SageMaker 模型 response = sagemaker_endpoint.invoke(mcp_data) # 从响应中获取推荐结果 recommendations = response["recommendations"] ``` * **欺诈检测:** * **场景:** 检测金融交易中的欺诈行为,考虑交易金额、交易地点、用户行为模式等上下文信息。 * **如何使用 MCP:** * 将交易金额、交易地点、用户行为模式等信息编码为 MCP 格式。 * 将 MCP 数据传递给您的欺诈检测模型。 * 模型使用 MCP 数据来评估交易的欺诈风险。 * **AWS 服务:** Amazon Fraud Detector, Amazon SageMaker, Amazon Kinesis (实时数据流), Amazon DynamoDB (存储用户行为数据) * **示例代码 (伪代码):** ```python # 假设我们已经从 Kinesis 获取了实时交易数据 transaction_data = get_transaction_data_from_kinesis() # 构建 MCP 数据 mcp_data = { "transaction_amount": transaction_data["amount"], "transaction_location": transaction_data["location"], "user_behavior": get_user_behavior_from_dynamodb(transaction_data["user_id"]) } # 将 MCP 数据传递给 Fraud Detector 或 SageMaker 模型 fraud_score = fraud_detector.detect_fraud(mcp_data) # 或 sagemaker_endpoint.invoke(mcp_data) # 根据欺诈评分采取行动 if fraud_score > threshold: flag_transaction_as_fraudulent() ``` * **自然语言处理 (NLP):** * **场景:** 提高文本分类、情感分析或机器翻译等 NLP 任务的准确性,通过提供文档的上下文信息(例如,作者、来源、主题)。 * **如何使用 MCP:** * 将文档内容、作者、来源、主题等信息编码为 MCP 格式。 * 将 MCP 数据传递给您的 NLP 模型。 * 模型使用 MCP 数据来更好地理解文本并提高性能。 * **AWS 服务:** Amazon Comprehend, Amazon SageMaker, Amazon S3 (存储文档), Amazon Kendra (企业搜索) * **示例代码 (伪代码):** ```python # 假设我们已经从 S3 获取了文档 document = get_document_from_s3("s3://my-bucket/my-document.txt") # 构建 MCP 数据 mcp_data = { "document_content": document, "document_author": "John Doe", "document_source": "News Article", "document_topic": "Politics" } # 将 MCP 数据传递给 Comprehend 或 SageMaker 模型 sentiment = comprehend.detect_sentiment(mcp_data) # 或 sagemaker_endpoint.invoke(mcp_data) # 分析情感 print(f"Sentiment: {sentiment}") ``` * **图像识别:** * **场景:** 提高图像识别的准确性,通过提供图像的上下文信息(例如,拍摄地点、时间、天气)。 * **如何使用 MCP:** * 将图像数据、拍摄地点、时间、天气等信息编码为 MCP 格式。 * 将 MCP 数据传递给您的图像识别模型。 * 模型使用 MCP 数据来更好地识别图像中的对象。 * **AWS 服务:** Amazon Rekognition, Amazon SageMaker, Amazon S3 (存储图像), Amazon Location Service (获取位置信息) * **示例代码 (伪代码):** ```python # 假设我们已经从 S3 获取了图像 image = get_image_from_s3("s3://my-bucket/my-image.jpg") # 获取图像的元数据 (例如,通过 EXIF 数据) image_metadata = get_image_metadata(image) # 构建 MCP 数据 mcp_data = { "image_data": image, "location": image_metadata["location"], "time": image_metadata["time"], "weather": get_weather_data_from_location_service(image_metadata["location"]) } # 将 MCP 数据传递给 Rekognition 或 SageMaker 模型 objects = rekognition.detect_objects(mcp_data) # 或 sagemaker_endpoint.invoke(mcp_data) # 识别图像中的对象 print(f"Objects detected: {objects}") ``` **关键考虑因素:** * **数据格式:** 定义清晰的 MCP 数据格式,以便模型能够正确解析和使用上下文信息。 可以使用 JSON 或其他结构化数据格式。 * **数据量:** 考虑 MCP 数据的大小和复杂性,以及它对模型性能的影响。 优化数据传输和处理流程。 * **安全性:** 确保 MCP 数据的安全性,特别是当包含敏感信息时。 使用 AWS Identity and Access Management (IAM) 控制访问权限。 * **模型训练:** 在训练模型时,使用包含上下文信息的 MCP 数据,以便模型能够学习如何利用这些信息。 * **模型部署:** 确保模型部署环境能够接收和处理 MCP 数据。 可以使用 Amazon SageMaker Endpoints 或其他部署选项。 * **监控:** 监控模型的性能,并根据需要调整 MCP 数据或模型参数。 使用 Amazon CloudWatch 监控指标。 **总结:** 模型上下文协议 (MCP) 是一种强大的工具,可以提高机器学习模型的性能和可解释性。 通过将 MCP 与 AWS 服务集成,您可以构建更智能、更个性化的应用程序。 以上示例展示了 MCP 在不同场景下的应用,并提供了使用 AWS 服务的指导。 请根据您的具体需求进行调整和扩展。 希望这些示例对您有所帮助! 如果您有任何其他问题,请随时提出。
vscode-mcp-server
用于管理 VSCode 设置、扩展、代码片段等的 VSCode MCP 服务器
Bunnyshell MCP Server
GBox MCP Server
Gbox MCP 服务器
Browser Use MCP
AverbePorto-MCP
AverbePorto MCP 服务器 (AverbePorto MCP fúwùqì)