Get the FREE Ultimate OpenClaw Setup Guide →

Minecraft

A wonderful MCP tool in debug Minecraft Server with RCON

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio minecraftcodefoundary-minecraft-mcp-server python -m minecraft_rcon_mcp \
  --env RCON_HOST="localhost" \
  --env RCON_PORT="25575" \
  --env SERVER_DIR="<path-to-minecraft-server>" \
  --env DATABASE_PATH="<path-to/plugin.db>" \
  --env RCON_PASSWORD="<your_password>"

How to use

This MCP server provides a bridge between AI agents and a Minecraft server via RCON. It exposes a set of tools that let you send commands to the Minecraft server, capture and inspect logs, query a plugin SQLite database, and check the health/status of the plugin and connection. The key capabilities are: run_command to execute an RCON command, run_command_with_log to execute a command and capture the subsequent log output, read_server_log to tail the server log, read_test_log to read prefix-filtered logs with incremental position tracking, query_database to perform read-only SQL SELECTs on the plugin database, and check_plugin_status to verify RCON connectivity along with recent errors and database status. These tools enable AI workflows that build, deploy, test, and debug Minecraft plugins with real-time feedback from the server.

How to install

Prerequisites:

  • Python 3.11+ installed on your system
  • A running Minecraft server with RCON enabled (see server.properties enable-rcon and rcon.port/password)
  • Access to the server directory where your plugin and database live

Installation steps:

  1. Install the MCP server package from PyPI (or install from source if provided):
pip install minecraft-rcon-mcp
  1. Clone or download the repository (if installing from source):
git clone https://github.com/YOUR_USERNAME/minecraft-rcon-mcp.git
cd minecraft-rcon-mcp
pip install -e .
  1. Configure environment variables for the MCP server (see the mcp_config example below for required values). Create or update the .env file if you prefer environment-file-based configuration, or pass env vars directly to the MCP runner.

  2. Run the MCP server (example shown in Quick Start):

# Direct run
python -m minecraft_rcon_mcp

# Or via CLI executable if installed as a script
minecraft-rcon-mcp
  1. Verify the server starts and connects to your Minecraft server using RCON. If you encounter connection issues, double-check RCON host/port/password and ensure the Minecraft server allows remote connections.

Additional notes

Tips and common issues:

  • Ensure RCON is enabled in server.properties (enable-rcon=true, rcon.port, rcon.password).
  • The tools support incremental log polling; use read_test_log with since_position to fetch only new entries after an action.
  • For safety, write operations to the plugin database are blocked; use query_database for safe read-only access.
  • If running behind a firewall or NAT, ensure the RCON port is reachable from the MCP server host.
  • Set DATABASE_PATH and SERVER_DIR to the correct plugin database location and Minecraft server root to enable database queries and log access.
  • Environment variable values shown are examples; replace with your actual deployment values.
  • When using Claude integration, you can reference the mcpServers entry with the same keys in Claude config files as shown in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers