SwarmVault
SwarmVault is a local-first knowledge vault. It ingests files, transcripts, code, URLs, and inboxes into an immutable raw/ layer, derives a curated wiki/ layer of markdown pages, and maintains a typed knowledge graph with provenance tracking. SwarmVault ships an MCP server (swarmvault mcp) that SwarmClaw connects to like any other MCP server.
SwarmClaw treats SwarmVault as one possible knowledge backend for an agent. There is no special storage path, no internal coupling. A SwarmVault vault is a directory the user owns, and the agent talks to it through MCP tools.
What You Get
- One-click setup: a "SwarmVault" preset in the MCP server sheet pre-fills the command, args, and transport. You only enter the vault directory path.
- Per-agent enablement: each agent independently picks which MCP servers it sees. One agent can target a research vault; another targets an engineering vault.
- Bundled skill: a built-in
swarmvaultskill captures the schema-first / graph-query-first conventions so the agent uses the vault correctly without you re-explaining each turn. - Multi-vault support: nothing prevents you from registering several SwarmVault MCP servers (one per vault) and assigning different sets to different agents.
Setup
1. Create a vault
In a directory of your choice:
npx @swarmvaultai/cli init
This creates swarmvault.config.json and the raw/, wiki/, state/ layout. Note the absolute path; you will paste it into the MCP server form.
2. Register SwarmVault as an MCP server in SwarmClaw
- Open MCP Servers in the sidebar.
- Click New.
- Under Quick Setup, click the SwarmVault chip. The form fills in:
- Transport:
stdio - Command:
npx - Arguments:
-y, @swarmvaultai/cli, mcp
- Transport:
- Paste the vault directory's absolute path into Working Directory.
- Optionally rename the server to identify the vault (for example
SwarmVault: Engineering). - Click Create, then open the server again and click Test Connection to confirm SwarmVault answers.
The Working Directory field exists because SwarmVault discovers its vault from the process working directory (swarmvault.config.json in cwd). Without it, the server would launch in SwarmClaw's own working directory and find the wrong vault (or no vault).
3. Enable on an agent
- Open the agent in the Agents view.
- In the agent sheet, find the MCP Servers section and check the SwarmVault server you registered.
- In the Skills section, pin the bundled
swarmvaultskill (auto-discovered; appears alongsidecoding-agent,google-workspace, etc.). - Save.
The agent can now call <server>_compile, <server>_query, <server>_ingest, <server>_graph, and so on (tool names are prefixed with the sanitized MCP server name). The swarmvault skill teaches the agent to read swarmvault.schema.md first, treat raw/ as immutable, and prefer graph queries over grep when the question is relational.
4. Use the vault from chat
A few example prompts:
- "Compile the vault and tell me what's new."
- "Query the vault for our current pricing strategy."
- "Ingest this URL and re-compile: https://…"
- "Use a graph query to show every concept that depends on the auth-rewrite project."
The agent uses the SwarmVault MCP tools and cites source_ids and node_ids from the vault.
What the Skill Adds
The bundled skills/swarmvault/SKILL.md encodes the SwarmVault contract:
- Read
swarmvault.schema.mdbefore any compile or query work. - Treat
raw/as immutable; new sources go throughingest. - Treat
wiki/as compiler-owned. Preservepage_id,source_ids,node_ids,freshness, andsource_hashesfrontmatter. - Read
wiki/graph/report.md(orwiki/index.md) before broad file searching. - For relational questions, prefer
graph query,graph path,graph explainover grep/glob. - Save high-value answers to
wiki/outputs/so they become first-class vault content.
The skill is independent of the MCP integration. It is useful when an agent uses the SwarmVault MCP server, when the agent uses the shell/execute tool to invoke swarmvault directly, or when the agent edits the vault by hand. It is harmless on agents that do neither.
API / CLI Reference
The MCP server APIs (/api/mcp-servers, etc.) accept the new optional cwd field on stdio transports:
curl -X POST http://localhost:3456/api/mcp-servers \
-H 'Content-Type: application/json' \
-d '{
"name": "SwarmVault: Engineering",
"transport": "stdio",
"command": "npx",
"args": ["-y", "@swarmvaultai/cli", "mcp"],
"cwd": "/Users/you/vaults/engineering"
}'
Then test the connection:
curl -X POST http://localhost:3456/api/mcp-servers/<id>/test
A successful response returns { "ok": true, "tools": [...] } with the SwarmVault tool list.
The SwarmClaw CLI:
swarmclaw mcp-servers create --data '{
"name": "SwarmVault: Engineering",
"transport": "stdio",
"command": "npx",
"args": ["-y", "@swarmvaultai/cli", "mcp"],
"cwd": "/Users/you/vaults/engineering"
}'
swarmclaw mcp-servers test <serverId>
swarmclaw mcp-servers tools <serverId>
Multiple Vaults
Each vault is a separate MCP server entry. Name them descriptively:
SwarmVault: Engineering→/Users/you/vaults/engineeringSwarmVault: Operations→/Users/you/vaults/opsSwarmVault: Research→/Users/you/vaults/research
Then assign each vault to the agents that should see it. An agent can have several vaults attached; tools from each are namespaced by the sanitized server name.
Troubleshooting
- "Connection test failed" on save — verify the vault directory exists and contains
swarmvault.config.json. Runnpx @swarmvaultai/cli initthere if not. - Tools list is empty — the SwarmVault MCP server starts up only when a valid vault is found. Check the server logs (
/api/mcp-servers/<id>/testreturns the error in theerrorfield). - Agent ignores the skill — confirm the skill is pinned on the agent's
skillIds[]. Bundled skills are visible in the skills list; pinning is per-agent. npxis slow on first run — the first invocation downloads the@swarmvaultai/clipackage. Subsequent runs use the npm cache. To skip the cache lookup entirely, install globally withnpm install -g @swarmvaultai/cliand setcommandtoswarmvaultinstead ofnpx.
See Also
- MCP Servers
- Skills
- Knowledge
- SwarmVault: https://swarmvault.ai
- SwarmVault on npm: https://www.npmjs.com/package/@swarmvaultai/cli