MCP Integration
Description
Implement an MCP server backed entirely by the Runtime Introspection Layer (#2 (closed)) and Remote Debug Protocol (#49 (closed)).
The MCP server should contain minimal engine-specific logic and act primarily as an adapter — thin glue between the protocol and MCP tool definitions.
Depends on: #2 (closed) Runtime Introspection Layer · #49 (closed) Remote Debug Protocol
Principles
Grounded Responses
Agents must retrieve actual runtime data before making recommendations.
| Bad | Good |
|---|---|
| "Your camera might be positioned incorrectly." | "Camera MainCamera is at (0,0,0) while the player is at (1000,0,0)." |
Discovery First
Expose schema information so agents can discover entity types, component types, available commands, and asset types without hardcoded knowledge.
MCP Tools
Scene
list_scenes
inspect_scene
find_entities
scene_summary ← compact summary for LLM consumptionEntity
inspect_entity
modify_component
spawn_entity
destroy_entityDiagnostics
capture_profiler
inspect_memory
list_errorsAssets
inspect_material
reload_assetSafety
- Read-only mode
- Confirmation-required for mutating operations
- Operation rate limits
Machine-Readable Documentation
Publish structured documentation at turian.mass4.org/docs suitable for LLM ingestion.
docs/
getting-started.md
runtime/
entities.md
components.md
scenes.md
protocol/
json-rpc.md
events.md
mcp/
tools.md
prompts.mdDocumentation must answer: what objects exist · how they relate · which operations are available · which operations mutate state · expected parameter types.
Acceptance Criteria
- MCP server functional and connectable from Claude Code / Cursor
- Tools generated from introspection metadata where possible
- LLM can inspect runtime state
- LLM can execute debug actions
- Machine-readable documentation published to
turian.mass4.org/docs