Discover Awesome MCP Servers

Extend your agent with 12,280 capabilities via MCP servers.

All12,280
pocketbase-mcp-server MCP Server

pocketbase-mcp-server MCP Server

一个模型上下文协议(Model Context Protocol)服务器,它使 Claude AI 能够通过自然语言与 PocketBase 数据库交互,包括列出和访问集合。

simple-mcp-server

simple-mcp-server

一个简单的 MCP 服务器 (Yī gè jiǎndān de MCP fúwùqì)

SQLite MCP Server

SQLite MCP Server

一个模型上下文协议服务器,它通过一个标准化的接口,使用 SQLite 数据库来实现 SQL 操作(SELECT、INSERT、UPDATE、DELETE)和表管理。

MCP Manager

MCP Manager

一个简单的图形用户界面,用于管理 MCP 服务器,方便切换 MCP 服务器。

ClickUp MCP Server

ClickUp MCP Server

ClickUp MCP 服务器使 AI 助手能够无缝地与您的 ClickUp 工作区交互。这种强大的集成允许 Claude 通过自然对话创建和管理任务、访问文档、组织文件夹和列表、添加评论以及处理清单。

octomind mcp server for tools, resources and prompts

octomind mcp server for tools, resources and prompts

MCP服务器与Octomind平台交互。 Octomind为端到端Web测试提供创建、运行和修复解决方案,请访问https://octomind.dev。

MCP-Server

MCP-Server

Rust Docs MCP Server

Rust Docs MCP Server

镜子 (jìng zi)

Goal Story MCP Server

Goal Story MCP Server

一个人工智能驱动的目标管理系统,它将传统的目标追踪转变为故事叙述,通过个性化的叙事和见解,帮助用户一次专注于一个目标,从而提高动力和成就感。

WebDAV MCP Server

WebDAV MCP Server

一个模型上下文协议(Model Context Protocol,MCP)服务器,它使 Claude Desktop 和其他 MCP 客户端能够通过自然语言命令与 WebDAV 文件系统进行交互,以进行 CRUD(创建、读取、更新、删除)操作。

Plugin de Estatísticas de Uso de IA

Plugin de Estatísticas de Uso de IA

用于捕获 AI 代码助手使用情况统计信息的 MPC 服务器

My Tools MCP Server

My Tools MCP Server

MCP Custom Server

MCP Custom Server

使用 Model Context Protocol TypeScript SDK 的自定义 MCP 服务器实现

Simple Weather MCP Server example from Quickstart

Simple Weather MCP Server example from Quickstart

镜子 (jìng zi)

MCP Server for sensor device

MCP Server for sensor device

一个 Node.js 应用程序,提供一个 JSON-RPC 接口来与二氧化碳 (CO2) 传感器数据交互,既可以在模拟模式下运行,也可以与真实的 Raspberry Pi Pico 硬件连接一起工作。

PagerDuty MCP Server

PagerDuty MCP Server

一个服务器,它向大型语言模型(LLM)公开 PagerDuty API 的功能,并使用结构化的输入和输出,从而能够管理事件、服务、团队和用户。

Anthropic MCP Code Analyzer

Anthropic MCP Code Analyzer

用于分析开源项目并协助代码库集成的 MCP 服务器

MCP Figma to React Converter

MCP Figma to React Converter

将 Figma 设计稿转换为带有 TypeScript 和 Tailwind CSS 的 React 组件,通过从 Figma 文件中提取组件并将它们转换为可直接使用的代码来实现。

Ldoce MCP Server

Ldoce MCP Server

从朗文当代英语词典网站提取结构化的字典数据,并通过模型上下文协议提供服务,使人工智能代理能够访问详细的单词定义、示例和语言信息。

Medical_calculator_MCP

Medical_calculator_MCP

医疗计算的 MCP 服务器

Uniswap Trader MCP

Uniswap Trader MCP

一个用于 AI 代理的 MCP 服务器,可在多个区块链上的 Uniswap DEX 上自动执行代币交换。

