Minecraft RCON MCP Server
Enables safe, read-only SELECT queries against plugin SQLite databases, allowing AI agents to inspect and verify plugin-specific data.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Minecraft RCON MCP Server run the /reload command and check the logs for any errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
⛏️ 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 pollingSQLite 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
Related MCP server: Minecraft MCP Server
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 .envRCON_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_password3. Run
# Direct
minecraft-rcon-mcp
# Or as a module
python -m minecraft_rcon_mcpConfiguration
Variable | Required | Default | Description |
| No |
| RCON server hostname |
| No |
| RCON server port |
| Yes | — | RCON password |
| Yes | — | Minecraft server root directory |
| No | — | Path to plugin SQLite database |
| No |
| Prefix for filtered log reading |
Tools
Tool | Description | Read-Only |
| Execute an RCON command on the server | No |
| Execute a command and capture subsequent server log output | No |
| Read the last N lines from the server log | Yes |
| Read prefix-filtered log entries with incremental position tracking | Yes |
| Execute a read-only SELECT query on the plugin SQLite database | Yes |
| 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
→ RepeatLive 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 dataIncremental 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)Development
git clone https://github.com/YOUR_USERNAME/minecraft-rcon-mcp.git
cd minecraft-rcon-mcp
pip install -e .中文说明
这是一个 MCP (Model Context Protocol) 服务器,通过 RCON 协议将 AI Agent 连接到 Minecraft 服务器。
核心功能
RCON 命令执行 — 支持自动重连
命令 + 日志捕获 — 执行命令后自动抓取服务器日志输出
日志过滤读取 — 按前缀过滤日志,支持增量读取(位置追踪)
数据库只读查询 — 安全的 SQLite SELECT 查询,自动拦截写操作
插件健康检查 — RCON 连通性 + 错误日志 + 数据库状态一键检查
典型工作流
AI Agent 编写插件代码
→ 构建部署到服务器
→ run_command_with_log("cvtest all") ← 执行测试
→ read_test_log(event_filter="SUMMARY") ← 查看结果
→ read_test_log(event_filter="FAIL") ← 查看失败详情
→ Agent 修复问题 → 重复这个 MCP 服务器在真实的 AI 辅助 Minecraft 插件开发中经过了充分验证(248 个测试用例全部通过)。
License
Available Tools
6 toolscheck_plugin_statusARead-onlyIdempotent
Check overall plugin health: RCON connectivity, recent errors in the server log, and database file status.
Recommended to call before running tests or debugging.
Inputs: no named parameters. Returns: result
query_databaseARead-onlyIdempotent
Execute a read-only SELECT query against the plugin's SQLite database.
Write operations (INSERT, UPDATE, DELETE, DROP, etc.) are blocked. Results
are returned as a formatted ASCII table.
Args:
sql: A SELECT SQL statement.
Inputs: sql (required). Returns: result
read_server_logARead-onlyIdempotent
Read the last N lines from the Minecraft server log file.
Args:
lines: Number of lines to read from the end of the log (default 50).
Inputs: lines. Returns: result
read_test_logARead-onlyIdempotent
Read plugin test/debug logs filtered by a configurable prefix.
Only lines containing the configured LOG_PREFIX (default ``[TEST]``) are
returned. Supports incremental reading: pass the ``position`` value from a
previous call as ``since_position`` to only get new entries.
Args:
since_position: Byte offset to start reading from (0 = beginning).
event_filter: Optional event type filter (e.g. ``PASS``, ``FAIL``,
``SUMMARY``). Only lines matching ``{prefix} {event_filter}`` are
returned.
Inputs: since_position, event_filter. Returns: result
run_commandA
Execute an RCON command on the Minecraft server (without leading slash).
Examples: ``say Hello``, ``gamemode creative Steve``, ``tp Steve 0 64 0``
Inputs: command (required). Returns: result
run_command_with_logA
Execute an RCON command and capture server log output produced afterwards.
Useful for commands whose feedback appears in the server log rather than the
RCON response (e.g. plugin commands that print results via logger).
Args:
command: The Minecraft command to execute.
wait_seconds: Seconds to wait for log output after execution (default 2).
Inputs: command (required), wait_seconds. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes: checking plugin status, querying databases, reading server logs, reading test logs, and executing commands. However, run_command and run_command_with_log have some overlap—both execute RCON commands—but their descriptions clarify that the latter is specifically for capturing log output, which helps differentiate them.
All tool names follow a consistent verb_noun pattern (e.g., check_plugin_status, query_database, read_server_log). There are no deviations in naming conventions, making the set predictable and easy to understand.
With 6 tools, the server is well-scoped for managing a Minecraft RCON server. Each tool serves a specific function—monitoring, logging, database queries, and command execution—without feeling excessive or insufficient for the domain.
The toolset covers core operations for Minecraft server management: health checks, log reading, database queries, and command execution. A minor gap is the lack of tools for writing to the database or managing server configurations, but agents can work around this using existing tools like run_command.
Maintenance
Related MCP Connectors
Manage NodePal Minecraft servers, worlds, mods, backups and console from AI agents.
All 20 YourAITools agent APIs in one MCP server. Most tools free; pay with credits or x402.
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
Curated catalog of APIs, MCP servers and tools for AI agents, plus an agent Q&A community.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI interactions with a running Minecraft server inside a Docker container using RCON, allowing models to programmatically create Minecraft builds and manage the server.10-
- FlicenseNot gradedqualityDmaintenanceEnables control of a Minecraft server through RCON commands via natural language, including game commands, chat-based AI interactions, and server management capabilities.6-
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with and manage Minecraft servers through a standardized interface, supporting server monitoring, player management, log analysis, and command execution.111MIT
- AlicenseAqualityDmaintenanceExposes Minecraft server commands via RCON as a tool, and optionally powers an in-game AI chat listener that answers player questions using Claude.2MIT