
Unity API Documentation
Stop Unity C# hallucinations by giving the agent version-accurate Unity API docs for 2022, 2023, or Unity 6.
Overview
Unity API MCP is a Build-phase MCP server that serves version-matched Unity API documentation to AI agents to prevent hallucinated signatures.
What is this MCP server?
- PyPI `unity-api-mcp` v2.0.2 with stdio transport and uvx hint
- Serves Unity API documentation for versions 2022, 2023, and 6
- UNITY_VERSION env or auto-detect via UNITY_PROJECT_PATH and ProjectVersion.txt
- Explicit goal: prevent hallucinated method signatures in AI-generated Unity code
- MCP server version 2.0.2
- Supports Unity documentation lines 2022, 2023, and 6
- 2 optional env vars UNITY_VERSION and UNITY_PROJECT_PATH documented in server schema
Community signal: 62 GitHub stars.
What problem does it solve?
LLMs routinely invent Unity APIs and overloads that do not exist in your editor version.
Who is it for?
Solo Unity developers wiring MCP into Claude Code or Cursor while scripting gameplay or editor tools.
Skip if: Unreal or Godot projects, or teams that do not want Python uvx MCP in their game workflow.
What do I get? / Deliverables
After setup, your agent can query Unity 2022, 2023, or 6 documentation aligned with your project or UNITY_VERSION setting.
- Version-aligned Unity API lookup via MCP tools
- Reduced invalid Unity C# suggestions during agent sessions
- Auto-detected editor version when UNITY_PROJECT_PATH is set
Recommended MCP Servers
Journey fit
How it compares
Unity engine doc MCP, not a generic codebase indexer or asset pipeline tool.
Common Questions / FAQ
Who is unity-api-mcp for?
Unity indie devs and small teams who use AI assistants and need engine API answers tied to 2022, 2023, or Unity 6.
When should I use unity-api-mcp?
Use it whenever you generate or refactor Unity C# and want the agent to verify classes and methods against real docs for your version.
How do I add unity-api-mcp to my agent?
Install `unity-api-mcp` via PyPI/uvx, set UNITY_VERSION or UNITY_PROJECT_PATH to your game folder, and add the stdio server to your MCP client configuration.