# Unity API Documentation

Supplies local Unity API reference data to AI agents, covering method overloads, namespaces, and deprecations across Unity 2022, 2023, and Unity 6.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 67
- Author: Codeturion
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Codeturion/unity-api-mcp
- Updated: 2026-10-12
- HTML: https://affpapa.org/en/nevibecode/mcp/unity-api-documentation

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `UNITY_VERSION`, `UNITY_PROJECT_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Unity

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env UNITY_VERSION=<UNITY_VERSION> --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> --transport stdio unity-api-documentation -- uvx unity-api-mcp
```
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>

### Codex

**Platform CLI**
```bash
codex mcp add unity-api-documentation --env UNITY_VERSION=<UNITY_VERSION> --env UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> -- uvx unity-api-mcp
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e UNITY_VERSION=<UNITY_VERSION> -e UNITY_PROJECT_PATH=<UNITY_PROJECT_PATH> unity-api-documentation uvx unity-api-mcp
```
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>

## When to use it
- 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
- Check the method signatures for `Physics.Raycast` in Unity 6
- Find the right namespace import for `SceneManager`
- Verify if `WWW` is obsolete and show what replaces it

## Similar
- [Pascal 3D Editor](https://affpapa.org/en/nevibecode/mcp/pascal-3d-editor.md) — MCP server · ★ 25085
- [Unity-MCP](https://affpapa.org/en/nevibecode/mcp/unity-mcp.md) — MCP server · ★ 4523
- [mcp](https://affpapa.org/en/nevibecode/mcp/sceneview-mcp.md) — MCP server · ★ 1348
- [Gearboy MCP Server](https://affpapa.org/en/nevibecode/mcp/gearboy-mcp-server.md) — MCP server · ★ 1219
- [ChiR24-unreal_mcp_server](https://affpapa.org/en/nevibecode/mcp/chir24-unreal-mcp-server.md) — MCP server · ★ 975
- [Nova3D](https://affpapa.org/en/nevibecode/mcp/nova3d.md) — MCP server · ★ 733

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
