Home / MCP / Godot MCP Server

Godot MCP Server

Provides an MCP interface to launch Godot, run projects, capture output, and manage scenes for AI-assisted development.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "godot": {
            "command": "node",
            "args": [
                "/absolute/path/to/godot-mcp/build/index.js"
            ],
            "env": {
                "GODOT_PATH": "/path/to/godot",
                "DEBUG": "true"
            }
        }
    }
}

Godot MCP is an MCP server that lets an AI assistant interact with the Godot game engine. You can launch the Godot editor, run projects, capture console output, manage scenes, and inspect project structure through a consistent interface that integrates with your AI tooling.

How to use

You will run the MCP server locally and connect your MCP client to it. The server exposes a set of capabilities that let you start the Godot editor for a specific project, run projects in debug mode, capture console output, and perform common scene-management tasks. Use these actions from your MCP client to automate common Godot workflows, analyze project structure, and iterate on AI-generated scenes and scripts.

How to install

Prerequisites: you need Node.js and npm installed on your system, and your environment should have access to the Godot executable when needed.

git clone https://github.com/Coding-Solo/godot-mcp.git
cd godot-mcp
npm install
npm run build

Configuration and usage notes

Configure your MCP client to connect to the Godot MCP server using a local stdio configuration. The server is started by running the built index script with Node.js. You can enable verbose logging with the DEBUG environment variable and point Godot to your executable with GODOT_PATH if needed.

# Example stdio configuration to run the local MCP server
{
  "type": "stdio",
  "name": "godot",
  "command": "node",
  "args": ["/absolute/path/to/godot-mcp/build/index.js"],
  "env": {
    "DEBUG": "true",
    "GODOT_PATH": "/path/to/godot"
  }
}

Tips for first runs

1) Ensure the Godot executable is available if you plan to launch the editor or run projects from the MCP server. 2) Start your MCP client and verify the godot server appears in the MCP server list. 3) Use the provided prompts to launch the editor, run a project, or inspect the project structure.

Security and reliability

Limit access to the MCP server to trusted clients. Do not expose the server to the public internet without proper authentication and network controls. Keep Node.js, npm, and your Godot installation up to date to reduce security risks and compatibility issues.

Troubleshooting

If Godot is not found, set the GODOT_PATH environment variable to the location of the Godot executable. If you encounter connection issues, ensure the MCP server is running and your client is configured correctly. For build issues, reinstall dependencies with npm install and rebuild with npm run build.

Notes on environment variables

You can customize behavior with these environment variables: GODOT_PATH to specify the Godot executable location, and DEBUG to enable verbose server-side logging. Use them in your MCP client configuration as shown above.

Available tools

launch_editor

Launch the Godot editor for a specified project, returning control to the AI assistant after the editor opens.

run_project

Execute a Godot project in debug mode and capture output and errors for analysis.

get_debug_output

Retrieve console output and error messages from a running or completed project.

stop_project

Stop a currently running Godot project gracefully.

get_godot_version

Return the installed Godot version detected by the MCP server.

list_projects

List Godot projects found in a specified directory.

get_project_info

Provide detailed information about a Godot project’s structure and assets.

create_scene

Create a new scene with a chosen root node type and basic properties.

add_node

Add nodes to an existing scene with customizable properties and positioning.

load_sprite

Load textures into Sprite2D nodes within scenes.

export_mesh_library

Export 3D scene content as a MeshLibrary resource for GridMap usage.

save_scene

Save the current scene with options to create variants.

get_uid

Get the UID for specific files in Godot 4.4+ projects.

update_project_uids

Update UID references by resaving resources after changes.