u-space-mcp
v0.0.18
Published
Model Context Protocol server for u-space documentation.
Maintainers
Readme
u-space-mcp
Model Context Protocol server for the u-space documentation, including the experimental u-space/worker OffscreenCanvas runtime, nested static-model decoding through ModelLoaderManager.setDecodeWorker() and u-space/worker/model-decoder, the core InstanceObject protocol, the public src/batches APIs (ModelInstancedLayer and EditableGeometryBatchLayer), core object defaults, TSLEffects.outline() with InstanceObject bounds proxies, and u-manager APIs/examples such as UManagerLoader, scene/facility instancing, opt-in setEditableBatching() static Geometry merging, semantic groups/floors/facilities, and semantic elevator/vent shafts. The index also covers atmosphere and fire WebGPU effects.
The bundled docs index contains the canonical core InstanceObject API from docs/api-objects.md: identity fields and updates, local/world bounds, fallback render-object access, ownership-aware materializer/materialize protocol, style/highlight controls, dirty callbacks, automatic transform-to-batch sync, and the isInstanceObject() type guard. docs/api-batches.md covers the one-shot source/build lifecycle, duplicate-instance rejection, isolated per-layer transforms, unsupported reasons and per-instance negative-scale fallback, immediate CPU dirty/world-matrix sync, cross-layer old-copy hiding, independent materialized materials, typed events, materialized-hit filtering, safe disposal, statistics, and lazy-BVH source remapping.
The u-manager coverage from docs/api-plugin-u-manager.md focuses on SceneInstanceObject, FacilityInstanceObject, semantic floor proxies, loaders, examples, scene/facility layer selection, and editable static batching through setEditableBatching() / SceneEditableBatchLayer. Retrieval distinguishes default SceneInstancedLayer path/model instancing from the editable primary layer and its sibling SceneEditableBatchFallback. SceneEditableBatchLayer is documented as a thin adapter over core EditableGeometryBatchLayer<SceneInstanceObject>; URL loading and fallback policy remain in SceneLoader, while Geometry merging, batchObjectIndex TSL state, materialize events, lazy BVH and disposal are core behavior. Effects coverage includes TSLEffects.outline() options, selection/update/disposal lifecycle, RenderPipeline composition, ordinary Object3D and InstanceObject render-object/bounds-proxy behavior, and examples/test_outline.html. The index also includes FireEffect emitter setup, simulation/grid options, volumetric pass bounds, dynamic lights, and RenderPipeline output-effect integration.
The Worker coverage from docs/api-viewer.md and docs/examples-guide.md explains the complete OffscreenViewerHost options/methods/events surface, main-thread canvas/input ownership, Worker-side Viewer creation, the host.init() / initialized renderer boundary versus the one-shot application ready boundary, structured-clone command boundaries, deduplicated ArrayBuffer transfer, built-in stats/viewpoint/render commands, rolling frame statistics, pre-ready fatal cleanup, canvas-transfer/post failures, initialization/disposal races, suppression of late business messages after disposal, browser and DOM-overlay limitations, and automatic aspect-preserving first-decode downscaling when ordinary images exceed the portable WebGPU 8192 texture limit. It also covers the nested model decoder Worker: static glTF/GLB/SBMX support and regular-loader/fatal-worker fallback, transferable buffers/bitmaps, serial ACK backpressure, bounded content-identity bitmap reuse, LoadingManager URL/lifecycle round-trips, same-origin credential isolation, safe node-graph validation, full-path cancellation, and identity-bound Worker disposal. examples/offscreen/test_umanager2_offscreen.html combines that decoder with OffscreenCanvas, setEditableBatching(), compileAsync(), standard transparent composition, native Three.js static-scene matrix updates, rolling frame-pacing statistics, and a visible-by-default semantic analysis overlay whose device selection, flight, highlight, and clear commands do not hide other objects. Explicit InstanceObject.updateWorldMatrix(true, false) and parent-group updateWorldMatrix(true, true) commits under a frozen root scene include instanced-buffer dirty propagation and editable-batch materialization.
Usage
{
"mcpServers": {
"uSpace": {
"command": "npx",
"args": ["-y", "u-space-mcp@latest"]
}
}
}For local documentation development, point the server at a local docs directory:
{
"mcpServers": {
"uSpace": {
"command": "npx",
"args": ["-y", "u-space-mcp@latest", "--docs", "/path/to/u-space/docs"]
}
}
}Tools
list_docssearch_docsget_docget_api_referencefind_examplesget_changelog
All tools are read-only.
