Skip to main content

MCP server for Unity game development — connect Cursor, Claude Code, Windsurf, and other AI clients to your Unity Editor.

Project description

GladeKit Unity MCP

Connect Cursor, Claude Code, Windsurf, Claude Desktop, and other AI clients directly to your Unity Editor.

230+ tools. A full Unity-aware system prompt. GLADE.md project context. Script semantic search. Skill calibration. Cloud intelligence layer with RAG and cross-session memory. All core features are free and local.

GladeKit MCP Demo


Quick Start

1. Install the Unity package

In Unity: Window > Package Manager > + > Add package from git URL...

https://github.com/Glade-tool/glade-mcp-unity.git?path=/unity-bridge

The Unity bridge starts automatically on localhost:8765.

2. Connect your AI client

Install uv (one-time):

  • Mac/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Then add the MCP config to your AI client. The client launches the MCP server automatically - no manual server step.

Claude Code

Option A — one-liner (recommended):

  • Mac/Linux: claude mcp add --transport stdio gladekit-unity --scope user -- uvx gladekit-mcp
  • Windows: claude mcp add --transport stdio gladekit-unity --scope user -- cmd /c uvx gladekit-mcp

Option B — manual config:

If you cloned this repo, the .mcp.json auto-connects. Otherwise add to your Claude Code MCP settings:

{
  "mcpServers": {
    "gladekit-unity": {
      "command": "uvx",
      "args": ["gladekit-mcp"]
    }
  }
}
Cursor

Cursor Settings > MCP > Add new MCP server:

{
  "mcpServers": {
    "gladekit-unity": {
      "command": "uvx",
      "args": ["gladekit-mcp"]
    }
  }
}
Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "gladekit-unity": {
      "command": "uvx",
      "args": ["gladekit-mcp"]
    }
  }
}
Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "gladekit-unity": {
      "command": "uvx",
      "args": ["gladekit-mcp"]
    }
  }
}
Unity AI Gateway (native in-editor)

Unity's built-in AI Assistant can connect to GladeKit via MCP. This gives you GladeKit's 230+ tools directly inside the Unity Editor - no external AI client needed.

Requires: Unity 6000.3+ with AI Gateway package (com.unity.ai.assistant@2.x)

  1. In Unity, go to Edit > Project Settings > AI > MCP Servers
  2. Click Open Config File and paste:
{
  "enabled": true,
  "path": "",
  "mcpServers": {
    "gladekit-unity": {
      "type": "stdio",
      "command": "uvx",
      "args": ["gladekit-mcp"]
    }
  }
}
  1. Under Path Configuration, paste your terminal's PATH into User Path so Unity can find uvx. To get your PATH:
    • Mac/Linux: echo $PATH
    • Windows: echo %PATH%
  2. Click Refresh Config File and Reload Servers
  3. Verify the server shows StartedSuccessfully in the Servers section

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"].

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 section below.

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 below.

VS Code (GitHub Copilot)

Add to .vscode/mcp.json in your workspace:

{
  "servers": {
    "gladekit-unity": {
      "type": "stdio",
      "command": "uvx",
      "args": ["gladekit-mcp"]
    }
  }
}

Why GladeKit Unity MCP?

Feature GladeKit Unity MCP unity-mcp (CoplayDev)
Tools 230+ granular tools across 15 categories ~40 consolidated tools
System prompt Full Unity intelligence - render pipeline detection, input system routing, tool discipline rules None
Project context GLADE.md - inject your game design doc into every request None
Script search Semantic search via OpenAI embeddings (bring your own key) None
Skill calibration Auto-detects beginner/expert, adapts response verbosity None
In-session memory remember_for_session - AI stores and recalls facts mid-conversation None
Cloud intelligence GLADEKIT_API_KEY - RAG knowledge base, cross-session memory, convention extraction None
License MIT MIT

All core features are free and local. The cloud intelligence layer is optional and requires a GLADEKIT_API_KEY.


