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.
Clone the repository:
git clone https://github.com/ayeletstudioindia/unreal-analyzer-mcp
cd unreal-analyzer-mcp
Install dependencies:
npm install
Build the project:
npm run build
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": {}
}
}
}
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": {}
}
}
}
Before using any analysis tools, you must first set either the Unreal Engine source path or a custom codebase path:
{
"name": "set_unreal_path",
"arguments": {
"path": "/path/to/UnrealEngine/Source"
}
}
{
"name": "set_custom_codebase",
"arguments": {
"path": "/path/to/your/codebase"
}
}
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
}
]
}
Visualize inheritance hierarchies:
{
"name": "find_class_hierarchy",
"arguments": {
"className": "ACharacter",
"includeImplementedInterfaces": true
}
}
Locate references to classes, functions, or variables:
{
"name": "find_references",
"arguments": {
"identifier": "BeginPlay",
"type": "function"
}
}
Search through code with context-aware results:
{
"name": "search_code",
"arguments": {
"query": "PhysicsHandle",
"filePattern": "*.h",
"includeComments": true
}
}
Identify common Unreal Engine patterns:
{
"name": "detect_patterns",
"arguments": {
"filePath": "Source/MyGame/MyActor.h"
}
}
Get guidance on following Unreal Engine best practices:
{
"name": "get_best_practices",
"arguments": {
"concept": "UPROPERTY" // or UFUNCTION, Components, Events, Replication, Blueprints
}
}
Search the API documentation:
{
"name": "query_api",
"arguments": {
"query": "Actor",
"category": "Object",
"module": "Core",
"includeExamples": true,
"maxResults": 10
}
}
Analyze major Unreal Engine subsystems:
{
"name": "analyze_subsystem",
"arguments": {
"subsystem": "Physics"
}
}
// 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}"
}
}
// 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"
}
}
search_code
to narrow down resultsTo 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.
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.
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": []
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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