MCP roadmap
MCP: stdio shipped — run cargo run -p k2f_mcp --release from a checkout (see engine/k2f_mcp/README.md). Remote HTTP MCP is not shipped. Tool contract: engine/k2f_mcp/mcp_tools.json. Use the K2F skill when MCP is unavailable.
Shipped tools (16)
Each tool maps to an existing SDK call. sign is not a tool. save / export_pdf require path and never return package bytes.
| Tool | Op | SDK | maps to | Skill |
|---|---|---|---|---|
create | write | stdio | copy_template + Editor.open_dir | k2f |
open | write | stdio | Editor.open(bytes) | k2f |
outline | read | stdio | Editor.outline() | k2f |
get_node | read | stdio | getNode(id) | k2f |
search | read | stdio | search(query) | k2f |
replace_text | write | stdio | replaceText(id, text) | k2f |
set_role | write | stdio | setRole(id, role, variant?) | k2f |
insert_node | write | stdio | insertNode(parentId, index, node) | k2f |
delete_node | destructive | stdio | deleteNode(id) | k2f |
validate | read | stdio | Editor.validate_package() | k2f |
diff | read | stdio | diff() | k2f |
save | destructive | stdio | save() | k2f |
markdown_to_k2f | write | stdio | markdownToK2f(md, opts) | k2f |
export_pdf | destructive | stdio | exportPdf(bytes) | k2f |
verify | read | stdio | Viewer.banner() / status_code() | integrity banners |
publish | destructive | stdio | POST /api/publish → /v/{appearance_hash} | k2f |
Rules
- No full lock JSON in context. Return node JSON, banners, and file paths — never document.K2F.lock geometry or paint ops.
- sign is human-gated. sign is not an MCP tool. save writes UNSIGNED. Signing stays a separate human/org step.
- Idempotent writes. replace_text, save, and validate are safe to retry. The same (id, text) write must not append a second node.