Hayba
An MCP server enabling AI agents to author Unreal Engine 5 scenes directly, with tools for spawning actors, building PCG graphs, validating physics, generating terrain, and more through a single MCP connection.
README
<div align="center">
Hayba
The agentic engine for spatial and procedural world-building in Unreal Engine 5 — plus the worldbuilding packages, desktop explorer, and web front-end around it.
</div>
Hayba lets your AI agent (Claude / GPT / any MCP host) author UE5 scenes directly: spawn actors, build PCG graphs, validate physics, generate terrain, run sandboxed Python, and more — over a single MCP connection. Spatial-first: where every other MCP server treats UE as a 2D code repository, Hayba ships a PCG SQLite registry, a native 2D Slate cognitive map, and a SpatialCLIP visual grounding sidecar.
This is a monorepo: the MCP server, the UE5 C++ plugin, the Tauri desktop explorer, the worldbuilding libraries, and the public website all live here.
Features
- 100+ tools across 33 domains — Actor / Level / Scene / Asset / Blueprint / Material / Foliage / Spline / World Partition / ISM / Physics / Python / Editor / Docs / PCG / Sequencer / Animation / Niagara / Audio / MetaSound / GAS / Behavior Tree / Input / UI / Net / Mesh / Texture / Data / Project / Build / Test / Memory / Plan / Conventions
- PCG SQLite registry — 344 PCGEx nodes / 356 pins / 2270 properties scraped from C++ headers, queryable with semantic + structural intent
- Cognitive Map — 2D top-down semantic clustering of every actor in the level, force-directed mindmap renderer
- Visual sidecar — FastAPI + CLIP / SpatialCLIP / OWL-ViT for deep physics validation and spatial grounding
- Plan Mode + native transactions — every destructive AI op wrapped in
GEditor->BeginTransactionso Ctrl+Z just works - Code Mode meta-tools — 3 tools (
list_tool_categories/get_tool_signature/python_run) reduce initial payload by 92%, full catalog discovered on demand - Worldbuilding packages — deterministic linguistics (conlang/phonology), planet physics (habitability, tidal locking), procedural architecture (cultures, style schema)
- Multi-instance safe — dynamic port allocation (52342-52350) + heartbeat registry so multiple UE instances coexist
Repository layout
| Path | What it is |
|---|---|
mcp-tools/hayba-mcp |
Core product — the Node/TypeScript MCP server (tool surface, schema registry, TCP client to UE) |
mcp-tools/hayba-mcp/addons/visual-embeddings |
Python FastAPI visual sidecar (CLIP / SpatialCLIP / OWL-ViT) |
mcp-tools/gaea-server |
TCP bridge between UE5 and Gaea terrain generation |
mcp-tools/gaea · mcp-tools/pcgex |
Locator / parked supporting tooling (see their READMEs) |
unreal/HaybaMCPToolkit |
The UE5 C++ editor plugin — 33 command-handler domains, Slate panels, the TCP server half of the protocol |
apps/hayba-explorer |
Tauri + React + Rust desktop explorer (the long-term viewer) |
apps/hayba-explorer/packages/* |
Worldbuilding libs consumed by the explorer: linguistics, planet-physics, tectonics, frame-stream, seeds, fixedpoint |
packages/architecture |
Procedural architecture engine (cultures, style schema, validation) |
packages/design-tokens |
Shared design tokens |
website/ |
Public website (static HTML/CSS/JS) — landing, waitlist, login, admin |
infra/, supabase/ |
Self-host infra (docker-compose, Caddy, Cloudflare tunnel) + Supabase backend (auth, migrations, edge functions) |
Quick start
1. Install the UE plugin
Copy unreal/HaybaMCPToolkit/ into your UE project's Plugins/ folder, regenerate Visual Studio project files, recompile (UE 5.7+, VS 2022).
2. Register the MCP server with your agent host
# Claude Code
claude mcp add hayba-toolkit -- node /path/to/hayba/mcp-tools/hayba-mcp/dist/index.js
// Claude Desktop — claude_desktop_config.json
{
"mcpServers": {
"hayba-toolkit": {
"command": "node",
"args": ["/path/to/hayba/mcp-tools/hayba-mcp/dist/index.js"]
}
}
}
3. Run the editor
Open UE; the Hayba MCP Toolkit panel appears in the toolbar. Pick Integrated (your MCP host drives the agent) or API Key (in-editor chat drives Anthropic/OpenAI directly).
Then ask Claude: "Search the PCG node catalog for voronoi, propose a 3-step plan to author a Voronoi graph, and execute it after I approve."
Architecture
┌──────────────────┐ stdio ┌──────────────────┐ TCP ┌────────────────┐
│ Agent Host │ ◄────► │ Node MCP Server │ ◄────► │ UE5 Plugin │
│ (Claude / GPT) │ │ mcp-tools/ │ :52342 │ unreal/ │
└──────────────────┘ │ hayba-mcp │ │ HaybaMCP... │
│ Zod · PCGEx DB │ │ 33 handlers │
└──────────────────┘ └────────────────┘
Two language boundaries, one protocol. The TCP envelope on :52342 (auto-fallback :52343-52350) carries length-prefixed JSON. Plan Mode + the editor transaction system gate every destructive op. See docs/ARCHITECTURE.md and CONTEXT.md.
Documentation
- CONTEXT.md — domain glossary + repo philosophy (read this first)
- Architecture — language boundaries, the TCP seam, data flows
- Getting started — local dev setup and first run
- Wiki — guides, tool reference, troubleshooting
- ADRs — architectural decision records
- Contributing · Changelog · Security · Code of Conduct
Roadmap
Status of everything planned. [x] done · [~] in progress · [ ] not started.
Repo restructure & re-emulation (foundational)
- [x] Monorepo restructure (
packages/hayba→mcp-tools/hayba-mcp,apps/, workspace globs) — PR #136 - [x] Re-emulate PRs #110/#112/#113/#134 onto the restructured layout (linguistics L9, sidecar discovery, prompt tools, ESLint/Prettier/CI)
- [x] Local gate green (build
@hayba/*deps →tsc+ 185 tests inmcp-tools/hayba-mcp) - [x] CI workflow repointed to the new layout; Node bumped to 22
Incorporation (this initiative)
- [~] Website → top-level
website/(re-emulated fromfeat/website-integration, not merged) - [~]
supabase/(auth, migrations, edge functions) + reconcileinfra/ - [~] UE plugin →
unreal/HaybaMCPToolkit/(snapshot; build artifacts gitignored) - [ ] Deferred: linguistics workbench as the website
/app+/lang/:id— to be wired during a dedicated linguistics →apps/hayba-explorerintegration step (not now). Until then/appand/lang/:idare graceful placeholders, no@hayba/linguisticsbuild coupling. - [ ] Vercel deploy verified end-to-end (env-var injection, rewrites)
Documentation & professionalism
- [~]
CONTEXT.md(domain glossary) - [~]
docs/adr/seeded (re-emulation doctrine, website location, plugin location, deferred linguistics integration) - [~]
docs/ARCHITECTURE.md - [~] Per-workspace READMEs (
mcp-tools/hayba-mcp,gaea-server,design-tokens,website,unreal/HaybaMCPToolkit) - [~]
docs/wiki/scaffold (glossary, setup, MCP tool reference, UE handler map, troubleshooting) - [~] Hygiene:
CODE_OF_CONDUCT.md,.nvmrc,.github/CODEOWNERS,.github/dependabot.yml, rootpackage.jsonmetadata - [ ] Expand
docs/getting-started.md(prerequisites → MCP host registration → UE connect → sidecar) - [ ] MCP tool catalog reference (auto-generated from Zod schemas)
- [ ] Coherent versioning + release process (changesets?)
Architecture deepening (surfaced; future grilling)
Deletion-test-positive opportunities from the friction walk (tectonic excluded) — each needs its own grilling pass before implementation:
- [ ] Fragment the 1606-line tool-registration surface (
mcp-tools/hayba-mcp/src/tools/index.ts) into per-domain self-registration - [ ] Consolidate config into a deep
@hayba/config(hayba-mcp ↔ gaea-server share ports/paths/keys) - [ ] Collapse thin worldbuilding handler wrappers — derive handlers from package schemas (one schema source)
- [ ] Replace the manual schema-registry bottleneck (registration + schema as one operation)
- [ ] Versioned TCP envelope between
gaea-server/hayba-mcpand the UE plugin - [ ] Make the dashboard-vs-Tauri decision explicit; inject
architecture-handlersdata root instead ofimport.meta.urlpath math
Known constraints
- The authoritative gate is local: build
@hayba/*deps, thentsc+npm testinmcp-tools/hayba-mcp. Run it before pushing. - Tectonic plate-sim work is out of scope for this initiative.
The full backlog with priority/effort lives in open issues.
Development
npm install # all workspaces (Node ≥ 22.5 — see .nvmrc)
npm run -w @hayba/linguistics build # build workspace TS deps the MCP server needs…
npm run -w @hayba/architecture build # …(also @hayba/planet-physics)
npm --prefix mcp-tools/hayba-mcp test # the authoritative gate (tsc + vitest)
Run the gate locally before pushing.
License
Hayba's source code is MIT-licensed (see LICENSE).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。