MCP Tools

Work Graph tools exposed to AI agents.

Why MCP in Work Graph

MCP is how IDE agents read backlog, contracts and evidence. The HTML site is for humans; MCP tools are programmatic access to the same git-backed data.

Before creating work items, use /api/docs/bvc-authoring-context. Full tool schemas: /api/docs/mcp-tools-context.

P0 tools

ToolInputOutputWhen to call
create_work_itemworkId, title, basis, vector, goalworkId, pathNew task with a BVC contract
get_work_contractworkIdworkId, contractBefore edits and for scope
assert_task_ready_for_doneworkIdok, missing[]Before moving to done

Typical agent flow

  1. Read contractget_work_contract(workId) → Basis, Vector, Goal, target_files, checks.
  2. Claim workclaim_work_item when project policy requires an explicit claim.
  3. Execute — edits only inside the allowlist; commands only from the approved list.
  4. Attach evidence — test output, traces, structured records (submit_evidence and related paths per MCP version).
  5. Check readinessassert_task_ready_for_done; if ok: false, do not close the task.

Tool errors

CodeMeaningAction
duplicate_work_idwork.id already existsNew id or update the existing atom
invalid_bvc_sectionMissing Basis, Vector or GoalComplete the contract
missing_evidenceNo proof for Tier ARun checks, attach logs

Details: [Errors and recovery](/docs/errors).

Setup

After npx @work-graph/cli init ., the project gets .cursor/mcp.json (or equivalent) with npx -y @work-graph/mcp and WORKGRAPH_ROOT. Reload MCP in your IDE after npm install.

Client discovery: /.well-known/mcp.json.