Skip to main content

Module mcp

Module mcp 

Source
Expand description

The interactive headless host: MCP drives the same scene without a window.

The host waits for commands rather than pacing itself. Only the frame-stepping tool advances simulation time, so a client can reproduce a complete sequence of input, rendering and recording without sleeping between commands.

The scene itself is the one crate::interactive builds: the host adds the exit request and serves MCP over it, so a client drives exactly the scene a test drives in process.

Re-exportsยง

use schemars::JsonSchema; ๐Ÿ”’
use schemars::JsonSchema; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use unlit_ecs::mcp::serde_json; ๐Ÿ”’
use unlit_ecs::mcp::serde_json::Value; ๐Ÿ”’
use unlit_ecs::mcp::serde_json::json; ๐Ÿ”’
use unlit_ecs::mcp::CommandSender; ๐Ÿ”’
use unlit_ecs::mcp::McpServer; ๐Ÿ”’
use unlit_ecs::mcp::ToolResult; ๐Ÿ”’
use unlit_ecs::mcp::ToolRouter; ๐Ÿ”’
use unlit_ecs::mcp::ToolSource; ๐Ÿ”’
use unlit_ecs::mcp::WorldArg; ๐Ÿ”’
use unlit_ecs::mcp::command; ๐Ÿ”’
use unlit_ecs::mcp::tool; ๐Ÿ”’
use unlit_ecs::World; ๐Ÿ”’
use unlit_ecs::bundle; ๐Ÿ”’
use unlit3d::winit::builtin::ExitRequest; ๐Ÿ”’
use unlit3dx::mcp::pump_mcp; ๐Ÿ”’
use unlit3dx::mcp::serve_mcp; ๐Ÿ”’
use crate::interactive::Interactive; ๐Ÿ”’
use crate::interactive::InteractiveConfig; ๐Ÿ”’
use crate::interactive::scene_status; ๐Ÿ”’
use unlit3dx::prelude::*; ๐Ÿ”’

Structsยง

StepFrames ๐Ÿ”’

Functionsยง

register ๐Ÿ”’
run
Run the interactive headless host until MCP asks it to exit.
scene_status_tool ๐Ÿ”’
status ๐Ÿ”’
Report the scene as the last step left it, plus the ids a client reads its frame and its recording through.
step_frames ๐Ÿ”’