Bicameral MCP
OfficialSynchronizes the decision ledger with Git commits to track code evolution and detect implementation drift by comparing content hashes at specific git references.
Integrates into CI/CD pipelines via GitHub Actions to run integration tests and generate decision-drift artifacts for code reviews.
Ingests decision context and project documentation from Notion to link high-level intent with the structural code symbols in the repository.
Extracts and normalizes decision intent from Slack threads and exports, bridging the gap between verbal agreements and their technical implementation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bicameral MCPSearch for past decisions related to the rate limiting logic."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bicameral MCP — Decision Ledger for Your Codebase
Every software team makes hundreds of verbal decisions per week — in meetings, PRDs, Slack threads, and huddles. None of those decisions are linked to the code that implements (or fails to implement) them.
Bicameral MCP is a local MCP server that ingests meeting transcripts and PRDs, builds a structured graph of decisions mapped to code symbols, and continuously tracks whether those decisions are reflected, drifting, or lost as the codebase evolves.
One-liner: A provenance-aware decision layer for your codebase — paste a transcript, get a living map of what was decided and what was actually built.
The Problem: 5 SDLC Friction Points
Smell | What Happens | Fix |
CONSTRAINT_LOST | A rate limit or compliance rule surfaces mid-sprint instead of at design time |
|
CONTEXT_SCATTERED | The "why" behind a decision is split across Slack, Notion, and someone's memory |
|
DECISION_UNDOCUMENTED | A verbal "let's do X" never lands in a ticket or ADR |
|
REPEATED_EXPLANATION | Same context tax paid twice — once to design, once to engineering |
|
TRIBAL_KNOWLEDGE | Only one person knows why the system works the way it does |
|
General-purpose AI can shred a PRD into user stories, but it goes deaf the moment code hits production. Bicameral's wedge is post-commit drift detection — knowing that a decision made three weeks ago is now inconsistent with what actually shipped.
Quickstart
One-command setup
uvx bicameral-mcp setupThis launches an interactive wizard that:
Detects your repo (from cwd or prompts you)
Installs the MCP config into Claude Code and/or Claude Desktop automatically
That's it. The server builds its code index on first tool call.
Manual config
If you prefer to configure manually, add to your MCP config:
{
"mcpServers": {
"bicameral": {
"command": "uvx",
"args": ["bicameral-mcp"],
"env": {
"REPO_PATH": "/path/to/your/repo"
}
}
}
}Local development
cd pilot/mcp
pip install -e ".[test]"
bicameral-mcp setup # interactive config
bicameral-mcp --smoke-test # verify tools
bicameral-mcp # start MCP server (stdio)No LLM provider credentials needed — all retrieval is deterministic.
9 MCP Tools
Decision Ledger (5 tools)
Tool | Purpose | Auto-triggers |
| Ingest a normalized source payload (transcript, PRD, Slack export) and advance the source cursor | — |
| Surface implementation status of all tracked decisions (reflected / drifted / pending / ungrounded) | — |
| Pre-flight: find past decisions relevant to a feature before writing code |
|
| Code review: surface decisions that touch symbols in a file, flagging divergence |
|
| Sync a commit into the ledger — updates content hashes, re-evaluates drift | — |
Code Locator (4 tools)
Tool | Purpose | Requires |
| Fuzzy-match candidate symbol names against the codebase index (rapidfuzz + SQLite) | Indexed repo |
| BM25 text search + structural graph traversal, ranked via RRF fusion | Indexed repo |
| 1-hop graph traversal around a symbol (callers, callees, imports, inheritance) | Indexed repo |
| Tree-sitter symbol extraction from a source file | — |
How the Tools Compose
Pre-flight (before coding)
bicameral.search("add rate limiting") → surfaces prior constraints
validate_symbols(["RateLimiter"]) → confirms code entities exist
search_code("rate limit middleware") → locates relevant code
get_neighbors(symbol_id) → understands blast radiusCode review (before merging)
bicameral.drift("payments/processor.py") → surfaces decisions touching this file
extract_symbols("payments/processor.py") → enumerates current symbols
bicameral.status(filter="drifted") → full drift reportIngestion (after a meeting)
bicameral.ingest(transcript_payload) → extracts intents, maps to code
bicameral.link_commit("HEAD") → syncs latest commit state
bicameral.status(since="2026-03-20") → shows what's reflected vs pendingArchitecture
Host Model (Claude Code / Cursor / Claude Desktop)
│ MCP stdio transport
▼
server.py — 9 tools, tool dispatch
├── handlers/ ← 5 ledger tool handlers
│ ├── ingest.py
│ ├── decision_status.py
│ ├── search_decisions.py
│ ├── detect_drift.py
│ └── link_commit.py
├── adapters/ ← adapter layer
│ ├── ledger.py → SurrealDBLedgerAdapter (singleton)
│ └── code_locator.py → RealCodeLocatorAdapter (lazy init)
├── ledger/ ← SurrealDB v2 embedded
│ ├── adapter.py, client.py, queries.py
│ ├── schema.py ← canonical table/index definitions
│ └── status.py ← content-hash drift derivation
└── code_locator/ ← deterministic retrieval
├── tools/ (validate, search, neighbors)
├── indexing/ (tree-sitter, SQLite, graph builder)
├── retrieval/ (BM25, sqlite-vec)
└── fusion/ (RRF)Storage: SurrealDB v2 embedded (surrealkv:// persistent or memory:// for tests) + SQLite (symbol index, BM25, graph edges). No external server required.
Zero nested LLM calls. The host model orchestrates tool calls directly. All retrieval is deterministic: tree-sitter + BM25 + graph traversal.
Status Derivation
Decision status is a pure function computed at query time — never stored:
Condition | Status | Meaning |
No | ungrounded | Intent captured but no matching code found |
Symbol absent at git ref | pending | Code not yet written |
| drifted | Code changed since decision was recorded |
| reflected | Code matches intent |
This makes Bicameral immune to rebase, squash, and cherry-pick — status is always re-derivable from (intent, git_ref).
Environment Variables
Var | Default | Purpose |
|
| Path to the repo being analyzed |
|
| SurrealDB URL. Use |
|
| Override code index location |
Tests & CI
Tests run via GitHub Actions on PRs to main (pilot/mcp/** paths). All phases use real adapters with SURREAL_URL=memory://.
cd pilot/mcp && source .venv/bin/activate
pytest tests/ -v # run everything locallyPhase | Tests | What |
Phase 1 |
| Code locator tools against real indexed repo |
Phase 2 |
| SurrealDB ledger adapter with |
Phase 3 |
| Full E2E structured around 5 SDLC failure modes |
Phase 3 tests produce JSON artifacts (test-results/e2e/) with full tool responses and SurrealDB graph dumps for qualitative review. These are uploaded as CI artifacts and embedded in the HTML test report.
Visual Documentation
See visual-plan/plans/ for rendered architecture docs:
bicameral-mcp-system.html — consolidated system architecture, swimlane diagrams, graph schema
code-locator-optionA-plus.html — code locator deep-dive (indexing, RRF fusion, benchmarks)
version-control-management.html — git integration design
bicameral-business-model.html — PLG go-to-market strategy
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BicameralAI/bicameral-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server