MCP Server
Expose MuBit as 21 tools over the Model Context Protocol stdio transport. Usable from Claude Desktop, Cursor, and any MCP client.
@mubit-ai/mcp is a Model Context Protocol server that exposes MuBit as a tool surface. Drop it into any MCP-compatible agent (Claude Desktop, Cursor, custom agents) and the agent can read or write memory through standard MCP tool calls — no MuBit-specific code in the agent itself.
npm install @mubit-ai/mcpMinimal usage
MUBIT_API_KEY=mbt_... MUBIT_ENDPOINT=https://api.mubit.ai npx -y @mubit-ai/mcpThe server reads its configuration from environment variables only — there are no --api-key / --endpoint flags. Set MUBIT_API_KEY and MUBIT_ENDPOINT (defaults to http://127.0.0.1:3000 when unset), and optionally MUBIT_DEFAULT_SESSION_ID / MUBIT_DEFAULT_USER_ID to supply defaults for tool calls that omit them. The server speaks MCP over stdio; configure your MCP client to spawn it with the same environment.
Claude Desktop config
{
"mcpServers": {
"mubit": {
"command": "npx",
"args": ["-y", "@mubit-ai/mcp"],
"env": {
"MUBIT_API_KEY": "mbt_...",
"MUBIT_ENDPOINT": "https://api.mubit.ai"
}
}
}
}Cursor config
{
"mcpServers": {
"mubit": {
"command": "npx",
"args": ["-y", "@mubit-ai/mcp"],
"env": {
"MUBIT_API_KEY": "mbt_...",
"MUBIT_ENDPOINT": "https://api.mubit.ai"
}
}
}
}Full tool surface
Core memory:
mubit_remember, mubit_recall, mubit_context, mubit_archive, mubit_dereference, mubit_reflect, mubit_lessons, mubit_forget, mubit_status
MAS and learning loop:
mubit_checkpoint, mubit_outcome, mubit_step_outcome, mubit_strategies, mubit_learned, mubit_register_agent, mubit_list_agents, mubit_handoff, mubit_feedback
Observability:
mubit_memory_health, mubit_diagnose, mubit_ingest_status
Common flows
Checkpoint + reflection: mubit_checkpoint → mubit_reflect → mubit_lessons
MAS coordination: mubit_register_agent → mubit_handoff → mubit_feedback
Failure diagnosis: mubit_diagnose → mubit_memory_health → mubit_recall
RAG with exact recovery: mubit_archive → mubit_dereferencePer-tool input schemas
Each tool accepts the same arguments as the corresponding SDK helper. For example, mubit_remember takes session_id, agent_id, content, intent, metadata, etc. Inspect tools/list from your MCP client for the full schemas.
Gotchas
- Stdio only. SSE transport is on the roadmap; stdio is the only option today.
- One server, one instance. Each spawn binds to a single MuBit instance (the one in your
MUBIT_API_KEY). Use multiplemcpServersentries if you need multiple instances. - Idempotency keys. When you supply an
idempotency_key(or derive one from a stable item id), the server dedups so the signal/write is not re-applied — until that key is evicted from a bounded in-memory cache (~100k keys, oldest-first). There is no fixed 24-hour TTL and norecord_idis returned. Note for MCP specifically: the server auto-generates a fresh item id per tool call, so two identical calls are not automatically deduplicated unless you pass an explicitidempotency_key. mubit_forgetis exposed by default. It deletes a lesson by id (lesson_id) or an entire session/run (session_id) — there is no--allow-forgetflag or gating. If deletes should be blocked, omitmubit_forgetat the MCP-client level (for example, by filtering the tool list your client advertises).
Version compatibility
@mubit-ai/mcp | mubit-sdk (Node) | @modelcontextprotocol/sdk |
|---|---|---|
0.5.x | >= 0.6.0 | >= 0.6.0 |