Features

230+ tools across 15 categories

Scene • GameObjects • Scripts • Prefabs • Materials • Lighting • VFX & Audio • Animation • IK • Physics • Camera • UI • Input System • Terrain & NavMesh • Profiler

All 230+ tools are dispatchable. Claude Code sees ~80 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.).

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).

7 MCP resources: Bridge health, project context, scene hierarchy, project scripts, current selection, GLADE.md, and session memory.

GLADE.md

Create 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.

# My Game

Genre: 3D platformer
Player: CharacterController, double jump enabled
Art style: pixel art, 16x16 sprites
Naming: PascalCase for scripts, snake_case for folders
Script semantic search

Set 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.

Everything needed ships with the package; no install flags or extras required. Get a key at platform.openai.com/api-keys (pay-as-you-go, pennies per search via text-embedding-3-small).

{
  "mcpServers": {
    "gladekit-unity": {
      "command": "uvx",
      "args": ["gladekit-mcp"],
      "env": { "OPENAI_API_KEY": "sk-..." }
    }
  }
}

Without the key, search_project_scripts still returns scripts - just unranked. Keys are never sent anywhere except OpenAI's embedding endpoint.

Skill calibration

The 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.

Cloud intelligence

Set GLADEKIT_API_KEY in your MCP config's env field to unlock cloud-powered features:

  • RAG knowledge base - get_relevant_tools queries a curated Unity knowledge base (API corrections, error patterns) and injects results alongside tool recommendations.
  • Cross-session persistent memory - facts stored with remember_for_session persist across sessions and are re-injected into the system prompt.
  • Convention extraction - the cloud backend distills coding patterns (naming, architecture, preferences) from your accumulated memories.

All cloud features degrade gracefully: if the key is missing or the cloud is unreachable, everything works normally.

{
  "mcpServers": {
    "gladekit-unity": {
      "command": "uvx",
      "args": ["gladekit-mcp"],
      "env": { "GLADEKIT_API_KEY": "your-api-key" }
    }
  }
}
Transports (stdio + streamable HTTP)

GladeKit MCP supports two transports. stdio is the default and works with all MCP clients - every config above uses stdio.

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:

# Defaults: host=127.0.0.1, port=8766, path=/mcp
gladekit-mcp --transport http

# Custom host/port/path
gladekit-mcp --transport http --host 127.0.0.1 --port 9000 --path /mcp

Endpoints:

  • POST/GET/DELETE http://127.0.0.1:8766/mcp - MCP streamable-HTTP endpoint
  • GET http://127.0.0.1:8766/health - liveness check

