Get the FREE Ultimate OpenClaw Setup Guide →

unity-api

Instant, accurate Unity API lookups instead of expensive source file reads, saving your agent tokens, context, and hallucinations

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio codeturion-unity-api-mcp uvx unity-api-mcp \
  --env UNITY_VERSION="2022"

How to use

The unity-api MCP server provides Unity API documentation to AI tools without requiring a local Unity installation. It serves version-specific Unity API data from SQLite databases so that tools can answer questions about signatures, namespaces, class references, deprecations, and more with fast responses (usually under 15ms per query). The server detects which Unity version to use either via the UNITY_VERSION environment variable, by reading a project path, or defaults to a general version. You can query tools like search_unity_api, get_method_signature, get_namespace, get_class_reference, and get_deprecation_warnings to verify API usage, resolve using directives, inspect full class references, and surface deprecated APIs. To get started, run the MCP server under your chosen environment and point your MCP config at it; then ask your agent to use these tools whenever Unity API details are needed.

How to install

Prerequisites:

  • Python 3.10+ (recommended)
  • pip (comes with Python)

Install the MCP server package:

pip install unity-api-mcp

Run the MCP server (examples shown as two common options): Option A (auto-detect from Unity project path):

# Set the Unity version to serve (e.g., 2022)
export UNITY_VERSION=2022
uvx unity-api-mcp

Option B (directly via ingested package name):

uvx unity-api-mcp

If you prefer explicit installation of the package as a module:

python -m pip install unity-api-mcp
python -m unity_api_mcp

After starting, the server will download the appropriate database (one time) and make it available to queries.

Additional notes

Tips and common scenarios:

  • The server caches version-specific databases locally (approx. 18-24 MB per version). First run may take a moment to download the database.
  • Valid UNITY_VERSION values include "2022", "2023", or "6". You can also point UNITY_PROJECT_PATH to auto-detect the version from your Unity project settings.
  • If you change the Unity version, ensure UNITY_VERSION is updated and restart the MCP server to load the correct database.
  • The Unity API coverage includes UnityEngine/UnityEditor modules and several packages. Note that third-party assets outside the covered scope may not be included.
  • For reproducibility, keep the “unity-api-mcp” package at a fixed version in your environment and pin UNITY_VERSION per project.
  • If you are ingesting a custom database, you can update the data source path using the provided environment controls in your MCP config.

Related MCP Servers

Sponsor this space

Reach thousands of developers