SPM MCP
MCP server for SPM memory. It gives an agent recall andwrite over a tenant-isolated memory plane where answers must be backed by astored source: when nothing supports the question, you get a refusal with amachine-readable reason instead of a plausible invention.
Five tools: remember, recall, status, read, delete(the aliases add_memory, search_memory, delete_memory take the samearguments).
- Evidence gate.
recallreturnsgate_reasonand evidence refs. Only apassedgate carries an answer; everything else says why it abstained. - Per-end-user partitions. One tenant, many people.
user_partitionkeepsone customer's memory out of another's recall. - Readable provenance. Every ref carries a
console_urlthat opens thesource in the SPM console.
Connect (hosted, default)
- Create a key at https://app.spmos.ai/api?utm_source=spm-mcp&utm_medium=readmewith the
memory:readscope (addmemory:writeto let the agent save). - Add the server. In Cline (
~/.cline/data/settings/cline_mcp_settings.json):
{
"mcpServers": {
"spm": {
"type": "streamableHttp",
"url": "https://api.spmos.ai/mcp",
"headers": { "Authorization": "Bearer spm_live_v1_YOUR_KEY" },
"disabled": false,
"autoApprove": []
}
}
}
Any MCP client that accepts a remote URL and an Authorization header worksthe same way. Claude Code:
claude mcp add --transport http spm https://api.spmos.ai/mcp \
--header "Authorization: Bearer spm_live_v1_YOUR_KEY"
Connect (local stdio)
For clients that can only run a command (installed from git; newer npm disables gitfetches by default, hence --allow-git=all):
{
"mcpServers": {
"spm": {
"command": "npx",
"args": ["-y", "--allow-git=all", "github:VeridicalTech/spm-mcp"],
"env": { "SPM_API_KEY": "spm_live_v1_YOUR_KEY" }
}
}
}
Once the npm name exists this becomes npx -y @spmos/spm-mcp.
Optional: SPM_USER_PARTITION pins every recall and write to one end user,SPM_BASE_URL points at another deployment.
Ninety seconds: does the partition actually hold
- With the key from step 1, save one fact in partition
alice:
curl -sS -X POST https://api.spmos.ai/v2/ingest \
-H "Authorization: Bearer $KEY" -H 'content-type: application/json' \
-d '{"text":"Alice rotates the deploy key every Monday.","user_partition":"alice"}'
- Ask as
alice, then asbob, with the same question:
for p in alice bob; do
curl -sS -X POST https://api.spmos.ai/v2/recall \
-H "Authorization: Bearer $KEY" -H 'content-type: application/json' \
-d "{\"query\":\"when is the deploy key rotated\",\"top_k\":1,\"depth\":\"fast\",\"user_partition\":\"$p\"}"
echo
done
alice answers with "gate_reason":"passed" and a source. bob returns anabstention with gate_reason such as no_candidate. Extraction runsasynchronously, so the first recall can take a few seconds; status tells youwhether a source is ready.
Tools
| Tool | Scope | Notes |
|---|---|---|
remember |
memory:write |
Idempotent via idempotency_key. |
recall |
memory:read |
depth: fast, auto, deep. Returns gate_reason, evidence refs, console_url. |
status |
memory:read |
Whether saved sources are ready to be recalled. |
read |
memory:read |
Original text for a ref; reports truncation counts. |
delete |
memory:delete |
Removes a source and everything derived from it. |
user_partition on remember/recall needs the memory:partition scope.
Failure behaviour
A refused question is a normal result, not an error: the caller sees the gatereason and can decide to widen the question. Transport failures return anerror with the reason. The local shim reconnects on the next call instead ofexiting.
Data and isolation
Requests carry the key, the tool arguments and the memory text. Nothing else:no repository contents beyond what you pass, no telemetry. Tenants are fencedserver-side by the key's tenant; partitions fence end users inside a tenant.See SECURITY.md.
Development
npm install
SPM_API_KEY=spm_live_v1_... npm run smoke # read-only: lists tools, one recall
License
MIT.