Back to MCP Catalog

Godot MCP Server

GamingTypeScript
A Model Context Protocol server for Gaming

About this MCP

Godot MCP Server provides a bridge between AI assistants and the Godot game engine, enabling direct interaction with game projects and the editor. This server allows AI assistants to launch the editor, run projects, capture debug output, and control project execution through a standardized Model Context Protocol interface. By creating a direct feedback loop between AI assistants and Godot, this tool helps assistants understand what works in real Godot projects, leading to better code generation and debugging assistance. The server supports a comprehensive set of features for game development workflows, including scene management, project analysis, and UID handling.

Documentation

Overview

The Godot MCP Server enables AI assistants to interact directly with the Godot game engine through a standardized Model Context Protocol (MCP) interface. This server bridges the gap between AI assistants and game development, allowing for more effective collaboration and assistance.

Features

  • Editor Control: Launch the Godot editor for specific projects
  • Project Execution: Run Godot projects in debug mode and control execution
  • Debug Capture: Retrieve console output and error messages
  • Project Management: List and analyze Godot projects
  • Scene Operations: Create scenes, add nodes, load sprites, and save scenes
  • Resource Handling: Export 3D scenes as MeshLibrary resources
  • UID Management: Get and update UIDs for Godot 4.4+ projects

Requirements

Before installing the Godot MCP Server, ensure you have:

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

Installation

  1. Clone the repository:

    git clone https://github.com/Coding-Solo/godot-mcp.git
    
  2. Navigate to the project directory:

    cd godot-mcp
    
  3. Install dependencies and build the server:

    npm install
    npm run build
    

Configuration

Configuring with Claude

Add the Godot MCP Server to your Claude MCP settings file (located at ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):

{
  "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"
      ]
    }
  }
}

Configuring with Cursor

  1. Open Cursor and navigate to Settings > Features > MCP
  2. Click + Add New MCP Server
  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. Restart Cursor if necessary

Available Tools

The Godot MCP Server provides the following tools:

Project Management

  • launch_editor: Open the Godot editor for a specific project
  • get_godot_version: Retrieve the installed Godot version
  • list_projects: Find Godot projects in a specified directory
  • get_project_info: Get detailed information about project structure

Project Execution

  • run_project: Execute Godot projects in debug mode
  • get_debug_output: Retrieve console output and error messages
  • stop_project: Stop a running Godot project

Scene Management

  • create_scene: Create new scenes with specified root node types
  • add_node: Add nodes to existing scenes with customizable properties
  • load_sprite: Load sprites and textures into Sprite2D nodes
  • export_mesh_library: Export 3D scenes as MeshLibrary resources for GridMap
  • save_scene: Save scenes with options for creating variants

UID Management (Godot 4.4+)

  • get_uid: Get UID for specific files
  • update_project_uids: Update UID references by resaving resources

Usage Examples

Launching the Godot Editor

I need to open my Godot project in the editor.

Running a Project

Can you run my Godot project and show me the debug output?

Creating a New Scene

I'd like to create a new 2D scene with a Sprite2D as the root node.

Adding Nodes to a Scene

Please add a CollisionShape2D node to my player scene.

Troubleshooting

If you encounter issues with the Godot MCP Server:

  1. Ensure Godot is properly installed and accessible from your PATH
  2. Check that the path to the MCP server is correct in your configuration
  3. Enable DEBUG mode by setting the environment variable DEBUG=true
  4. Verify that your AI assistant supports MCP and is properly configured

For more detailed information, visit the GitHub repository.

Related MCPs

No related MCPs found

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.