This plugin allows AI assistants to interact with your Godot projects through the Model Context Protocol (MCP). Through natural language commands, Claude can access and modify scripts, scenes, nodes, and resources, enabling powerful code assistance and project management capabilities.
Clone the repository:
git clone https://github.com/ee0pdt/godot-mcp.git
cd godot-mcp
Install and build the server:
cd server
npm install
npm run build
cd ..
Edit or create the Claude Desktop configuration file:
# For macOS
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"godot-mcp": {
"command": "node",
"args": [
"PATH_TO_YOUR_PROJECT/server/dist/index.js"
],
"env": {
"MCP_TRANSPORT": "stdio"
}
}
}
}
Be sure to replace PATH_TO_YOUR_PROJECT
with the absolute path to your cloned repository.
Restart Claude Desktop
project.godot
fileAfter setup, you can interact with your Godot project from Claude using natural language commands.
To invoke MCP commands in Claude, use the following syntax:
@mcp godot-mcp COMMAND PARAMETERS
To read the current script:
@mcp godot-mcp read godot://script/current
To read the current scene:
@mcp godot-mcp read godot://scene/current
To get project information:
@mcp godot-mcp read godot://project/info
To get the scene tree structure:
@mcp godot-mcp run get-scene-tree
To create a new node:
@mcp godot-mcp run create-node
Here are some natural language tasks you can ask Claude to perform:
Here's an example of how you might use Claude with MCP:
Ask Claude to review your current script:
@mcp godot-mcp read godot://script/current
I need help optimizing my player movement code. Can you suggest improvements?
Request scene modification:
@mcp godot-mcp run get-scene-tree
Add a cube in the middle of the scene and then make a camera that is looking at the cube.
To use the MCP plugin in your existing Godot project:
addons/godot_mcp
folder to your project's addons
directoryThere 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.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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.
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.