Unreal Engine Analyzer MCP server

Analyzes Unreal Engine codebases, enabling deep insights into class hierarchies, subsystems, and game patterns.
Back to servers
Setup instructions
Provider
Ayelet Technology Private Limited
Release date
Jan 04, 2025
Language
TypeScript
Stats
80 stars

This Model Context Protocol (MCP) server provides powerful source code analysis capabilities for Unreal Engine codebases, enabling AI assistants like Claude and Cline to understand and analyze Unreal Engine source code thoroughly.

Installation

  1. Clone the repository:

    git clone https://github.com/ayeletstudioindia/unreal-analyzer-mcp
    cd unreal-analyzer-mcp
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Configuration

For Claude Desktop App

Add the following to your Claude desktop configuration file (%APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "unreal-analyzer": {
      "command": "node",
      "args": ["path/to/unreal-analyzer/build/index.js"],
      "env": {}
    }
  }
}

For Cline

Add the following to your Cline MCP settings file (%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json on Windows):

{
  "mcpServers": {
    "unreal-analyzer": {
      "command": "node",
      "args": ["path/to/unreal-analyzer/build/index.js"],
      "env": {}
    }
  }
}

Basic Usage

Before using any analysis tools, you must first set either the Unreal Engine source path or a custom codebase path:

Setting Up Analysis

For Unreal Engine Source Code

{
  "name": "set_unreal_path",
  "arguments": {
    "path": "/path/to/UnrealEngine/Source"
  }
}

For Custom C++ Codebases

{
  "name": "set_custom_codebase",
  "arguments": {
    "path": "/path/to/your/codebase"
  }
}

Available Analysis Tools

Class Analysis

Get detailed information about C++ classes:

{
  "name": "analyze_class",
  "arguments": {
    "className": "AActor"
  }
}

Example output:

{
  "name": "AActor",
  "properties": [
    {
      "name": "RootComponent",
      "type": "USceneComponent*",
      "access": "protected"
    }
  ],
  "methods": [
    {
      "name": "BeginPlay",
      "returnType": "void",
      "access": "protected",
      "virtual": true
    }
  ]
}

Class Hierarchy Analysis

Visualize inheritance hierarchies:

{
  "name": "find_class_hierarchy",
  "arguments": {
    "className": "ACharacter",
    "includeImplementedInterfaces": true
  }
}

Reference Finding

Locate references to classes, functions, or variables:

{
  "name": "find_references",
  "arguments": {
    "identifier": "BeginPlay",
    "type": "function"
  }
}

Code Search

Search through code with context-aware results:

{
  "name": "search_code",
  "arguments": {
    "query": "PhysicsHandle",
    "filePattern": "*.h",
    "includeComments": true
  }
}

Pattern Detection

Identify common Unreal Engine patterns:

{
  "name": "detect_patterns",
  "arguments": {
    "filePath": "Source/MyGame/MyActor.h"
  }
}

Best Practices Guide

Get guidance on following Unreal Engine best practices:

{
  "name": "get_best_practices",
  "arguments": {
    "concept": "UPROPERTY"  // or UFUNCTION, Components, Events, Replication, Blueprints
  }
}

API Documentation Query

Search the API documentation:

{
  "name": "query_api",
  "arguments": {
    "query": "Actor",
    "category": "Object",
    "module": "Core",
    "includeExamples": true,
    "maxResults": 10
  }
}

Subsystem Analysis

Analyze major Unreal Engine subsystems:

{
  "name": "analyze_subsystem",
  "arguments": {
    "subsystem": "Physics"
  }
}

Custom Codebase Examples

Analyzing a Custom Game Engine

// Initialize with custom codebase
{
  "name": "set_custom_codebase",
  "arguments": {
    "path": "/path/to/game-engine"
  }
}

// Analyze engine's renderer class
{
  "name": "analyze_class",
  "arguments": {
    "className": "Renderer"
  }
}

// Find all shader-related code
{
  "name": "search_code",
  "arguments": {
    "query": "shader|glsl|hlsl",
    "filePattern": "*.{h,cpp,hpp}"
  }
}

Analyzing a Qt Application

// Initialize with Qt project
{
  "name": "set_custom_codebase",
  "arguments": {
    "path": "/path/to/qt-app"
  }
}

// Find widget class definitions
{
  "name": "search_code",
  "arguments": {
    "query": "class.*:.*public.*QWidget",
    "filePattern": "*.h"
  }
}

Best Practices

  • Always set either the Unreal Engine path or custom codebase path before using analysis tools
  • Use specific class names when analyzing (e.g., "MyClass" instead of just "Class")
  • Leverage the file pattern parameter in search_code to narrow down results
  • Include implemented interfaces when analyzing class hierarchies for complete understanding
  • Use the subsystem analysis tool to get a high-level overview before diving into specific classes

Performance Considerations

  • Large codebases may take longer to analyze
  • Complex class hierarchies might require more processing time
  • Broad search patterns could result in many matches
  • Consider using more specific queries for faster results

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "unreal-analyzer" '{"command":"node","args":["path/to/unreal-analyzer/build/index.js"],"env":[]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "unreal-analyzer": {
            "command": "node",
            "args": [
                "path/to/unreal-analyzer/build/index.js"
            ],
            "env": []
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "unreal-analyzer": {
            "command": "node",
            "args": [
                "path/to/unreal-analyzer/build/index.js"
            ],
            "env": []
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later