godot-mcp-pilot
godot-mcp-pilot
Servidor del Protocolo de Contexto de Modelo (MCP) para Godot 4 — Otorga a los asistentes de IA (Claude, Cursor, Cline, etc.) control directo sobre tus proyectos de Godot.
godot-mcp-pilot expone las operaciones del motor Godot como herramientas MCP, permitiendo a los asistentes de IA iniciar el editor, ejecutar proyectos, crear y editar escenas, escribir GDScript e inspeccionar activos, todo mediante lenguaje natural. Funciona tanto para juegos 2D como 3D.

"Create a CharacterBody3D player scene with a Camera3D and collision"
"Run the project and show me any errors"
"Add a DirectionalLight3D to the scene"
"Create a 2D platformer with sprites and tilemaps"Inicio rápido
1. Instalación
npm install -g godot-mcp-pilotO úsalo sin instalar:
npx godot-mcp-pilot2. Ejecuta el asistente de configuración
npx godot-mcp-pilot setup
# or, if installed globally:
godot-mcp-pilot-setupEl asistente:
Detectará automáticamente tu binario de Godot (revisa Aplicaciones, Descargas, PATH)
Preguntará qué cliente de IA utilizas
Escribirá la configuración en el lugar correcto para ese cliente
Related MCP server: Godot MCP Enhanced
Configuración manual
Claude Code (CLI / Extensión de IDE)
Crítico: Claude Code lee
.mcp.jsondesde el directorio donde lo ejecutas. El archivo debe estar en la carpeta de tu proyecto de juego, no en la carpeta godot-mcp-pilot.
# From inside your game project directory:
claude mcp add godot -- npx godot-mcp-pilotEsto escribe .mcp.json en tu directorio actual. Luego, ejecuta siempre Claude Code desde ese directorio:
cd ~/games/my-platformer
claudeSi Godot no se detecta automáticamente (ej. nunca lo moviste de ~/Downloads):
claude mcp add godot -e GODOT_PATH=/path/to/Godot.app/Contents/MacOS/Godot -- npx godot-mcp-pilotO escribe .mcp.json manualmente en la raíz de tu proyecto de juego:
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["godot-mcp-pilot"],
"env": {
"GODOT_PATH": "/path/to/your/Godot"
}
}
}
}Claude Desktop
Claude Desktop utiliza un archivo de configuración diferente — no lee .mcp.json.
Edita ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
o %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["godot-mcp-pilot"],
"env": {
"GODOT_PATH": "/path/to/your/Godot"
}
}
}
}Luego cierra y vuelve a abrir Claude Desktop.
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["godot-mcp-pilot"],
"env": {
"GODOT_PATH": "/path/to/your/Godot"
}
}
}
}Detección de la ruta de Godot
El servidor busca automáticamente en estas ubicaciones (en orden):
SO | Rutas verificadas |
macOS |
|
Linux |
|
Windows |
|
Si la detección automática falla, establece GODOT_PATH a la ruta absoluta de tu ejecutable de Godot.
Juegos 2D y 3D
godot-mcp-pilot funciona igual de bien para 2D y 3D. Utiliza los tipos de nodo apropiados:
2D | 3D | |
Jugador |
|
|
Raíz |
|
|
Cámara |
|
|
Malla |
|
|
Colisión |
|
|
Física |
|
|
Luz | — |
|
Ejemplos de prompts:
"Create a 3D scene with a Node3D root, MeshInstance3D floor, and DirectionalLight3D"
"Add a CharacterBody3D with a CollisionShape3D using a CapsuleShape3D"
"Write a GDScript for 3D first-person movement"Características
Categoría | Herramientas |
Sistema |
|
Editor / Ejecución |
|
Escenas |
|
Nodos |
|
Scripts |
|
Proyecto |
|
Activos |
|
UIDs |
|
Configuración
Variable de entorno | Predeterminado | Descripción |
| auto-detectado | Ruta absoluta al ejecutable de Godot |
|
| Si es |
|
| Imprime información de depuración en stderr |
Solución de problemas
"MCP server not connected" / las herramientas no aparecen
Claude Code: El archivo .mcp.json debe estar en el directorio donde ejecutas claude. Abre una terminal nueva, entra (cd) en tu proyecto de juego y ejecuta claude desde allí.
Claude Desktop: Asegúrate de haber editado el archivo correcto (claude_desktop_config.json, no .mcp.json) y de haber cerrado y vuelto a abrir la aplicación por completo.
Godot no encontrado
Establece GODOT_PATH explícitamente en el bloque env de la configuración. En macOS, si descargaste Godot pero nunca lo moviste:
GODOT_PATH=/Users/yourname/Downloads/Godot.app/Contents/MacOS/GodotPara encontrar dónde está Godot:
# macOS / Linux
find ~/Downloads ~/Applications /Applications -name "Godot" -type f 2>/dev/nullErrores de análisis de escena / .tscn mal formado
Si Godot se niega a cargar una escena editada por el MCP, verifica que las líneas instance= no tengan comillas:
# Correct
instance=ExtResource("1_abc")
# Wrong (Godot rejects this)
instance="ExtResource(\"1_abc\")"Ejecuta el proyecto en modo headless para ver el error exacto:
/path/to/Godot --path /path/to/project --headless --quit 2>&1El MCP se desconecta durante una sesión
Este es un problema conocido con algunas implementaciones de host MCP. Solución: cierra y vuelve a abrir tu cliente de IA. El servidor MCP en sí no tiene estado; reconectarse es seguro.
Flujos de trabajo de ejemplo
Shooter 2D de vista cenital
"Create a 2D scene called Main.tscn"
"Add a CharacterBody2D called Player at the center"
"Create a movement + shooting script for the Player"
"Add an Area2D called Enemy that moves toward the player"
"Run the project and show errors"Plataformas 3D
"Create a 3D scene with a StaticBody3D floor (MeshInstance3D box, scale 20x1x20)"
"Add a CharacterBody3D player with a CapsuleShape3D collision"
"Create a 3D character controller script with jump and gravity"
"Add a Camera3D as a child of the player with offset Vector3(0, 2, 5)"Modo de solo lectura
READ_ONLY_MODE=true npx godot-mcp-pilotDeshabilita todas las herramientas de escritura. Útil para flujos de trabajo de CI/CD o revisión.
Desarrollo
git clone https://github.com/pushks18/godot-mcp-pilot
cd godot-mcp-pilot
npm install
npm run build
# Run the setup wizard
npm run setup
# Development mode (ts-node, no build step)
npm run devEstructura del proyecto
godot-mcp-pilot/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server + tool routing
│ ├── config.ts # Godot path detection, env config
│ ├── godot-process.ts # Process management (spawn, capture)
│ ├── tools/
│ │ ├── system.ts # Version, project listing/info
│ │ ├── execution.ts # Launch editor, run/stop project
│ │ ├── scene.ts # Scene CRUD + node manipulation
│ │ ├── script.ts # GDScript read/write/analyze
│ │ ├── assets.ts # Asset listing/inspection
│ │ ├── project_settings.ts # Settings, autoloads, input maps
│ │ └── uid.ts # Godot 4 UID management
│ └── utils/
│ ├── path.ts # Path validation (prevents traversal)
│ ├── tscn.ts # .tscn parser and serializer
│ └── project_godot.ts # project.godot reader
└── scripts/
├── setup.js # Interactive setup wizard
└── godot_operations.gd # Bundled GDScript for runtime opsCompatibilidad
Godot 4.x (objetivo principal — probado en 4.2, 4.3, 4.4)
Godot 3.x — las herramientas básicas funcionan; se aplican diferencias en el formato de escena
Protocolo MCP — especificación 2024-11-05
Node.js — 18+
Seguridad
Todas las rutas de archivo se validan para permanecer dentro del directorio del proyecto (sin recorrido de rutas)
launch_editoryrun_projectsolo inician procesos con argumentos seguros y predefinidosUsa
READ_ONLY_MODE=trueen entornos no confiablesEl servidor nunca ejecuta comandos de shell arbitrarios, solo el binario de Godot
Licencia
MIT
Available Tools
44 toolsadd_autoloadB
Add or update an autoload (singleton) in the project settings. The script will be instantiated automatically when the project starts.
Inputs: projectPath (required), name (required), scriptPath (required), enabled.
add_input_actionB
Add a new input action to the project's Input Map (with no events bound). Use the Godot editor or set_project_setting to bind keys to it.
Inputs: projectPath (required), actionName (required).
add_nodeC
Add a new node to an existing scene.
Inputs: projectPath (required), scenePath (required), nodeType (required), nodeName (required), +2 more.
add_script_functionA
Append a new function to a GDScript file. Fails if the function already exists.
Inputs: projectPath (required), scriptPath (required), funcName (required), body (required), +3 more.
add_signalC
Add a signal declaration to a GDScript file. Inserted after existing signals.
Inputs: projectPath (required), scriptPath (required), signalName (required), params.
add_variableB
Add a top-level variable or property declaration to a GDScript file.
Inputs: projectPath (required), scriptPath (required), varName (required), type, +2 more.
analyze_scriptB
Perform basic static analysis on a GDScript file — finds common errors and Godot 4 migration issues.
Inputs: projectPath (required), scriptPath (required).
create_sceneB
Create a new .tscn scene file with a specified root node type.
Inputs: projectPath (required), scenePath (required), rootNodeType.
create_scriptB
Create a new GDScript file. Use the template param to pick a starter template: 'CharacterBody2D', 'CharacterBody3D', 'Singleton', or provide custom content.
Inputs: projectPath (required), scriptPath (required), template.
duplicate_nodeA
Duplicate a node (and its children) within the same scene, giving it a new name. The duplicate is placed under the same parent as the original.
Inputs: projectPath (required), scenePath (required), nodePath (required), newName (required).
edit_nodeC
Modify properties of an existing node in a scene.
Inputs: projectPath (required), scenePath (required), nodePath (required), properties (required).
get_asset_infoB
Get detailed metadata about a specific asset: type, size, UID, and import settings.
Inputs: projectPath (required), assetPath (required).
get_debug_outputB
Get console output (stdout/stderr) from the running or last run project.
Inputs: no named parameters.
get_godot_versionA
Get the installed Godot engine version and platform information.
Inputs: no named parameters.
get_main_sceneB
Get the project's configured main (startup) scene path.
Inputs: projectPath (required).
get_project_infoB
Get metadata about a Godot project: name, version, scene/script/asset counts.
Inputs: projectPath (required).
get_project_settingsA
Read the project.godot configuration. Optionally filter to a specific section (e.g. "application", "display", "input", "autoload", "rendering").
Inputs: projectPath (required), section.
get_uidB
Get the Godot 4 unique ID (uid://) for a resource file.
Inputs: projectPath (required), filePath (required).
instantiate_sceneB
Instantiate a packed scene (sub-scene) as a child node inside another scene. Adds the ext_resource entry automatically.
Inputs: projectPath (required), scenePath (required), subScenePath (required), parentNodePath, +1 more.
launch_editorA
Open the Godot editor for a project. Non-blocking — returns immediately.
Inputs: projectPath (required).
list_assetsB
List all asset files in a project (textures, audio, meshes, fonts, shaders, etc.). Optionally filter by type.
Inputs: projectPath (required), assetType.
list_autoloadsB
List all autoload (singleton) entries configured in the project.
Inputs: projectPath (required).
list_input_actionsB
List all custom input actions defined in the project (Project > Project Settings > Input Map).
Inputs: projectPath (required).
list_projectsC
Find Godot projects (project.godot files) under a directory.
Inputs: directory (required), recursive.
list_project_scenesC
List all .tscn scene files in a project.
Inputs: projectPath (required).
list_project_scriptsB
List all GDScript (.gd) files in a project.
Inputs: projectPath (required).
list_script_functionsA
Parse a GDScript file and return all functions, signals, and top-level variables with their names, parameters, return types, and line numbers.
Inputs: projectPath (required), scriptPath (required).
load_spriteC
Load a texture resource into a Sprite2D (or TextureRect) node.
Inputs: projectPath (required), scenePath (required), nodePath (required), texturePath (required).
modify_scriptC
Overwrite a GDScript file with new content.
Inputs: projectPath (required), scriptPath (required), newContent (required).
move_nodeA
Move (re-parent) a node to a different parent within the same scene. All descendant parent paths are updated automatically.
Inputs: projectPath (required), scenePath (required), nodePath (required), newParentPath (required).
read_sceneB
Read a scene file — returns raw .tscn text and a structured node list.
Inputs: projectPath (required), scenePath (required).
read_scriptB
Read the source code of a GDScript file.
Inputs: projectPath (required), scriptPath (required).
remove_autoloadC
Remove an autoload singleton from the project settings.
Inputs: projectPath (required), name (required).
remove_input_actionC
Remove an input action from the project's Input Map.
Inputs: projectPath (required), actionName (required).
remove_nodeB
Remove a node (and all its children) from a scene.
Inputs: projectPath (required), scenePath (required), nodePath (required).
remove_script_functionC
Remove a function and its entire body from a GDScript file.
Inputs: projectPath (required), scriptPath (required), funcName (required).
run_gdscriptA
Run a GDScript snippet headlessly inside a project and return the output. The script body is wrapped in a SceneTree subclass automatically — just write the statements to execute (e.g. print("hello")). Great for quick tests and calculations that need Godot's built-in types.
Inputs: projectPath (required), scriptBody (required), timeoutMs.
run_projectA
Run a Godot project in debug mode (background). Optionally run a specific scene. Use get_debug_output to retrieve console logs after starting.
Inputs: projectPath (required), scene.
save_sceneC
Save a scene (re-writes it to disk, optionally to a new path).
Inputs: projectPath (required), scenePath (required), newPath.
set_main_sceneC
Set the project's main (startup) scene.
Inputs: projectPath (required), scenePath (required).
set_project_settingA
Write a setting to project.godot. The value must be a valid Godot config value string. For strings, wrap in double quotes: e.g. value='"res://scene.tscn"'. For booleans/numbers use: 'true', '42'. Creates the section if it doesn't exist.
Inputs: projectPath (required), section (required), key (required), value (required).
set_scene_scriptA
Attach a GDScript to a node in a scene, or detach the current script. Automatically adds the ext_resource entry to the .tscn file.
Inputs: projectPath (required), scenePath (required), nodePath (required), scriptPath.
stop_projectA
Stop the currently running Godot project.
Inputs: no named parameters.
update_project_uidsA
Re-import all project assets to refresh Godot 4 UIDs. Runs Godot headlessly. Use after adding or moving resource files.
Inputs: projectPath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Every tool has a clearly distinct purpose with no ambiguity. Tools are well-organized into categories like project management, scene editing, script manipulation, and asset handling, making it easy for an agent to select the correct tool for each task without confusion.
All tool names follow a consistent verb_noun pattern with snake_case throughout, such as 'add_autoload', 'create_scene', and 'get_project_info'. This predictability enhances readability and usability for agents.
With 44 tools, the count is borderline high for the Godot domain, which could feel heavy and overwhelming. While the tools cover many aspects comprehensively, the large number may increase complexity for agents in navigation and selection.
The tool set provides complete CRUD/lifecycle coverage for Godot project management, including project setup, scene and script editing, asset handling, and runtime operations. There are no obvious gaps, ensuring agents can handle all core workflows without dead ends.
Related MCP Connectors
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to directly run, inspect, modify, and debug Godot game development projects through 110+ tools covering scenes, scripts, resources, runtime debugging, and asset management.333MIT
- AlicenseBqualityDmaintenanceAn enhanced MCP server for interacting with the Godot game engine, enabling AI assistants to launch the editor, run projects, manage scenes and nodes, and handle scripts.16MIT
- AlicenseCqualityCmaintenanceAn MCP server providing AI assistants with 149 tools to fully control the Godot game engine, including runtime code execution, scene manipulation, physics, audio, networking, animation, and more.100121 npm522MIT
- AlicenseAqualityDmaintenanceAn MCP server that gives AI assistants full control over the Godot game engine, enabling scene building, script writing, game running, and more through natural language.758MIT