ue-codegraph-mcp
Indexes an Unreal Engine C++ codebase into a local SQLite graph and answers call-graph, class, include, macro, Blueprint, and symbol-search questions through 16 MCP tools.
Index management —
init_codebasescans a project/engineSourcepath (with optionalheaders_onlyto skip.cppfor large engines),get_index_statusreports registered codebases and stats,reindex_filerefreshes a single changed file.Call graphs —
find_callers(who calls a function),find_callees(what a function calls), andfind_call_chainfor the shortest A→B path with a configurablemax_depth.Class analysis —
analyze_classreturns methods, fields, UE macros, base classes, and Blueprint exposure;get_class_hierarchywalks ancestors, descendants, or both.Include dependencies —
get_file_dependenciesshows what a file includes and what includes it, optionally transitive to a given depth.UE macros —
find_ue_macrosfiltersUCLASS/USTRUCT/UENUM/UPROPERTY/UFUNCTION/UINTERFACEby specifier (e.g.BlueprintCallable);get_macro_specifiersdumps all specifiers and meta specifiers for a symbol.Blueprint exposure —
find_blueprint_exposedlists allBlueprintCallable/BlueprintReadWritesymbols;get_blueprint_interfacegives a class's full BP surface (functions, properties, events, delegates).Search and references —
search_symbols(FTS5 prefix search, filterable by symbol kind),search_code(raw text pattern search), andfind_referencesfor cross-referencing any class, function, or variable.Operation style — all tools run locally and synchronously (no task/async support), read-only against the index, with result-count caps and
codebase_id/depth parameters for scoping.
Indexes Unreal Engine C++ source code to provide tools for querying call graphs, class structure, UE macros, #include dependencies, and Blueprint-exposed symbols. Enables analysis of Unreal Engine projects without reading raw files each time.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ue-codegraph-mcp Find all functions that call TakeDamage"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ue-codegraph-mcp
MCP server for indexing and querying Unreal Engine C++ codebases.
Indexes your UE project's Source/ directory into a local SQLite database and exposes 17 MCP tools so Claude Code can answer questions about call graphs, class structure, #include dependencies, and Blueprint-exposed symbols — without reading raw files every time.
Features
Call graph analysis — find all callers of a function, trace call chains from A → B
Class analysis — methods, fields, base classes, UE macros (
UCLASS,UPROPERTY,UFUNCTION)Blueprint exposure — list all
BlueprintCallablefunctions andBlueprintReadWriteproperties#includedependency graph — what a file includes, and what includes it (transitive support)Symbol search — FTS5 full-text search across 40k+ symbols with prefix matching
Incremental indexing — re-indexes only changed files (hash + mtime based)
Standalone CLI — use
ue-graphcommands directly from the terminal without Claude
Related MCP server: MCP Local Codebase Search
Prerequisites
Requirement | Version | Check |
Node.js | 22 LTS |
|
npm | 9+ |
|
Claude Code | latest |
|
Use an even-numbered Node.js release (20, 22 LTS or 24). Odd-numbered "Current" releases (v23, v25, etc.) are incompatible with tree-sitter's native bindings and will fail to parse files. Node 24 needs
better-sqlite312+ (this repo ships 13); the older 11.x crashes the process under garbage collection on Node 24.
Installation
1. Install Node.js 22 LTS
Download from https://nodejs.org (click the LTS tab) or use winget:
winget install OpenJS.NodeJS.LTS2. Run setup.bat
cd C:\path\to\ue-codegraph-mcp
.\setup.batsetup.bat will:
Verify Node.js 22 LTS
Install
node-gypglobally (needed for native module builds)Run
npm install(builds tree-sitter and better-sqlite3 from source)Run
npm linkto register theue-graphCLI globallyOptionally index your project and generate
mcp.json
If the native build fails, install Visual Studio Build Tools with the C++ build tools workload, then re-run
setup.bat.
3. Index your project
ue-graph index "G:\YourProject\Source" my-projectOutput:
Indexing G:\YourProject\Source as "my-project" (project)...
Done!
Files: 1784 (new: 1784, changed: 0)
Symbols: 45623
Macros: 3210
Calls: 28450
Includes: 9120
Time: 32.5s4. Register with Claude Code
claude mcp add -s user ue-codegraph node "C:\path\to\ue-codegraph-mcp\build\index.js"Verify with claude mcp list. Then start Claude Code in your project directory and run /mcp to confirm the server is connected.
Usage in Claude Code
Once registered, Claude automatically uses the MCP tools when you ask natural-language questions:
"Find everything that calls SetHP"
"Trace the call chain from DamageMyPlayer to ApplyDamage"
"Analyze the UAMirLuaManager class"
"Which files include AMirCharacter.h?"
"Show all BlueprintCallable functions in UAMirAbilityComponent"CLI Commands
Use ue-graph directly from the terminal without Claude Code.
Index management
ue-graph index <path> [name] # Index a codebase
ue-graph status # Show indexed codebases and stats
ue-graph reindex <file...> # Re-index specific files (deleted files are removed)
ue-graph watch [path] # Watch for edits and re-index changed files automatically
ue-graph ui [--port N] # Open the visual explorer in your browser
ue-graph delete <id|name|all> # Remove a codebase from the indexCall graph
ue-graph callers SetHP # Who calls SetHP?
ue-graph callees BeginPlay # What does BeginPlay call?
ue-graph chain DamageMyPlayer SetHP # Call path from A to BClass analysis
ue-graph analyze UAMirLuaManager # Methods, fields, UE macros
ue-graph hierarchy AAMirCharacter # Inheritance tree (up + down)
ue-graph blueprint UAMirLuaManager # Full Blueprint interfaceSearch
ue-graph search "SetHP" # FTS symbol search
ue-graph code "CL2LG_MY_CHARACTER_SPAWN_REQ" # Code text pattern search
ue-graph refs DamageMyPlayer # Where is this symbol used?UE Macros
ue-graph macros UFUNCTION # All UFUNCTION macros
ue-graph macros UFUNCTION BlueprintCallable # Filter by specifier
ue-graph deps "G:\...\MyActor.h" # #include dependency graphIncremental indexing
Edits are applied in proportion to what changed, not to the size of the codebase.
Change detection compares size, mtime and content hash, so only touched files are parsed.
File watcher: while the MCP server runs (or
ue-graph watch), saving a.h/.cppre-indexes just that file (debounced). On start-up the server also catches up on edits made while it was off. Disable withUE_CODEGRAPH_WATCH=0.Scoped linking: after a re-parse only the affected rows are re-linked: the file's own calls, references, base classes and includes, plus unresolved rows elsewhere that point at a symbol name that was re-created. Files keep their row id on re-index, so
#includelinks from other files stay valid.Include-aware resolution: when several symbols share a name (
Tick,BeginPlay...), a call resolves to the one in the same file, then the paired header, then the include closure (3 hops), instead of an arbitrary match. If a file's#includelist changes, the files that include it (2 hops) are re-ranked.Parallel parsing: large batches are parsed on worker threads (
UE_CODEGRAPH_WORKERS=N,0= single thread) while the main thread writes the previous batch to SQLite.When more than 30% of files changed (or on the first index) a full link pass runs instead.
Parsing is file-local, so a header edit does not require re-parsing its includers. Their links are refreshed instead, which is what the scoped linking above does.
Rough numbers on a synthetic 3000-header project: full index 17 s single-threaded, 5.5 s with 6 workers; re-indexing one saved file takes about 50 ms.
Visual explorer
ue-graph ui # http://localhost:4177or ask Claude to call the open_viewer tool. Everything runs locally (bound to 127.0.0.1) and the page refreshes by
itself when the index changes.
Tab | Shows |
Overview | Counts, link quality, symbols by kind, UE macros, biggest classes, most-called functions, most-included headers |
Class hierarchy | Ancestors and descendants of a class (engine/unindexed bases appear as dashed nodes) |
Call graph | Callers and callees of a function, up to 4 levels |
Includes |
|
Modules | Folder-level dependency map (aggregated |
Click a node for details (members, UE macros, signature, includes), double-click to re-center, drag to rearrange,
scroll to zoom. Purple dot = carries a UE macro (UCLASS...), green dot = Blueprint-exposed.
MCP Tools Reference
Tool | Description |
| Index a UE source directory |
| Show registered codebases and stats |
| Re-index specific files (normally automatic, see below) |
| Start the local web viewer and return its URL |
| Find all callers of a function |
| Find all functions called by a function |
| Shortest call path from function A to B |
|
|
| Class methods, fields, UE macros, base classes |
| Ancestor and descendant class tree |
| Search UE macros by type and specifier |
| Get specifiers for a specific symbol's macro |
| All |
| Full Blueprint interface of a class |
| FTS5 symbol search |
| Code text pattern search |
| Cross-reference lookup |
Known Limitations
Issue | Workaround |
| Use Grep + Read instead |
Parent class lookup broken when | Use |
| Calls are ranked by include closure, but without type information it can still pick the wrong overload |
Databases indexed before the scoped-linking release attach | Delete the codebase and index it once more ( |
Troubleshooting
All files fail with Invalid argument during indexing
→ Wrong Node.js version. Install Node.js 22 LTS, delete node_modules/, re-run setup.bat.
Native build errors (node-gyp, better-sqlite3)
→ Install Visual Studio Build Tools (C++ workload), then re-run setup.bat.
MCP server not visible in Claude Code
→ Confirm the path in claude mcp list is an absolute path. Restart Claude Code and run /mcp.
License
MIT
Available Tools
16 toolsanalyze_classA
Get detailed analysis of a C++ class including methods, properties, UE macros, inheritance, and Blueprint exposure.
Inputs: class_name (required).
find_blueprint_exposedB
Find all Blueprint-exposed functions and properties across the codebase.
Inputs: macro_type, codebase_id, max_results.
find_call_chainB
Find the shortest call chain from one function to another using recursive CTE graph traversal.
Inputs: to_function (required), from_function (required), max_depth.
find_calleesC
Find all functions called by a specific function.
Inputs: function_name (required), max_results.
find_callersB
Find all functions that call a specific function.
Inputs: function_name (required), max_results.
find_referencesB
Find all references to a symbol (class, function, variable) across the codebase.
Inputs: symbol_name (required), max_results.
find_ue_macrosA
Search for UE macros (UCLASS, UPROPERTY, UFUNCTION, etc.) with optional filtering by type and specifiers.
Inputs: specifier, macro_type, codebase_id, max_results.
get_blueprint_interfaceA
Get the complete Blueprint interface for a class (all BP-exposed functions, properties, events, delegates).
Inputs: class_name (required).
get_class_hierarchyB
Get the inheritance hierarchy for a class (ancestors, descendants, or both).
Inputs: class_name (required), direction, max_depth.
get_file_dependenciesB
Get #include dependency graph for a file (what it includes and what includes it).
Inputs: file_path (required), max_depth, include_transitive.
get_index_statusB
Get the indexing status and statistics for registered codebases.
Inputs: codebase_id.
get_macro_specifiersC
Get all specifiers for a specific UE macro instance, including meta specifiers.
Inputs: symbol_name (required), macro_type.
init_codebaseA
Register and index a UE source or project codebase. Scans C++ files, extracts symbols, UE macros, call graphs, and include dependencies.
Inputs: path (required), name, type, headers_only.
reindex_fileB
Re-index a single file (useful after file changes).
Inputs: file_path (required).
search_codeC
Search through indexed code using text pattern matching.
Inputs: pattern (required), codebase_id, max_results.
search_symbolsB
Search for symbols using full-text search (FTS5). Supports fuzzy matching.
Inputs: query (required), kind, max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Tools are mostly distinct with clear purposes, but find_callers, find_callees, and find_call_chain could be confused if not reading descriptions carefully. search_symbols and search_code have overlapping functionality but are differentiated by search type.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., init_codebase, find_callers, get_class_hierarchy). The verbs (init, get, find, analyze, search) are appropriate and predictable.
16 tools is well-scoped for a UE code analysis server, covering indexing, querying, and search without being overwhelming. Each tool serves a distinct purpose.
The tool set covers most aspects of codebase analysis: indexing, call graphs, class analysis, Blueprint exposure, macros, and search. Missing a tool to unregister/delete a codebase, but core workflows are complete.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Repository knowledge graph MCP server for codebase understanding and debugging.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides semantic understanding of C++ codebases using libclang, allowing Claude to instantly find classes, functions, and their relationships without having to grep through thousands of files.34MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that indexes local Python projects into a SQLite database to enable efficient symbol searching and dependency tracking. It allows users to find function or class definitions, trace module imports, and read file contents through natural language interfaces.-
- AlicenseNot gradedqualityDmaintenanceA local, SQLite-backed code index for Claude Code, exposed over MCP, enabling targeted code retrieval without external APIs.112 PyPI1MIT
- FlicenseNot gradedqualityDmaintenanceRead-only MCP server that gives Claude live access to your UE5 project state — Blueprints, interfaces, variables, functions, event graphs, materials, structs, and Data Assets.-