home / mcp / unreal engine code analyzer mcp server

Unreal Engine Code Analyzer MCP Server

MCP server for Unreal Engine 5

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ayeletstudioindia-unreal-analyzer-mcp": {
      "command": "node",
      "args": [
        "path/to/unreal-analyzer/build/index.js"
      ],
      "env": {
        "ENV": "PLACEHOLDER"
      }
    }
  }
}

This Unreal Engine Code Analyzer MCP Server provides deep source code analysis capabilities for Unreal Engine projects. It enables you to explore class structures, search code contextually, locate references, map hierarchies, and gain subsystem insights to accelerate understanding and development of large C++ codebases.

How to use

You interact with the server through an MCP client. Start by ensuring your codebase path is set to either the Unreal Engine Source or your own custom C++ project. Then request analysis tasks such as examining a class, finding its inheritance, locating references, or searching for code patterns. Use the available tools to inspect subsystems like Rendering or Physics, or to retrieve API documentation-like results for familiar Unreal Engine concepts. You can combine queries to quickly gather a complete picture of how a class works, how it interacts with other types, and where it is used across the codebase.

How to install

# Prerequisites
# You need Git and Node.js installed on your system.

# 1) Clone the MCP Unreal Analyzer 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

# 4) Start the local MCP server (stdio config)
# The runtime command is node followed by the built entrypoint
node unreal-analyzer/build/index.js

Configuration

Configure your MCP clients to connect to the Unreal Engine Code Analyzer MCP Server using the local stdio flow shown below. If you plan to run the server from a specific path after building, replace the path accordingly.

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

Usage notes

Before issuing any analysis requests, set the codebase path you want to analyze. You can set either the Unreal Engine Source path or a custom codebase path. Then request analyses such as class details, hierarchy, references, or code searches. The server can also perform pattern detection and best practices guidance to help you improve your Unreal Engine projects.

Troubleshooting

If you encounter issues, ensure the codebase path is accessible, and that the built entrypoint exists at the expected location. Typical errors include missing codebase paths, inaccessible files, or parsing failures in unusual C++ constructs. Rebuild after any source changes and re-run the startup command.

Available tools

analyze_class

Retrieve detailed information about a specific Unreal Engine C++ class, including properties, methods, and access modifiers.

find_class_hierarchy

Obtain the inheritance hierarchy for a given class, with options to include implemented interfaces.

find_references

Find all references to a specific identifier such as a class, function, or variable within the analyzed codebase.

search_code

Perform a context-aware search across code files with customizable file patterns.

detect_patterns

Analyze a file to detect Unreal Engine patterns and provide enhancement suggestions.

get_best_practices

Provide best practices guidance for Unreal Engine concepts like UPROPERTY, UFUNCTION, and replication.

query_api

Query API/documentation style results for Unreal Engine concepts, including usage examples and remarks.

analyze_subsystem

Analyze a major Unreal Engine subsystem and summarize core classes, features, and use cases.