/godot-mcp-setup:godot-mcp-setup [godot-project-dir]from godot-mcp-setup
Installs or updates the voidrot/godot-mcp editor addon in a Godot 4 project, enables it, and connects Claude Code to the editor through a project `.mcp.json` `godot-editor` entry. Run as /godot-mcp-setup [godot-project-dir].
Ships in godot-mcp-setup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Connect Claude Code to a running Godot editor through the godot_mcp addon (github.com/voidrot/godot-mcp, MIT). The addon is itself the MCP server: Streamable HTTP at http://127.0.0.1:<port>/mcp, with a bearer token it rewrites on every editor load to <project>/.godot/godot_mcp/headers.json. This skill installs the addon, enables it, writes the .mcp.json entry, and hands off to the addon's own agent skill. It holds no tool details; the addon's SKILL.md does.
Confirm with the user before every write: the addon copy, the project.godot edit, and the .mcp.json edit.
project.godot ($ARGUMENTS, else the current directory, else ask)..mcp.json lives. Often the same as the Godot dir; in a monorepo the Godot dir is a subfolder.headersHelper is a POSIX shell command and its setup refuses Windows.project.godot exists and config/features names "4.7" or later. The addon targets 4.7; on an older project stop and say so.$GODOT, else godot, godot4 or godot-mono on PATH (<bin> --version). Also coreutils timeout on PATH; the addon's job tools (run_headless, import_assets, build_dotnet) need it.curl, tar and git on PATH.${CLAUDE_SKILL_DIR}/scripts/install-addon.sh --dry-run <godot-dir>. It prints installed_version, new_version and commit (key=value lines) and changes nothing.addons/godot_mcp/ will be replaced wholesale. Get a yes. The addon is third-party code (github.com/voidrot/godot-mcp) that runs inside the editor with the user's privileges, so tell them to review that commit's diff before approving it, and keep the pinned --commit rather than a branch.${CLAUDE_SKILL_DIR}/scripts/install-addon.sh --commit <commit> <godot-dir>, passing the dry run's commit value. It downloads that exact commit's tarball into a new temp dir, refuses unless the tarball's commit id equals <commit> (so a commit that moved since the preview is never installed), refuses archives with absolute or .. paths and addons with symlinks or special files, and copies only addons/godot_mcp/. Nothing in the tarball runs.new_version and commit for the final report.In project.godot, add "res://addons/godot_mcp/plugin.cfg" to enabled=PackedStringArray(...) under [editor_plugins], keeping existing entries. Create the section if it is missing:
[editor_plugins]
enabled=PackedStringArray("res://addons/godot_mcp/plugin.cfg")
Skip if it is already listed. If the editor has the project open right now, have the user enable "Godot MCP" in Project > Project Settings > Plugins instead: the editor rewrites project.godot on save and would drop a hand edit.
Read server/port under [godot_mcp] in project.godot (the godot_mcp/server/port setting). The addon picks a free port from 6550 to 6649 on its first load and saves it there; never choose or pin one yourself.
If it is missing, the addon has not loaded yet. Either ask the user to open the project in the editor, or, with their OK and no editor open on it, load it once headless (a few seconds; --quit-after stops it after 100 frames, timeout is the backstop):
timeout 60 <godot-bin> --headless --editor --quit-after 100 --path <godot-dir> 2>&1 | grep 'godot_mcp'
Expect godot_mcp: serving http://127.0.0.1:<port>/mcp; any other godot_mcp: line is the error to report. Then read the port back from project.godot.
.mcp.json entryBuild this entry (in <claude-root>/.mcp.json, under mcpServers):
"godot-editor": {
"type": "http",
"url": "http://127.0.0.1:<port>/mcp",
"headersHelper": "cat .godot/godot_mcp/headers.json",
"timeout": 600000
}
.mcp.json headersHelper with the Claude root as its working directory, so the path is relative to the Claude root. When the Godot dir is a subfolder, use cat <subdir>/.godot/godot_mcp/headers.json (single-quote the path if it has spaces or shell characters). Refuse a path containing ${ or control characters: Claude Code expands ${...} in the entry.godot-editor; the addon's skill and tool docs use it.godot-editor entry.Show the user a unified diff of .mcp.json (current file, or empty, against the proposed one) and write it only after they approve. Validate the result parses as JSON.
The addon ships its own SKILL.md, matched to its version. Tell the user to run Project > Tools > "MCP: install agent skill / show config" in the editor, or, once connected (step 7), call the install_agent_skill tool. Either writes <godot-dir>/.claude/skills/godot-mcp/SKILL.md. Never copy that file by hand. Rerun this after every addon update.
If the Godot dir is a subfolder of the Claude root, that skill lands under the subfolder's .claude/, which Claude Code started at the root does not load. Tell the user, and offer to move it to <claude-root>/.claude/skills/godot-mcp/ after they confirm.
/mcp and reconnect), accept the project trust dialog, and approve the godot-editor project server. The headersHelper runs only once the folder is trusted.get_project_info. It should return the project name and features.Report: addon version and commit, port, the .mcp.json change, and what is left for the user (enable in the editor, install the agent skill, approve the server).
Remind them to commit addons/godot_mcp/, .mcp.json and .claude/skills/godot-mcp/, and to keep .godot/ ignored (check .gitignore). The token lives in .godot/godot_mcp/ and the addon writes a * .gitignore there too.
@tool scripts and property setters, i.e. project code. Use the addon only on trusted projects.headersHelper, which Claude Code reruns on each connect and once after a 401 or 403; a static headers value goes stale..mcp.json entry; do not reuse one port across projects./mcp..mcp.json itself, after approval. The addon's own setup never does; it only shows an entry with an absolute token path. Both work; the relative path here survives moving the repo.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin godot-mcp-setup