Minecraft MCP Server is an MCP server that enables AI models and MCP clients to control a Minecraft server through RCON using FastMCP. It connects language models like Claude and Gemini to a running Minecraft instance, allowing operators and players to execute console commands dynamically. Designed for Minecraft server administrators, developers, and multiplayer communities, the project bridges in-game events and AI assistants. It exposes an MCP resource providing a dictionary of available commands alongside an execution tool that leverages the mcrcon library. Through this setup, users can inspect server states, list players, modify game rules, control weather, or give items using plain language prompts. Additionally, the server includes an in-game chat monitor that listens for player messages prefixed with specific triggers, queries the Gemini API, and automatically translates natural language requests into Minecraft RCON commands executed directly on the server.
Category: Other & General Purpose
Tags: gaming, minecraft, rcon, server-management
bash cd Minecraft-MCP-Server/mcp_server 2. Create and activate a Python virtual environment, then install dependencies: bash python -m venv venv venv\Scripts\activate pip install -r requirements.txt 3. Enable RCON in your Minecraft server.properties by setting enable-rcon=true, rcon.password=minemcp, and rcon.port=25575. 4. Create a .env file containing: env MINECRAFT_LOG_PATH=C:\path\to\logs\latest.log MCP_SERVER_PATH=mcp_server/server.py GEMINI_API_KEY=your_gemini_api_key 5. To configure with Claude Desktop, add the following to claude_desktop_config.json: json { "mcpServers": { "minecraft-controller": { "type": "stdio", "command": "path/to/venv/bin/python3", "args": ["path/to/mcp_server/server.py"], "env": {"PATH": "%PATH%"} } } } 6. Restart Claude Desktop or run python mcp_server/server.py directly for standard I/O usage./give commands safely. - Translating player chat messages starting with @ai into automated server actions using the integrated Gemini chat client. - Reading documentation resources through minecraft://commands to let AI assistants validate syntax before command execution.Part of MCP Servers
To install it, clone the repository, set up a Python virtual environment, and install the required dependencies using pip. Ensure RCON is enabled in your Minecraft server.properties file with the appropriate port and password. Finally, add the server execution command and script path to your Claude Desktop configuration file.
It provides a resource that exposes Minecraft command syntax to language models and a tool named run_minecraft_command that executes RCON commands. It also includes an optional chat client script that monitors Minecraft log files and translates in-game player prompts starting with @ai into executed server commands.
The server works with Claude Desktop using the standard stdio transport configuration. It is also compatible with any custom Python script using the FastMCP Client library or any standard Model Context Protocol client capable of launching Python processes over stdio.
You need Python 3, a running Minecraft server with RCON enabled in server.properties, and the mcrcon library installed. If you plan to use the automated in-game chat listener script, you also need a valid Google Gemini API key configured in your environment file.