MCP integration

25 tools over stdio — code (L0/L0.5), knowledge (L1.5–L3), domain (L2.5), the global skill view (L4–L5), and a research surface (ask, requirements, incidents, workspace). Query your cross-project graph from any MCP-aware agent.

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "subnet": {
      "command": "subnet",
      "args": ["serve", ".", "--mcp"]
    }
  }
}

Replace "." with an absolute project path if you want the server to operate on a fixed project regardless of where Cursor is invoked.

Claude Code

Add to ~/.claude/claude_desktop_config.json (macOS path may vary):

{
  "mcpServers": {
    "subnet": {
      "command": "subnet",
      "args": ["serve", "--mcp"]
    }
  }
}

Codex CLI / other

Any MCP-compatible client that supports the stdio transport works the same way. The command is subnet serve [path] --mcp; no flags beyond --mcp.

Tool catalogue

Code (L0)

ToolPurposeKey args
subnet_searchSymbol search across code by name + kind.query, kind?, limit?
subnet_nodeOne symbol's details — signature, docstring, location.name
subnet_syncTrigger code re-index.full?
subnet_analyzeCode-grounded analysis: per-file LLM summaries + architectural layers + tags (the hybrid L0 → semantic pass).full?

Knowledge (L1.5–L3)

ToolPurposeKey args
subnet_contextPrimary tool. Builds context for a topic — facts + related code in one call.task, limit?
subnet_recallSemantic + FTS query across conversations and facts; filterable by scope and grounding.query, kinds?, scope?, includeEnrichment?, limit?
subnet_decisionsList decisions / constraints / patterns for a topic or file.topic?, file?, limit?
subnet_business_logicList business rules / invariants / entities.topic?, file?, limit?
subnet_conceptsList or inspect L3 concepts. Pass a conceptId for members + summary.conceptId?, domain?, limit?
subnet_explainStructured systematic-thinking view of a concept (problem / constraints / options / decision / consequences).conceptId
subnet_triage_auditInspect kept vs dropped windows with rationale.droppedOnly?, limit?
subnet_verifyRun Verifier sweep on demand.pruneBelow?
subnet_ingestTrigger incremental ingest + agent pipeline.runTriage?, runExtract?
subnet_statusCounts per layer.—

Domain (L2.5)

ToolPurposeKey args
subnet_domain_modelThe business-domain graph — entities + evidence-grounded relationships, each showing its grounding.entity?, limit?
subnet_gapsOpen questions / knowledge gaps; names the gap and cites the evidence, never fabricates the answer.limit?
subnet_enrichRun the enrichment pass — skills, entities/relationships, industry, gaps.noAgent?

Second brain (L4–L5)

ToolPurposeKey args
subnet_linkCross-project — where else this concept appears, with relation kind and score.conceptId
subnet_skillsGlobal skill graph — technical + industry skills aggregated across projects, weighted by evidence.scope?, cross?, limit?
subnet_profileBig-picture knowledge profile — industries, top technical skills, evidence mix. Pass prose for ProfileWriter-generated portfolio markdown.prose?
subnet_learnLearning targets — industry-standard knowledge not yet grounded in your work.limit?
subnet_askGrounded Q&A — most relevant facts + concepts for a question, filtered to project-truth grounding (includeInferred to add model/external).query, includeInferred?, limit?
subnet_requirementsProduct knowledge — requirements, features, actors, processes, metrics from docs + conversations.query?, limit?
subnet_incidentsRoot-cause analysis — incidents linked to root cause + resolution (why X broke / how it was fixed).query?, limit?
subnet_workspaceCross-project view — workspace umbrella, sibling repos, and emergently-related projects.none

Usage patterns

Carrying decisions forward

When starting work on a new feature, prompt the agent to recall prior decisions before writing code:

"Before designing the payment retry flow, call subnet_decisions with topic 'retry' and tell me what we've already decided. Then call subnet_business_logic for 'payment' to surface invariants."

Onboarding a teammate

subnet_concepts with no arguments lists the top concepts in a project ranked by member count. subnet_explain conceptId expands one into a structured brief.

Auditing what the system kept

If a decision you remember discussing didn't surface, run subnet_triage_audit droppedOnly:true to see what got filtered and why. The rationale string captures the Triage Agent's reasoning; if the filter was wrong, retune triage (bump prompt version or swap model).

Transport details

Stdio only. The server logs to stderr (not visible to the MCP client) and speaks JSON-RPC 2.0 on stdout. No network sockets are opened.

Verify the server independently:

printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}\n{"jsonrpc":"2.0","id":2,"method":"tools/list"}\n' \
  | subnet serve . --mcp