Minecraft RCON MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install minecraft-rcon-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "RCON_PASSWORD=${RCON_PASSWORD}" -e "SERVER_DIR=${SERVER_DIR}" minecraft-rcon -- node "<FULL_PATH_TO_MINECRAFT_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_MINECRAFT_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:RCON_PASSWORDSERVER_DIR+ 4 optional
README.md

Connects AI agents to Minecraft servers via RCON for commands and logs.

⛏️ Minecraft RCON MCP Server

An MCP (Model Context Protocol) server that connects AI agents to Minecraft servers through RCON. Execute commands, monitor logs, query databases, and check plugin health — all from your AI coding assistant.

Built and battle-tested during real AI-assisted Minecraft plugin development.


Features

  • RCON Command Execution — Run any server command with automatic reconnection on failure
  • Command + Log Capture — Execute a command and capture the server log output that follows (unique and powerful for plugin debugging)
  • Server Log Reading — Tail the latest server log
  • Filtered Log Monitoring — Read logs by configurable prefix (e.g. [TEST], [DEBUG]) with incremental position tracking for efficient polling
  • SQLite Database Queries — Safe read-only SELECT queries against plugin databases, with write-operation blocking
  • Plugin Health Checks — Combined RCON connectivity + error log scan + database status in one call

Quick Start

1. Install

# From PyPI (when published)
pip install minecraft-rcon-mcp

# Or from source
git clone https://github.com/YOUR_USERNAME/minecraft-rcon-mcp.git
cd minecraft-rcon-mcp
pip install .

2. Configure

Copy .env.example to .env and fill in your server details:

cp .env.example .env
RCON_HOST=localhost
RCON_PORT=25575
RCON_PASSWORD=your_password
SERVER_DIR=/path/to/minecraft/server

# Optional
DATABASE_PATH=/path/to/plugin.db
LOG_PREFIX=[TEST]

Make sure RCON is enabled in your server.properties:

enable-rcon=true
rcon.port=25575
rcon.password=your_password

3. Run

# Direct
minecraft-rcon-mcp

# Or as a module
python -m minecraft_rcon_mcp

Configuration

Variable Required Default Description
RCON_HOST No localhost RCON server hostname
RCON_PORT No 25575 RCON server port
RCON_PASSWORD Yes RCON password
SERVER_DIR Yes Minecraft server root directory
DATABASE_PATH No Path to plugin SQLite database
LOG_PREFIX No [TEST] Prefix for filtered log reading

Tools

Tool Description Read-Only
run_command Execute an RCON command on the server No
run_command_with_log Execute a command and capture subsequent server log output No
read_server_log Read the last N lines from the server log Yes
read_test_log Read prefix-filtered log entries with incremental position tracking Yes
query_database Execute a read-only SELECT query on the plugin SQLite database Yes
check_plugin_status Check RCON connectivity, recent errors, and database status Yes

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "minecraft-rcon": {
      "command": "minecraft-rcon-mcp",
      "env": {
        "RCON_HOST": "localhost",
        "RCON_PORT": "25575",
        "RCON_PASSWORD": "your_password",
        "SERVER_DIR": "/path/to/minecraft/server",
        "DATABASE_PATH": "/path/to/plugin.db"
      }
    }
  }
}

Usage with Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "minecraft-rcon": {
      "command": "minecraft-rcon-mcp",
      "env": {
        "RCON_HOST": "localhost",
        "RCON_PORT": "25575",
        "RCON_PASSWORD": "your_password",
        "SERVER_DIR": "/path/to/minecraft/server",
        "DATABASE_PATH": "/path/to/plugin.db"
      }
    }
  }
}

Find your server.properties

rcon.password= rcon.port= enable-rcon=true


Use Cases

AI-Assisted Plugin Testing

The run_command_with_log + read_test_log combo enables a powerful automated testing loop:

Agent writes plugin code
    → Build & deploy to server
    → run_command_with_log("mytest run")
    → read_test_log(event_filter="FAIL")
    → Agent fixes failures
    → Repeat

Live Debugging

check_plugin_status()           → Is the plugin loaded? Any errors?
run_command("mycommand arg")    → Execute plugin commands
read_server_log(lines=100)      → Check what happened
query_database("SELECT ...")    → Inspect plugin data

Incremental Log Monitoring

# First call — read all test logs
result = read_test_log()  # returns position=12345

# After running more tests — only get NEW entries
result = read_test_log(since_position=12345)

Tools (6)

run_commandExecute an RCON command on the server
run_command_with_logExecute a command and capture subsequent server log output
read_server_logRead the last N lines from the server log
read_test_logRead prefix-filtered log entries with incremental position tracking
query_databaseExecute a read-only SELECT query on the plugin SQLite database
check_plugin_statusCheck RCON connectivity, recent errors, and database status

Environment Variables

RCON_HOSTRCON server hostname
RCON_PORTRCON server port
RCON_PASSWORDrequiredRCON password
SERVER_DIRrequiredMinecraft server root directory
DATABASE_PATHPath to plugin SQLite database
LOG_PREFIXPrefix for filtered log reading

Configuration

claude_desktop_config.json
{"mcpServers": {"minecraft-rcon": {"command": "minecraft-rcon-mcp", "env": {"RCON_HOST": "localhost", "RCON_PORT": "25575", "RCON_PASSWORD": "your_password", "SERVER_DIR": "/path/to/minecraft/server", "DATABASE_PATH": "/path/to/plugin.db"}}}}

Try it

Check the current plugin status to see if there are any recent errors in the logs.
Run the 'reload' command on the server and capture the log output to verify it loaded correctly.
Query the plugin database to list all entries in the player_data table.
Read the last 50 lines of the server log to investigate why the server crashed.
Monitor the test logs for any new entries marked with [DEBUG] since the last check.

Frequently Asked Questions

What are the key features of Minecraft RCON MCP Server?

RCON command execution with automatic reconnection. Command and log capture for plugin debugging. Tail server logs with filtered log monitoring. Read-only SQLite database queries for plugin data. Combined plugin health checks.

What can I use Minecraft RCON MCP Server for?

Automated AI-assisted plugin testing loops. Live debugging of Minecraft server plugins. Incremental log monitoring for error detection. Inspecting plugin database state during development.

How do I install Minecraft RCON MCP Server?

Install Minecraft RCON MCP Server by running: pip install minecraft-rcon-mcp

What MCP clients work with Minecraft RCON MCP Server?

Minecraft RCON MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Minecraft RCON MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare