skills / godot-mcp.md
This skill teaches the LLM how to use the godot-mcp MCP tool set while developing a Godot game.
With godot-mcp the LLM can:
godot-mcp comes from the project Coding-Solo/godot-mcp. It is an MCP server
that turns many Godot actions into tools the model can call.
The goal is simple: the LLM gives commands, reads the results, and fixes its next command. This makes the LLM write better code, because it can see what actually works in a real Godot project.
skills / godot-mcp.md
This skill teaches the LLM how to use the godot-mcp MCP tool set while developing a Godot game.
With godot-mcp the LLM can:
godot-mcp comes from the project Coding-Solo/godot-mcp. It is an MCP server
that turns many Godot actions into tools the model can call.
The goal is simple: the LLM gives commands, reads the results, and fixes its next command. This makes the LLM write better code, because it can see what actually works in a real Godot project.
Error: <reason>. If there are solutions, it also adds
Possible solutions:\n- .... Read this text and fix your call. Do not repeat
the same wrong call.projectPath and directory must be absolute
paths. Other path args must be relative to the project. Never use ...search_godot_docs and fetch_godot_docs. Then act.stop_project or start a fresh run_project
before doing more.Every tool takes parameters in JSON Schema form (type, required,
description). Below are all tools. Required args are marked required;
optional args are marked optional.
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
launch_editor | projectPath: string | β | Open the Godot editor for a project folder (must contain project.godot). Opens in the background. |
run_project | projectPath: string | scene: string | Run the project in debug (headless) mode and capture output. Use scene to open a specific scene. Then read output with get_debug_output. |
get_debug_output | β | β | Return stdout/stderr of the running project (JSON). Errors if nothing is running. |
stop_project | β | β | Stop the running project and return its final output (JSON). Errors if nothing is running. |
get_godot_version | β | β | Return the Godot executable version string. |
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
list_projects | directory: string | recursive: boolean | Find Godot projects (folders with project.godot) inside a folder. Optional recursive search. Returns JSON array. |
get_project_info | projectPath: string | β | Return project metadata: name, path, Godot version, and file counts (scenes/scripts/assets/other). Returns JSON. |
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
create_scene | projectPath, scenePath | rootNodeType: string | Create a new scene file (relative to project, e.g. ui/main.tscn). Optional root node type (default Node2D). |
add_node | projectPath, scenePath, nodeType, nodeName | parentNodePath, properties: record | Add a node to an existing scene. nodeType must be a built-in Godot class name. parentNodePath is like root or root/Player. properties sets key/value attributes. |
load_sprite | projectPath, scenePath, nodePath, texturePath | β | Load an image into a Sprite2D / Sprite3D / TextureRect node. Node path is like root/Player/Sprite2D. |
export_mesh_library | projectPath, scenePath, outputPath | meshItemNames: string[] | Export a 3D scene to a MeshLibrary .res file (for GridMap). Optional subset of mesh item names. |
save_scene | projectPath, scenePath | newPath: string | Save a scene. Optional new path to write a variant. |
get_uid | projectPath, filePath | β | Get the UID of a file (relative to project). Godot 4.4+ only. |
update_project_uids | projectPath | β | Re-save resources to refresh all UID references in a project. Godot 4.4+ only. |
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
search_godot_docs | query: string | maxResults: int, version: string | Search the official docs. Returns matching pages as JSON [{title, url, snippet}]. version can be stable/beta/4.3/4.4/5.0. |
fetch_godot_docs | url: string | maxChars: int | Fetch and return the readable text of one docs page. maxChars sets the char limit. |
Important about search:
search_godot_docsmatches keywords. It can return several pages that mention the word, not just one exact page. So pick the most relevant result, then callfetch_godot_docson itsurl. If the result looks wrong, search again with different words. Do not assume the search result points to the exact page you wanted.
LM Studio shows these settings as a UI. You do not manage them directly, but they change tool behavior:
| Setting | Type | Default | Effect |
|---|---|---|---|
docsMaxResults | number (1-20) | 5 | Max results from search_godot_docs. Override with the maxResults arg. |
docsMaxChars | number (500-100000) | 20000 | Max chars from fetch_godot_docs. Override with the maxChars arg. |
docsVersion | select | stable | Which docs version to search. Override with the version arg. |
godotPath | string | (empty) | Path to the Godot executable (overrides GODOT_PATH). Empty = auto-detect. |
toolsEnabled | boolean | true | Turn engine tools (A/B/C) on or off. Docs tools (D) are always on. Off returns "disabled" errors. |
projectPath and directory must be absolute paths (e.g.
/home/user/projects/my_game).scenePath, texturePath, outputPath, filePath are relative to the
project (e.g. scenes/level1.tscn, characters/hero.png). No ...nodeType and rootNodeType must be built-in Godot class names (e.g.
Node2D, CharacterBody2D, Sprite2D, CollisionShape2D, GridMap). Not a
path, not res://....add_node,
load_sprite, save_scene, export_mesh_library. They need the .tscn to
already exist. Use create_scene first if it does not exist.get_uid and update_project_uids need Godot 4.4+. If the version is
lower, they return a clear error and tell you to upgrade.godotPath or
GODOT_PATH.Scene created successfully at: ...). The tools get_debug_output, stop_project, list_projects,
get_project_info, and search_godot_docs return a JSON string. You can
parse it.Error: . If there are
solutions, it adds a Possible solutions: list. For example, when Godot
cannot be launched you will see
Error: Failed to create scene: Failed to spawn Godot executable "<path>": ENOENT β this means Godot is missing or the path is wrong, so set
godotPath / GODOT_PATH or install Godot before retrying.Error: text as debug info. Fix the argument or the
prior step, then call again. Do not repeat the same clear error more than
twice. If it still fails, search the docs or change your approach, and tell
the user what happened.// 1) Find Godot projects under a root folder { "tool": "list_projects", "arguments": { "directory": "/home/user/projects", "recursive": true } } // Returns something like: // [ { "path": "/home/user/projects/arcade", "name": "arcade" }, ... ] // 2) Get details about that project { "tool": "get_project_info", "arguments": { "projectPath": "/home/user/projects/arcade" } } // Returns: // { "name": "arcade", "path": "...", "godotVersion": "Godot 4.4-stable ...", "structure": { "scenes": 3, "scripts": 8, "assets": 12, "other": 2 } }
// 1) Create a Node2D scene { "tool": "create_scene", "arguments": { "projectPath": "/home/user/projects/arcade", "scenePath": "ui/hud.tscn", "rootNodeType": "Node2D" } } // 2) Add a Sprite2D node to it (the scene must exist first) { "tool": "add_node", "arguments": { "projectPath": "/home/user/projects/arcade", "scenePath": "ui/hud.tscn", "nodeType": "Sprite2D", "nodeName": "Background", "parentNodePath": "root", "properties": { "offset": { "x": 0, "y": 0 } } } } // 3) Load a texture into that node { "tool": "load_sprite", "arguments": { "projectPath": "/home/user/projects/arcade", "scenePath": "ui/hud.tscn", "nodePath": "root/Background", "texturePath": "assets/bg.png" } }
// 1) Run in headless debug mode, opening a scene { "tool": "run_project", "arguments": { "projectPath": "/home/user/projects/arcade", "scene": "scenes/main.tscn" } } // 2) Read the output (may be empty, or show errors) { "tool": "get_debug_output", "arguments": {} } // ... fix any problems ... // 3) Stop when done { "tool": "stop_project", "arguments": {} }
// 1) Search the docs for CharacterBody3D { "tool": "search_godot_docs", "arguments": { "query": "CharacterBody3D movement physics" } } // Returns: [ { "title": "...", "url": "https://docs.godotengine.org/en/stable/classes/class_characterbody3d.html", "snippet": "..." }, ... ] // 2) Read the most relevant page (use the url from step 1) { "tool": "fetch_godot_docs", "arguments": { "url": "https://docs.godotengine.org/en/stable/classes/class_characterbody3d.html", "maxChars": 4000 } } // 3) Follow the docs, then use add_node to create a CharacterBody3D node with the right collision setup
Here are common Godot tasks and the tool call order to use. Adjust as needed. Read each result before choosing the next step.
Goal: make a runnable minimum prototype with a hero, a scene, and collisions.
list_projects β confirm the project exists (if not, ask the user, or
create the project.godot first).get_project_info β see the current structure (scene/script counts) so you
do not rebuild what already exists.search_godot_docs("CharacterBody2D"). If needed,
fetch_godot_docs to read how move_and_slide works.create_scene β make the main scene (e.g. scenes/level.tscn, root
Node2D).add_node β add the hero as CharacterBody2D (nodeName: Player), with
properties like collision_layer.add_node β add a CollisionShape2D child, or create a StaticBody2D for
the ground.load_sprite β give the hero and ground textures.run_project (with scene: scenes/level.tscn) β get_debug_output to
look for script errors..gd file directly),
then use save_scene and run again to verify.stop_project when done.Principle: reproduce, narrow down, fix, verify.
run_project (with scene) to reproduce.get_debug_output to read stdout/stderr. Look for ERROR:, Invalid call,
and script line numbers.search_godot_docs + fetch_godot_docs to find the correct signature..gd file directly), call
save_scene if the scene structure changed, then run_project to verify.stop_project. Never leave a process running.search_godot_docs("GridMap") and search_godot_docs("MeshLibrary"). Read
the pages if needed.create_scene β make a 3D scene (root Node3D, or WorldEnvironment, etc.).add_node β add a GridMap node. Set properties like cell_size and
cell_half_size per the docs..res MeshLibrary: use add_node to create the related node,
then fill the GridMap in GDScript (the tool builds the structure).export_mesh_library (outputPath like assets/mesh_lib.res; optional
meshItemNames subset).run_project + get_debug_output to verify the level works.godot-mcp's add_node, when it needs to load a script by class name, only accepts
names from the Project Global Class Registry. This is a safety choice (it
blocks arbitrary paths like res://evil.gd). So:
project.godot / project settings).add_node with nodeType set to the registered
class name. Or use a built-in class name and attach the script another way.get_godot_version β confirm it is >= 4.4.get_uid (filePath like scenes/level.tscn) to get the UID of one file.update_project_uids.res://...) instead of UIDs.list_projects / get_project_info to confirm the project and path....nodeType / rootNodeType use valid class names.create_scene first).search_godot_docs and fetch_godot_docs.stop_project and leave no process
running.Error: I fixed it instead of
repeating the same call.| You want to⦠| Use this tool |
|---|---|
| Open the editor for a project | launch_editor |
| Run and debug a project | run_project β get_debug_output β stop_project |
| Know the Godot version | get_godot_version |
| Find projects | list_projects / get_project_info |
| Create a new scene | create_scene |
| Add a node/attribute to a scene | add_node |
| Load a texture onto a node | load_sprite |
| Export 3D assets for GridMap | export_mesh_library |
| Save a scene / make a variant | save_scene |
| Work with UIDs (4.4+) | get_uid / update_project_uids |
| Look up Godot official docs | search_godot_docs β fetch_godot_docs |
Coding-Solo/godot-mcp
(https://github.com/Coding-Solo/godot-mcp). It is written in TypeScript and
runs inside the Node.js environment built into LM Studio.Error: Failed to spawn Godot executable "<path>": <ENOENT|EACCES|EPERM>
(or any "Could not find Godot executable" message), set the godotPath setting
or the GODOT_PATH environment variable, or install Godot Engine. These tools
now report this error explicitly instead of silently pretending the operation
succeeded.Error: <reason>. If there are solutions, it also adds
Possible solutions:\n- .... Read this text and fix your call. Do not repeat
the same wrong call.projectPath and directory must be absolute
paths. Other path args must be relative to the project. Never use ...search_godot_docs and fetch_godot_docs. Then act.stop_project or start a fresh run_project
before doing more.Every tool takes parameters in JSON Schema form (type, required,
description). Below are all tools. Required args are marked required;
optional args are marked optional.
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
launch_editor | projectPath: string | β | Open the Godot editor for a project folder (must contain project.godot). Opens in the background. |
run_project | projectPath: string | scene: string | Run the project in debug (headless) mode and capture output. Use scene to open a specific scene. Then read output with get_debug_output. |
get_debug_output | β | β | Return stdout/stderr of the running project (JSON). Errors if nothing is running. |
stop_project | β | β | Stop the running project and return its final output (JSON). Errors if nothing is running. |
get_godot_version | β | β | Return the Godot executable version string. |
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
list_projects | directory: string | recursive: boolean | Find Godot projects (folders with project.godot) inside a folder. Optional recursive search. Returns JSON array. |
get_project_info | projectPath: string | β | Return project metadata: name, path, Godot version, and file counts (scenes/scripts/assets/other). Returns JSON. |
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
create_scene | projectPath, scenePath | rootNodeType: string | Create a new scene file (relative to project, e.g. ui/main.tscn). Optional root node type (default Node2D). |
add_node | projectPath, scenePath, nodeType, nodeName | parentNodePath, properties: record | Add a node to an existing scene. nodeType must be a built-in Godot class name. parentNodePath is like root or root/Player. properties sets key/value attributes. |
load_sprite | projectPath, scenePath, nodePath, texturePath | β | Load an image into a Sprite2D / Sprite3D / TextureRect node. Node path is like root/Player/Sprite2D. |
export_mesh_library | projectPath, scenePath, outputPath | meshItemNames: string[] | Export a 3D scene to a MeshLibrary .res file (for GridMap). Optional subset of mesh item names. |
save_scene | projectPath, scenePath | newPath: string | Save a scene. Optional new path to write a variant. |
get_uid | projectPath, filePath | β | Get the UID of a file (relative to project). Godot 4.4+ only. |
update_project_uids | projectPath | β | Re-save resources to refresh all UID references in a project. Godot 4.4+ only. |
| Tool | Required args | Optional args | What it does |
|---|---|---|---|
search_godot_docs | query: string | maxResults: int, version: string | Search the official docs. Returns matching pages as JSON [{title, url, snippet}]. version can be stable/beta/4.3/4.4/5.0. |
fetch_godot_docs | url: string | maxChars: int | Fetch and return the readable text of one docs page. maxChars sets the char limit. |
Important about search:
search_godot_docsmatches keywords. It can return several pages that mention the word, not just one exact page. So pick the most relevant result, then callfetch_godot_docson itsurl. If the result looks wrong, search again with different words. Do not assume the search result points to the exact page you wanted.
LM Studio shows these settings as a UI. You do not manage them directly, but they change tool behavior:
| Setting | Type | Default | Effect |
|---|---|---|---|
docsMaxResults | number (1-20) | 5 | Max results from search_godot_docs. Override with the maxResults arg. |
docsMaxChars | number (500-100000) | 20000 | Max chars from fetch_godot_docs. Override with the maxChars arg. |
docsVersion | select | stable | Which docs version to search. Override with the version arg. |
godotPath | string | (empty) | Path to the Godot executable (overrides GODOT_PATH). Empty = auto-detect. |
toolsEnabled | boolean | true | Turn engine tools (A/B/C) on or off. Docs tools (D) are always on. Off returns "disabled" errors. |
projectPath and directory must be absolute paths (e.g.
/home/user/projects/my_game).scenePath, texturePath, outputPath, filePath are relative to the
project (e.g. scenes/level1.tscn, characters/hero.png). No ...nodeType and rootNodeType must be built-in Godot class names (e.g.
Node2D, CharacterBody2D, Sprite2D, CollisionShape2D, GridMap). Not a
path, not res://....add_node,
load_sprite, save_scene, export_mesh_library. They need the .tscn to
already exist. Use create_scene first if it does not exist.get_uid and update_project_uids need Godot 4.4+. If the version is
lower, they return a clear error and tell you to upgrade.godotPath or
GODOT_PATH.Scene created successfully at: ...). The tools get_debug_output, stop_project, list_projects,
get_project_info, and search_godot_docs return a JSON string. You can
parse it.Error: . If there are
solutions, it adds a Possible solutions: list. For example, when Godot
cannot be launched you will see
Error: Failed to create scene: Failed to spawn Godot executable "<path>": ENOENT β this means Godot is missing or the path is wrong, so set
godotPath / GODOT_PATH or install Godot before retrying.Error: text as debug info. Fix the argument or the
prior step, then call again. Do not repeat the same clear error more than
twice. If it still fails, search the docs or change your approach, and tell
the user what happened.// 1) Find Godot projects under a root folder { "tool": "list_projects", "arguments": { "directory": "/home/user/projects", "recursive": true } } // Returns something like: // [ { "path": "/home/user/projects/arcade", "name": "arcade" }, ... ] // 2) Get details about that project { "tool": "get_project_info", "arguments": { "projectPath": "/home/user/projects/arcade" } } // Returns: // { "name": "arcade", "path": "...", "godotVersion": "Godot 4.4-stable ...", "structure": { "scenes": 3, "scripts": 8, "assets": 12, "other": 2 } }
// 1) Create a Node2D scene { "tool": "create_scene", "arguments": { "projectPath": "/home/user/projects/arcade", "scenePath": "ui/hud.tscn", "rootNodeType": "Node2D" } } // 2) Add a Sprite2D node to it (the scene must exist first) { "tool": "add_node", "arguments": { "projectPath": "/home/user/projects/arcade", "scenePath": "ui/hud.tscn", "nodeType": "Sprite2D", "nodeName": "Background", "parentNodePath": "root", "properties": { "offset": { "x": 0, "y": 0 } } } } // 3) Load a texture into that node { "tool": "load_sprite", "arguments": { "projectPath": "/home/user/projects/arcade", "scenePath": "ui/hud.tscn", "nodePath": "root/Background", "texturePath": "assets/bg.png" } }
// 1) Run in headless debug mode, opening a scene { "tool": "run_project", "arguments": { "projectPath": "/home/user/projects/arcade", "scene": "scenes/main.tscn" } } // 2) Read the output (may be empty, or show errors) { "tool": "get_debug_output", "arguments": {} } // ... fix any problems ... // 3) Stop when done { "tool": "stop_project", "arguments": {} }
// 1) Search the docs for CharacterBody3D { "tool": "search_godot_docs", "arguments": { "query": "CharacterBody3D movement physics" } } // Returns: [ { "title": "...", "url": "https://docs.godotengine.org/en/stable/classes/class_characterbody3d.html", "snippet": "..." }, ... ] // 2) Read the most relevant page (use the url from step 1) { "tool": "fetch_godot_docs", "arguments": { "url": "https://docs.godotengine.org/en/stable/classes/class_characterbody3d.html", "maxChars": 4000 } } // 3) Follow the docs, then use add_node to create a CharacterBody3D node with the right collision setup
Here are common Godot tasks and the tool call order to use. Adjust as needed. Read each result before choosing the next step.
Goal: make a runnable minimum prototype with a hero, a scene, and collisions.
list_projects β confirm the project exists (if not, ask the user, or
create the project.godot first).get_project_info β see the current structure (scene/script counts) so you
do not rebuild what already exists.search_godot_docs("CharacterBody2D"). If needed,
fetch_godot_docs to read how move_and_slide works.create_scene β make the main scene (e.g. scenes/level.tscn, root
Node2D).add_node β add the hero as CharacterBody2D (nodeName: Player), with
properties like collision_layer.add_node β add a CollisionShape2D child, or create a StaticBody2D for
the ground.load_sprite β give the hero and ground textures.run_project (with scene: scenes/level.tscn) β get_debug_output to
look for script errors..gd file directly),
then use save_scene and run again to verify.stop_project when done.Principle: reproduce, narrow down, fix, verify.
run_project (with scene) to reproduce.get_debug_output to read stdout/stderr. Look for ERROR:, Invalid call,
and script line numbers.search_godot_docs + fetch_godot_docs to find the correct signature..gd file directly), call
save_scene if the scene structure changed, then run_project to verify.stop_project. Never leave a process running.search_godot_docs("GridMap") and search_godot_docs("MeshLibrary"). Read
the pages if needed.create_scene β make a 3D scene (root Node3D, or WorldEnvironment, etc.).add_node β add a GridMap node. Set properties like cell_size and
cell_half_size per the docs..res MeshLibrary: use add_node to create the related node,
then fill the GridMap in GDScript (the tool builds the structure).export_mesh_library (outputPath like assets/mesh_lib.res; optional
meshItemNames subset).run_project + get_debug_output to verify the level works.godot-mcp's add_node, when it needs to load a script by class name, only accepts
names from the Project Global Class Registry. This is a safety choice (it
blocks arbitrary paths like res://evil.gd). So:
project.godot / project settings).add_node with nodeType set to the registered
class name. Or use a built-in class name and attach the script another way.get_godot_version β confirm it is >= 4.4.get_uid (filePath like scenes/level.tscn) to get the UID of one file.update_project_uids.res://...) instead of UIDs.list_projects / get_project_info to confirm the project and path....nodeType / rootNodeType use valid class names.create_scene first).search_godot_docs and fetch_godot_docs.stop_project and leave no process
running.Error: I fixed it instead of
repeating the same call.| You want to⦠| Use this tool |
|---|---|
| Open the editor for a project | launch_editor |
| Run and debug a project | run_project β get_debug_output β stop_project |
| Know the Godot version | get_godot_version |
| Find projects | list_projects / get_project_info |
| Create a new scene | create_scene |
| Add a node/attribute to a scene | add_node |
| Load a texture onto a node | load_sprite |
| Export 3D assets for GridMap | export_mesh_library |
| Save a scene / make a variant | save_scene |
| Work with UIDs (4.4+) | get_uid / update_project_uids |
| Look up Godot official docs | search_godot_docs β fetch_godot_docs |
Coding-Solo/godot-mcp
(https://github.com/Coding-Solo/godot-mcp). It is written in TypeScript and
runs inside the Node.js environment built into LM Studio.Error: Failed to spawn Godot executable "<path>": <ENOENT|EACCES|EPERM>
(or any "Could not find Godot executable" message), set the godotPath setting
or the GODOT_PATH environment variable, or install Godot Engine. These tools
now report this error explicitly instead of silently pretending the operation
succeeded.