tomyud1/godot-mcp

MCP Server and Godot Plugin for AI-assisted game development

Godot MCP – AI‑powered assistant for the Godot editor

What it is

  • A Godot 4.4+ plugin that lets an MCP‑compatible AI (Claude, Cursor, etc.) control the editor directly.
  • The AI talks to a small Node.js server (the MCP server) via the standard MCP protocol, which then calls the plugin’s 69 built‑in tools.
  • Works locally; the AI can create nodes, edit scripts, run the game, take screenshots, undo changes, and even show an interactive project map in a browser.

Key capabilities (grouped by the 7 tool categories)

Category What you can ask the AI to do
Scene Operations (23 tools) Build whole node trees, add/remove/move nodes, set any property (textures, meshes, materials), attach scripts, signals, groups, call methods.
Project & Runtime (28 tools) Start/stop the game, send input, capture screenshots, inspect live nodes, read logs, query project settings, input map, autoloads.
Script & File Operations (8 tools) Create, edit, validate GDScript files, rename/move files with reference updates, create/delete folders.
File Browsing (4 tools) List directories, read file contents, search the project, generate new script files.
Undo & Batching (4 tools) Undo/redo any change the AI made, group many changes into a single atomic batch.
Asset Generation (1 tool) Turn an SVG into a 2‑D sprite asset.
Visualization (1 tool) Launch a browser‑based visualizer (localhost:6510) that shows a force‑directed graph of scripts, lets you edit code and node properties in real time.

How to get started

  1. Install Node.js (once).
  2. Add the plugin via the Godot Asset Store (search “Godlink”/“mcp”) or copy addons/godot_mcp/ into your project and enable it in Project → Plugins.
  3. Configure your AI client – add a server entry that runs npx -y godot-mcp-server (examples for Claude Desktop, Cursor, Claude Code are in the README).
  4. Restart the AI client and the Godot project. When the top‑right of the editor shows MCP: Agent Active (green), the AI can start issuing commands.

Typical workflow

  • In the AI chat, you ask something like “Create a platformer level with a player node, a ground tilemap and a camera.”
  • The AI sends an MCP request; the server invokes the appropriate tool (e.g., scene_create_tree).
  • Godot updates the scene on disk, the plugin reloads it, and you see the result instantly.
  • If you make a mistake, ask the AI to mcp_undo or run a batch of changes atomically.

Limitations to be aware of

  • Only runs on localhost; no remote or cloud‑hosted editing.
  • One Godot editor instance at a time (multiple AI clients can connect but share that single editor).
  • Undo/redo inside the editor does not affect AI‑made changes because the plugin writes to disk; you must use the provided mcp_undo tool.
  • The AI’s knowledge of Godot is still imperfect – complex UI layouts, advanced compositing, or obscure node properties may need manual tweaking.

Architecture at a glance

AI client  ⇄  MCP Server (Node.js, stdio)  ⇄  Godot editor plugin
                │                               │
                └─► Visualizer (HTTP @6510) – browser UI

The server forwards MCP commands to the plugin, which manipulates the project. The optional visualizer shows a live graph of script relationships and lets you edit code from the browser.

Development & installation options

  • The server is published on npm as godot-mcp-server; you can run it with npx (no build needed).
  • To build from source: cd mcp-server && npm install && npm run build and point your AI client to mcp-server/dist/index.js.

License: MIT – free for personal and commercial use.

Where to find more

  • Godot Asset Store page (named Godlink MCP) for easy installation.
  • npm package page for the server.
  • Release notes and changelog in the repo for version history.
  • Issue tracker for bug reports and feature requests.

In short, Godot MCP turns an LLM‑based assistant into a real‑time co‑developer inside the Godot editor, letting you script, build, run, and debug your game without leaving the IDE.

Related

  • Project
  • Project
  • Project
  • Project
  • Project