|
| 1 | +# @zensystemai/multi-agent-memory-mcp |
| 2 | + |
| 3 | +MCP server for [Multi-Agent Memory](https://github.com/ZenSystemAI/multi-agent-memory) — gives Claude Code, Cursor, and other MCP-compatible AI tools access to a shared memory system that works across agents and machines. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +This package connects to the Multi-Agent Memory API. You need to run that first: |
| 8 | + |
| 9 | +```bash |
| 10 | +git clone https://github.com/ZenSystemAI/multi-agent-memory.git |
| 11 | +cd multi-agent-memory |
| 12 | +cp .env.example .env # Set BRAIN_API_KEY, QDRANT_URL, QDRANT_API_KEY |
| 13 | +docker compose up -d |
| 14 | +``` |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +```bash |
| 19 | +npm install -g @zensystemai/multi-agent-memory-mcp |
| 20 | +``` |
| 21 | + |
| 22 | +## Configuration |
| 23 | + |
| 24 | +### Claude Code (`~/.claude.json`) |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | + "mcpServers": { |
| 29 | + "shared-brain": { |
| 30 | + "command": "multi-agent-memory-mcp", |
| 31 | + "env": { |
| 32 | + "BRAIN_API_URL": "http://localhost:8084", |
| 33 | + "BRAIN_API_KEY": "your-api-key" |
| 34 | + } |
| 35 | + } |
| 36 | + } |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +### Cursor / Windsurf (`mcp.json`) |
| 41 | + |
| 42 | +```json |
| 43 | +{ |
| 44 | + "mcpServers": { |
| 45 | + "shared-brain": { |
| 46 | + "command": "multi-agent-memory-mcp", |
| 47 | + "env": { |
| 48 | + "BRAIN_API_URL": "http://your-server:8084", |
| 49 | + "BRAIN_API_KEY": "your-api-key" |
| 50 | + } |
| 51 | + } |
| 52 | + } |
| 53 | +} |
| 54 | +``` |
| 55 | + |
| 56 | +### Environment Variables |
| 57 | + |
| 58 | +| Variable | Required | Description | |
| 59 | +|----------|:--------:|-------------| |
| 60 | +| `BRAIN_API_KEY` | Yes | API key set in your `.env` | |
| 61 | +| `BRAIN_API_URL` | No | API URL. Default: `http://localhost:8084` | |
| 62 | + |
| 63 | +## Tools |
| 64 | + |
| 65 | +| Tool | Description | |
| 66 | +|------|-------------| |
| 67 | +| `brain_store` | Store a memory (event, fact, decision, or status) | |
| 68 | +| `brain_search` | Semantic search across all memories from all agents | |
| 69 | +| `brain_briefing` | Get a session briefing — what happened since a given time | |
| 70 | +| `brain_query` | Structured query by type, key, subject, or time range | |
| 71 | +| `brain_stats` | Memory health stats (totals, active, decayed, by type) | |
| 72 | +| `brain_consolidate` | Trigger or check LLM consolidation | |
| 73 | + |
| 74 | +## Usage Example |
| 75 | + |
| 76 | +Once configured, your AI tool can call these tools directly. For example in Claude Code: |
| 77 | + |
| 78 | +``` |
| 79 | +brain_briefing since="2026-03-11T00:00:00Z" agent="claude-code" |
| 80 | +``` |
| 81 | + |
| 82 | +Returns categorized updates from all other agents since yesterday — events, facts, decisions, and status changes. |
| 83 | + |
| 84 | +``` |
| 85 | +brain_store type="fact" content="Client prefers dark mode UI" source_agent="claude-code" client_id="acme-corp" key="acme-ui-preference" |
| 86 | +``` |
| 87 | + |
| 88 | +Stores a fact that any other agent (n8n, OpenClaw, Cursor) can retrieve later. |
| 89 | + |
| 90 | +## Memory Types |
| 91 | + |
| 92 | +| Type | Behavior | When to Use | |
| 93 | +|------|----------|-------------| |
| 94 | +| `event` | Append-only, immutable | "Deployment completed", "Workflow failed" | |
| 95 | +| `fact` | Upsert by `key` | Persistent knowledge that gets updated | |
| 96 | +| `status` | Update-in-place by `subject` | Current state of a system or workflow | |
| 97 | +| `decision` | Append-only | Choices made and why | |
| 98 | + |
| 99 | +## Full Documentation |
| 100 | + |
| 101 | +See the [main repository](https://github.com/ZenSystemAI/multi-agent-memory) for the complete API reference, adapter docs (Bash CLI, n8n, OpenClaw), deployment guide, and architecture overview. |
| 102 | + |
| 103 | +## License |
| 104 | + |
| 105 | +MIT |
0 commit comments