mc-ai-connection
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mc-ai-connection
An MCP server that lets AI assistants (Claude, Codex, and any other MCP client) build and operate on a Minecraft Java server. It talks to the server over RCON, so no mod is required.
AI client ──MCP (stdio)──▶ mc-ai-connection ──RCON──▶ Minecraft serverAsk for "a stone-brick tower next to Steve" or "a glass dome of radius 10 at the origin", and the AI turns it into commands. It has been tried on a Paper server running Minecraft 26.3, including a full cathedral build of about 700 commands.
Requirements
Related MCP server: MCP Minecraft Remote
Setup
1. Install
git clone https://github.com/Lapius7/mc-ai-connection
cd mc-ai-connection
pnpm install2. Enable RCON on the server
Add this to server.properties and restart the server.
enable-rcon=true
rcon.port=25575
rcon.password=use-a-long-random-password3. Register it with your AI client
Claude Code:
claude mcp add mc \
-e MC_RCON_PASSWORD=use-a-long-random-password \
-- bun run /absolute/path/to/mc-ai-connection/src/index.tsCodex (~/.codex/config.toml):
[mcp_servers.mc]
command = "bun"
args = ["run", "/absolute/path/to/mc-ai-connection/src/index.ts"]
env = { MC_RCON_PASSWORD = "use-a-long-random-password" }Any other MCP client works if it can launch bun run src/index.ts over stdio.
4. Try it
Start the server, then ask the AI: "List the online players" or "Where is Steve standing?".
Configuration
Variable | Default | Description |
|
| Server host |
|
| RCON port |
| empty | RCON password |
|
| Maximum number of blocks one operation may change |
Tools
Tool | Description |
| Run one command and return its output. A leading |
| Run up to 2000 commands in order |
| Get a player's position, rotation, and dimension |
| Place one block |
| Fill a box. |
| Build a sphere (radius 1 to 60), optionally hollow |
| Build a cylinder (radius 1 to 60, height 1 to 320), optionally hollow |
| Draw a 3D line between two points |
Coordinates are absolute integers in the form [x, y, z]. Blocks accept block states, such as oak_stairs[facing=north]. Shape tools return a short summary (commands run, succeeded, sample failures) instead of dumping every response.
run_command can run any command the server console can, so the AI can also change the time, weather, game rules, and entities, give items, and teleport players.
How an AI builds
It calls
get_player_posto find a base coordinate.It picks shapes (
fill,build_sphere, ...) and, for fine detail, sends many commands throughrun_commands.It checks results with commands such as
execute if block x y z <block>, which return "Test passed" or "Test failed".
Troubleshooting
Failed to connect
The server is not running, or RCON is not enabled. Check that
enable-rcon=trueis set and the server was restarted.The host is wrong. If the server runs on Windows and the AI runs in WSL2,
127.0.0.1may not reach it. Use the Windows host IP (the default gateway shown byip route show default) asMC_RCON_HOST, or switch WSL to mirrored networking (networkingMode=mirroredin.wslconfig).
Command syntax errors
Command syntax changes between Minecraft versions. For example, in 26.x time query daytime no longer exists and you use time query day. Let the AI read the error and retry, or ask it to check the command with run_command first.
Safety
RCON is unencrypted and has full control of the server. Never expose the RCON port to the internet. Use a strong password and a firewall.
run_commandalso allows dangerous commands such asstop,op, andban. Only connect to servers you own.There is no undo. Back up the world before large builds.
MC_MAX_VOLUMErefuses oversized single operations.Only server-side commands are available. Client-side actions such as camera, movement, and screenshots are out of scope.
Development
pnpm check # type check
pnpm start # start the MCP server on stdioFile | Role |
| Minimal RCON client |
| Pure functions that turn shapes into command lists |
| MCP tool definitions |
Roadmap
Undo by saving a region before it is overwritten
A command allow list and deny list
A companion MCP that reports a user's installed mods
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Hosted MCP server to manage a restaurant menu from AI agents - 39 tools over the DuckHub API.
Hosted YouTube MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
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-
- 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.2711 npm13MIT
- 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-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to connect to Minecraft servers as a bot, allowing cooperative building, movement, combat, and chat in the same world.8 npm1Apache 2.0