PBIXRay MCP Server

PBIXRay MCP Server

一个模型上下文协议,使 AI 客户端能够通过 PBIXRay Python 包查询元数据,从而与 PowerBI 模型进行交互。

Remote MCP Server on Cloudflare

Remote MCP Server on Cloudflare

MCP server proxy

MCP server proxy

Okay, I understand. You want to extend the functionality of an MCP (Minecraft Protocol) server to also act as a worker in a distributed system. This means the server would not only handle Minecraft client connections but also perform tasks assigned to it by a central controller or manager. Here's a breakdown of the concepts, potential approaches, and considerations for achieving this, along with example code snippets (in Python, as it's commonly used for server-side scripting and automation): **1. Understanding the Core Concepts** * **MCP Server:** This is your existing Minecraft server (likely based on Spigot, Paper, Fabric, or a custom implementation). It handles player connections, game logic, and world management. * **Worker:** The extended MCP server will now also be a worker. A worker receives tasks from a central controller, executes those tasks, and reports the results back. * **Controller/Manager:** This is a separate application (or a module within the MCP server itself, though less ideal for scalability) that distributes tasks to the workers. It monitors worker status, assigns jobs, and collects results. * **Task:** A unit of work that the worker needs to perform. Examples: * Generating a specific region of the world. * Running a complex calculation related to game mechanics. * Performing automated actions (e.g., building structures). * Executing commands on the server. * **Communication:** The controller and workers need a way to communicate. Common options: * **Message Queue (e.g., RabbitMQ, Redis Pub/Sub):** A robust and scalable solution for asynchronous communication. The controller publishes tasks to a queue, and workers subscribe to the queue to receive tasks. * **RPC (Remote Procedure Call) (e.g., gRPC, Thrift):** Allows the controller to directly call functions on the worker. Suitable for more synchronous or request-response style interactions. * **HTTP/REST API:** The worker exposes an API that the controller can use to send tasks and retrieve results. Simple to implement but potentially less efficient than message queues or RPC. * **Database:** The controller writes tasks to a database, and the workers periodically check the database for new tasks. Less efficient for real-time task assignment. * **Serialization:** Tasks and results need to be serialized (converted to a format that can be transmitted over the network). Common options: * **JSON:** Human-readable and widely supported. * **Protocol Buffers (protobuf):** More efficient than JSON, especially for complex data structures. * **MessagePack:** Another efficient binary serialization format. **2. Architectural Approaches** * **Embedded Worker:** The worker functionality is integrated directly into the MCP server process. This is simpler to set up but can impact the server's performance if the worker tasks are resource-intensive. * **Separate Worker Process:** The worker runs in a separate process (potentially on the same machine or a different machine) and communicates with the MCP server via a plugin or API. This isolates the worker's workload and prevents it from directly affecting the server's performance. This is the generally preferred approach for production environments. **3. Implementation Steps (Example using Python and RabbitMQ)** This example outlines the steps using a separate worker process and RabbitMQ for communication. It assumes you have a basic understanding of RabbitMQ. **A. Controller (Python):** ```python import pika import json import time import uuid # RabbitMQ connection parameters RABBITMQ_HOST = 'localhost' RABBITMQ_QUEUE = 'mcp_tasks' def send_task(task_type, task_data): """Sends a task to the RabbitMQ queue.""" connection = pika.BlockingConnection(pika.ConnectionParameters(host=RABBITMQ_HOST)) channel = connection.channel() channel.queue_declare(queue=RABBITMQ_QUEUE, durable=True) # Ensure queue exists task_id = str(uuid.uuid4()) # Generate a unique task ID task = { 'task_id': task_id, 'task_type': task_type, 'task_data': task_data } channel.basic_publish( exchange='', routing_key=RABBITMQ_QUEUE, body=json.dumps(task).encode('utf-8'), properties=pika.BasicProperties( delivery_mode=2, # Make message persistent ) ) print(f" [x] Sent task: {task}") connection.close() return task_id if __name__ == '__main__': # Example usage: task_id = send_task( task_type='generate_region', task_data={'x': 0, 'z': 0, 'radius': 100} ) print(f"Task ID: {task_id}") task_id = send_task( task_type='execute_command', task_data={'command': 'say Hello from the controller!'} ) print(f"Task ID: {task_id}") ``` **B. Worker (Python):** ```python import pika import json import time import subprocess # For executing Minecraft commands import os # RabbitMQ connection parameters RABBITMQ_HOST = 'localhost' RABBITMQ_QUEUE = 'mcp_tasks' # Path to the Minecraft server's command execution script (e.g., a shell script) MINECRAFT_COMMAND_SCRIPT = '/path/to/minecraft_command.sh' # Replace with your actual path def execute_minecraft_command(command): """Executes a command on the Minecraft server using a script.""" try: # Ensure the script is executable os.chmod(MINECRAFT_COMMAND_SCRIPT, 0o755) # Make executable (if needed) result = subprocess.run([MINECRAFT_COMMAND_SCRIPT, command], capture_output=True, text=True, check=True) return result.stdout.strip() except subprocess.CalledProcessError as e: print(f"Error executing command: {e}") return f"Error: {e.stderr.strip()}" except FileNotFoundError: print(f"Error: Command execution script not found at {MINECRAFT_COMMAND_SCRIPT}") return "Error: Command execution script not found." def process_task(task): """Processes a task received from the queue.""" task_type = task['task_type'] task_data = task['task_data'] task_id = task['task_id'] print(f" [x] Received task: {task}") if task_type == 'generate_region': # Simulate region generation (replace with actual logic) x = task_data['x'] z = task_data['z'] radius = task_data['radius'] print(f"Generating region at ({x}, {z}) with radius {radius}...") time.sleep(5) # Simulate work result = f"Region generated successfully at ({x}, {z}) with radius {radius}." elif task_type == 'execute_command': command = task_data['command'] print(f"Executing command: {command}") result = execute_minecraft_command(command) # Execute the command else: result = f"Unknown task type: {task_type}" print(f" [x] Task {task_id} completed. Result: {result}") return result def callback(ch, method, properties, body): """Callback function for handling messages from the queue.""" try: task = json.loads(body.decode('utf-8')) result = process_task(task) # Acknowledge the message (important for RabbitMQ) ch.basic_ack(delivery_tag=method.delivery_tag) # Optionally, send the result back to the controller (using another queue or RPC) # (Implementation omitted for brevity) except Exception as e: print(f"Error processing task: {e}") ch.basic_nack(delivery_tag=method.delivery_tag, requeue=False) # Reject and don't requeue on error def start_worker(): """Starts the RabbitMQ worker.""" connection = pika.BlockingConnection(pika.ConnectionParameters(host=RABBITMQ_HOST)) channel = connection.channel() channel.queue_declare(queue=RABBITMQ_QUEUE, durable=True) # Ensure queue exists channel.basic_qos(prefetch_count=1) # Process one message at a time channel.basic_consume(queue=RABBITMQ_QUEUE, on_message_callback=callback) print(' [*] Waiting for messages. To exit press CTRL+C') channel.start_consuming() if __name__ == '__main__': start_worker() ``` **C. Minecraft Command Execution Script (Bash - `minecraft_command.sh`):** ```bash #!/bin/bash # This script executes a command on the Minecraft server using rcon-cli. # Make sure rcon-cli is installed and configured correctly. COMMAND="$1" # Replace with your rcon-cli command and credentials rcon-cli -H localhost -p 25575 -P your_rcon_password "$COMMAND" ``` **D. Minecraft Server Plugin (Spigot/Paper Example - Java):** This plugin is necessary if you want the worker to directly interact with the Minecraft server's API. If you're only executing commands, the `minecraft_command.sh` script might be sufficient. ```java import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.Bukkit; public class WorkerPlugin extends JavaPlugin { @Override public void onEnable() { getLogger().info("WorkerPlugin has been enabled!"); // Example: Register a command that can be triggered by the worker getCommand("workercommand").setExecutor((sender, command, label, args) -> { if (args.length > 0) { String message = String.join(" ", args); Bukkit.broadcastMessage("Worker Command: " + message); return true; } else { sender.sendMessage("Usage: /workercommand <message>"); return false; } }); } @Override public void onDisable() { getLogger().info("WorkerPlugin has been disabled!"); } } ``` **Explanation:** 1. **Controller:** * Connects to RabbitMQ. * Defines a `send_task` function to publish tasks to the `mcp_tasks` queue. * Each task is a JSON object containing a `task_id`, `task_type`, and `task_data`. * The `delivery_mode=2` property ensures that messages are persistent (survive RabbitMQ restarts). * Example usage demonstrates sending two types of tasks: `generate_region` and `execute_command`. 2. **Worker:** * Connects to RabbitMQ. * Declares the `mcp_tasks` queue. * Sets `prefetch_count=1` to process one message at a time. * The `callback` function is called whenever a new message arrives. * `process_task` handles the different task types. * For `generate_region`, it simulates region generation (replace with your actual world generation logic). * For `execute_command`, it calls the `execute_minecraft_command` function. * `execute_minecraft_command` uses `subprocess.run` to execute a shell script (`minecraft_command.sh`) that uses `rcon-cli` to send commands to the Minecraft server. * `ch.basic_ack` acknowledges the message, telling RabbitMQ that the task has been successfully processed. This is crucial to prevent messages from being re-queued indefinitely if the worker crashes. * Error handling is included to catch exceptions during task processing and reject the message (with `ch.basic_nack`) to prevent infinite loops. 3. **`minecraft_command.sh`:** * A simple Bash script that takes a command as an argument and uses `rcon-cli` to execute it on the Minecraft server. * **Important:** Replace `localhost`, `25575`, and `your_rcon_password` with your actual RCON settings. * Make sure `rcon-cli` is installed and configured correctly on the worker machine. 4. **`WorkerPlugin.java` (Spigot/Paper):** * A basic Spigot/Paper plugin that demonstrates how to register a command that can be triggered by the worker. * This is only necessary if you need the worker to directly interact with the Minecraft server's API (e.g., to modify blocks, spawn entities, etc.). * The example registers a command `/workercommand` that broadcasts a message to all players. **To Run the Example:** 1. **Install RabbitMQ:** Follow the instructions on the RabbitMQ website to install and configure RabbitMQ on your system. 2. **Install `rcon-cli`:** Install `rcon-cli` on the worker machine (if you're using the `execute_command` task). You might need to install it using your system's package manager (e.g., `apt-get install rcon-cli` on Debian/Ubuntu). 3. **Configure RCON:** Enable RCON on your Minecraft server and set a password. 4. **Update Paths:** In the `worker.py` script, update the `MINECRAFT_COMMAND_SCRIPT` variable to point to the correct path of your `minecraft_command.sh` script. Also, update the RCON credentials in `minecraft_command.sh`. 5. **Install Python Libraries:** Install the required Python libraries: `pip install pika`. 6. **Run the Controller:** `python controller.py` 7. **Run the Worker:** `python worker.py` 8. **Start your Minecraft server.** 9. **Test:** The controller will send tasks to the worker, and the worker will execute them. You should see the results in the worker's console and in the Minecraft server's console (or in-game if you're using the plugin). **Important Considerations:** * **Security:** Secure your RabbitMQ connection with proper authentication and authorization. Never expose your RCON password directly in your code. Use environment variables or a configuration file to store sensitive information. * **Error Handling:** Implement robust error handling in both the controller and the worker. Use try-except blocks to catch exceptions and handle them gracefully. Consider using a logging library to log errors and other important events. * **Scalability:** For high-volume task processing, consider using multiple worker instances. RabbitMQ will automatically distribute tasks to available workers. * **Task Prioritization:** If you have tasks with different priorities, you can use RabbitMQ's priority queues to ensure that high-priority tasks are processed first. * **Task Results:** The example doesn't include a mechanism for sending results back to the controller. You can implement this using another RabbitMQ queue, RPC, or a database. * **Minecraft Server API:** If you need to interact with the Minecraft server's API, you'll need to use a plugin (like the example `WorkerPlugin.java`). The plugin can expose functions that the worker can call (e.g., using a custom protocol or a REST API). * **Resource Management:** Monitor the resource usage of the worker processes to ensure that they don't overload the system. Consider using resource limits (e.g., CPU and memory limits) to prevent workers from consuming too many resources. * **Idempotency:** Design your tasks to be idempotent, meaning that they can be executed multiple times without causing unintended side effects. This is important in case a task fails and needs to be retried. * **Concurrency:** If your tasks are CPU-bound, consider using multiple threads or processes within the worker to improve performance. However, be careful to avoid race conditions and other concurrency issues. * **Configuration:** Use a configuration file to store settings such as RabbitMQ connection parameters, RCON credentials, and task-specific parameters. This makes it easier to manage and deploy your system. * **Monitoring:** Implement monitoring to track the status of the controller, workers, and RabbitMQ. Use metrics such as task queue length, task processing time, and error rates to identify potential problems. **Choosing a Communication Method:** * **RabbitMQ:** Best for asynchronous, reliable task processing. Good for scalability and fault tolerance. Requires setting up a RabbitMQ server. * **gRPC:** Good for synchronous or request-response style interactions. Provides strong typing and efficient serialization. Requires defining gRPC services and messages. * **HTTP/REST:** Simple to implement but potentially less efficient than RabbitMQ or gRPC. Suitable for simple tasks and when you don't need high performance. **Example Task Types:** * **`generate_region`:** Generates a specific region of the world. Task data: `x`, `z`, `radius`, `world`. * **`execute_command`:** Executes a command on the server. Task data: `command`. * **`build_structure`:** Builds a predefined structure at a specific location. Task data: `x`, `y`, `z`, `structure_name`. * **`calculate_stats`:** Calculates statistics about the server (e.g., number of players, number of entities, memory usage). Task data: None. This comprehensive guide should give you a solid foundation for extending your MCP server to work as a worker. Remember to adapt the code and architecture to your specific needs and requirements. Good luck!

