swarmvault mcp
Run SwarmVault as a local MCP server over stdio.
Usage
swarmvault mcpWhat It Exposes
Tools
workspace_infosearch_pagesread_pagelist_sourcesquery_vaultingest_inputcompile_vaultlint_vaultbuild_context_packlist_context_packsread_context_packstart_taskupdate_taskfinish_tasklist_tasksread_taskresume_taskstart_memory_taskupdate_memory_taskfinish_memory_tasklist_memory_tasksread_memory_taskresume_memory_taskretrieval_statusrebuild_retrievaldoctor_retrievaldoctor_vaultquery_graphgraph_reportgraph_statsgraph_statusgraph_callersupdate_graphcluster_graphget_nodeget_communityget_neighborsget_hyperedgesshortest_pathgod_nodesblast_radius
Query Tool Shape
query_vault accepts:
question- required natural-language questionsave- optional boolean, defaults totrueformat- optionalmarkdown | report | slides | chart | image
That means MCP-aware clients can request the same saved visual output formats that the CLI supports.
compile_vault accepts:
approve- optional boolean, matchingswarmvault compile --approvemaxTokens- optional integer token budget, matchingswarmvault compile --max-tokens <n>
build_context_pack accepts:
goal- required handoff or review goaltarget- optional file path, page id, node id, or graph labelbudgetTokens- optional token budgetformat- optionalmarkdown | json | llmsprinted shape
Task tools mirror swarmvault task; memory task tools mirror the compatibility aliases:
start_taskcreates a task ledger and linked context packupdate_taskrecords notes, decisions, changed paths, linked context packs, graph ids, git refs, or statusfinish_taskrecords an outcome and follow-upslist_tasks,read_task, andresume_taskexpose saved task historystart_memory_taskcreates a task ledger and linked context packupdate_memory_taskrecords notes, decisions, changed paths, linked context packs, graph ids, git refs, or statusfinish_memory_taskrecords an outcome and follow-upslist_memory_tasks,read_memory_task, andresume_memory_taskexpose saved task history
Retrieval tools inspect and repair the local state/retrieval/ index:
retrieval_statusreturns the current backend, freshness, manifest, page count, and shard pathrebuild_retrievalrebuilds the SQLite FTS shard and manifestdoctor_retrievalchecks freshness and can repair stale artifacts
doctor_vault runs the broader vault doctor surface. It checks graph artifacts, retrieval, review queues, watch state, migrations, managed sources, page/source/task counts, and can rebuild safe derived retrieval artifacts when repair: true is passed.
graph_status is the read-only graph freshness check, mirroring swarmvault graph status: it reports graph/report presence, tracked repo changes, and whether a code-only refresh or full compile is recommended without writing watch state.
update_graph runs the code-only graph refresh, mirroring swarmvault graph update. It accepts an optional files array to refresh just the named files (the per-file fast path used by agent hooks); concurrent refreshes coalesce through the same lock plus queue under state/watch/.
graph_callers mirrors swarmvault graph callers <symbol>: it lists every caller of a symbol from graph calls edges with exact file:line call-site evidence, scanning only the files the graph identifies as callers, so who-calls and impact-of-change questions resolve without a repo-wide grep.
Resources
swarmvault://configswarmvault://graphswarmvault://manifestsswarmvault://context-packsswarmvault://tasksswarmvault://memory-tasksswarmvault://sessionsswarmvault://sessions/{path}swarmvault://pages/{path}
Notes
- The current release supports
stdiotransport only - Run the command from the root of the vault you want to expose
- Compatible clients can use this surface to search pages, read markdown, inspect session artifacts, query the vault, ingest new input, check health, and run compile or lint without shelling out directly
- Context-pack tools let compatible clients request bounded evidence bundles from the compiled vault without broad file search
- Task tools let compatible clients keep a durable handoff ledger without storing full transcripts; memory-task tools remain as compatibility aliases
- Saved
chartandimageMCP queries write the same wrapper pages and local assets as direct CLI queries graph_reportreturns the machine-readable graph trust artifact,graph_statsreturns lightweight graph counts,cluster_graphrecomputes communities and graph report artifacts from the existing compiled graph,get_communityreturns members/pages/evidence edges for one community,get_hyperedgesexposes multi-node group patterns directly fromstate/graph.json,graph_statusis the read-only freshness check,update_graphruns the code-only (optionally per-file) graph refresh,build_context_packwriteswiki/context/andstate/context-packs/, task tools writewiki/memory/andstate/memory/tasks/,doctor_vaultsummarizes whole-vault health, retrieval tools inspectstate/retrieval/,blast_radiustraces reverse-import impact for module changes, andgraph_callerslists every caller of a symbol with file:line call-site evidence
For a higher-level explanation of the MCP surface, see MCP Server.