Agent Brain MCP Server — stdio + Streamable-HTTP transport surfaces for cross-source personal memory (Claude Code, Claude Desktop, Cursor, Windsurf)
Project description
agentbrain-mcp
MCP server that gives any MCP-capable AI client (Claude Code, Claude Desktop, Cursor, Windsurf) access to your personal Agent Brain — cross-source memory that persists across tools, conversations, and devices.
Status: status.agentbrain.ch · Changelog: CHANGELOG.md · License: MIT
What it does
Native MCP tools registered for cross-source personal memory:
Core recall + store:
brain_recall(query, limit)— search your Brain for relevant memories (semantic + recency + authority)brain_recall_index(query, limit)— slim L0-preview (id+score+weight+preview+tags+created_at)brain_get(ids)— full-content retrieval by memory-IDbrain_store(content, type, source_trust, layers)— persist a memory with structured tagsbrain_memory_content(id)— fetch full content of a single memorybrain_timeline(limit)— chronological WAL recent entriesbrain_status()— agent + workspace health
Identity + self-model:
brain_identity_backbone()— read agent identity-backbone (mission, principles, forbidden_drifts, voice)brain_self_model()— composite self-model (mood + arousal + calibration)brain_list_modes()— capability-modes + active selection (with Sprint-1 #2 safe-navigation)
Mythos-Layer (introduced v0.2.0):
brain_belief(belief_id)— fetch belief-memory with reasoning chainbrain_predict_record(prediction_text, horizon_hours)— register a prediction for later resolutionbrain_correct(claim_id, correction)— supersede a prior belief with corrected statementbrain_quality_metrics()— agent calibration + Brier-decomposition + decision-audit
Plus presence/observability tools: brain_presence_hydrate, brain_presence_thoughts, brain_active_skills, brain_dream_recent, brain_pulse_recent, brain_calibration_history, brain_observe, brain_session_save, brain_session_resume, brain_open_loops, brain_pin_thought, brain_why, brain_tom_summary, brain_create_mode, brain_edit_mode, brain_set_mode, brain_learning_event, brain_flag_wrong, brain_backbone_update, mcp_observe_output.
The server is per-agent: each install is bound to one workspace via env vars. If you have multiple brains (work/personal/customer), run multiple instances.
Transport surfaces
Two transport modes (stdio + Streamable-HTTP):
- stdio — default. Spawned by MCP-clients (Claude Code, Desktop, Cursor, Windsurf). Auth via env-var
BRAIN_API_KEY. - Streamable-HTTP —
agentbrain-mcp --http. HTTP server on configurable port. Auth viaX-API-Keyheader. Stateless session management (per F-P3.1-05).
Install
pip install agentbrain-mcp
Or from source:
git clone https://github.com/AgentBrainHQ/agentbrain-mcp
cd agentbrain-mcp
pip install -e .
Quick start — Claude Code
claude mcp add agentbrain-max -- agentbrain-mcp
With explicit env:
BRAIN_AGENT=max BRAIN_API_KEY=<your-key> claude mcp add agentbrain-max -- agentbrain-mcp
Quick start — Claude Desktop / Cursor / Windsurf
Add to your MCP config (claude_desktop_config.json or equivalent):
{
"mcpServers": {
"agentbrain-max": {
"command": "agentbrain-mcp",
"env": {
"BRAIN_AGENT": "max",
"BRAIN_API_KEY": "your-key-here"
}
}
}
}
Configuration
| Env Var | Required | Description |
|---|---|---|
BRAIN_BASE_URL |
yes (defaults to https://mcp.agentbrain.ch) |
MCP-server URL |
BRAIN_API_KEY |
yes | per-agent API key |
BRAIN_AGENT |
yes (default max) |
agent-identity |
MCP_PHASE6_UNLOCK_ACK |
conditional | HTTP-transport unlock acknowledgment (per F-P6-00) |
See .env.example for full configuration reference.
Architecture
See ARCHITECTURE.md for canonical cross-surface routing reference (Phase-D).
Development
pip install -e ".[dev]"
pytest tests/
Test infrastructure includes:
- Phase-B CI-Guard (AST-based structural bug-class regression-prevention, 12/12 + 109/109 GREEN)
- Phase-C cross-surface smoke-script (9-call matrix baseline, see
scripts/cross_surface_smoke.py) - Sprint-1 #2 safe-navigation regression tests (13 tests, see
tests/test_mcp_wrappers_safe_navigation.py) - Sprint-2 #4 Mythos wrapper tests (22 tests, see
tests/test_mcp_mythos_tools.py)
License
MIT — see LICENSE.
Copyright (c) 2026 Theshoth Sritharan / AgentBrain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentbrain_mcp-0.2.0.tar.gz.
File metadata
- Download URL: agentbrain_mcp-0.2.0.tar.gz
- Upload date:
- Size: 84.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c6d615913a881716f3a4c34344abd8f68ae06422989b27a7e8f9035ad2e1c13
|
|
| MD5 |
541562f99b9d2f8dc17821e66bc94546
|
|
| BLAKE2b-256 |
4d1616cfe2d6b1171b47da81a0fc2f6e3c60d621c3dcf167cc2fc3c6a1d1322e
|
File details
Details for the file agentbrain_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agentbrain_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 56.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41ef8340990eda48a3d009f9845b3a03053106ac03af02398f009b69355efd8d
|
|
| MD5 |
8a3287cc82051ee0d1ce19e594afafbf
|
|
| BLAKE2b-256 |
83f435706bfcd6050a976ac97c9cee6de6d0b54f1a9dd1aacbe89f4d80843b7d
|