MCP Analytics Middleware

MCP Analytics Middleware

一个轻量级的 TypeScript 中间件,用于 MCP SDK 服务器,可提供分析功能。它以最小的开销捕获请求指标、性能数据和使用模式。 具有实时监控、可配置的数据收集和详细的报告功能 - 所有这些都具有完整的类型安全性。

mcp-client-and-server MCP server

mcp-client-and-server MCP server

mcp-dice: A MCP Server for Rolling Dicemcp-dice: A MCP Server for Rolling Dice

mcp-dice: A MCP Server for Rolling Dicemcp-dice: A MCP Server for Rolling Dice

一个 MCP 服务器,使 LLM 能够掷骰子。 (Yī gè MCP fúwùqì, shǐ LLM nénggòu zhì shǎizi.)

state-server MCP Server

state-server MCP Server

我的新仓库 (Wǒ de xīn cāngkù)

iFlytek Workflow MCP Server

iFlytek Workflow MCP Server

一个 MCP 服务器实现,可以通过模型上下文协议调用讯飞工作流,从而实现具有顺序、并行、循环和嵌套执行模式的智能工作流调度。

Thingsboard MCP Server

Thingsboard MCP Server

Thingsboard MCP 服务器,用于在 LLM 工具中使用 Thingsboard 数据作为上下文。 (Alternatively, a more literal translation could be: 用于将 Thingsboard 数据用作 LLM 工具上下文的 Thingsboard MCP 服务器)