{
  "markdown": "# Glade MCP \n\nConnect Cursor, Claude Code, Windsurf, Claude Desktop, and other AI clients directly to your Unity or Godot editor.\n\n**Unity (2021.3+):** 275 tools across 20 categories, full Unity-aware system prompt, GLADE.md project context, script semantic search, skill calibration, free CC0 asset pipeline, cloud intelligence layer with RAG and cross-session memory.\n\n**Godot (4.3+):** 115 native tools across 17 categories - scene/node, scripts, resources, signals, physics and edit-time spatial queries, 2D (sprites, tilemaps, parallax), audio, particles, animation and AnimationTree, camera, navigation, UI, lighting and WorldEnvironment, runtime, export, and project introspection.\n\n**Both engines:** one-call vetted gameplay scaffolders (controllers, enemies, combat, menus, save system), a verification loop (`look_at_game_view` screenshots, runtime-event observation, playability probes), surgical script editing with true `find_references` / `rename_symbol`, and build/export tools so the agent can ship what it built.\n\nThe MCP server auto-detects which editor is running (Unity on `:8765`, Godot on `:8766`) and exposes the matching tool set.\n\n![GladeKit MCP Demo](https://raw.githubusercontent.com/Glade-tool/glade-mcp/main/assets/demo.gif)\n\n---\n\n## Quick Start\n\n### 1. Install the editor bridge\n\nGlade MCP supports both Unity and Godot. Both bridges live in this repo: [`unity-bridge/`](https://github.com/Glade-tool/glade-mcp/tree/main/unity-bridge) is a UPM package, [`godot-bridge/`](https://github.com/Glade-tool/glade-mcp/tree/main/godot-bridge) wraps the editor addon at `godot-bridge/addons/com.gladekit.mcp-bridge/`. Install the one for your engine.\n\n<details>\n<summary><strong>Unity (2021.3+)</strong></summary>\n\nIn Unity, open **Window > Package Manager > + > Add package from git URL...**\n\n```\nhttps://github.com/Glade-tool/glade-mcp.git?path=/unity-bridge\n```\n\nThe Unity bridge starts automatically on `localhost:8765`. **Window > GladeKit MCP** shows bridge / client status and has one-click **Copy MCP Config** and **Copy Unity AI Gateway Config** buttons.\n\n</details>\n\n<details>\n<summary><strong>Godot (4.3+)</strong></summary>\n\n1. Download `com.gladekit.mcp-bridge.zip` from the latest [Godot bridge release](https://github.com/Glade-tool/glade-mcp/releases?q=godot&expanded=true). (Grab the zip asset under **Assets** - not \"Source code\".) From source instead: copy `godot-bridge/addons/com.gladekit.mcp-bridge/` out of this repo.\n2. Move the `com.gladekit.mcp-bridge/` folder into your project's `addons/` directory, so the final path is `<your-godot-project>/addons/com.gladekit.mcp-bridge/plugin.cfg`.\n3. In Godot: **Project → Project Settings → Plugins** → enable **GladeKit MCP Bridge**.\n\nThe Godot bridge starts automatically on `localhost:8766`. You should see a confirmation line in the editor Output panel:\n\n```\n[GladeKit MCP Bridge] listening on ws://127.0.0.1:8766  (v0.7.13, 115 tools registered, thread-polled at 200Hz)\n```\n\nThe bridge writes a per-session auth token to `~/.gladekit/godot-bridge-8766.token`; the MCP server picks it up automatically, so a web page can't drive your editor through the local socket.\n\n**Supported:** Godot 4.3+ GDScript projects, Forward+ and Compatibility renderers, 2D and 3D. **Not yet supported:** Godot Mono / C# projects. The bridge is editor-only; it never runs in exported games.\n\n</details>\n\nEngine auto-detection: the MCP server probes both ports on startup and exposes the matching tool set. Running both editors at once? Set `GLADEKIT_MCP_FORCE_ENGINE=unity` or `=godot` to pin a specific engine.\n\n### 2. Connect your AI client\n\nInstall [uv](https://docs.astral.sh/uv/getting-started/installation/) (one-time):\n\n- **Mac/Linux:** `curl -LsSf https://astral.sh/uv/install.sh | sh`\n- **Windows:** `powershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"`\n\nThen add the MCP config to your AI client. The client launches the MCP server automatically - no manual server step.\n\n<details>\n<summary><strong>Claude Code</strong></summary>\n\n**Option A: one-liner (recommended)**\n\n- **Mac/Linux:** `claude mcp add --transport stdio gladekit-mcp --scope user -- uvx gladekit-mcp`\n- **Windows:** `claude mcp add --transport stdio gladekit-mcp --scope user -- cmd /c uvx gladekit-mcp`\n\n**Option B: manual config**\n\nIf you cloned this repo, the `.mcp.json` auto-connects. Otherwise add to your Claude Code MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Cursor</strong></summary>\n\n`Cursor Settings > MCP > Add new MCP server`:\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Claude Desktop</strong></summary>\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (Mac) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Cline (VS Code extension)</strong></summary>\n\nOpen Cline's MCP settings file (auto-created on first MCP use):\n\n- **Mac:** `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`\n- **Windows:** `%APPDATA%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json`\n- **Linux:** `~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`\n\nAdd:\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Windsurf</strong></summary>\n\nIn Windsurf, open **Windsurf Settings → MCP Servers → Open MCP Registry**, then click the settings (gear) icon to open `mcp_config.json`. Add the snippet below (or edit `~/.codeium/windsurf/mcp_config.json` directly):\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Unity AI Gateway (native in-editor)</strong></summary>\n\nUnity's built-in AI Assistant can connect to GladeKit via MCP. This gives you GladeKit's 275 tools directly inside the Unity Editor - no external AI client needed.\n\n**Requires:** Unity 6000.3+ with AI Gateway package (`com.unity.ai.assistant@2.x`)\n\n1. In Unity, go to **Edit > Project Settings > AI > MCP Servers**\n2. Click **Open Config File** and paste (or use **Window > GladeKit MCP > Copy Unity AI Gateway Config**):\n\n```json\n{\n  \"enabled\": true,\n  \"path\": \"\",\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n3. Under **Path Configuration**, paste your terminal's PATH into **User Path** so Unity can find `uvx`. To get your PATH:\n   - **Mac/Linux:** `echo $PATH`\n   - **Windows:** `echo %PATH%`\n4. Click **Refresh Config File and Reload Servers**\n5. Verify the server shows **StartedSuccessfully** in the Servers section\n\n> **Tip:** If `uvx` isn't found, add the directory containing it to the `path` field in the config (e.g., `\"/opt/homebrew/bin\"` on Mac or `\"C:\\\\Users\\\\<you>\\\\.local\\\\bin\"` on Windows). Alternatively, use `pip install gladekit-mcp` and set `\"command\": \"python\"` with `\"args\": [\"-m\", \"gladekit_mcp\"]`.\n\n> **Troubleshooting:** If the server shows **FailedToStart**, click **Inspect** for error details. The most common cause is PATH - Unity's PATH differs from your terminal's PATH. See the [Troubleshooting](#troubleshooting) section below.\n\n> **Paid tier (`GLADEKIT_API_KEY`):** To enable RAG knowledge base and cross-session memory on any client, add the key to the `env` field of your config. See [Cloud intelligence](#cloud-intelligence) below.\n\n</details>\n\n<details>\n<summary><strong>VS Code (GitHub Copilot)</strong></summary>\n\nAdd to `.vscode/mcp.json` in your workspace:\n\n```json\n{\n  \"servers\": {\n    \"gladekit-mcp\": {\n      \"type\": \"stdio\",\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"]\n    }\n  }\n}\n```\n\n</details>\n\n---\n\n## Why GladeKit?\n\n| Feature              | GladeKit MCP                                                                                                                            | unity-mcp (CoplayDev)                         | godot-mcp (Coding-Solo)                                  |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------------------- |\n| Engines              | **Unity and Godot**, auto-detected from one server                                                                                      | Unity                                         | Godot                                                    |\n| Tools                | **275 Unity + 115 Godot**, granular                                                                                                     | 48 consolidated (`action` enums)              | 14                                                       |\n| Editor link          | Live editor session (HTTP `:8765` / WebSocket `:8766`)                                                                                  | Live editor session                           | Spawns `godot --headless` per call, edits `.tscn` on disk |\n| Gameplay scaffolders | **One-call vetted templates** - controllers, enemies, projectiles, health + HUD, game manager, menus, moving platforms, save system      | None                                          | None                                                     |\n| Verification loop    | **`look_at_game_view`** screenshots, runtime-event stream, playability probe, play-verify heal gate, `compile_scripts`                   | Screenshots, console read, test runner        | `run_project` + raw stdout                               |\n| Script editing       | Outline / partial reads, anchor edits, **true `find_references` / `rename_symbol`** (lexical scanner)                                    | Anchor / regex edits, Roslyn validation       | No script tools                                          |\n| Build / export       | **Both engines** (`build_player`, `export_project`)                                                                                     | Unity                                         | None (MeshLibrary only)                                  |\n| Assets               | **Free CC0 pipeline** with license audit                                                                                                | AI generation (BYO Tripo / Meshy / fal keys)  | None                                                     |\n| Project context      | **GLADE.md** + live prompt (render pipeline, input system, skill level)                                                                  | Static instructions                           | None                                                     |\n| Script search        | **Semantic search** via OpenAI embeddings (bring your own key)                                                                          | Regex `find_in_file`                          | None                                                     |\n| Memory               | In-session (`remember_for_session`) + cross-session (cloud)                                                                              | None                                          | None                                                     |\n| Safety               | Undo-registered edits, pre-mutation backups, overwrite guards, per-session token auth, read-only mode                                    | SHA-guarded script edits                      | None                                                     |\n| Tests                | 269 pytest + 37-case eval on 3 MCP SDK versions, schema↔bridge parity guards, Unity NUnit + Godot GUT suites                             | Unity CI matrix + NL suite                    | None                                                     |\n| License              | MIT                                                                                                                                     | MIT                                           | MIT                                                      |\n\n\nAll core features are **free and local**. The cloud intelligence layer is optional and requires a `GLADEKIT_API_KEY`.\n\n---\n\n## Features\n\n<details>\n<summary><strong>275 Unity tools + 115 Godot tools</strong></summary>\n\n**Unity (20 categories):** Scene • GameObjects • Scripts • Prefabs • Materials • Lighting • VFX & Audio • Animation • IK • Physics (3D & 2D) • Tilemaps • Camera • UI • Input System • Terrain & NavMesh • Profiler • Gameplay scaffolders • Runtime & diagnostics • Build • Asset pipeline\n\nAll 275 tools are dispatchable. Claude Code sees ~90 curated core tools by default (Claude Code has a practical 128-tool limit; Unity AI Gateway has a cloud token budget). Use `get_relevant_tools` to discover extended tools for specialized work (blend trees, NavMesh, IK, Cinemachine, etc.).\n\n**5 meta-tools:** `get_relevant_tools` (task-based tool discovery + RAG context), `remember_for_session` (store facts), `recall_session_memories` (retrieve facts), `batch_execute` (multi-step tool dispatch), `search_project_scripts` (semantic code search, Unity only). The first four work on both engines.\n\n**9 MCP resources (Unity):** bridge health, project context, project info, scene hierarchy, project scripts, current selection, GLADE.md, session memory, and batch-discipline telemetry.\n\n**Godot (17 categories):** all 115 tools are exposed directly (no core filtering needed), plus the four engine-agnostic meta-tools. Read-only tools carry the MCP `readOnlyHint` annotation so clients can auto-approve them.\n\n</details>\n\n<details>\n<summary><strong>One-call gameplay scaffolders</strong></summary>\n\nVetted, self-wiring templates that write known-good scripts verbatim and assemble the scene around them - carrying the game-feel details a from-scratch script tends to drop (coyote time, jump buffering, variable jump height, normalized diagonals). Re-running one reuses what already exists instead of duplicating it.\n\n- **Players:** `create_third_person_controller` (3D, both engines), `create_platformer_controller` / `create_top_down_controller` (Unity), `create_2d_controller` (Godot).\n- **Combat:** `create_projectile`, `create_health`, `create_health_bar`, `create_enemy` (Unity) / `create_enemy_2d` + `create_enemy_3d` (Godot), `create_hit_vfx`.\n- **Game loop:** `create_game_manager` (score, lives, win/lose), `create_collectible`, `create_hazard`, `create_level_system`, `create_loot_drop`, `create_save_system`.\n- **Flow and feel:** `create_main_menu`, `create_pause_menu`, `create_scene_transition`, `create_moving_platform`, `create_screen_shake`, `create_juice`, `create_particles_2d` / `_3d`, `create_sound_effects`.\n\nBatch layout tools (`set_transform_batch`, `set_node_transform_batch`, `arrange_nodes`, `snap_to_ground`) place dozens of objects in one call instead of one round-trip each.\n\n</details>\n\n<details>\n<summary><strong>Verify what you built</strong></summary>\n\n- **See it:** `look_at_game_view` returns a screenshot of the rendered view so the model catches invisible, missing, or mispositioned objects that inspection alone cannot.\n- **Watch it run:** `start_runtime_observation` / `get_runtime_events` stream a cursored, fingerprinted error feed from the play session; `get_unity_console_logs` / `get_godot_console_logs` for the raw log.\n- **Play-test it:** `start_playability_probe` (Unity) and `run_gameplay_probe` (Godot) drive the player with input and report PASS/FAIL; Godot's `run_project` has a `verify` mode that runs, captures, and reports.\n- **Compile and ship it:** `compile_scripts` (Unity); `build_player` + `get_build_status` (Unity) and `create_export_preset` + `export_project` (Godot, including Web).\n- **Diagnose stalls (Godot):** an editor main-thread watchdog turns \"timed out\" into \"editor wedged for 12s - dismiss the modal dialog\" with `possible_solutions`.\n\n</details>\n\n<details>\n<summary><strong>Surgical script editing</strong></summary>\n\n`get_script_content` supports outline mode (a structural map of a large file) and line-ranged partial reads; `modify_script` applies anchor-based edits. `find_references` and `rename_symbol` use a lexical scanner (C# and GDScript) that matches whole identifiers only, so a rename shows its real blast radius before it happens. `create_script` / `modify_script` refuse to clobber existing project scripts unless asked.\n\n</details>\n\n<details>\n<summary><strong>GLADE.md</strong></summary>\n\nCreate a `GLADE.md` file in your Unity project root. The MCP server reads it and injects it into every request. Works as a permanent context layer: your game's design intent, conventions, and constraints are always in scope.\n\n```markdown\n# My Game\n\nGenre: 3D platformer\nPlayer: CharacterController, double jump enabled\nArt style: pixel art, 16x16 sprites\nNaming: PascalCase for scripts, snake_case for folders\n```\n\n</details>\n\n<details>\n<summary><strong>Script semantic search</strong></summary>\n\nSet `OPENAI_API_KEY` in your MCP config's `env` field and the server ranks project scripts by semantic similarity to your query. Ask \"how does the enemy spawn?\" and the right script surfaces, even if it's not named `EnemySpawner`.\n\nEverything needed ships with the package; no install flags or extras required. Get a key at [platform.openai.com/api-keys](https://platform.openai.com/api-keys) (pay-as-you-go, pennies per search via `text-embedding-3-small`).\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"],\n      \"env\": { \"OPENAI_API_KEY\": \"sk-...\" }\n    }\n  }\n}\n```\n\nWithout the key, `search_project_scripts` still returns scripts - just unranked. Keys are never sent anywhere except OpenAI's embedding endpoint.\n\n</details>\n\n<details>\n<summary><strong>Skill calibration</strong></summary>\n\nThe server tracks vocabulary across your messages and detects whether you're a Unity beginner or expert. Beginners get plain-language explanations and encouraging framing. Experts get terse, technical responses. Calibration persists to `.gladekit/skill_level.json` in your project.\n\n</details>\n\n<details>\n<summary><strong>Asset pipeline (free CC0 imports)</strong></summary>\n\nThree tools for finding and importing free, commercially-usable assets directly from your AI client, on both engines. All assets are CC0 (public domain, no attribution required). v1 ships [Kenney.nl](https://kenney.nl) packs (catalog refreshed weekly); additional providers (Freesound, Quaternius, AI generation) are on the roadmap.\n\n| Tool                   | Purpose                                                                                                                                                                                                  |\n| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `find_asset`           | Search ranked candidates by description, asset type, style, and license. Read-only, no editor dispatch.                                                                                                   |\n| `import_asset`         | Download, extract, place under `Assets/` (or `res://`), configure import settings for the asset type, and write a `.gladekit-asset.json` sidecar with license metadata. Requires explicit `licenseAcknowledged: true`. |\n| `list_imported_assets` | Walk the project's sidecars and surface a license audit (license counts, attribution-required count). Useful before a commercial release.                                                                |\n\n**Example workflow** (Cursor, Claude Code, Windsurf use the same pattern):\n\n> **You:** I'm prototyping a 2D platformer and need placeholder character + tile art. Find me something free.\n\nThe AI calls `find_asset`:\n\n```json\n{\n  \"description\": \"platformer character and tiles\",\n  \"asset_type\": \"sprite_2d\",\n  \"max_results\": 5\n}\n```\n\nResult (truncated):\n\n```json\n{\n  \"success\": true,\n  \"candidates\": [\n    {\n      \"id\": \"kenney/platformer-pack-redux\",\n      \"name\": \"Platformer Pack Redux\",\n      \"description\": \"360+ side-scrolling platformer sprites: characters, enemies, tiles, items, hazards.\",\n      \"license\": \"CC0-1.0\",\n      \"license_summary\": \"Public domain. No attribution required for any use, including commercial.\",\n      \"official_page\": \"https://kenney.nl/assets/platformer-pack-redux\",\n      \"approx_assets\": 360,\n      \"score\": 0.92\n    },\n    { \"id\": \"kenney/pixel-platformer\", \"score\": 0.71, ... },\n    { \"id\": \"kenney/tiny-town\", \"score\": 0.45, ... }\n  ],\n  \"count\": 3\n}\n```\n\n> **You:** Let's go with Platformer Pack Redux. Import it to `Assets/Sprites/Platformer/`. I accept the CC0 license.\n\nThe AI calls `import_asset`:\n\n```json\n{\n  \"candidateId\": \"kenney/platformer-pack-redux\",\n  \"assetType\": \"sprite_2d\",\n  \"licenseAcknowledged\": true,\n  \"targetPath\": \"Assets/Sprites/Platformer/\"\n}\n```\n\nThe MCP server resolves the download URL locally (catalog is bundled with the server, no cloud dependency), passes it to the Unity bridge, which downloads, extracts, configures `TextureImporter` for each sprite (Texture Type = Sprite, Filter Mode = Point, Uncompressed) and writes the license sidecar. Result:\n\n```json\n{\n  \"success\": true,\n  \"message\": \"Imported 360 file(s) from kenney/platformer-pack-redux to Assets/Sprites/Platformer/\",\n  \"downloadedBytes\": 1842340,\n  \"importedFileCount\": 360,\n  \"configuredImportSettings\": 354,\n  \"license\": \"CC0-1.0\",\n  \"sidecarPath\": \"Assets/Sprites/Platformer/.gladekit-asset.json\"\n}\n```\n\nThe sprites appear in the Unity Project window, ready to drop into a scene.\n\n> **You:** Before I ship, audit my imported assets. Anything that needs attribution?\n\nThe AI calls `list_imported_assets`:\n\n```json\n{\n  \"success\": true,\n  \"count\": 1,\n  \"licenseCounts\": { \"CC0-1.0\": 1 },\n  \"attributionRequiredCount\": 0,\n  \"entries\": [\n    {\n      \"candidate_id\": \"kenney/platformer-pack-redux\",\n      \"license\": \"CC0-1.0\",\n      \"asset_type\": \"sprite_2d\",\n      \"imported_at\": \"2026-05-10T09:37:42Z\",\n      \"target_path\": \"Assets/Sprites/Platformer/\",\n      \"imported_file_count\": 360,\n      \"sidecar_path\": \"Assets/Sprites/Platformer/.gladekit-asset.json\"\n    }\n  ]\n}\n```\n\nCC0 needs no attribution; the audit report is empty for required attributions. If you imported a CC-BY asset later, it would surface here so you remember to credit it.\n\n**Security and license discipline:**\n\n- The LLM never sees download URLs. URL resolution happens cloud/MCP-side; the bridge tool refuses if the resolved fields are missing or LLM-injected.\n- `licenseAcknowledged: true` is required on every `import_asset` call. The bridge refuses without it. Do not set it without explicit user confirmation.\n- The bridge validates `_resolvedUrl`'s host against a per-provider allowlist (`AssetPipelineGuard.IsResolvedUrlHostAllowed`) before downloading. Even a client bypassing both the cloud and MCP preprocessors cannot smuggle in an arbitrary download URL; unknown hosts fail closed. HTTPS only.\n- Every imported asset bundle gets a `.gladekit-asset.json` sidecar recording the candidate id, provider, license, attribution string, source URL, and timestamp. `list_imported_assets` reads these for the audit report.\n- Asset Pipeline tools are gated by `AssetPipelineGuard` on the bridge side. A misconfigured client cannot bypass it.\n\n**Disabling the pipeline (for studio / curated-asset workflows):**\n\nSet `GLADEKIT_MCP_DISABLE_ASSET_PIPELINE=1` in the MCP server's environment to suppress the three tools entirely. They will not appear in the tool list and dispatch will refuse with a clear error. This is the recommended setting for projects that already have a managed asset workflow (Perforce-tracked libraries, internal asset stores) where AI-driven external downloads aren't appropriate.\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"],\n      \"env\": { \"GLADEKIT_MCP_DISABLE_ASSET_PIPELINE\": \"1\" }\n    }\n  }\n}\n```\n\nThe Unity bridge enforces the same gate via `EditorPrefs` (`GladeAI.AssetPipelineEnabled`, default `true`). Toggle it via `POST http://localhost:8765/api/settings { \"assetPipelineEnabled\": false }`.\n\n</details>\n\n<details>\n<summary><strong>Safety and security</strong></summary>\n\n- **Reversible:** scaffolds and batch edits register with the editor's Undo stack (Unity) or take pre-mutation backups in `.gladekit-backups/` with node revert (Godot). `create_script` / `modify_script` refuse to overwrite real project scripts without an explicit flag.\n- **Loopback only:** both bridges bind `127.0.0.1`. The Godot bridge requires a per-session token (`~/.gladekit/godot-bridge-<port>.token`) on every request except `health`, closing the cross-site WebSocket drive-by. The Unity bridge enforces localhost access control and path-traversal guards on its file endpoints.\n- **Play-mode safety:** editing tools refuse to run while the editor is playing; read-only tools run in either mode.\n- **Read-only sessions:** `GLADEKIT_GODOT_READ_ONLY=1` (or `gladekit/read_only_mode` in project settings) makes the Godot bridge refuse every mutating tool - for audits, reviews, and demos.\n\n</details>\n\n<details>\n<summary><strong>Cloud intelligence</strong></summary>\n\nSet `GLADEKIT_API_KEY` in your MCP config's `env` field to unlock cloud-powered features:\n\n- **RAG knowledge base** - `get_relevant_tools` queries a curated, engine-aware knowledge base (API corrections, error patterns) and injects results alongside tool recommendations. Godot sessions retrieve Godot docs, not Unity content.\n- **Cross-session persistent memory** - facts stored with `remember_for_session` persist across sessions and are re-injected into the system prompt.\n- **Convention extraction** - coding patterns (naming, architecture, preferences) are distilled from your accumulated memories and surfaced in future sessions.\n\nAll cloud features degrade gracefully: if the key is missing or the cloud is unreachable, everything works normally.\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"gladekit-mcp\"],\n      \"env\": { \"GLADEKIT_API_KEY\": \"your-api-key\" }\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Transports (stdio + streamable HTTP)</strong></summary>\n\nGladeKit MCP supports two transports. **stdio is the default** and works with all MCP clients - every config above uses stdio. The server supports both MCP SDK 1.x and 2.x (`mcp[cli]>=1.10,<3`) and is tested at the floor, the newest 1.x, and the newest 2.x.\n\n**Streamable HTTP** is for clients that prefer URL-based config (Claude Desktop URL mode, custom clients). Launch the server manually, then point your client at the URL:\n\n```bash\n# Defaults: host=127.0.0.1, port=8767, path=/mcp\ngladekit-mcp --transport http\n\n# Custom host/port/path\ngladekit-mcp --transport http --host 127.0.0.1 --port 9000 --path /mcp\n```\n\nEndpoints:\n\n- `POST/GET/DELETE http://127.0.0.1:8767/mcp` - MCP streamable-HTTP endpoint\n- `GET http://127.0.0.1:8767/health` - liveness check\n\n**Security defaults:**\n\n- Binds **loopback-only** (`127.0.0.1`). Use `--host 0.0.0.0` to expose on LAN - opt-in only.\n- **DNS-rebinding protection** enabled for loopback binds: requests with a `Host` header other than `127.0.0.1:<port>` or `localhost:<port>` are rejected with `421 Misdirected Request`.\n- Non-loopback binds disable rebinding protection (you've taken responsibility for the network) and print a warning on startup.\n\n**Client config example:**\n\n```json\n{\n  \"mcpServers\": {\n    \"gladekit-mcp\": {\n      \"url\": \"http://127.0.0.1:8767/mcp\"\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Environment Variables</strong></summary>\n\nMCP server (set in your client config's `env` field):\n\n| Variable                               | Required | Description                                                                                             |\n| -------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |\n| `UNITY_BRIDGE_URL`                     | No       | Unity bridge URL (default: `http://localhost:8765`)                                                     |\n| `GODOT_BRIDGE_URL`                     | No       | Godot bridge URL (default: `ws://localhost:8766/`)                                                      |\n| `GLADEKIT_MCP_FORCE_ENGINE`            | No       | `unity` or `godot` - skip auto-detection when both editors are open                                     |\n| `OPENAI_API_KEY`                       | No       | Enables script semantic search via embeddings ([get one](https://platform.openai.com/api-keys))         |\n| `GLADEKIT_API_KEY`                     | No       | Enables RAG knowledge base, cross-session memory, convention extraction                                 |\n| `GLADEKIT_MCP_DISABLE_ASSET_PIPELINE`  | No       | Set to `1` to suppress `find_asset` / `import_asset` / `list_imported_assets` (curated-asset workflows) |\n| `GLADEKIT_MCP_SUPPRESS_BRIDGE_WARNING` | No       | Set to `1` to silence the stderr warning when the Unity or Godot bridge is older than recommended       |\n\nGodot bridge (set in your shell *before* launching Godot):\n\n| Variable                      | Description                                                                 |\n| ----------------------------- | --------------------------------------------------------------------------- |\n| `GLADEKIT_GODOT_BRIDGE_PORT`  | Listen port (default `8766`)                                                |\n| `GLADEKIT_GODOT_READ_ONLY`    | Set to `1` to refuse every mutating tool for this editor session            |\n| `GLADEKIT_GODOT_NO_AUTH`      | Set to `1` to disable per-session token auth (for older clients; opt-in)    |\n\n</details>\n\n<details>\n<summary><strong>Troubleshooting</strong></summary>\n\n**Unity bridge not connecting**\n\n- Open Unity and wait for it to finish importing assets - the bridge starts automatically\n- Check **Window > GladeKit MCP** in Unity - the Bridge and AI Client indicators show connection status; **Restart** rebinds the server and the Diagnostics panel shows recent bridge faults\n- Verify nothing else is using port 8765: `lsof -i :8765` (Mac/Linux) or `netstat -ano | findstr 8765` (Windows)\n\n**Godot bridge not connecting**\n\n- Confirm the plugin is enabled and the Output panel shows the `listening on ws://127.0.0.1:8766` line; a bind failure prints the `GLADEKIT_GODOT_BRIDGE_PORT` override instructions\n- `authentication failed` in tool errors: the MCP server couldn't read `~/.gladekit/godot-bridge-8766.token`. Restart Godot (it rewrites the token) or, for an older client, set `GLADEKIT_GODOT_NO_AUTH=1` before launching Godot\n- Tool calls time out while a dialog is open: the editor's main thread is blocked. Dismiss the dialog; the error names the stall duration\n\n**AI client can't find `uvx`**\n\n- Install [uv](https://docs.astral.sh/uv/getting-started/installation/): `curl -LsSf https://astral.sh/uv/install.sh | sh` (Mac/Linux) or `pip install uv`\n- Or use `pip install gladekit-mcp` and change the config command from `\"uvx\"` to `\"python\"` with args `[\"-m\", \"gladekit_mcp\"]`\n\n**Tools not appearing in Claude Code**\n\n- Claude Code has a practical ~128-tool limit. GladeKit shows ~90 curated core tools by default - this is intentional. All 275 are dispatchable: use `get_relevant_tools` to find extended tools by task description.\n\n**`GLADE.md` not being picked up**\n\n- The file must be named exactly `GLADE.md` (case-sensitive on Mac/Linux) and placed in the Unity project root (same directory as `Assets/`, `Packages/`, `ProjectSettings/`)\n\n**Stderr warning: `Unity bridge X.Y.Z is older than recommended`**\n\n- Unity caches UPM git packages and never refetches, so an `?path=unity-bridge` install drifts behind `main` over time. Update via Unity → **Window > Package Manager > GladeKit MCP Bridge > Update**, or pin the manifest entry to a specific tag so future updates are explicit:\n\n  ```json\n  \"com.gladekit.mcp-bridge\": \"https://github.com/Glade-tool/glade-mcp.git?path=unity-bridge#v0.7.23\"\n  ```\n\n- The same warning also appears as a one-shot prefix on the next tool response so you see it in chat. To silence both: add `\"GLADEKIT_MCP_SUPPRESS_BRIDGE_WARNING\": \"1\"` to the `env` of your MCP client config. For Godot, replace the addon folder with the latest release zip.\n\n**Unity AI Gateway - server shows FailedToStart**\n\n- Click **Inspect** in the Servers section for the error message\n- Most common cause: Unity can't find `uvx`. Under **Path Configuration**, paste your terminal's full PATH into **User Path**, then click **Refresh Config File and Reload Servers**\n- On Windows: `echo %PATH%` in Command Prompt. On Mac/Linux: `echo $PATH`\n- Alternative: use `pip install gladekit-mcp` and set the command to `\"python\"` with args `[\"-m\", \"gladekit_mcp\"]` - avoids the `uvx` PATH dependency\n- Validate outside Unity first: run `uvx gladekit-mcp` in a terminal (you should see the `gladekit-mcp v...` banner on stderr)\n\n</details>\n\n<details>\n<summary><strong>Architecture</strong></summary>\n\n```\n[AI Client: Cursor / Claude Code / Windsurf / Claude Desktop / Unity AI Gateway]\n         |\n         | stdio or HTTP MCP protocol\n         v\n[gladekit_mcp Python process]\n    bridge.py -> probes :8765 (Unity, HTTP) and :8766 (Godot, WebSocket), picks the engine\n    prompts.py -> system prompt (auto-reads render pipeline, input system, GLADE.md)\n    tools/ -> 275 Unity tool schemas + dispatch      schemas/godot/ -> 115 Godot tool schemas\n    asset_pipeline/ -> bundled CC0 catalog + URL resolution\n    cloud.py -> optional GLADEKIT_API_KEY -> api.gladekit.com\n         |                                  |\n         | HTTP localhost:8765              | WebSocket localhost:8766 (+ session token)\n         v                                  v\n[Unity Bridge -- C# Editor extension]     [Godot Bridge -- GDScript EditorPlugin]\n    unity-bridge/ (UPM package)              godot-bridge/addons/com.gladekit.mcp-bridge/\n    UnityBridgeServer.cs -> HttpListener     ws_server.gd -> TCPServer + WebSocketPeer\n    275 ITool implementations                115 tool implementations (main-thread dispatch)\n    UnityContextGatherer, PlayModeObserver,  context_gatherer, play_session_manager,\n    BackupManager, BuildManager              backup_manager, export_manager, bridge_auth\n```\n\n</details>\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nEach bridge is the source of truth for its tools; the Python server mirrors the schema. CI (`ruff` + `pytest` + the eval harness, on three MCP SDK versions) runs on every change to `mcp-server/`, `unity-bridge/`, or `godot-bridge/`, and a schema↔bridge field-parity test fails if an argument exists on one side only. Adding a tool takes three changes.\n\n**Unity**\n\n1. **C# implementation** (`unity-bridge/Editor/Tools/Implementations/<Category>/MyTool.cs`):\n\n```csharp\npublic class MyTool : ITool\n{\n    public string Name => \"my_tool\";\n    public string Execute(Dictionary<string, object> args)\n    {\n        // ... Unity Editor API calls ...\n        return ToolUtils.CreateSuccessResponse(\"Done\", extras);\n    }\n}\n```\n\n2. **C# registration** (`unity-bridge/Editor/Tools/Registrars/<Category>Tools.cs`): add `Register(new MyTool());`. Registration is explicit — an unregistered tool compiles fine but returns \"Tool was blocked from executing or null.\" when dispatched.\n\n3. **Python schema** (`mcp-server/src/gladekit_mcp/tools/<category>.py`): add an entry to the category's tool list following the existing format (OpenAI function-calling schema).\n\n**Godot**\n\n1. **GDScript implementation** (`godot-bridge/addons/com.gladekit.mcp-bridge/tools/implementations/<category>/my_tool.gd`) extending `i_tool.gd`; set `tool_name` and `requires_edit_mode` in `_init()` and return `ToolUtils.success(...)` / `ToolUtils.error(...)`.\n\n2. **Registration** in `godot-bridge/addons/com.gladekit.mcp-bridge/bridge/tool_registry.gd` (`register_tool(MyTool.new())`).\n\n3. **Python schema** (`mcp-server/src/gladekit_mcp/schemas/godot/<category>.py`).\n\nSee [`godot-bridge/README.md`](https://github.com/Glade-tool/glade-mcp/blob/main/godot-bridge/README.md) for the wire protocol and GUT test setup, and [`mcp-server/CHANGELOG.md`](https://github.com/Glade-tool/glade-mcp/blob/main/mcp-server/CHANGELOG.md) for release history.\n\n</details>\n\n---\n\n**License:** MIT - see [LICENSE](LICENSE).\n\nThe [GladeKit desktop app](https://gladekit.com) is a separate commercial product that layers streaming, miss recovery, and a memory UI on top of this MCP server.\n\n<!-- mcp-name: io.github.Glade-tool/glade-mcp -->\n",
  "bytes": 37196,
  "sha": "3bcd67ab76a7183200cfe95cc7b307ddb323acb2529ad9f43f870f4a9c96739a",
  "repo_slug": "glade-tool/glade-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_glade_tool_glade_mcp_5e3d78ab/readme"
}