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).
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.