Skip to content

Read-only MCP

mdkg includes a read-only local MCP server for tools that can speak MCP.

Use it when an orchestrator, editor, or agent runtime needs structured access to repository memory without shelling out for every read.

Terminal window
mdkg mcp serve --stdio --root /path/to/repo

The current public-alpha boundary is read-only. Tools expose status, workspace list, search, show, pack, goal current, goal next, and validation-style operations. Mutation-shaped calls should fail closed.

  • inspect the selected goal
  • search graph nodes
  • show a node by id or qid
  • build bounded packs for a work item
  • validate graph state
  • let a higher-level orchestrator compare multiple mdkg graphs
  • broad task mutation through MCP
  • worker execution
  • cross-repo writes
  • secret storage
  • hosted graph services

MCP clients should still respect mdkg ownership boundaries. A root orchestrator can read child graph context, but child repo mutations should happen in the owning repo after explicit approval.

Before depending on MCP in a workflow:

Terminal window
mdkg status --json
mdkg validate --json
mdkg mcp serve --stdio --root .

Keep stdout as newline-delimited JSON-RPC responses. Diagnostics should go to stderr so clients can parse responses reliably.