MCP
src/mcp.ts is a stdio MCP server named api.lawyer. It speaks HTTP to this service (API_LAWYER_URL, default localhost:4902) and exposes the demand loop as tools — so a consumer-side agent can file, watch, and advance a Matter without ever crossing the authority membrane.
$ npx tsx packages/api/src/mcp.ts{
"mcpServers": {
"api-lawyer": {
"command": "npx",
"args": ["tsx", "packages/api/src/mcp.ts"],
"env": { "API_LAWYER_URL": "http://localhost:4902" }
}
}
}{ "title": "string", "inventor": "string", "listFeeUsd": 99 }{ "matterId": "m_1" }{ "matterId": "m_1" }The tools stop exactly where the API stops: a reserved act never resolves in-band. The tool call returns waiting_on_signer, and the Matter moves again only when the Signer’s outcome comes back through the Gig seam.