发现优秀的 MCP 服务器
通过 MCP 服务器扩展您的代理能力,拥有 18,496 个能力。
Gemini MCP Server
一个用于与 Google Gemini API 交互的模型上下文协议 (MCP) 服务器。
configfacets_mcp
Configfacets MCP 服务器 (Configfacets MCP fúwùqì)
Hyperliquid MCP Server v3
一个精简版的 Hyperliquid MCP 服务器,可以使用单个命令进行设置。
mcp-server-agenda
镜子 (jìng zi)
MCP Server - Natural Language API Gateway for z-ap-server
Solana Mcp
Solana Agent Kit MCP 服务器
MCP Server for Flomo
🚀 MCP Tester
它基本上是一个 MCP 服务器或客户端测试应用程序。
Chrome MCP Server
MCP 服务器与 Chrome 交互
Apple Music MCP Server
一个用于与 Apple Music API 交互的 MCP 服务器。
MCP Server for Confluence Integration
MCP for VuFind
一个用于 VuFind 的简单 MCP 服务器
weather-server MCP Server
Awesome MCP Servers
Free Image Generation MCP Server
这个 MCP 服务器使用 Together AI Flux Schnell 模型提供免费的图像生成服务。 可以根据需要更改模型以使用其他 Together AI 模型。
🧠 Advanced MCP Server Setup with
使用 uv、llama-index、ollama 和 Cursor IDE 进行高级 MCP 服务器设置
OpenAPI MCP Server
镜子 (jìng zi)
Test Repository
通过 MCP 服务器创建的测试仓库
hko_mcp
使用 MCP 从香港天文台获取数据
YouTube Transcript MCP Server
Fluent MCP
There isn't a single, pre-built Python package specifically designed to create Minecraft (MCP) servers with embedded Large Language Model (LLM) reasoning. You'll need to combine several existing packages and build the integration logic yourself. Here's a breakdown of the components you'll need and how you might approach it, along with potential package recommendations: **1. Minecraft Server Management:** * **Purpose:** This handles the core Minecraft server functionality: starting, stopping, managing players, executing commands, and receiving server events. * **Options:** * **`mcstatus`:** (Relatively simple) Primarily for querying server status (player count, MOTD, etc.). Less suitable for full server control. * **`minecraft-launcher-lib`:** (More complex, but powerful) Allows you to launch and manage Minecraft server instances programmatically. You can control the server process, read its output, and send commands. This is likely the best option for more advanced control. * **`pyminecraft`:** (Less actively maintained) Provides some server interaction capabilities, but might be outdated. * **Directly interacting with the server process:** You can use Python's `subprocess` module to launch the Minecraft server JAR file and communicate with it via standard input/output. This gives you the most control but requires more manual handling of server processes and command parsing. **2. Minecraft Protocol Handling:** * **Purpose:** This allows your Python code to understand and interact with the Minecraft network protocol. You'll need this to send commands to the server and receive information about the game world. * **Options:** * **`python-minecraft-protocol` (or `mcproto`):** A popular library for handling the Minecraft protocol. It allows you to connect to a Minecraft server as a client, send and receive packets, and interact with the game world. This is crucial for sending commands and receiving information from the server. * **`nbt`:** For reading and writing NBT (Named Binary Tag) data, which is used to store Minecraft world data, player data, and other information. You'll likely need this if you want to analyze or modify the game world. **3. LLM Integration:** * **Purpose:** This provides the interface to your chosen Large Language Model. * **Options:** * **`openai`:** For interacting with OpenAI's models (GPT-3, GPT-4, etc.). Requires an OpenAI API key. * **`transformers` (Hugging Face):** A very versatile library for working with a wide range of LLMs, including open-source models. You can use it to load pre-trained models or fine-tune your own. * **`cohere`:** For interacting with Cohere's LLMs. * **`llama-cpp-python`:** For running Llama 2 and other LLMs locally. This is useful if you want to avoid API costs and have more control over the model. * **LangChain:** A framework that simplifies the process of building applications with LLMs. It provides tools for chaining together different LLM calls, managing prompts, and integrating with external data sources. It can be very helpful for complex reasoning tasks. **4. Text Processing and Natural Language Understanding (NLU):** * **Purpose:** To parse player commands, extract relevant information, and format responses from the LLM. * **Options:** * **`spaCy`:** A powerful library for natural language processing. It can be used for tokenization, part-of-speech tagging, named entity recognition, and more. * **`NLTK` (Natural Language Toolkit):** Another popular NLP library with a wide range of features. * **Regular expressions (`re` module):** Useful for simple pattern matching and text extraction. **5. Asynchronous Programming (Optional but Recommended):** * **Purpose:** To handle multiple tasks concurrently (e.g., listening for server events, processing player commands, interacting with the LLM) without blocking the main thread. * **Options:** * **`asyncio`:** Python's built-in asynchronous programming library. * **`aiohttp`:** An asynchronous HTTP client/server library (useful if you're interacting with an LLM API over the network). **Conceptual Architecture:** 1. **Minecraft Server Management:** Use `minecraft-launcher-lib` (or `subprocess`) to start and manage the Minecraft server. 2. **Protocol Connection:** Use `python-minecraft-protocol` to connect to the server as a client. 3. **Command Handling:** * Listen for chat messages from players using `python-minecraft-protocol`. * Parse the chat messages using `spaCy` or regular expressions to identify commands and arguments. 4. **LLM Reasoning:** * Formulate a prompt for the LLM based on the player's command and any relevant game state information. * Send the prompt to the LLM using the `openai`, `transformers`, `cohere`, or `llama-cpp-python` library. * Receive the LLM's response. 5. **Action Execution:** * Parse the LLM's response to determine the appropriate action to take in the game world. * Use `python-minecraft-protocol` to send commands to the server to execute the action (e.g., `/give`, `/tp`, `/say`). * Send a response back to the player in the chat. **Example (Illustrative - Requires Significant Implementation):** ```python import asyncio import minecraft_launcher_lib from mcproto import MinecraftProtocol import openai import re # Configuration (replace with your actual values) SERVER_JAR = "server.jar" # Path to your Minecraft server JAR SERVER_PORT = 25565 OPENAI_API_KEY = "YOUR_OPENAI_API_KEY" async def main(): # 1. Start the Minecraft server # (Using minecraft-launcher-lib or subprocess) # ... (Implementation details omitted for brevity) # 2. Connect to the server using mcproto protocol = MinecraftProtocol("localhost", SERVER_PORT) await protocol.connect() await protocol.handshake() await protocol.login("LLMBot") # Bot's username # 3. Listen for chat messages async def handle_chat_message(packet): message = packet.data['content'] print(f"Received chat message: {message}") # Extract player name and command (very basic example) match = re.match(r"^<(\w+)> !(\w+)\s*(.*)$", message) if match: player_name = match.group(1) command = match.group(2) arguments = match.group(3) # 4. LLM Reasoning prompt = f"Player {player_name} issued command: {command} {arguments}. What should I do in Minecraft?" openai.api_key = OPENAI_API_KEY response = openai.Completion.create( engine="text-davinci-003", # Choose an appropriate model prompt=prompt, max_tokens=50, n=1, stop=None, temperature=0.7, ) llm_response = response.choices[0].text.strip() print(f"LLM Response: {llm_response}") # 5. Action Execution (very basic example) server_command = f"/say {llm_response}" await protocol.send_chat_message(server_command) # Assuming you have a send_chat_message function protocol.register_packet_listener("chat.message", handle_chat_message) # Keep the connection alive try: while True: await asyncio.sleep(1) except asyncio.CancelledError: pass finally: await protocol.disconnect() if __name__ == "__main__": asyncio.run(main()) ``` **Important Considerations:** * **Security:** Be extremely careful about executing commands based on LLM output. Implement robust validation and sanitization to prevent malicious commands from being executed. Consider using a whitelist of allowed commands. * **Rate Limiting:** LLM APIs often have rate limits. Implement appropriate rate limiting in your code to avoid exceeding these limits. * **Prompt Engineering:** The quality of the LLM's responses depends heavily on the prompts you provide. Experiment with different prompts to find what works best for your application. * **Error Handling:** Implement robust error handling to gracefully handle unexpected errors, such as network errors, API errors, and invalid LLM responses. * **Minecraft Server Configuration:** You may need to configure your Minecraft server to allow connections from your Python script. * **Performance:** LLM inference can be computationally expensive. Consider using techniques such as caching and batching to improve performance. Running the LLM locally (e.g., with `llama-cpp-python`) can reduce latency but requires significant computational resources. * **Ethical Considerations:** Be mindful of the potential ethical implications of using LLMs in a game environment. Consider how the LLM's behavior might affect players and ensure that it is used responsibly. This is a complex project, but by breaking it down into smaller components and using the appropriate libraries, you can create a powerful and engaging Minecraft server with embedded LLM reasoning. Good luck!
Ebay MCP server
镜子 (jìng zi)
Whimsical MCP Server
镜子 (jìng zi)
mcp-server-Sql
这是一个基于 Spring Boot 的 SQL 服务应用,用于执行 SQL 查询并将结果写入文件。该服务作为 Spring AI MCP (模型, 聊天, 提示) 框架的一部分,提供了 SQL 查询和更新操作的功能。
Layer2 MCP Server
Game Thinking MCP Server
esa-mcp-server
mcp-sonic-pi: MCP server for Sonic Pi
Sonic Pi 的 MCP 服务器
Notion MCP Server
官方 Notion MCP 服务器
Hello-MCP 🚀
一个简单的带有客户端和服务器的 MCP 演示