
Unity API Documentation
io.github.CodeturionPublished by GitHub account Codeturionv2.1.1Updated Oct 24, 2026
Accurate Unity API docs (2022/2023/6) for AI agents. Prevents hallucinated signatures.
Overview
A local MCP server that gives an AI assistant accurate Unity API documentation for Unity 2022, 2023 and 6, so it can check signatures, namespaces and deprecat
- What you can do
- Search Unity APIs by keyword across UnityEngine, UnityEditor and packages such as Input System, Addressables, uGUI/TextMeshPro, AI Navigation and Netcode. Retrieve exact method signatures with all overloads, and full class reference cards listing methods, fields and properties. Resolve the correct using directive for a type, and check whether an API is obsolete along with its replacement. Answers come from a version-specific SQLite database queried locally.
- When to use it
- Useful when an assistant writes or reviews Unity C# code and needs to verify exact overloads, namespaces or deprecation status rather than infer them from usage examples. Best for projects on Unity 2022 LTS, 2023 or Unity 6 that rely on built-in modules and the listed Unity packages.
- Requirements
- Runs locally as a Python package (Python 3.10+) via uvx or pip, with no Unity installation required. Set UNITY_VERSION (for example 2022, 2023, 6 or a stream like 6000.3) or UNITY_PROJECT_PATH to auto-detect from ProjectSettings/ProjectVersion.txt; otherwise it defaults to Unity 6. Internet access is needed on first run to download a roughly 20-30 MB database into the user's home directory.
Installation
In SourceWeft
- Open Unity API Documentation in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
unity-api-mcp
[PyPI Version] [PyPI Downloads] [MCP Registry] [GitHub Stars] [GitHub Last Commit] [Weekly DB Build] [License: MIT] [Python 3.10+]
MCP server that gives AI agents accurate Unity API documentation. Prevents hallucinated signatures, wrong namespaces, and deprecated API usage.
Supports Unity 6 (one database per minor stream), Unity 2023, and Unity 2022 LTS. Works with Claude Code, Cursor, Windsurf, or any MCP-compatible AI tool. No Unity installation required. See the supported versions. New Unity releases are detected and built automatically every week.
Quick Start
Add to your MCP config (.mcp.json, mcp.json, or your tool's MCP settings), setting UNITY_VERSION to match your project:
Valid values: a Unity 6 stream like "6000.3", or "6", "2023", "2022".
On first run the server downloads the correct database (~20-30 MB) to ~/.unity-api-mcp/.
How It Works
- Version detection. The server figures out which Unity version to serve:
-
Database download. If the database for that version isn't cached locally, it downloads from GitHub. Unity 6 minor streams (
6000.0,6000.3,6000.5, …) get their own per-stream database, falling back to the generic6database when a stream database isn't published. Cached databases are freshness-checked against the release on startup, so weekly rebuilds reach existing installs automatically. -
Serve. All tool calls query the version-specific SQLite database. Every query returns in <15ms.
Each version has its own database with the correct signatures, deprecation warnings, and member lists for that release.
Tools
Coverage
All UnityEngine and UnityEditor modules, plus packages parsed from C# source: Input System, Addressables, uGUI (incl. TextMeshPro on Unity 6), AI Navigation, and Netcode. ~42,500 records per Unity 6 database, ~500 deprecation warnings each.
Full version list: db-v1 release page. CI regenerates that table on every build. New Unity patches are detected and built automatically every Monday.
Does not cover third-party assets (DOTween, VContainer, Newtonsoft.Json). For those, rely on project source.
Benchmarks
Measured, not promised: 25 research questions across 3 testbeds, answered by 3 agent configs, every answer judged against ground truth verified in the source beforehand. The full harness lives in docs/benchmark/ and re-runs with one command.
The one reproduced hallucination is instructive. Asked to list the overloads of SceneManager.LoadSceneAsync, both non-MCP agents invented single-parameter LoadSceneAsync(string) and LoadSceneAsync(int) overloads that do not exist. Code written against them does not compile. The MCP agent returned the exact four real overloads.
Why correctness and not token savings? Agentic tools are good at code search now. Claude Code has shipped a Grep tool from the start, and current models search first and then read a narrow line range, so raw token use was comparable across all configs in our runs. But exact overloads, namespaces, and deprecations are not in your project files at all. An agent without MCP can only infer them from usage examples, and when it infers wrong you pay with a broken build.
Methodology
- 3 testbeds: a real Unity 6 game project (11 questions), pure Unity API lookups (8), and Unity Input System package source with 2,700 to 4,600 line files (6)
- 3 configs, same model and turn limit: MCP tools + Grep/Read, Grep/Read only, Read only
- Ground truth verified by reading the source before any runs; answers judged by a separate model session against that ground truth; token usage taken from API usage fields
- Run it yourself:
python docs/benchmark/run.py --project <unity-project-path>(results from July 2026; agent behavior moves, so re-run before quoting)
CLAUDE.md Snippet
Add this to your project's CLAUDE.md (or equivalent instructions file). This step is important. Without it, the AI has the tools but won't know when to reach for them.
Setup Details
Auto-detect version from project path
Instead of setting UNITY_VERSION, you can point to your Unity project. The server reads ProjectSettings/ProjectVersion.txt automatically:
Alternative installation methods
Using pip install:
Environment variables
Building databases locally
If you want to build a database from your own Unity installation instead of downloading:
Databases are written to ~/.unity-api-mcp/unity_docs_{version}.db by default.
AI-Assisted Setup
If an AI agent is setting this up for you:
Add
unity-api-mcpto my MCP config usinguvxwithUNITY_VERSIONset to match my project, append the CLAUDE.md snippet from the README, and verify withget_namespace("SceneManager").
Project structure
Databases are stored in ~/.unity-api-mcp/ (downloaded on first run).
Troubleshooting
See Also
unreal-api-mcp: same concept for Unreal Engine (C++), with weekly auto-built databases per UE version.
Contact
Need a custom MCP server for your engine or framework? I build MCP tools that cut token waste and prevent hallucinations for AI-assisted game development. If you want something similar for your team's stack, reach out.
License
Source: README.md at commit 3f65d1d
Tools
0Version history
2- v2.1.1LatestOct 12, 2026
- v2.1.0Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts