
# Godot MCP
### The most complete MCP server for Godot Engine — **386 tools** that give your AI assistant real hands inside your game project.
[](LICENSE.md)
[](https://github.com/yanhuifair/Godot-MCP/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/@yanhuifair/godot-mcp)
[](https://www.npmjs.com/package/@yanhuifair/godot-mcp)
[](#all-tools)
[](.)
[](https://godotengine.org)
[English](README.md) | [中文文档](README-zh.md)
---
**Godot MCP** is a [Model Context Protocol](https://modelcontextprotocol.io) server that connects any AI assistant — **Claude, Cursor, VS Code Copilot, Windsurf, Cline, Codex, Aider** — directly to **Godot Engine 4.x**. Your AI stops guessing about your project and starts *operating* it.
- 📂 **Reads and writes your project files natively** — `.tscn` scenes, `.tres` resources, GDScript, C#, `.gdshader`, `project.godot`. Custom parsers, no Godot process required, instant response.
- 🎛️ **Drives the live editor** — select nodes, connect signals, author visual shaders, bake lightmaps, set breakpoints, step the debugger, run and stop the game.
- ↩️ **Every scene edit is undoable** — add, remove, rename, move, reparent, duplicate and instantiate all register on Godot's native undo stack. If the AI gets it wrong, **Ctrl+Z** puts it back.
- 🎮 **Reaches inside the running game** — inspect the live scene tree, call methods, inject input, **freeze the game, step it one frame at a time, and screenshot the result.** No other public Godot MCP does this.
- 🔎 **Stays usable at scale** — `search_tools` finds the right tool out of 386, `get_status` tells you exactly what is connected, and every error returns a typed code plus a repair hint.
**386 tools · 30 categories · 21 AI clients · 4 communication paths · one-command setup.**
```bash
npx @yanhuifair/godot-mcp --enable-plugin -p .
```
| Requirement | |
|---|---|
| Godot | 4.x (Godot 3 not supported) |
| Node.js | >= 18 |
| AI Client | Any MCP-compatible client (see [Configuration](#ai-client-configuration)) |
---
## Why Godot MCP
| | **Godot MCP** | Other Godot MCP servers |
|---|---|---|
| **Tool count** | **386** across 30 categories | 16 – 156 |
| **Works without Godot running** | ✅ Native `.tscn` / `.tres` / `.godot` parsers | ⚠️ Usually needs a live editor |
| **Live editor control** | ✅ 140 tools — play, debug, breakpoints, viewport, bake | Partial |
| **Undoable AI edits** | ✅ **Every scene mutation is one Ctrl+Z away** — native `EditorUndoRedoManager` actions | ❌ Edits are permanent |
| **Control the _running game_** | ✅ **11 tools** — live tree, method calls, input injection | ❌ None |
| **Deterministic frame stepping** | ✅ `runtime_freeze` → `runtime_step` → `runtime_screenshot` | ❌ None |
| **Tool discovery for large catalogs** | ✅ `search_tools` + `get_status` | ❌ None |
| **Error messages** | ✅ Typed error code + actionable repair hint | Raw stack traces |
| **Transports** | Stdio · SSE · Streamable HTTP | Usually stdio only |
| **Editor plugin install** | ✅ One command, auto-enabled | Manual copy |
| **Engine introspection** | ✅ Live ClassDB — classes, methods, properties, signals, docs | Rare |
If you have ever wanted to say *"run the game, freeze it at the moment the player lands, and show me the collision state"* — this is the server that can actually do it.
---
## Table of Contents
1. [Why Godot MCP](#why-godot-mcp)
2. [Quick Start](#quick-start)
3. [What You Can Do](#what-you-can-do)
4. [Architecture](#architecture)
5. [Implementation Principles](#implementation-principles)
6. [Transport Modes](#transport-modes)
7. [Installation](#installation)
8. [AI Client Configuration](#ai-client-configuration)
9. [Usage Examples](#usage-examples)
10. [Editor Plugin](#editor-plugin)
11. [Tool Discovery & Live Game Runtime](#tool-discovery--live-game-runtime)
12. [All Tools](#all-tools)
13. [Supported Formats](#supported-formats)
14. [Development](#development)
15. [Build VSIX](#build-vsix)
16. [Limitations](#limitations)
17. [FAQ](#faq)
18. [License](#license)
---
## Quick Start
**Two setup steps, about two minutes.** You do *not* need to install anything globally, and you do *not* need to keep a terminal open — your AI client starts the server for you.
### Before You Begin
| You need | How to check |
|---|---|
| **Godot 4.x** installed | Open Godot → the version shows in the title bar. *(Godot 3 is not supported.)* |
| **Node.js 18 or newer** | Run `node -v` in a terminal. If it says `command not found`, install from [nodejs.org](https://nodejs.org). |
| **An MCP-capable AI client** | VS Code + Copilot, Cursor, Claude Desktop, Windsurf, Cline… see [the full list](#ai-client-configuration). |
### Step 1 — Install the Editor Plugin
Open a terminal, `cd` into your Godot project folder (the one containing `project.godot`), and run:
```bash
npx @yanhuifair/godot-mcp --enable-plugin -p .
```
> **Run this from your project root** — the folder containing `project.godot` — because `-p .` means "the current directory". If you run it from anywhere else, pass an absolute path instead:
> `npx @yanhuifair/godot-mcp --enable-plugin -p /Users/me/games/my-game`
> **Always installs the latest version.** `npx` fetches the newest release every time. To force it or pin a specific version:
> `npx @yanhuifair/godot-mcp@latest --enable-plugin -p .` (latest) · `npx @yanhuifair/godot-mcp@1.12.16 --enable-plugin -p .` (pinned)
**What this does:** copies the plugin into `addons/godot-mcp/` and switches it on inside `project.godot`. Nothing to click in Godot.
**How to confirm it worked:** you should now see an `addons/godot-mcp/` folder in your project. If Godot is already open, reload the project (Project → Reload Current Project) so it picks up the plugin.