Quick Start & Setup
Relevant source files
The following files were used as context for generating this wiki page:
The Memory Context Browser (MCB) is a high-performance Model Context Protocol (MCP) server designed to provide AI agents with persistent memory, semantic search, and codebase understanding. The setup process involves configuring a Rust-based environment, building the multi-crate workspace, and integrating the server with MCP-compatible clients like Claude Desktop.
Sources: README.md:1-12, AGENTS.md:120-125
Prerequisites
Before beginning the installation, ensure the following environment requirements are met:
- Rust Toolchain: Version 1.92+ is required. It is recommended to use
rustupfor management. - Build Tools:
makeand a POSIX-compliant shell are necessary for executing the project's canonical verbs. - Embedding Provider: An active provider is required for semantic search features. Options include a local Ollama instance or API keys for cloud providers like OpenAI, VoyageAI, or Gemini.
Sources: README.md:33-37, rust-toolchain.toml
Build and Installation
The development cycle is managed through a central Makefile which interacts with the scripts/lib/mcb.sh monopoly script. This ensures consistent execution of build, test, and deployment phases.
The diagram above illustrates the high-level workflow for setting up a production-ready MCB instance.
Standard Build Commands
| Command | Description |
|---|---|
make build | Performs a debug build of the workspace crates. |
make build RELEASE=1 | Performs an optimized release build. |
make install | Installs the binary and configuration as a systemd user service. |
make setup WHAT=hooks | Installs pre-commit quality gates including architecture validation. |
Sources: README.md:41-48, AGENTS.md:175-200
Configuration
MCB uses environment variables and YAML-based configuration files managed by the Loco.rs framework. Configuration is split into three profiles: development, test, and production.
Embedding Provider Setup
Users must specify an embedding provider to enable semantic indexing.
# Example: Using local FastEmbed (No API key required)
export EMBEDDING_PROVIDER=fastembed
# Example: Using local Ollama
export EMBEDDING_PROVIDER=ollama
export OLLAMA_BASE_URL=http://localhost:11434
# Example: Using OpenAI
export EMBEDDING_PROVIDER=openai
export OPENAI_API_KEY=sk-your-key
Runtime Profiles
| Profile | Port | Database | Default Vector Store |
|---|---|---|---|
| Development | 3000 | SQLite | Milvus |
| Test | Dynamic | SQLite | EdgeVec |
| Production | 8080 | SQLite | Milvus |
Sources: README.md:52-64, AGENTS.md:245-255
MCP Integration
To integrate MCB with Claude Desktop, modify the claude_desktop_config.json file to include the MCB server as an MCP provider. This allows the AI agent to call any of the 24 exposed tools, such as search_code or store_memory.
{
"mcpServers": {
"mcb": {
"command": "mcb",
"args": ["serve", "--stdio"]
}
}
}
Sources: README.md:68-80, AGENTS.md:265-275
Architecture Validation
A critical part of the setup for developers is ensuring compliance with the project's Clean Architecture rules. The mcb-validate tool enforces strict inward-only dependency flows between layers.
This diagram represents the dependency flow where higher-level components (Server/Infrastructure) depend on the Domain layer, while the Domain layer remains independent.
Quality Gates
Before contributing, the following checks must be passed:
make lint: Zero clippy warnings and consistent formatting.make test: All unit and integration tests must pass.make validate: Enforcement of architecture rules defined inconfig/mcb-validate-internal.toml.
Sources: AGENTS.md:215-235, config/mcb-validate-internal.toml:15-20, crates/mcb-infrastructure/Cargo.toml
The setup process ensures that the high-performance Rust core is correctly linked to preferred embedding providers and vector stores, providing a robust foundation for AI-driven codebase analysis and persistent memory.
Sources: README.md:14-25, AGENTS.md:295-300