Minecraft
Minecraft server management via RCON. Integrates FastMCP for easy command execution, supports interaction with Claude Desktop and other MCP clients, and offers a flexible architecture for local development and production use.
claude mcp add --transport stdio peterson047-minecraft-mcp-server python mcp_server/server.py \ --env PATH="%PATH%" \ --env GEMINI_API_KEY="your_gemini_api_key" \ --env MCP_SERVER_PATH="mcp_server/server.py" \ --env MINECRAFT_LOG_PATH="path/to/minecraft/logs/latest.log"
How to use
This MCP server provides a Python-based FastMCP implementation to control a Minecraft server via RCON. It exposes a toolset and resources that allow you to issue Minecraft commands programmatically, query the available commands, and interact with the in-game world through an LLM-powered interface. The server uses a local STDIO setup for development and can be extended to HTTP/SSE for production deployments. Use the included mcp_chat_client to listen for in-game chat directed at the AI (messages starting with @ai) and have those requests translated into server commands via Gemini integration. To start, run the server script in a Python virtual environment, then launch the chat client in a separate terminal if you want conversational control via chat.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Virtual environment support (venv) available
- Minecraft server with RCON enabled (server.properties: enable-rcon=true, rcon.password=<password>, rcon.port=<port>)
Installation steps:
- Clone the repository and navigate to the mcp_server directory:
cd Minecraft-MCP-Server/mcp_server
- Create and activate a virtual environment:
python -m venv venv
# Windows
venv\Scripts\activate
# Unix/macOS
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Create a .env file with required configuration (examples):
MINECRAFT_LOG_PATH=/path/to/minecraft/logs/latest.log
MCP_SERVER_PATH=mcp_server/server.py
GEMINI_API_KEY=your_gemini_api_key
- Run the MCP server:
python mcp_server/server.py
- (Optional) Run the chat client in a separate terminal after starting the server:
venv\Scripts\activate # Windows
# or: source venv/bin/activate # Unix
python mcp_server/mcp_chat_client.py
Notes:
- Ensure the Minecraft server is running and accessible via RCON before starting the MCP server.
- The project uses a local STDIO transport by default for development and can be extended to HTTP/SSE in production.
Additional notes
Tips and common issues:
- Memory overflow bug: If the chat client is started before the MCP server, you may encounter memory issues. Always start the server first, then launch the chat client.
- Ensure your RCON settings in server.properties match the credentials used by the MCP server (port and password).
- The commands and tools are exposed via commands.json and the FastMCP integration, enabling dynamic command discovery and execution.
- When deploying in production, consider transitioning to HTTP/SSE transport and Docker for isolation, as suggested in the readme's Next Steps.
- If you modify environment paths, update the PATH in the mcp_config.env accordingly to ensure Python and dependencies are found.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP