Gives AI clients accurate Unity API signatures, namespaces, class references, and deprecation warnings for Unity 2022, 2023, and 6.
다른 이름 Codeturion/unity-api-mcp, unity-api-mcp
- 스타
- 66
- Tools
- 5
- 다운로드, 30일
- —
- 최신 버전
- 2.1.1
- 마지막 커밋
- 2026년 10월 26일
- 라이선스
- MIT
Unity API Documentation MCP란?
Unity API Documentation은(는) MCP server입니다. Gives AI clients accurate Unity API signatures, namespaces, class references, and deprecation warnings for Unity 2022, 2023, and 6. 5개 도구를 제공합니다. 예: search_unity_api, get_method_signature, get_namespace.
프로젝트 README에서 생성된 요약
Unity API Documentation MCP server 정보
Providing accurate Unity API signatures and namespaces to AI agents is what this server enables for game developers. It prevents common issues like hallucinated method overloads, incorrect using directives, and the use of deprecated code during AI-assisted programming. The server supports Unity 6, Unity 2023, and Unity 2022 LTS, offering version-specific data for each release.
Developers can integrate this into tools like Claude Code, Cursor, or Windsurf by configuring the server via uvx or pip. It can automatically detect the correct version by reading the ProjectSettings/ProjectVersion.txt file from a provided UNITY_PROJECT_PATH or by using a manual UNITY_VERSION environment variable. On the first run, it downloads a version-specific SQLite database to the local machine.
Unlike general coding assistants that guess API details from context, this server uses specialized tools like get_method_signature, get_namespace, and get_deprecation_warnings to provide ground truth. It covers UnityEngine, UnityEditor, and several key packages including Input System, Addressables, and Netcode, but does not include third-party assets like DOTween.
활용 사례
- 1Verify method signaturesAn AI agent can use the server to find the exact parameters and overloads for a specific Unity method to ensure code compiles.
- 2Resolve namespace directivesDevelopers can ask the AI to identify the correct using directive needed to access a specific Unity class.
- 3Avoid deprecated APIsThe server helps prevent the use of obsolete functions by providing explicit warnings for outdated Unity code.
- 4Explore class membersAn AI can retrieve a full reference card for a class to see all available methods, fields, and properties.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Unity API Documentation MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 Unity API Documentation MCP 설치
$ claude mcp add unity-api-mcp -- uvx unity-api-mcpCursor에 Unity API Documentation MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"unity-api-mcp": {
"command": "uvx",
"args": [
"unity-api-mcp"
]
}
}
}VS Code에 Unity API Documentation MCP 설치
.vscode/mcp.json
{
"servers": {
"unity-api-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"unity-api-mcp"
]
}
}
}Claude Desktop에 Unity API Documentation MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"unity-api-mcp": {
"command": "uvx",
"args": [
"unity-api-mcp"
]
}
}
}Codex에 Unity API Documentation MCP 설치
~/.codex/config.toml
[mcp_servers.unity-api-mcp] command = "uvx" args = ["unity-api-mcp"]
Gemini CLI에 Unity API Documentation MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"unity-api-mcp": {
"command": "uvx",
"args": [
"unity-api-mcp"
]
}
}
}Unity API Documentation MCP 도구 5
README에서 감지됨search_unity_apiget_method_signatureget_namespaceget_class_referenceget_deprecation_warnings
| search_unity_api | — | |
| get_method_signature | — | |
| get_namespace | — | |
| get_class_reference | — | |
| get_deprecation_warnings | — |
구성
UNITY_PROJECT_PATHPath to Unity project for auto-detecting version from ProjectSettings/ProjectVersion.txt
UNITY_VERSIONUnity version to serve: 2022, 2023, or 6 (default: auto-detect or 6)
| 이름 | 설명 | 유형 |
|---|---|---|
| UNITY_PROJECT_PATH | Path to Unity project for auto-detecting version from ProjectSettings/ProjectVersion.txt | |
| UNITY_VERSION | Unity version to serve: 2022, 2023, or 6 (default: auto-detect or 6) |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨통과
- 모델에 대한 숨겨진 지침 없음통과
- 패키지와 의존성에 심각한 보안 권고 없음통과
README
GitHub에서 보기unity-api-mcp
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:
{
"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
- 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" |
-
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
| 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. 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.
| 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.
- 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.
## 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
Instead of setting UNITY_VERSION, you can point to your Unity project. The server reads ProjectSettings/ProjectVersion.txt automatically:
{
"mcpServers": {
"unity-api": {
"command": "uvx",
"args": ["unity-api-mcp"],
"env": {
"UNITY_PROJECT_PATH": "/path/to/your/unity-project"
}
}
}
}
Using pip install:
pip install unity-api-mcp
{
"mcpServers": {
"unity-api": {
"command": "unity-api-mcp",
"args": [],
"env": {
"UNITY_VERSION": "6000.3"
}
}
}
}
| 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 |
If you want to build a database from your own Unity installation instead of downloading:
# 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.
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").
unity-api-mcp/
├── src/unity_api_mcp/
│ ├── server.py # MCP server (5 tools)
│ ├── db.py # SQLite + FTS5 database layer
│ ├── version.py # Version detection + DB download
│ ├── xml_parser.py # Parse Unity XML IntelliSense files
│ ├── cs_doc_parser.py # Parse C# doc comments from package source
│ ├── unity_paths.py # Locate Unity install + package dirs
│ └── ingest.py # CLI ingestion pipeline
└── pyproject.toml
Databases are stored in ~/.unity-api-mcp/ (downloaded on first run).
Troubleshooting
| Problem | Fix |
|---|---|
| "Could not download Unity X database" | Check internet connection. Or build locally: python -m unity_api_mcp.ingest --unity-version 2022 |
| Wrong API version being served | Set UNITY_VERSION explicitly. Check stderr: unity-api-mcp: serving Unity <version> API docs |
| Server won't start | Check python --version (needs 3.10+). Check path: which unity-api-mcp or where unity-api-mcp |
ModuleNotFoundError: No module named 'mcp.server.fastmcp' |
Version 2.1.0 or older installed mcp 2.x. Restart your MCP client, or run uvx unity-api-mcp@latest. With pip, run pip install -U unity-api-mcp. |
| Third-party packages return no results | DOTween, VContainer, Newtonsoft.Json are not indexed (third-party, not Unity packages) |
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
Unity API Documentation MCP 질문
Unity API Documentation MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add unity-api-mcp -- uvx unity-api-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Unity API Documentation MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Unity API Documentation MCP는 어떤 도구를 제공하나요?
5개 도구를 제공합니다. 예: search_unity_api, get_method_signature, get_namespace, get_class_reference, get_deprecation_warnings.
Which Unity versions does this MCP server support?
It supports Unity 6 (one database per minor stream), Unity 2023, and Unity 2022 LTS.
How do I check the exact signature of a Unity method?
Use the get_method_signature tool, which returns exact signatures with all overloads.
How do I find the using directive for a Unity type?
Call get_namespace with the type name to resolve the correct using directive.
Does it tell me if a Unity API is deprecated?
Yes, get_deprecation_warnings checks whether an API is obsolete and suggests replacements.
Does it cover third-party Unity assets like DOTween?
No, third-party assets such as DOTween, VContainer, and Newtonsoft.Json are not indexed.