minecraft-rcon-mcp
Click on "Install 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-mcpwho's online right now?"
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
An MCP server that lets an AI assistant (Claude, Cursor, etc.) control a live Minecraft server over RCON — list players, broadcast chat, teleport, give items, change weather/time, kick, or run any raw vanilla/plugin command — instead of you typing it into the server console yourself.
Why this exists
Most MCP servers give an AI assistant access to code — a filesystem, a language, a build system. This one gives it access to a running game world: a genuinely different, much less common category of MCP tool, and a fun one to build on top of a protocol (Source RCON) that's small enough to implement from scratch in a couple hundred lines with zero dependencies beyond the MCP SDK itself.
Related MCP server: Minecraft MCP Server
Installation
git clone https://github.com/Faneraiy14/minecraft-rcon-mcp
cd minecraft-rcon-mcp
npm installRequires a Minecraft server (vanilla or Paper/Spigot — anything that
speaks the Source RCON protocol) with RCON enabled. In its
server.properties:
enable-rcon=true
rcon.port=25575
rcon.password=<a real password — do not leave this blank>Connecting (Claude Desktop / Claude Code)
claude mcp add minecraft-rcon-mcp -- node /absolute/path/to/minecraft-rcon-mcp/src/server.js \
-e MC_RCON_HOST=127.0.0.1 \
-e MC_RCON_PORT=25575 \
-e MC_RCON_PASSWORD=<the same password from server.properties>MC_RCON_HOST defaults to 127.0.0.1, MC_RCON_PORT to 25575 if
omitted — only MC_RCON_PASSWORD is required. The password is read from
the environment only, never accepted as a tool argument — an MCP tool
argument comes from (or at least passes through) the AI's own context, and
a long-lived secret has no business living there when the environment can
hold it instead.
Tools
Tool | What it does |
| Runs any raw vanilla/plugin command (no leading |
| Who's online right now ( |
| Broadcasts a chat message from the server ( |
| Teleports a player/selector to coordinates or another entity ( |
| Gives a player an item ( |
| Sets weather to clear/rain/thunder, optionally for a duration ( |
| Sets the game time by tick count or keyword like |
| Disconnects a player, optionally with a reason shown to them ( |
Every tool returns { success, command, output } on a successful RCON
round-trip — success: true means the request reached the server and it
replied, not that the command necessarily did what you intended
semantically. output is the server's own response text (e.g. "No player was found" for a /give targeting someone offline) — the AI reads
that to know what actually happened, the same way a human reading the
server console would.
How the RCON client works
Source RCON
is a small binary TCP protocol — src/rcon.js implements it directly, no
dependency:
Packet framing:
[int32 length][int32 requestId][int32 type][payload][0x00][0x00], all little-endian.lengthdoesn't include itself.Auth (
SERVERDATA_AUTH, type 3): send the password; the server replies withSERVERDATA_AUTH_RESPONSE(type 2) carrying the SAME request ID on success, orrequestId: -1on a wrong password — that's the only signal that auth failed, there's no error message field.Fragmented responses: nothing in the protocol marks "this is the last packet of the response" — a long
/listor/helpoutput can legitimately arrive as severalSERVERDATA_RESPONSE_VALUEpackets. The standard trick, used here: right after the real command, send a second, emptySERVERDATA_EXECCOMMANDpacket with the next request ID. Minecraft doesn't recognize an empty command, but still echoes an emptySERVERDATA_RESPONSE_VALUEback with that packet's own request ID — and because responses come back in order, seeing that ID is a reliable "everything before this belonged to the real command" marker.A real, live bug this caught: the first version matched incoming packets against pending requests using only
requestId, and never checked the terminator's ID — the terminator packet's_handlePacketcall fell into a dead branch, so every command call silently hung until its own timeout, even though the real server response had already arrived correctly. Found by running the client against an actual live Paper server (not a mock) rather than assuming the protocol implementation was right because it looked right, and fixed by checkingp.terminatorIdfirst.Each MCP tool call opens a fresh connection, authenticates, runs one command, and closes — Minecraft's RCON is meant for short admin connections, not a persistent session (there's no equivalent to NyxilumMcp's REPL tools here for that reason).
Tests
MC_RCON_HOST=127.0.0.1 MC_RCON_PORT=25575 MC_RCON_PASSWORD=<password> npm test21 checks across config.mjs (env-var validation — no server needed),
rcon.mjs (the protocol client against a REAL running server: list
returns real output, an unknown command returns the server's own error
text rather than throwing, a wrong password gives RconAuthError rather
than hanging, an unreachable port fails cleanly, three sequential
commands on one connection don't cross-talk — the exact scenario that
would have caught the terminator-ID bug above), tools.mjs (the same
through the tool handlers, including that a wrong password comes back as
{ success: false, isAuthError: true } rather than throwing — this one
caught a second real bug: custom Error subclasses in JS don't set
.name to the subclass name automatically, so the original
err.name === 'RconAuthError' check silently never matched; fixed by
setting this.name = this.constructor.name in the base error class and
switching the check to instanceof), and transport.mjs — the same
things again through the real MCP protocol (StdioClientTransport +
Client), not just direct function calls.
Every test that needs a live server is skipped (not failed) when
MC_RCON_HOST/MC_RCON_PORT/MC_RCON_PASSWORD aren't set — CI doesn't
have a Minecraft server sitting around, and this shouldn't block on one.
Security
The RCON password lives in the environment only (see Connecting above) — never accepted as a tool input, never logged.
mc_commandruns whatever string it's given, with no allowlist — that's the deliberate design of this tool specifically (an admin console for a game world you own), not an oversight. If you want an AI assistant to have LESS power over your server than a full admin console, don't connect this tool to it, or wrapmc_commandbehind your own MCP proxy that filters commands before they reach here.Every RCON call has a timeout (default 10s, configurable per call via
timeout_ms, capped at 30s) so a server that stops responding mid-command doesn't hang the calling tool forever.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceAllows AI assistants to connect to and control Minecraft players on remote servers, enabling navigation, building, mining, inventory management, entity interaction, and chat communication through natural language commands.272413MIT
- 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
- AlicenseAqualityDmaintenanceConnects AI agents to Minecraft servers via RCON to execute commands, monitor logs, and perform read-only SQLite database queries. It is specifically designed to facilitate AI-assisted plugin development, live debugging, and automated testing workflows.611MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with and manage Minecraft servers through a standardized interface, supporting server monitoring, player management, log analysis, and command execution.11MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Faneraiy14/minecraft-rcon-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server