godot script integration.com
godot script integration.com logo

Godot Script Integration

Integrates with Godot to enable AI interaction with scripts, supporting features like reading, listing, and updating scr...

Created byApr 22, 2025

Godot MCP (Model Context Protocol)

A comprehensive integration between Godot Engine and AI assistants using the Model Context Protocol (MCP). This plugin allows AI assistants to interact with your Godot projects, providing powerful capabilities for code assistance, scene manipulation, and project management.

Features

  • Full Godot Project Access: AI assistants can access and modify scripts, scenes, nodes, and project resources
  • Two-way Communication: Send project data to AI and apply suggested changes directly in the editor
  • Command Categories:

Quick Setup

1. Clone the Repository

2. Set Up the MCP Server

3. Set Up Claude Desktop

  1. Edit or create the Claude Desktop config file:
  1. Add the following configuration (or use the included claude_desktop_config.json as a reference):
  1. Restart Claude Desktop

4. Open the Example Project in Godot

  1. Open Godot Engine
  1. Select "Import" and navigate to the cloned repository
  1. Open the project.godot file
  1. The MCP plugin is already enabled in this example project

Using MCP with Claude

After setup, you can work with your Godot project directly from Claude using natural language. Here are some examples:

Example Prompts

Natural Language Tasks Claude Can Perform

  • "Create a main menu with play, options, and quit buttons"
  • "Add collision detection to the player character"
  • "Implement a day/night cycle system"
  • "Refactor this code to use signals instead of direct references"
  • "Debug why my player character falls through the floor sometimes"

Available Resources and Commands

Resource Endpoints:

  • godot://script/current - The currently open script
  • godot://scene/current - The currently open scene
  • godot://project/info - Project metadata and settings

Command Categories:

Node Commands

  • get-scene-tree - Returns the scene tree structure
  • get-node-properties - Gets properties of a specific node
  • create-node - Creates a new node
  • delete-node - Deletes a node
  • modify-node - Updates node properties

Script Commands

  • list-project-scripts - Lists all scripts in the project
  • read-script - Reads a specific script
  • modify-script - Updates script content
  • create-script - Creates a new script
  • analyze-script - Provides analysis of a script

Scene Commands

  • list-project-scenes - Lists all scenes in the project
  • read-scene - Reads scene structure
  • create-scene - Creates a new scene
  • save-scene - Saves current scene

Project Commands

  • get-project-settings - Gets project settings
  • list-project-resources - Lists project resources

Editor Commands

  • get-editor-state - Gets current editor state
  • run-project - Runs the project
  • stop-project - Stops the running project

Troubleshooting

Connection Issues

  • Ensure the plugin is enabled in Godot's Project Settings
  • Check the Godot console for any error messages
  • Verify the server is running when Claude Desktop launches it

Plugin Not Working

  • Reload Godot project after any configuration changes
  • Check for error messages in the Godot console
  • Make sure all paths in your Claude Desktop config are absolute and correct

Adding the Plugin to Your Own Godot Project

If you want to use the MCP plugin in your own Godot project:
  1. Copy the addons/godot_mcp folder to your Godot project's addons directory
  1. Open your project in Godot
  1. Go to Project > Project Settings > Plugins
  1. Enable the "Godot MCP" plugin

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Documentation

For more detailed information, check the documentation in the docs folder:
  • Getting Started
  • Installation Guide
  • Command Reference
  • Architecture

License

This project is licensed under the MIT License - see the LICENSE file for details.

Godot MCP (Model Context Protocol)

A comprehensive integration between Godot Engine and AI assistants using the Model Context Protocol (MCP). This plugin allows AI assistants to interact with your Godot projects, providing powerful capabilities for code assistance, scene manipulation, and project management.

Features

  • Full Godot Project Access: AI assistants can access and modify scripts, scenes, nodes, and project resources
  • Two-way Communication: Send project data to AI and apply suggested changes directly in the editor
  • Command Categories:

Quick Setup

1. Clone the Repository

2. Set Up the MCP Server

3. Set Up Claude Desktop

  1. Edit or create the Claude Desktop config file:
  1. Add the following configuration (or use the included claude_desktop_config.json as a reference):
  1. Restart Claude Desktop

4. Open the Example Project in Godot

  1. Open Godot Engine
  1. Select "Import" and navigate to the cloned repository
  1. Open the project.godot file
  1. The MCP plugin is already enabled in this example project

Using MCP with Claude

After setup, you can work with your Godot project directly from Claude using natural language. Here are some examples:

Example Prompts

Natural Language Tasks Claude Can Perform

  • "Create a main menu with play, options, and quit buttons"
  • "Add collision detection to the player character"
  • "Implement a day/night cycle system"
  • "Refactor this code to use signals instead of direct references"
  • "Debug why my player character falls through the floor sometimes"

Available Resources and Commands

Resource Endpoints:

  • godot://script/current - The currently open script
  • godot://scene/current - The currently open scene
  • godot://project/info - Project metadata and settings

Command Categories:

Node Commands

  • get-scene-tree - Returns the scene tree structure
  • get-node-properties - Gets properties of a specific node
  • create-node - Creates a new node
  • delete-node - Deletes a node
  • modify-node - Updates node properties

Script Commands

  • list-project-scripts - Lists all scripts in the project
  • read-script - Reads a specific script
  • modify-script - Updates script content
  • create-script - Creates a new script
  • analyze-script - Provides analysis of a script

Scene Commands

  • list-project-scenes - Lists all scenes in the project
  • read-scene - Reads scene structure
  • create-scene - Creates a new scene
  • save-scene - Saves current scene

Project Commands

  • get-project-settings - Gets project settings
  • list-project-resources - Lists project resources

Editor Commands

  • get-editor-state - Gets current editor state
  • run-project - Runs the project
  • stop-project - Stops the running project

Troubleshooting

Connection Issues

  • Ensure the plugin is enabled in Godot's Project Settings
  • Check the Godot console for any error messages
  • Verify the server is running when Claude Desktop launches it

Plugin Not Working

  • Reload Godot project after any configuration changes
  • Check for error messages in the Godot console
  • Make sure all paths in your Claude Desktop config are absolute and correct

Adding the Plugin to Your Own Godot Project

If you want to use the MCP plugin in your own Godot project:
  1. Copy the addons/godot_mcp folder to your Godot project's addons directory
  1. Open your project in Godot
  1. Go to Project > Project Settings > Plugins
  1. Enable the "Godot MCP" plugin

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Documentation

For more detailed information, check the documentation in the docs folder:
  • Getting Started
  • Installation Guide
  • Command Reference
  • Architecture

License

This project is licensed under the MIT License - see the LICENSE file for details.