← Back to directory
U

Unity API Documentation MCP Server

Community
Accurate Unity API documentation for AI agents, with no hallucinated signatures
GitHub source repository ↗
★ 67 Stars Category · Dev Tools Popular
59FMRS · C

This is a third-party MCP server for Unity developers that serves accurate Unity API documentation from per-version SQLite databases, including method signatures, overloads, namespaces, and deprecation warnings. The README's benchmarks report 24/25 correct answers and zero hallucinated APIs for the MCP config, clearly ahead of Grep/Read-only configs. It supports Unity 6, 2023, and 2022 LTS and works with Claude Code, Cursor, and Windsurf without a Unity installation, with databases rebuilt weekly. Limitations: it does not index third-party assets, and the first run needs a network download.

Reliability
9/20
Security and permissions
11/20
Maintenance
12/20
Documentation
14/20
Setup experience
13/20
Read the FMRS scoring method →

This is an MCP server that gives AI agents accurate Unity API documentation, preventing hallucinated signatures, wrong namespaces, and deprecated API usage. It supports Unity 6 (one database per minor stream), Unity 2023, and Unity 2022 LTS, and works with Claude Code, Cursor, Windsurf, or any MCP-compatible AI tool. No Unity installation is required. On first run the server downloads the correct SQLite database (~20-30 MB) to ~/.unity-api-mcp/; all tool calls query the version-specific database and every query returns in under 15ms. Databases are rebuilt weekly so new Unity releases are covered automatically. The project does not cover third-party assets such as DOTween, VContainer, or Newtonsoft.Json.

Tools

search_unity_api
Find APIs by keyword, e.g. "Tilemap SetTile" or "async load scene"
get_method_signature
Get exact method signatures with all overloads, e.g. UnityEngine.Physics.Raycast
get_namespace
Resolve using directives, e.g. "SceneManager" maps to using UnityEngine.SceneManagement;
get_class_reference
Get a full class reference card, e.g. all methods, fields, and properties of "InputAction"
get_deprecation_warnings
Check whether an API is obsolete, e.g. "WWW" should use UnityWebRequest instead

Setup

  1. Add the server to your MCP config file (.mcp.json, mcp.json, or your tool's MCP settings): run unity-api-mcp with uvx and set UNITY_VERSION to match your project (e.g. "6000.3", "6", "2023", or "2022").
  2. Alternatively, install with pip install unity-api-mcp and set command to unity-api-mcp in the config.
  3. Instead of UNITY_VERSION, you can set UNITY_PROJECT_PATH to your Unity project so the server auto-detects the version from ProjectSettings/ProjectVersion.txt; if neither is set, it defaults to "6".
  4. On first run the server downloads the correct database (~20-30 MB) to ~/.unity-api-mcp/.
  5. Add the usage snippet from the README to your project's CLAUDE.md or equivalent instructions file so the AI knows when to reach for these tools.
claude_desktop_config.json
{
  "mcpServers": {
    "unity-api": {
      "command": "uvx",
      "args": ["unity-api-mcp"],
      "env": {
        "UNITY_VERSION": "6000.3"
      }
    }
  }
}

Fit and risk

Best for

  • Teams developing Unity projects with Claude Code, Cursor, or Windsurf
  • Developers who want to avoid AI-invented Unity API signatures
  • Projects on Unity 6, Unity 2023, or Unity 2022 LTS
  • AI-assisted workflows that want to reduce source-file reads, saving context and tokens

Not for

  • Users who need third-party assets like DOTween, VContainer, or Newtonsoft.Json (not indexed)
  • Developers using Unreal Engine or non-Unity engines
  • Environments with Python below 3.10
  • Anyone needing official Unity support (this is an independent third-party project)

Required permissions

  • Read access to local MCP configuration files
  • Network access on first run to download the database (~20-30 MB)
  • Read/write access to ~/.unity-api-mcp/ to cache databases
  • Optional UNITY_PROJECT_PATH reads ProjectSettings/ProjectVersion.txt inside the project
  • Optional UNITY_INSTALL_PATH is used only for local database building (ingest) to locate the Unity install

Risks and side effects

  • First run or database updates require internet access; without it you must build the database locally
  • The downloaded database is ~20-30 MB and occupies local disk space
  • An incorrect UNITY_VERSION can cause API docs for the wrong version to be served
  • Databases are rebuilt weekly by CI, so version coverage may lag the newest Unity release
  • Third-party packages are not indexed and return no results

Troubleshooting

  1. If you see "Could not download Unity X database", check your internet connection or build locally with python -m unity_api_mcp.ingest --unity-version 2022
  2. If the wrong API version is served, set UNITY_VERSION explicitly and check the stderr line "unity-api-mcp: serving Unity <version> API docs"
  3. If the server won't start, check python --version (needs 3.10+) and verify the path with which unity-api-mcp or where unity-api-mcp
  4. If third-party packages return no results, that is expected: DOTween, VContainer, and Newtonsoft.Json are not indexed
  5. If the AI isn't using the tools, check that you added the CLAUDE.md snippet from the README

Use cases

Verify method signatures before writing Unity API calls instead of guessing
Look up the namespace for a type to add the correct using directive
See all members (methods, fields, properties) on a class
Check whether a Unity API is deprecated and what replaces it
Let AI agents generate compilable code in Unity projects

Supported clients

Claude CodeFull support
CursorFull support
WindsurfFull support