Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,582 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCB — Memory Context Browser

License: MIT Rust MCP Version

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.

Features

  • 🔍 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

Quick Start

Prerequisites

  • Rust 1.92+ (rustup recommended)
  • make and a POSIX shell
  • An embedding provider: Ollama (local, free) or an API key (OpenAI, VoyageAI, Gemini)

Build & Install

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

Configure

# 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-key

See Configuration Guide for all options.

Integrate with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcb": {
      "command": "mcb",
      "args": ["serve", "--stdio"]
    }
  }
}

MCP Tools

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.

Architecture

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.

Documentation

Getting Started

Architecture & Design

Developer Guide

Operations

Development

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 + validate

Quality Gates

All contributions must pass:

  • make lint — Zero Clippy warnings, consistent formatting
  • make test — All tests green
  • make validate — Zero architecture violations
  • No unwrap()/expect() in production code paths

Planned

  • 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.

Contributing

Contributions are welcome! Please read the Contributing Guide for development setup, coding standards, and the PR process.

License

MIT — Open source, free for commercial and personal use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages