---
title: "Deploy minecraft-mcp"
description: "MCP server that gives AI agents RCON control of your Minecraft server"
category: "AI/ML"
url: https://railway.com/deploy/minecraft-mcp
---

# Deploy minecraft-mcp

MCP server that gives AI agents RCON control of your Minecraft server

**[Deploy minecraft-mcp on Railway](https://railway.com/template/minecraft-mcp)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/minecraft-mcp/manifest.json

- **Creator:** Nameless 's Projects
- **Category:** AI/ML

## Template content

### mcp

- **Source:** https://github.com/lNamelessl/minecraft-mcp
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host

Minecraft Server MCP on Railway gives your AI agents (Claude, Cursor, ChatGPT connectors) direct RCON control of a Minecraft Java server: run commands, manage the whitelist, check who is online — over the standard Model Context Protocol at a private, per-deploy secret URL.

**[Deploy Minecraft Server MCP on Railway](https://railway.com/deploy/minecraft-mcp)**

## About Hosting

This template deploys one small stateless service (about 60 MB of RAM, no volume) that speaks the vanilla Minecraft RCON protocol (TCP 25575, implemented directly from the wiki.vg spec) and exposes three MCP tools — `mc_command`, `mc_players`, `mc_status` — over streamable-HTTP. The MCP endpoint lives at `https://YOUR-DOMAIN/YOUR-SECRET-PATH/mcp` where the secret path segment is generated automatically per deploy; an optional `MCP_TOKEN` variable adds a Bearer check for clients that can send headers. The RCON target is fixed at deploy time via variables (`RCON_HOST` / `RCON_PORT` / `RCON_PASSWORD`) and is never rewritten per request; RCON itself stays on Railway's private network.

Destructive commands (`stop`, `save-off`, `ban`, `ban-ip`, `banlist`, `kick`, `op`, `deop`) are blocked by default behind `ALLOW_DESTRUCTIVE=false` — blocked commands return guidance text and are never sent to the server. Flip the variable to enable them.

This MCP server does not host Minecraft itself — pair it with a Minecraft Java service in the same project (pairing table below). Bedrock Edition has no RCON, so Java servers only. RCON returns empty output for many successful commands (and cannot detect unknown commands), so a typo'd command can look like silent success — both behaviors are disclosed here and in the README.

## Why Deploy

The agent-era gap: the dominant "agent manages my game server" architecture is LLM → MCP → RCON, and this is the first Railway template exposing it for Minecraft — the 1,558-deploy `minecraft-server` flagship proved the demand, but gave operators a web console rather than an agent-native control plane. You get: zero deploy-form prompts (secrets generated per deploy), a secret-URL auth shape proven across 54 deploys on the platform, a default-off destructive-command gate, ~60 MB of RAM, stateless restarts, and native pairing with the Modrinth Modpack template or any itzg-based server.

| Tool | Input | Behavior |
|---|---|---|
| `mc_command` | command string (no leading slash) | Any server command (`say`, `whitelist add`, `time set day`, `weather`, `gamemode`, ...) with the server's output text; destructive set gated |
| `mc_players` | none | Online players parsed from `list` (count, max, names) |
| `mc_status` | none | Snapshot: players, difficulty, in-game time |

## Common Use Cases

- Let an agent announce events: `say Server restart in 5 minutes` — and prove delivery in the Minecraft console log.
- Manage a friend-group server conversationally: `whitelist add`, `gamemode`, `time set`, `weather`, `difficulty` — no console SSH needed.
- Ask "who is online?" before maintenance: `mc_players` / `mc_status` snapshots from Claude, Cursor, or ChatGPT.
- Script server ops (backups, kicklists, rule changes) through any MCP-capable automation, with destructive commands locked behind a default-off gate.

## Dependencies for Minecraft Server MCP Hosting

- A Minecraft **Java** server with RCON enabled, reachable from the MCP service (same Railway project over private networking is the intended shape; any reachable RCON host works).
- The MCP service's generated `RCON_PASSWORD` must match the Minecraft server's RCON password.
- An MCP client: Claude Code, Cursor, or a ChatGPT developer-mode connector.

### Deployment Dependencies

Pairing table — set these on your Minecraft service, then point the MCP service at it:

| Where | Setting | Value |
|---|---|---|
| itzg/minecraft-server image | `ENABLE_RCON` | `true` |
| itzg/minecraft-server image | `RCON_PASSWORD` | same value as the MCP service's `RCON_PASSWORD` |
| itzg/minecraft-server image | `RCON_PORT` | `25575` (default) |
| Modrinth Modpack template (ours) | `RCON_PASSWORD` | already generated — copy it into the MCP service's `RCON_PASSWORD` |
| MCP service | `RCON_HOST` | `minecraft.railway.internal` (baked default for a service named `minecraft`) or your server's hostname |

The [Modrinth Modpack Minecraft Server template](https://railway.com/deploy/modrinth-modpack) pairs natively (RCON already enabled on 25575). Zero deploy-form prompts on this template: `SECRET_PATH` and `RCON_PASSWORD` are generated per deploy; everything else has safe defaults.

Market note (2026-11-15): no Railway template existed for Minecraft RCON-over-MCP at publish time; the dedicated GitHub RCON-MCP repos in this niche are all under 15 stars. Template content: Python 3.12 slim, `mcp` SDK 2.3.0 (MCPServer, stateless streamable-HTTP, JSON responses), uvicorn 0.54.0, healthcheck at `/health`.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/minecraft-mcp
