Godot-MCP
About
Open-source MCP server connecting AI agents (Claude, Cursor, GitHub Copilot, Gemini, and more) to the Godot Editor and runtime (Godot 4.x, C#).
Details
- Author
- ivanmurzak
- Downloads
- 79
- Categories
- Developer Tools, Other, AI
Jump to
- Open-source MCP server
- Connects AI agents to Godot Editor and runtime
- Supports Claude, Cursor, GitHub Copilot, and Gemini
- Targets Godot 4.x with C# support
—
Godot MCPis an AI-powered game development assistantfor the Godot Editor. ConnectClaude,Cursor,Copilot, or any MCP-aware agent to Godot and let it inspect and drive your project — create nodes, edit scenes, manage resources and scripts, capture screenshots, and more.
Godot-MCP is the Godot counterpart ofUnity-MCP: a C#editor addonthat exposes Godot Editor operations asAI Toolsand connects them to an MCP server through the same hosted cloud backend (ai-game.dev) that powers Unity-MCP — or your own self-hosted server. The MCP / reflection stack isnot forked: it is shared with Unity-MCP and consumed fromnuget.orgasPackageReferences.
💬 Join our Discord Server— Ask questions, showcase your work, and connect with other developers!
- ✔️AI agents— Use the best agents fromAnthropic,OpenAI,Google, or any other provider with no vendor lock-in
- ✔️42 built-in Tools— A wide range ofMCP Toolsacross 12 families for operating the Godot Editor
- ✔️C# & GDScript— Read, create, and update both.csand.gdscripts, and attach them to nodes
- ✔️Scene & Node control— Build and edit the scene tree, open/save.tscnscenes, mutate.tres/.resresources
- ✔️Visual feedback— Capture viewport, camera, and isolated-node screenshots the LLM can inspect
- ✔️Reflection escape hatch— Find and call any C# method across loaded assemblies viaReflectorNet
- ✔️Cloud or self-hosted— Connect toai-game.devout of the box, or point at your own server
- ✔️Natural conversation— Chat with AI like you would with a human
Get up and running from a terminal using thegodot-cli(the Godot analog ofunity-mcp-cli) — no manual file copying or csproj editing required:
That's it. Ask your AI"Create 3 cubes in a circle with radius 2"and watch it happen. ✨
Offline / dev install:install-plugin --source <path-to>/addons/godot_mcpcopies the addon from a local directory instead of downloading it. Prefer the matching release version withinstall-plugin --version <x.y.z>if you need a specific addon build. The manual route (copy the addon + add the NuGet packages yourself) is still documented underInstallationSteps 1–2 for the Asset Library / hand-managed flows.
See thefull CLI documentationfor every command, editor-resolution order, and connection env vars.
- Quick Start
- Tools Reference
- Requirements
- Installation
- Option A — Godot Asset Library (recommended)
- Option B — GitHub Release zip
- Option C — copy from source
- Cloud mode (default) — ai-game.dev
- Custom mode — your own server
- Local server — let the addon download & run it for you
- Build & run the server manually (advanced)
- Capturing in-game runtime errors
- Sample: a live game-state tool
- Where the server URL and token come from
- Security: opt-in only, default OFF
Godot-MCP ships42 built-in toolsgrouped into12 families. Tool names mirror Unity-MCP where sensible (scene-,node-, …). Every tool returns a structured,ReflectorNet-serialized result (or a PNG image for screenshots). All editor tools are available immediately after the addon is enabled — no extra configuration required. Theruntime-errorsfamily is the exception: it surfaces errors from therunning gameand isOFF by default— opt in withbuilder.WithRuntimeErrorCapture()(seeCapturing in-game runtime errors).
- ping— Lightweight readiness probe; echoes a message back, or returnspong. ASystem tool: call it over/api/system-tools/ping(orgodot-cli run-system-tool ping); it is not listed intools/list.
- node-find— Find nodes in the active scene tree by path, type, or name.
- node-create— Create a new node under a parent (optionally instancing a.tscnsub-scene), optionally at a specific siblingindex(negative counts from the end).
- node-modify— Set fields/properties on one or more nodes.
- node-set-parent— Reparent nodes within the scene tree.
- node-reorder— Move an existing node to a different position among its siblings (Node.MoveChild) — the only way to rearrange an existing scene short of delete-and-recreate.
- node-duplicate— Duplicate nodes together with their subtrees.
- node-delete— Delete nodes from the active scene.
- scene-open— Open ares://.tscnPackedScene in the editor.
- scene-save— Save an open scene back to its.tscnfile.
- scene-create— Create a new scene asset in the project.
- scene-list-opened— List the scenes currently open in the editor.
- scene-get-data— Retrieve the root nodes / structure of a scene.
- resource-find— Search the project for resources (.tres/.res).
- resource-get-data— Read a resource's serialized fields and properties.
- resource-modify— Modify a resource's properties.
- resource-create— Create a new resource asset.
- resource-move— Move / rename a resource, keeping.importsidecars consistent.
- resource-delete— Delete a resource from the project.
- filesystem-list— Browse theres://tree (file types + uids) via the editor file index.
- filesystem-reimport— Reimport files in the project.
- script-read— Read a.cs/.gdscript file.
- script-create— Create a new script file.
- script-update— Update an existing script file's contents.
- script-delete— Delete a script file.
- script-attach-to-node— Attach a script to a node.
- script-validate— Validate GDScript (.gd) files and return structured parse/compile diagnostics.
- screenshot-viewport— Capture the editor viewport as a PNG.
- screenshot-camera— Capture from a specific camera.
- screenshot-isolated— Render a node in isolation from a chosen angle.
- editor-application-get-state— Read the editor application/run state.
- editor-application-set-state— Start / stop the running game.
- editor-selection-get— Get the current editor selection.
- editor-selection-set— Set the current editor selection.
- console-get-logs— Read the plugin's collected editor logs (with filtering). This includes the plugin's connection lifecycle diagnostics (connect/disconnect, drain-timeout, config save/load, skill-gen, dev-control, dispatcher, and runtime-capture warnings), which route through the same capture sink as its framework logs.
- console-clear-logs— Clear the collected log cache.
- reflection-method-find— Find C# methods (including private) across every loaded assembly.
- reflection-method-call— Call any C# method with input parameters and get the result.
runtime-errors(in-game;OFF by default— enable withbuilder.WithRuntimeErrorCapture())
- runtime-errors-get— Read captured in-game runtime errors (oldest-first, newest-kept page); poll only new errors viasinceSequence. Returnsavailable:falsewhen capture was never enabled, so an empty list is never mistaken for health.
- runtime-errors-clear— Clear the captured in-game runtime-error buffer (a no-op when capture is not enabled); the monotonic sequence counter is preserved.
skills(system tools — served on/api/system-tools/, not advertised to AI agents)
- godot-skill-create— Write a new C# (.cs) MCP tool file into the project. The tool becomes callable once the project is rebuilt (Godot builds C# out-of-band).
- godot-skill-generate— Regenerate everySKILL.mdfrom the tools currently registered in the editor, into the selected AI agent's skills folder.
- Godot 4.3+— the C# / .NET (mono) edition. The addon csproj pinsGodot.NET.Sdk/4.3.0as its minimum floor; newer 4.x editors (4.4, 4.5) work.
- .NET 8 SDK(net8.0).
[!IMPORTANT] Godot-MCP requires themono (C#/.NET)build of Godot — the standard (GDScript-only) build cannot compile the addon.
There are two things to install: theaddon(the plugin files) and the twoNuGet packagesthe addon's C# depends on. Godot compilesevery.csunder your project into one assembly, so your project's.csprojmust declare the same NuGet references the addon needs — otherwise the addon's C# will not compile.
Pickoneof the following ways to get theaddons/godot_mcp/folder into your Godot C# project.
Fully automated (recommended for terminal workflows):godot-cliinstall-plugin ./MyGodotProjectdoesall of Step 1 and Step 2 in one command— it downloadsaddons/godot_mcp/from the matching GitHub release, adds the two NuGet packagesand the extension-catalog<EmbeddedResource>to your.csproj, and enables the plugin inproject.godot, idempotently. Use--source <path>/addons/godot_mcpto install from a local copy offline. The manual Options A–C below remain for in-editor (Asset Library) and hand-managed installs.
Option A — Godot Asset Library (recommended)
The easiest path: install directly from inside the editor.
- Open theAssetLibtab at the top of the Godot editor.
- Search forGodot-MCPand open the asset.
- ClickDownload, thenInstall— Godot unpacks the addon into your project'sres://addons/godot_mcp/.
The Asset Library entry is published per release and always points at a tagged version, so an in-editor install gives you a known-good snapshot of the addon. (See note below if the entry is not visible yet.)
Grab the latestgodot-mcp-addon-<version>.zipfrom theReleases pageand extract it into your project's root — the archive already containsaddons/godot_mcp/..., so the files land atres://addons/godot_mcp/.
Copy theaddons/godot_mcp/folder from this repository (or your clone) into your project'saddons/directory by hand.
After the files are in place (Options A–C),enablethe plugin:Project → Project Settings → Plugins → Godot-MCP → Enable. (If you used the fully-automatedgodot-cliinstall-pluginabove, the plugin is already enabled and the NuGet packages + extension-catalog embed are already added — skip straight toStep 3.) On a successful load the editor Output panel prints:
Asset Library availability.The in-editor AssetLib entry (Option A) appears after the maintainer's first submission is approved by the Godot Asset Library moderators. Until then, use Option B (GitHub Release zip) or Option C.
Step 2: Add the NuGet packages + the extension catalog embed
Add bothPackageReferencesandthe extension-catalog<EmbeddedResource>to your project's.csproj(use these exact pinned versions — they must match the addon'sGodot-MCP.csproj):
<ItemGroup> <PackageReference Include="com.IvanMurzak.ReflectorNet" Version="5.4.0" /> <PackageReference Include="com.IvanMurzak.McpPlugin" Version="8.1.0" /> </ItemGroup> <!-- Embed the extension catalog so the Extensions panel populates (else it is EMPTY). --> <ItemGroup> <EmbeddedResource Include="addons/godot_mcp/extensions.catalog.json" LogicalName="Godot-MCP.extensions.catalog.json" /> </ItemGroup>
The<EmbeddedResource>isas required as the NuGet pins: the addon's pure-managed extension registry reads the catalog at editor runtime viaGetManifestResourceStream(nores:/// filesystem fallback), and because the addon ships assourceits own<EmbeddedResource>does not carry into your project — so without this line yourExtensions panel is empty. TheLogicalNamemust be exactlyGodot-MCP.extensions.catalog.jsonso the resource resolves identically to the addon's own assembly.
Rundotnet restoreso the packages land in your NuGet cache, then build.No manual DLL copying is required— at editor runtime the addon's assembly resolver locates the DLLs in your NuGet global-packages folder by reading the build's.deps.json. (If you prefer self-contained output, set<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>so the DLLs are copied beside your project assembly instead.)
Choose a singleAI agentyou prefer — you don't need to install all of them. This is your main chat window to communicate with the LLM.
- Claude Code(recommended)
- Claude Desktop
- GitHub Copilot in VS Code
- Antigravity
- Cursor
- Any other MCP-aware agent
Write the agent's MCP-client config withgodot-cli setup-mcp <agent> ./MyGodotProject. By default it points the client at theproject-pinnedcloud URL<host>/mcp/p/<pin>, so an agent session launched in this project folder routes tothisproject's editor even when your account has several editors connected; pass--no-pinfor the bare<host>/mcpURL. OAuth-capable agents (Claude Code, Cursor, Copilot, …) authenticate to the cloud through their own OAuth handshake — no token is written into the config. See theCLI documentationfor the full list of supported agents.
The plugin connects to an MCP server in one of two modes. The mode and its URL / token can be set in the serialized config or overridden at process start with environment variables (handy for CI, headless runs, and local dev). All variable names are the Godot analog of Unity-MCP'sUNITY_MCP_. The active mode always recomputes from the environment, so a process-level override wins over the serialized config without editing any file.
InCloudmode the plugin connects to the hosted backend athttps://ai-game.dev(the/mcphub path is appended automatically). This is the defaultconnectionMode.
InCustommode the plugin connects to a server URL you supply (a local dev server, a self-hosted instance, etc.).
Example — boot the editor pointed at a local server:
export GODOT_MCP_CONNECTION_MODE=Custom export GODOT_MCP_HOST=http://localhost:5300 # export GODOT_MCP_TOKEN=... # only if the server enforces auth
Thegodot-cli opencommand forwards these env vars for you via--mode,--url,--cloud-url, and--tokenflags.
InCloudmode you don't run a server at all — the plugin talks toai-game.dev. If you want to host the server yourself (local dev, CI, or your own cloud), you have two options: let the addondownload and run the matched server binary for you(recommended), orrun it manually(advanced).
The server itself is the shared, engine-agnosticGameDev-MCP-Server— one server binary (gamedev-mcp-server) serving Unity-MCP, Godot-MCP, and Unreal-MCP. It is released from its own repo on its own version line; this addonpinsthe server version it consumes (theServerVersionconstant inaddons/godot_mcp/Runtime/Connection/GodotMcpServerView.cs).
Local server — let the addon download & run it for you
- Start Server— downloads the server build for thepinned server version, caches it, launches it, and the plugin connects to it.Stop Serverterminates it (it is also stopped automatically when you close the editor).
- The download is the per-platform release assetgamedev-mcp-server-<rid>.zip— pulled overHTTPS fromgithub.comonly, from theGameDev-MCP-Server releasetaggedv<ServerVersion>, so the asset URL is:https://github.com/IvanMurzak/GameDev-MCP-Server/releases/download/v<ServerVersion>/gamedev-mcp-server-<rid>.zip. The<rid>(platform runtime identifier — e.g.win-x64,osx-arm64,linux-x64) is resolved automatically for your machine; all seven published RIDs are supported (win-x64/x86/arm64,linux-x64/arm64,osx-x64/arm64).
- The binary is cached under your project's.godot/mcp-server/<rid>/folder (gitignored) and re-used on later launches; it is only re-downloaded when the pinned server version changes (anexactversion match, so the editor plugin and the server it talks to never drift). The server is launched on the port from yourServer URL(defaulthttp://localhost:8080), over thestreamableHttptransport.
Version pinning & security.The download URL is derivedsolelyfrom the addon's pinnedServerVersionconstant and your platform RID — there is no arbitrary-URL binary execution. The addon version and the server version aredecoupled: bumping the consumed server is an explicit addon change (a newServerVersion), and the pinnedv<ServerVersion>release must already exist on GameDev-MCP-Serverbeforean addon release that pins it. If the release asset can't be fetched (you're offline), the addon logs a warning and the local server simply doesn't start — fall back to the manual run below, or use Cloud mode. The download isskipped entirely under CI(theCI/GITHUB_ACTIONSenvironment), where no local server is hosted.
To run the server as a standalone / cloud process, download aGameDev-MCP-Server releasebinary (or use theaigamedeveloper/mcp-serverDocker image). Both transports are supported:streamableHttp(HTTP) andstdio.
# HTTP transport on port 8080 ./gamedev-mcp-server --client-transport streamableHttp --port 8080 # stdio transport — for local MCP clients that launch the server directly ./gamedev-mcp-server --client-transport stdio
Then point the plugin at it inCustom mode(GODOT_MCP_HOST=http://localhost:8080).
Choosing a transport:usestdiowhen the MCP client launches the server binary directly (local use — the most common setup); usestreamableHttpwhen running the server as a standalone process or in the cloud and connecting over HTTP.
Godot-MCP supports customMCP Tooldevelopment directly in your project code. A tool family is apartial classdecorated[AiToolType]; each tool method is decorated[AiTool("tool-name", …)]with a[Description]on the method and on each parameter to help the LLM understand it.
Any Godot API call (Node,Resource,EditorInterface, …)mustrun on the editor main thread — marshal it throughMainThread.Instance.Run(...)(ReflectorNet'sMainThreadis backed by the Godot main-thread dispatcher on plugin boot). Never touch engine objects off-thread.
[AiToolType] public partial class Tool_MyFeature { [AiTool("my-custom-task", Title = "Do a custom task")] [Description("Explain to the LLM what this does and when to call it.")] public string CustomTask ( [Description("Explain to the LLM what this parameter is.")] string inputData ) { // ... work that does not touch the Godot API can run on this background thread ... return MainThread.Instance.Run(() => { // ... touch EditorInterface / Node / Resource here, on the main thread ... return "[Success] Operation completed."; }); } }
Return a structured data model (ReflectorNet-serialized) orvoidfor side-effect-only ops — never ad-hoc string formatting for parseable output. Usestring? optional = nullparameters (nullable + default) to mark them as optional for the LLM.
Everything above runs the MCP connectioninside the Godot editor(the[Tool]EditorPluginboots it for you). Godot-MCP canalsorun inside arunning / exported game build(debugorrelease) — the Godot analog of Unity-MCP's runtime mode. This lets an LLM read and drive yourlive game state: imagine a Chess game whose bot logic you outsource to an LLM by exposing a couple of tools.
Two things make runtime mode different from editor mode, and both are deliberate:
- It never auto-connects.The editor plugin connects on boot; a game build doesnot.Youwrite the opt-in code and decide when (if ever) to callConnect().
- There are no tools, prompts, or resources by default — strictly manual.The runtime shipszeroMCP tools, prompts,andresources. You register every[AiToolType]tool,[AiPromptType]prompt, and[AiResourceType]resource yourself, in your own code — and each kind isindependently optional(register prompts without any tools, or vice versa). (The addon's editor tool families are gated by#if TOOLSand don't even compile into a game build, so they can never leak in.)
The entry point isGodotMcpRuntime.Initialize(...)(namespacecom.IvanMurzak.Godot.MCP.Runtime). Write it once — e.g. from a Godotautoload's_Ready()so aSceneTreeexists:
using System.Reflection; using com.IvanMurzak.Godot.MCP.Connection; // GodotMcpConnectionMode using com.IvanMurzak.Godot.MCP.Runtime; // GodotMcpRuntime using McpServerConsts = com.IvanMurzak.McpPlugin.Common.Consts.MCP.Server; // AuthOption (none/oauth/token) using Godot; public partial class GameMcp : Node { private GodotMcpRuntimeHandle? _mcp; public override async void _Ready() { // 1) Build the connection (default OFF — nothing connects yet). _mcp = GodotMcpRuntime.Initialize(builder => { builder.WithConfig(config => { config.ConnectionMode = GodotMcpConnectionMode.Custom; // your own server config.Host = "http://localhost:8080"; // prefer loopback config.AuthOption = McpServerConsts.AuthOption.token; // offline bearer-token auth config.Token = "your-secret-token"; }); // 2) Opt YOUR tools / prompts / resources in. Zero of each by default — this is the only way // they get registered, and each kind is independently optional. builder.WithToolsFromAssembly(Assembly.GetExecutingAssembly()); // [AiToolType] classes builder.WithPromptsFromAssembly(Assembly.GetExecutingAssembly()); // [AiPromptType] classes builder.WithResourcesFromAssembly(Assembly.GetExecutingAssembly()); // [AiResourceType] classes // …or register specific families: // builder.WithTools(typeof(GameMcpTools)); // builder.WithPrompts(typeof(GameMcpPrompts)); // builder.WithResources(typeof(GameMcpResources)); }).Build(); // 3) Connect — explicit, the security-required opt-in. Retries in the background while // KeepConnected is true (the default). await _mcp.Connect(); } public override async void _ExitTree() { // 4) Disconnect on shutdown (or whenever you want to stop exposing tools). if (_mcp is not null) await _mcp.Disconnect(); } }
Builder surface (all fluent / chainable):
Initialize().Build()also guarantees a main-thread dispatcherNodein the runningSceneTree(so tool handlers can marshal Godot API calls onto the engine main thread), unless you opt out withWithoutMainThreadDispatcher(). Call it once aSceneTreeis live (e.g. from an autoload_Ready).
In editor mode,console-get-logsandscript-validatesurface the plugin's own logs and GDScriptparseerrors. But errors raised inside arunning game— a GDScriptruntimeerror (a null dereference, a bad index), apush_error/push_warning, a shader error, or a C# unhandled exception — are not visible to an agent through those editor tools. Without this, an agent can launch the game, poll for logs, see silence, and wrongly conclude the game is healthy. This is the gap that blocks an unattended "keep fixing until no errors" loop for real gameplay/runtime bugs.
_mcp = GodotMcpRuntime.Initialize(builder => { builder.WithConfig(cfg => { / host / token … / }); builder.WithRuntimeErrorCapture(); // capture in-game runtime errors + expose the runtime-errors- tool }).Build(); await _mcp.Connect();
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





