Minecraft Command Execution MCP Server
Servidor MCP de ejecución de comandos de Minecraft
Un servidor MCP (Model Context Protocol) que permite a Claude ejecutar comandos de Minecraft y obtener autocompletado mediante la API de MasterControl.
Características
Este servidor MCP proporciona dos herramientas:
1. execute_command
Ejecuta cualquier comando de Minecraft de forma remota como el jugador autenticado.
El jugador debe estar en línea y en un servidor
El jugador recibe una notificación en el juego cuando se ejecutan los comandos
Devuelve la salida del comando o mensajes de error
Para obtener ayuda: Añade "help" a cualquier comando (ej. "island help", "island upgrade help")
Ejemplos:
execute_command("gamemode creative")
execute_command("island help") # Shows island command help
execute_command("island upgrade help") # Shows upgrade subcommand help
execute_command("island upgrade speed 5")2. tab_complete
Obtén sugerencias de autocompletado para comandos parciales.
Descubre comandos y subcomandos disponibles
Encuentra argumentos y parámetros válidos
Funciona exactamente igual que pulsar Tab en Minecraft
Ejemplos:
tab_complete("gamemode ") # Returns: survival, creative, adventure, spectator
tab_complete("island ") # Returns: available island subcommandsRelated MCP server: MCP Minecraft Remote
Requisitos previos
Python 3.10 o superior
Gestor de paquetes
uv(instalar aquí)Un servidor MasterControl en ejecución con la API de comandos
Clave de API válida para tu jugador de Minecraft
Instalación
Clona el repositorio:
git clone https://github.com/<your-user>/minecraft-mcp-server.git
cd minecraft-mcp-serverInstala las dependencias:
uv syncConfigura las variables de entorno:
cp .env.example .envEdita
.envcon tus ajustes:
# Required: Your Midnight API key
MIDNIGHT_API_KEY=your-api-key-here
# Optional: MasterControl API URL (defaults to localhost:8080)
MIDNIGHT_API_URL=http://your-server:8080/api/v2Uso
Pruebas locales
Ejecuta el servidor directamente para probar:
uv run server.pyEsperará la entrada por stdio; eso es lo esperado para un servidor MCP. Ctrl+C para salir.
Integración con Claude Code
Añade el servidor a Claude Code (usa la ruta absoluta a tu repositorio clonado):
claude mcp add midnight \
--transport stdio \
--env MIDNIGHT_API_KEY=your-key-here \
--env MIDNIGHT_API_URL=http://localhost:8080/api/v2 \
-- uv --directory /absolute/path/to/minecraft-mcp-server run server.pyVerificar la instalación
En Claude Code, comprueba que el servidor se está ejecutando:
/mcpDeberías ver midnight listado con el estado ✓ Connected.
Ejemplos de conversaciones
Ejecutar comandos:
You: "Change my gamemode to creative"
Claude: [Uses execute_command("gamemode creative")]
✓ Command executed successfullyObtener ayuda de comandos:
You: "How do I use the island upgrade command?"
Claude: [Uses execute_command("island upgrade help")]
Shows the help output for island upgradeExplorar comandos:
You: "What island commands are available?"
Claude: [Uses tab_complete("island ")]
Lists: upgrade, create, delete, invite, members...Configuración
Variables de entorno
Variable | Requerido | Por defecto | Descripción |
| Sí | - | Tu clave de API de jugador |
| No |
| URL base de la API de MasterControl |
Endpoints de la API
POST /api/v2/command/execute— Ejecutar comandosPOST /api/v2/command/tabComplete— Obtener autocompletado
Solución de problemas
"MIDNIGHT_API_KEY environment variable not set!"
Crea un archivo .env:
echo "MIDNIGHT_API_KEY=your-key-here" > .env"Failed to execute command"
Comprueba que:
La API de MasterControl esté en ejecución
La clave de API sea correcta
El jugador esté en línea y en un servidor (no en el limbo del proxy)
Seguridad
Nunca subas
.enval repositorio — contiene tu clave de API (ya excluida mediante.gitignore)Los comandos se ejecutan con los permisos de tu jugador
La IA puede ejecutar cualquier comando que tú puedas ejecutar en el juego
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables management of Minecraft servers through the MCSManager API. Supports executing server commands, checking player status, retrieving server information, and controlling game settings like weather.191MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to remotely control a Minecraft player, including navigation, mining, building, and interaction with the world and other players.MIT
- FlicenseNot gradedqualityBmaintenanceEnables natural language control of a Minecraft bot, allowing it to execute tasks like mining, exploring, and item management via AI-powered commands.1
- AlicenseAqualityBmaintenanceExposes Minecraft server commands via RCON as a tool, and optionally powers an in-game AI chat listener that answers player questions using Claude.2MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
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/mattlack15/midnightsky-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server