Repository navigation
Closed
Labels
area:productWork in the product area.priority:P1High-impact work needed for the MVP or beta path.type:featureNew product or library capability.
Description
rvt-rs ships its own MCP server, rvt-rs-mcp: local, read-only on the model, no network, stdio only. It links the rvt crate in process (no CLI subprocesses) and targets MCP 2026-07-28, the stateless revision, from the start.
Design
- Protocol. rmcp 3.8 (server, macros, transport-io, schemars).
server/discoverand the legacyinitializehandshake are both served (rmcp's default supported versions run 2024-11-05 to 2026-07-28). The crate declaresrust-version = "1.88", rmcp's MSRV; the workspace stays at 1.87. - State. No session.
open_model(path)decodes once and returns an opaquemodel_id; every other tool takesmodel_idorpath. The server keeps an LRU of decoded models keyed by canonical path, size and mtime. An unknown or evictedmodel_idis a tool error that tells the caller to callopen_modelagain (MCP 2026-07-28, server/tools, "Stateful Tools"). Handle lifetime is stated inopen_model's description. - One source of truth. Every answer comes from the same decoded model the IFC exporter writes, so a tool answer and the export cannot disagree.
- Structured answers. Each tool declares an
outputSchemaand returnsstructuredContent, with the JSON also given as text. - Long calls. Exports are one call: progress notifications when the request carries a progress token, and
notifications/cancelledmapped toWalkerControlcancellation (nothing partial is written). The output goes to a path the caller names; the result returns a summary plus aresource_linkto the file. No multi round-trip requests: they are for input a server is missing, and an export has all its input. The Tasks extension (io.modelcontextprotocol/tasks) is the later step if one long call stops being enough. A server may return a task only to a client that declares the extension, so adding it later changes nothing for other clients. - Wire discipline. stdout carries only JSON-RPC. Logging goes through tracing to stderr. The server exits on stdin EOF.
Tools (first PR)
open_model, get_summary, list_elements (by category, level, class), get_element (property sets, trust markers, file-level provenance), list_rooms, list_levels, get_diagnostics (what was read, skipped and left out, with reasons), export_ifc, export_gltf.
Done when
- An E2E test drives the built binary over real stdio on
corpus/tier1in both lifecycles (server/discoverat 2026-07-28,initializeat 2025-11-25). It also checks the unsupported-version error (-32022) and exit on EOF. - A CI check shows the dependency tree carries no HTTP client or server.
docs/mcp.mdexists, and the release archives include the binary.
Follow-ups: per-element provenance, per-element export decisions, and a Measure scorer for the server's answers (linked below).
Metadata
Metadata
Assignees
Labels
area:productWork in the product area.priority:P1High-impact work needed for the MVP or beta path.type:featureNew product or library capability.
Activity
fix(mcp): exclusive temp files for exports, bad arguments as tool err…
fix(mcp): the socket check in the end-to-end test looks for network s…
docs(mcp): commit the tool contract the server reports, and its rende…
feat(ifc): a room whose own phase is not the export phase is left out…
fix(mcp): a client that closes stdin before any session is leaving, n…
chore(release): prepare v0.14.0 (#1345)
feat(mcp): rvt-rs-mcp, a stateless stdio MCP server over the decoded …