Instant, accurate Unity API lookups instead of expensive source file reads, saving your agent tokens, context, and hallucinations
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add unity-api-mcp -- uvx unity-api-mcp{
"mcpServers": {
"unity-api-mcp": {
"command": "uvx",
"args": ["unity-api-mcp"]
}
}
}MCP Servers overview
# unity-api-mcp
<!-- mcp-name: io.github.Codeturion/unity-api-mcp -->
[](https://pypi.org/project/unity-api-mcp/)
[](https://pypi.org/project/unity-api-mcp/)
[](https://registry.modelcontextprotocol.io/?q=unity-api-mcp)
[](https://github.com/Codeturion/unity-api-mcp)
[](https://github.com/Codeturion/unity-api-mcp)
[](https://github.com/Codeturion/unity-api-mcp/actions/workflows/detect-unity-release.yml)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
**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](https://github.com/Codeturion/unity-api-mcp/releases/tag/db-v1). 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:
```json
{
"mcpServers": {
"unity-api": {
"command": "uvx",
"args": ["unity-api-mcp"],
"env": {
"UNITY_VERSION": "6000.3"
}
}
}
}
```
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
1. **Version detection.** The server figures out which Unity version to serve:
| Priority | Source | Example |
|----------|--------|---------|
| 1 | `UNITY_VERSION` env var | `"2022"`, `"6"`, `"6000.3"`, or `"6000.3.8f1"` |
| 2 | `UNITY_PROJECT_PATH` | Reads `ProjectSettings/ProjectVersion.txt`, maps `2022.3.62f1` to `"2022"`, `6000.3.8f1` to `"6000.3"` |
| 3 | Default | `"6"` |
2. **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 generic `6` database when a stream database isn't published. Cached databases are freshness-checked against the release on startup, so weekly rebuilds reach existing installs automatically.
3. **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
| Tool | Purpose | Example |
|------|---------|---------|
| `search_unity_api` | Find APIs by keyword | "Tilemap SetTile", "async load scene" |
| `get_method_signature` | Exact signatures with all overloads | `UnityEngine.Physics.Raycast` |
| `get_namespace` | Resolve `using` directives | "SceneManager" -> `using UnityEngine.SceneManagement;` |
| `get_class_reference` | Full class reference card | "InputAction" -> all methods/fields/properties |
| `get_deprecation_warnings` | Check if an API is obsolete | "WWW" -> Use UnityWebRequest instead |
## 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**](https://github.com/Codeturion/unity-api-mcp/releases/tag/db-v1). 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/`](docs/benchmark/) and re-runs with one command.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Codeturion/unity-api-mcp/master/docs/images/benchmark-accuracy-dark.png">
<img alt="Answer quality by agent config, judged against verified ground truth" src="https://raw.githubusercontent.com/Codeturion/unity-api-mcp/master/docs/images/benchmark-accuracy-light.png">
</picture>
| Config | Correct | Partial | Wrong | Hallucinated APIs |
|---|---|---|---|---|
| **MCP + targeted Read** | **24/25** | 1 | 0 | **0** |
| Skilled (Grep+Read) | 20/25 | 3 | 2 | 1 |
| Naive (full Reads) | 19/25 | 3 | 3 | 1 |
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.
<details>
<summary>Methodology</summary>
- 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)
</details>
## 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.
```markdown
## Unity API Lookup (unity-api MCP)
Use the `unity-api` MCP tools to verify Unity API usage instead of guessing. **Do not hallucinate signatures.**
| When | Tool | Example |
|------|------|---------|
| Unsure about a method's parameters or return type | `get_method_signature` | `get_method_signature("UnityEngine.Tilemaps.Tilemap.SetTile")` |
| Need the `using` directive for a type | `get_namespace` | `get_namespace("SceneManager")` |
| Want to see all members on a class | `get_class_reference` | `get_class_reference("InputAction")` |
| Searching for an API by keyword | `search_unity_api` | `search_unity_api("async load scene")` |
| Checking if an API is deprecated | `get_deprecation_warnings` | `get_deprecation_warnings("FindObjectOfType")` |
**Rules:**
- Before writing a Unity API call you haven't used in this conversation, verify the signature with `get_method_signature`
- Before adding a `using` directive, verify with `get_namespace` if unsure
- Covers: all UnityEngine/UnityEditor modules, Input System, Addressables, uGUI/TextMeshPro, AI Navigation, Netcode
- Does NOT cover: DOTween, VContainer, Newtonsoft.Json (third-party)
```
## Setup Details
<details>
<summary>Auto-detect version from project path</summary>
Instead of setting `UNITY_VERSION`, you can point to your Unity project. The server reads `ProjectSettings/ProjectVersion.txt` automatically:
```json
{
"mcpServers": {
"unity-api": {
"command": "uvx",
"args": ["unity-api-mcp"],
"env": {
"UNITY_PROJECT_PATH": "/path/to/your/unity-project"
}
}
}
}
```
</details>
<details>
<summary>Alternative installation methods</summary>
**Using pip install:**
```bash
pip install unity-api-mcp
```
```json
{
"mcpServers": {
"unity-api": {
"command": "unity-api-mcp",
"args": [],
"env": {
"UNITY_VERSION": "6000.3"
}
}
}
}
```
</details>
<details>
<summary>Environment variables</summary>
| Variable | Purpose | Example |
|----------|---------|---------|
| `UNITY_VERSION` | Unity version to serve | `6000.3`, `6000.3.8f1`, `6`, `2023`, `2022` |
| `UNITY_PROJECT_PATH` | Auto-detect version from project | `F:/Unity Projects/my-project` |
| `UNITY_INSTALL_PATH` | Override Unity install path (for `ingest` only) | `D:/Unity/6000.3.8f1` |
</details>
<details>
<summary>Building databases locally</summary>
If you want to build a database from your own Unity installation instead of downloading:
```bash
# Install with ingest dependencies
pip install unity-api-mcp[ingest]
# Windows
python -m unity_api_mcp.ingest --unity-version 6000.3 --unity-install "D:/Unity/6000.3.8f1" --project "F:/Unity Projects/MyProject"
# macOS
python -m unity_api_mcp.ingest --unity-version 6000.3 --unity-install "/Applications/Unity/Hub/Editor/6000.3.20f1" --project "/path/to/UnityProject"
# Legacy versions
python -m unity_api_mcp.ingest --unity-version 2022 --unity-install "D:/Unity/2022.3.62f1"
```
Databases are written to `~/.unity-api-mcp/unity_docs_{version}.db` by default.
</details>
<details>
<summary>AI-Assisted Setup</summary>
If an AI agent is setting this up for you:
> Add `unity-api-mcp` to my MCP confWhat people ask about unity-api-mcp
What is Codeturion/unity-api-mcp?
+
Codeturion/unity-api-mcp is mcp servers for the Claude AI ecosystem. Instant, accurate Unity API lookups instead of expensive source file reads, saving your agent tokens, context, and hallucinations It has 67 GitHub stars and its last recorded update is dated 2026-10-12.
How do I install unity-api-mcp?
+
You can install unity-api-mcp by cloning the repository (https://github.com/Codeturion/unity-api-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is Codeturion/unity-api-mcp safe to use?
+
Our security agent has analyzed Codeturion/unity-api-mcp and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains Codeturion/unity-api-mcp?
+
Codeturion/unity-api-mcp is maintained by Codeturion. The last recorded GitHub activity is dated 2026-10-12, with 11 open issues.
Are there alternatives to unity-api-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy unity-api-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/codeturion-unity-api-mcp)<a href="https://claudewave.com/repo/codeturion-unity-api-mcp"><img src="https://claudewave.com/api/badge/codeturion-unity-api-mcp" alt="Featured on ClaudeWave: Codeturion/unity-api-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Reverse engineer anything with agents, from app behavior down to native binaries.
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev