Unity API Documentation — Claude Code MCP server: how to install
Supplies local Unity API reference data to AI agents, covering method overloads, namespaces, and deprecations across Unity 2022, 2023, and Unity 6.
claude mcp add --env UNITY_VERSION=<UNITY_VERSION> --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> --transport stdio unity-api-documentation -- uvx unity-api-mcpWhat Unity API Documentation does
The server queries an offline SQLite database built for specific engine releases instead of guessing signatures. It provides tools to look up method parameters, resolve using statements, inspect class definitions, and check obsolete API warnings.
Target versions resolve through the UNITY_VERSION variable or by reading ProjectSettings/ProjectVersion.txt via UNITY_PROJECT_PATH. If neither option is set, the server defaults to Unity 6. On initial startup, it fetches a 20-30 MB database file into ~/.unity-api-mcp/.
UnityEngine, UnityEditor, Input System, and Netcode modules are fully indexed. Third-party packages such as DOTween or VContainer are absent from the database. Running the tool through uvx requires Python 3.10 or newer.
What it helps with
- lookup exact method overloads for UnityEngine classes
- resolve missing C# namespaces for Unity types
- verify whether an API is obsolete and find replacements
- inspect properties and fields of Input System components
Example prompts for the agent
- Check the method signatures for
Physics.Raycastin Unity 6 - Find the right namespace import for
SceneManager - Verify if
WWWis obsolete and show what replaces it
How to install Unity API Documentation
Platform CLI
claude mcp add --env UNITY_VERSION=<UNITY_VERSION> --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> --transport stdio unity-api-documentation -- uvx unity-api-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unity-api-mcp <command>
Platform CLI
codex mcp add unity-api-documentation --env UNITY_VERSION=<UNITY_VERSION> --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> -- uvx unity-api-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unity-api-mcp <command>
Config file
{
"mcpServers": {
"unity-api-documentation": {
"command": "uvx",
"args": [
"unity-api-mcp"
],
"env": {
"UNITY_VERSION": "<UNITY_VERSION>",
"UNITY_PROJECT_PATH": "<UNITY_PROJECT_PATH>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unity-api-mcp <command>
Config file
{
"servers": {
"unity-api-documentation": {
"type": "stdio",
"command": "uvx",
"args": [
"unity-api-mcp"
],
"env": {
"UNITY_VERSION": "<UNITY_VERSION>",
"UNITY_PROJECT_PATH": "<UNITY_PROJECT_PATH>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unity-api-mcp <command>
Platform CLI
gemini mcp add -e UNITY_VERSION=<UNITY_VERSION> -e UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> unity-api-documentation uvx unity-api-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from unity-api-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Unity API Documentation
How to install Unity API Documentation in Claude Code?
Run claude mcp add unity-api-mcp -- uvx unity-api-mcp. If you need custom environment flags for your project, run `claude mcp add --env UNITY_VERSION=<UNITY_VERSION> --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> --transport stdio unity-api-documentation -- uvx unity-api-mcp`.
What does Unity API Documentation do?
It exposes specialized MCP tools that fetch verified C# method signatures, type namespaces, and deprecation details directly from a local database.
Does this require Unity Editor to be installed?
No, Unity Editor is not required. The server retrieves and queries pre-built SQLite indexes stored locally in ~/.unity-api-mcp/.