241b246e9d31f1427eb574be22a577b2dd660be8
- Add ue_mcp_server.py: 5 MCP tools (search_types, get_class_overview, get_member, get_file, search_source) for item-granularity doc lookups - Add .mcp.json: registers server with Claude Code via stdio transport - Remove .claude/skills/ue-api/SKILL.md: superseded by MCP tools - Update generate.py: accept multiple input dirs/files, last arg is output; track per-file base path for correct relative output paths - Remove samples/: headers deleted (corpus regenerated externally) - Add possess_flow.png: sequence diagram of UE Possess flow with server/client split Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
UnrealDocGenerator
Generates compact, agent-readable Markdown documentation from Unreal Engine C++ header files, plus a Claude Code skill for querying it.
How it works
- Parse —
ue_parser.pyscans UE headers into dataclasses using a position-based scanner (handles nested braces, macros, delegates, namespaces). - Render —
ue_markdown.pyemits one.mdper header: only items with C++ doc comments, no deprecated functions, compact enum format. - Index —
generate.pyproducestype-index.txt: a flatTypeName: path/to/File.mdlookup for instant type resolution.
Usage
python generate.py <input> <output_dir>
# Examples
python generate.py /path/to/UnrealEngine/Engine/Source/ docs/
python generate.py samples/AIController.h docs/
Output: one .md per .h + docs/type-index.txt.
Querying the docs (Claude Code skill)
The repo includes a Claude Code skill at .claude/skills/ue-api/ that answers Unreal Engine API questions using the generated docs, falling back to source headers when needed.
Set two environment variables before starting Claude Code:
export UE_DOCS_PATH=/path/to/your/generated/docs
export UE_ENGINE_ROOT=/path/to/UnrealEngine # optional, for source fallback
The skill triggers automatically on UE-related questions. It resolves types via $UE_DOCS_PATH/type-index.txt in a single grep, reads the relevant .md files, and escalates to source headers for undocumented members, macros, or implementation details.
Example lookup:
grep "^AController:" "$UE_DOCS_PATH/type-index.txt"
# → AController: Engine/Classes/GameFramework/Controller.md
Samples
Three representative UE headers in samples/ for testing:
| File | Size | Contents |
|---|---|---|
GeomUtils.h |
~6 KB | Free functions in UE::AI namespace |
AIController.h |
~22 KB | AAIController with movement, BT, perception |
GameplayTagsManager.h |
~43 KB | UGameplayTagsManager singleton, delegates, enums |
Output format
- Functions:
##### `Name(params)` → `ReturnType` *(flags)* - Properties:
- \name` `type` (flags) — description` - Enums: table when values have descriptions, inline
Values: A, B, Cotherwise - Inheritance:
*Inherits*: [BaseClass](relative/path.md)with corpus links
Description
Languages
Python
100%