Fix search_source: pass env vars via mcp.json interpolation, search Plugins/, cap at 40 total lines
- .mcp.json: pass UE_ENGINE_ROOT and UE_DOCS_PATH via ${VAR} interpolation so the
MCP server subprocess inherits them without hardcoding paths
- search_source: search both Engine/Source/ and Engine/Plugins/ (path_hint applied
under both); switch from -m 40 (per-file cap) to streaming Popen with a true
40-line total cap; fix UE_ENGINE_ROOT to point at Engine/ not the repo root
- Update README and CLAUDE.md to reflect the above
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,10 +34,10 @@ pip install mcp
|
||||
|
||||
```bash
|
||||
export UE_DOCS_PATH=/path/to/your/generated/docs
|
||||
export UE_ENGINE_ROOT=/path/to/UnrealEngine # optional, for search_source
|
||||
export UE_ENGINE_ROOT=/path/to/UnrealEngine/Engine # optional, for search_source
|
||||
```
|
||||
|
||||
The `.mcp.json` at the repo root registers the server automatically when you open the project in Claude Code.
|
||||
The `.mcp.json` at the repo root registers the server automatically when you open the project in Claude Code. It reads `UE_DOCS_PATH` and `UE_ENGINE_ROOT` from your environment via `${VAR}` interpolation — no paths are hardcoded.
|
||||
|
||||
### Available tools
|
||||
|
||||
@@ -47,7 +47,7 @@ The `.mcp.json` at the repo root registers the server automatically when you ope
|
||||
| `get_class_overview(class_name)` | Description + base classes + property/function name lists |
|
||||
| `get_member(class_name, member_name)` | Full doc for one function or property (all overloads) |
|
||||
| `get_file(relative_path)` | Full `.md` file — for delegates, enums, or multiple classes |
|
||||
| `search_source(pattern, path_hint)` | Grep UE source `.h` files via `$UE_ENGINE_ROOT` |
|
||||
| `search_source(pattern, path_hint)` | Grep UE `.h` files in `Engine/Source/` and `Engine/Plugins/`; returns up to 40 lines |
|
||||
|
||||
### Typical query flow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user