Unity Code Intelligence MCP Server

Unity Code Intelligence MCP Server

AI-powered static analysis for Unity projects, detecting common patterns, component relationships, and programming insights to augment developer workflows.

Category
Visit Server

README

Unity Code Intelligence MCP Server

AI-powered static analysis for Unity projects
This Model Context Protocol (MCP) server provides intelligent code analysis for Unity, detecting common patterns, component relationships, and programming insights to augment developer workflows.

Key Features

  • 🎮 Unity-Specific Pattern Detection - Identifies 8+ common Unity patterns (Singleton, Coroutine, ScriptableObject etc.)
  • 🤝 Component Relationship Mapping - Visualizes MonoBehaviour dependencies and interactions
  • 📊 Quantitative Metrics - Provides statistics on pattern usage across projects
  • 🔍 Structured Documentation Access - AI-optimized Unity documentation retrieval
  • ⚙️ Automatic Configuration - Resolves Unity installations based on project settings

Designed for Extensibility

Modular Pattern Detection

Our pattern detection system uses a plugin architecture where new Unity patterns can be detected by implementing the IUnityPatternDetector interface. The registry automatically discovers and integrates all detectors found in the system.

Flexible Configuration

The dual-path configuration system supports both automatic Unity installation detection and manual overrides. This adaptive approach ensures compatibility with future Unity versions and custom deployment scenarios.

Documentation Framework

The documentation engine provides a clean abstraction layer over Unity's documentation, offering multiple endpoints optimized for AI consumption. New documentation formats and search strategies can be added via our standardized plugin API.

Getting Started

Prerequisites

Before you begin, ensure you have the .NET 8.0 SDK or a newer version installed.

Building and Running

The following instructions apply to both Windows and macOS.

1. Build the Server

From the root directory of the repository, run the following command to build the project and restore dependencies:

dotnet build

2. Run the Server

To start the server, execute the following command from the root directory:

dotnet run

The server will now be running and ready to accept requests from an MCP client.

Configuration

The server is configured using the appsettings.json file, which must be placed in the project's root directory. This file allows you to specify paths required for the analysis tools to function correctly.

UnityAnalysisSettings

All settings are located within the UnityAnalysisSettings object in appsettings.json.

  • ProjectPath (Required): The absolute path to the root of the Unity project you intend to analyze.

    • Example: "C:\\Users\\YourUser\\Documents\\MyUnityProject"
  • InstallRoot (Optional): The path to the directory containing your Unity Editor version folders. This is typically the Editor folder inside your Unity Hub installation directory. This setting is used with the project's detected version to automatically locate the correct Unity Editor.

    • Example: "C:\\Program Files\\Unity\\Hub\\Editor"
  • EditorPath (Optional): A direct and explicit path to a specific Unity Editor installation folder. If provided, this path takes priority over the InstallRoot setting. This is useful for development or if your editor is in a non-standard location.

    • Example: "C:\\UnityEditors\\2022.3.15f1"

To function, the analyzer must be able to locate the Unity Editor installation. You must configure either InstallRoot (so the editor can be found automatically) or provide a direct EditorPath.

Sample appsettings.json:

{
  "UnityAnalysisSettings": {
    "InstallRoot": "/Applications/Unity/Hub/Editor/",
    "EditorPath": "",
    "ProjectPath": "C:\\Path\\To\\Your\\UnityProject"
  }
}

Interacting with the Server

You can interact with the server using the MCP Inspector, which provides a web-based interface.

# Navigate to your MCP server project directory
# (The directory containing Unity_Intelligence_MCP.csproj)
cd path/to/Unity_Intelligence_MCP

# Install and run the MCP Inspector
npx @modelcontextprotocol/inspector dotnet run

Follow the instructions in your terminal. You will be prompted to open a URL in your web browser to access the inspector.

From the web interface, you can select a tool like analyze_unity_project. The tool will use the ProjectPath configured in your appsettings.json to run the analysis.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured