Expand description
Cairn MCP server — a thin JSON-RPC transport over cairn_core::edit.
It holds no logic of its own (docs/design.md Section 7): every tool call
dispatches to the one Editor in Core, and every commit returns the one
Core Report. The MCP subset implemented is the minimum to drive
authoring: initialize, tools/list, tools/call. Resources, prompts,
and capability negotiation beyond a tools declaration are out of v0.1.
Tools exposed are exactly those that work: the Section 6
worked-session loop, run/run_module, the version-control surface,
the stored-tree tools query_type, find_references,
replace_node, fill_hole, and the v0.2 editor substrate
render_addressed/node_at/put_expr (projection + hash↔span
index + the node-construction primitive, so an out-of-process
editor turns a cursor into a node hash and mints replacements).
tools/list reflects exactly the working surface.
Structs§
- Session
- One authoring session: a store, the single Core editor over it,
and a per-session SQLite file
run_handlerdrives so a web handler’s load/persist round-trip persists across calls (POST in one call, GET it back in the next — the verification ani64run_modulecannot give).
Functions§
- serve_
stdio - Read JSON-RPC messages line-by-line from stdin, write responses to stdout.