Memory Context Browser (MCB) is a high-performance MCP server that gives AI coding agents persistent memory, semantic code search, and deep codebase understanding — all through the standard Model Context Protocol.
- 🔍 Semantic Code Search — Natural language queries over indexed codebases using vector embeddings
- 🧠 Persistent Memory — Cross-session observation storage with timeline, tagging, and context injection
- 🏗️ Multi-Provider Architecture — 6 embedding providers (OpenAI, VoyageAI, Ollama, Gemini, FastEmbed, Anthropic) and 5 vector stores (Milvus, EdgeVec, Qdrant, Pinecone, Encrypted)
- 🌳 AST-Aware Analysis — Tree-sitter parsing for 14 languages (Rust, Python, JS/TS, Go, Java, C/C++/C#, Ruby, PHP, Swift, Kotlin)
- ✅ Architecture Validation — Built-in Clean Architecture rule enforcement through
mcb-validate - 🔌 MCP Protocol Native — Seamless integration with Claude Desktop, Claude Code, and any MCP-compatible client
- 🔒 Git-Aware Indexing — Repository-level context with branch comparison and impact analysis
- Rust 1.92+ (
rustuprecommended) makeand a POSIX shell- An embedding provider: Ollama (local, free) or an API key (OpenAI, VoyageAI, Gemini)
git clone https://github.com/marlonsc/mcb.git
cd mcb
# Build release binary
make build RELEASE=1
# Install as a systemd user service
make install# Option A: Local embeddings (free, no API key)
export EMBEDDING_PROVIDER=fastembed
# Option B: Ollama (local, more models)
export EMBEDDING_PROVIDER=ollama
export OLLAMA_BASE_URL=http://localhost:11434
# Option C: Cloud embeddings
export EMBEDDING_PROVIDER=openai
export OPENAI_API_KEY=sk-your-keySee Configuration Guide for all options.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcb": {
"command": "mcb",
"args": ["serve", "--stdio"]
}
}
}MCB exposes 24 public tool names through the MCP protocol, grouped into 9 operation families:
| Family | Public tools | Status |
|---|---|---|
| Search | search_code, search_memory |
✅ Stable |
| Index | index_repo, index_status, clear_index |
✅ Stable |
| Validate | validate_code, analyze_code, list_rules |
✅ Stable |
| Memory | store_memory, get_memories, list_memories, memory_timeline, inject_context |
✅ Stable |
| Session | start_session, get_session, list_sessions, summarize_session |
✅ Stable |
| Agent | log_tool_call, log_delegation |
✅ Stable |
| VCS | list_repos, compare_branches, analyze_impact |
✅ Stable |
| Project | project |
✅ Stable |
| Entity | entity |
✅ Stable |
See MCP Tools Documentation for full schemas and examples.
MCB follows Clean Architecture with strict inward-only dependency flow:
┌─────────────────────────────────────────────────┐
│ mcb-server │
│ (MCP protocol, transport) │
├─────────────────────────────────────────────────┤
│ mcb-infrastructure │
│ (DI, config, cache, logging) │
├─────────────────────────────────────────────────┤
│ mcb-domain │
│ (entities, ports, errors) │
├─────────────────────────────────────────────────┤
│ mcb-utils │
│ (constants, utilities, helpers) │
└─────────────────────────────────────────────────┘
▲ ▲
mcb-providers mcb-validate
(embeddings, stores) (architecture rules)
7 workspace crates enforce layer boundaries at compile time via linkme provider registration (zero runtime overhead).
See Architecture Documentation for detailed design and ADR index for Architecture Decision Records.
- Quick Start Guide — Build, configure, and run in 5 minutes
- Configuration Reference — All environment variables and config file options
- Architecture Overview — Clean Architecture layers, crate map, dependency flow
- Architecture Decision Records — 52 ADRs documenting every major design choice
- MCP Tools Schema — Full tool API documentation
- Contributing — Development setup, coding standards, PR process
- Roadmap — Version plans and feature timeline
- Integration Tests — Test infrastructure and patterns
- Changelog — Release history and migration notes
- Migration Guide — Upgrading from the previous project version
make build # Debug build
make build RELEASE=1 # Optimized release build
make test # Run all tests
make lint # Clippy + format check
make validate # Architecture rule enforcement
make check # Full pipeline: fmt + lint + test + validateAll contributions must pass:
make lint— Zero Clippy warnings, consistent formattingmake test— All tests greenmake validate— Zero architecture violations- No
unwrap()/expect()in production code paths
- v0.3.1 — Release stabilization: MCP response consistency, Docker runtime profile, test helper cleanup
- v0.4.0 — Workflow system: FSM-based task orchestration, context scout, policy enforcement
- v0.5.0 — Integrated context: knowledge graph, hybrid search (semantic + BM25), time-travel queries
See Roadmap for details.
Contributions are welcome! Please read the Contributing Guide for development setup, coding standards, and the PR process.
MIT — Open source, free for commercial and personal use.