Back to memory-api/README.md.
MCP server for spec-api.
spec-mcp runs on stdio and opens the spec store directly. Use it when an agent needs spec CRUD, tree views, section editing, or code-reference validation without an HTTP backend.
Named tool groups:
- CRUD and discovery:
spec_create,spec_get,spec_update,spec_delete,spec_list,spec_search - Structure and validation:
spec_tree,spec_health,spec_refs_validate - Sections:
spec_section_add,spec_section_list,spec_section_get,spec_section_delete - Maintenance:
spec_scan,spec_add_root
spec_update accepts sparse request payloads. Omit untouched keys entirely; send only the fields, to_state, or body being changed. The response returns only directly relevant update metadata such as id, changed_fields, state_transition, and body_updated.
Store discovery:
- Set
SPEC_INDEX_ROOTto point at a specific spec store. - Otherwise the server falls back to the nearest
.specworkspace.
Run the server on stdio:
cargo run -p spec-mcpExample VS Code MCP configuration:
{
"servers": {
"spec-mcp": {
"type": "stdio",
"command": "cargo",
"args": ["run", "-p", "spec-mcp"]
}
}
}- Call
spec_listwhen a client needs the current specification inventory. - Call
spec_treeto render the section hierarchy for one spec. - Call
spec_refs_validatebefore review to confirm that referenced files and symbols still resolve. - For
spec_update, prefer sparse payloads such as{"id":"<id-or-slug>","field_map":{"fulfillment_status":"done"}}or{"id":"<id-or-slug>","to_state":"reviewed"}.