Godot MCP server

Interface with the Godot game engine. Provides tools for launching the editor, running projects, and capturing debug output.
Back to servers
Setup instructions
Provider
Solomon
Release date
Mar 20, 2025
Language
TypeScript
Stats
739 stars

Godot MCP is a server implementation of the Model Context Protocol (MCP) that enables AI assistants to interact with the Godot game engine. It allows assistants to launch the Godot editor, run projects, capture debug output, and control project execution through a standardized interface, creating a direct feedback loop for better code generation and debugging assistance.

Installation

Prerequisites

  • Godot Engine installed on your system
  • Node.js and npm
  • An AI assistant that supports MCP (Claude, Cursor, etc.)

Building from Source

Clone the repository and build the MCP server:

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

Configuration with AI Assistants

Configure with Claude

Add to your Claude MCP settings file:

{
  "mcpServers": {
    "godot": {
      "command": "node",
      "args": ["/absolute/path/to/godot-mcp/build/index.js"],
      "env": {
        "DEBUG": "true"
      },
      "disabled": false,
      "autoApprove": [
        "launch_editor",
        "run_project",
        "get_debug_output",
        "stop_project",
        "get_godot_version",
        "list_projects",
        "get_project_info",
        "create_scene",
        "add_node",
        "load_sprite",
        "export_mesh_library",
        "save_scene",
        "get_uid",
        "update_project_uids"
      ]
    }
  }
}

Configure with Cursor

Using the Cursor UI:

  1. Go to Cursor Settings > Features > MCP
  2. Click on the + Add New MCP Server button
  3. Fill out the form:
    • Name: godot (or any name you prefer)
    • Type: command
    • Command: node /absolute/path/to/godot-mcp/build/index.js
  4. Click "Add"
  5. Refresh to populate the tool list

Using Project-Specific Configuration:

Create a file at .cursor/mcp.json in your project directory:

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

Environment Variables

Customize server behavior with these environment variables:

  • GODOT_PATH: Path to the Godot executable (overrides automatic detection)
  • DEBUG: Set to "true" to enable detailed server-side debug logging

Usage

Your AI assistant will automatically run the MCP server when needed. Use the following example prompts:

Editor and Project Management

  • Launch the Godot editor for a specific project:

    Launch the Godot editor for my project at /path/to/project
    
  • Run a Godot project and view debug output:

    Run my Godot project and show me any errors
    
  • Get project information:

    Get information about my Godot project structure
    

Scene and Node Management

  • Create a new scene:

    Create a new scene with a Player node in my Godot project
    
  • Add nodes to scenes:

    Add a Sprite2D node to my player scene and load the character texture
    
  • Export 3D models:

    Export my 3D models as a MeshLibrary for use with GridMap
    

Advanced Features (Godot 4.4+)

  • UID Management:

    Get the UID for a specific script file in my Godot 4.4 project
    
    Update UID references in my Godot project after upgrading to 4.4
    

Troubleshooting

  • Godot Not Found: Set the GODOT_PATH environment variable to your Godot executable
  • Connection Issues: Ensure the server is running and restart your AI assistant
  • Invalid Project Path: Ensure the path points to a directory containing a project.godot file
  • Build Issues: Make sure all dependencies are installed by running npm install
  • For Cursor Specifically:
    • Ensure the MCP server shows up and is enabled in Cursor settings
    • MCP tools can only be run using the Agent chat profile (Cursor Pro or Business subscription)
    • Use "Yolo Mode" to automatically run MCP tool requests

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "godot" '{"command":"node","args":["/absolute/path/to/godot-mcp/build/index.js"],"env":{"DEBUG":"true"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later