Security defaults:

  • Binds loopback-only (127.0.0.1). Use --host 0.0.0.0 to expose on LAN - opt-in only.
  • 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.
  • Non-loopback binds disable rebinding protection (you've taken responsibility for the network) and print a warning on startup.

Client config example:

{
  "mcpServers": {
    "gladekit-unity": {
      "url": "http://127.0.0.1:8766/mcp"
    }
  }
}
Environment Variables
Variable Required Description
UNITY_BRIDGE_URL No Unity bridge URL (default: http://localhost:8765)
OPENAI_API_KEY No Enables script semantic search via embeddings (get one)
GLADEKIT_API_KEY No Enables RAG knowledge base, cross-session memory, convention extraction
Troubleshooting

Bridge not connecting

  • Open Unity and wait for it to finish importing assets - the bridge starts automatically
  • Check Window > GladeKit MCP in Unity - the Bridge and AI Client indicators show connection status
  • Verify nothing else is using port 8765: lsof -i :8765 (Mac/Linux) or netstat -ano | findstr 8765 (Windows)

AI client can't find uvx

  • Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh (Mac/Linux) or pip install uv
  • Or use pip install gladekit-mcp and change the config command from "uvx" to "python" with args ["-m", "gladekit_mcp"]

Tools not appearing in Claude Code

  • Claude Code has a practical ~128-tool limit. GladeKit shows ~80 curated core tools by default - this is intentional. All 230+ are dispatchable: use get_relevant_tools to find extended tools by task description.

GLADE.md not being picked up

  • 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/)

Stderr warning: Unity bridge X.Y.Z is older than recommended

  • 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:

    "com.gladekit.mcp-bridge": "https://github.com/Glade-tool/glade-mcp-unity.git?path=unity-bridge#v0.4.1"
    
  • 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.

Unity AI Gateway - server shows FailedToStart

  • Click Inspect in the Servers section for the error message
  • 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
  • On Windows: echo %PATH% in Command Prompt. On Mac/Linux: echo $PATH
  • Alternative: use pip install gladekit-mcp and set the command to "python" with args ["-m", "gladekit_mcp"] - avoids the uvx PATH dependency
  • Validate outside Unity first: run uvx gladekit-mcp in a terminal (you should see the gladekit-mcp v... banner on stderr)
Architecture
[AI Client: Cursor / Claude Code / Windsurf / Claude Desktop / Unity AI Gateway]
         |
         | stdio or HTTP MCP protocol
         v
[gladekit_mcp Python process]
    bridge.py -> HTTP localhost:8765
    prompts.py -> system prompt (auto-reads render pipeline, input system, GLADE.md)
    tools/ -> 230+ tool schemas + dispatch
    cloud.py -> optional GLADEKIT_API_KEY -> api.gladekit.com
         |
         | HTTP localhost:8765
         v
[Unity Bridge -- C# Editor extension (UPM package)]
    UnityBridgeServer.cs -> HttpListener on :8765
    230+ ITool implementations
    UnityContextGatherer -> scene, scripts, packages, render pipeline
Contributing

The Unity bridge (unity-bridge/) is the source of truth for C# tools. Adding a tool requires two files:

1. C# implementation (unity-bridge/Editor/Tools/Implementations/<Category>/MyTool.cs):

public class MyTool : ITool
{
    public string Name => "my_tool";
    public string Execute(Dictionary<string, object> args)
    {
        // ... Unity Editor API calls ...
        return ToolUtils.CreateSuccessResponse("Done", extras);
    }
}

2. 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).

Tools are auto-discovered via reflection - no registration needed beyond these two files.


License: MIT - see LICENSE.

The GladeKit desktop app is a separate commercial product that layers streaming, miss recovery, and a memory UI on top of this MCP server.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gladekit_mcp-0.4.2.tar.gz (10.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gladekit_mcp-0.4.2-py3-none-any.whl (96.2 kB view details)

Uploaded Python 3

File details

Details for the file gladekit_mcp-0.4.2.tar.gz.

File metadata

  • Download URL: gladekit_mcp-0.4.2.tar.gz
  • Upload date:
  • Size: 10.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gladekit_mcp-0.4.2.tar.gz
Algorithm Hash digest
SHA256 dc676df694e587616149db39c75acf316cd58f127974a1590304ba3680f4f3d7
MD5 42de37fe293b87385581d013087a2592
BLAKE2b-256 5895268a2aa6092269d87d2f17b6496e326b70b851fc1b74f970b92c34c80c25

See more details on using hashes here.

Provenance

The following attestation bundles were made for gladekit_mcp-0.4.2.tar.gz:

Publisher: release.yml on Glade-tool/glade-mcp-unity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gladekit_mcp-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: gladekit_mcp-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gladekit_mcp-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00c9f8ba3ee4eff32037646f96c19c419b261d394a995c6f18011ffb42ab3b35
MD5 cbc9cc52d7d6f4036856215259168912
BLAKE2b-256 54bee99d2333c4787d7ae2a90bc2e657de86373fea872d83dbeb04830030d45c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gladekit_mcp-0.4.2-py3-none-any.whl:

Publisher: release.yml on Glade-tool/glade-mcp-unity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page