What codeagent-memory does
The codeagent-memory MCP server combines two local retrieval systems for coding work. Its code graph parses supported repositories into symbols and call relationships, while its memory tree stores project facts, architecture decisions, debugging write-ups, and user habits. Both are kept on disk in .cam/cam.db, so the main agent and shell-based subagents can share the same project context.
The code graph presents virtual paths for navigating files and symbols. An agent can list a file outline, read one symbol body, or inspect one-hop callers and callees instead of loading complete files. The memory side supports adding entries and finding them with a hybrid search that combines local embeddings and identifier-aware BM25 ranking.
How it works
Running cam index parses a workspace with Tree-sitter and records definitions and call edges in SQLite. cam sync updates hashes and cam watch can maintain the graph as files change. Supported languages are Rust, Python, TypeScript, JavaScript, Go, Java, C, C++, and C#.
Memory searches use Reciprocal Rank Fusion to combine dense local retrieval with lexical matching. Queries can find terms across naming styles such as snake_case, kebab-case, and camelCase. Memory entries can form branching topics with --parent or revision chains with --supersedes; older superseded entries remain in the history.
The MCP interface is started with cam mcp. Subagents that do not inherit MCP configuration can invoke cam --json instead. Both interfaces access the same local database, which allows a main agent and its subprocesses to use shared indexing and memory.
Setup and configuration
Install the binary with a Rust toolchain using cargo install --git https://github.com/HanochZhu/codeagent_memory --locked, or install it from a local checkout. A Docker image is also documented for environments without Rust. After installation, run cam index from the target repository; the .cam/ directory is created automatically when needed.
Register cam as an MCP stdio server with the argument mcp. For example, an MCP configuration uses command cam and arguments ["mcp"]. The codeagent-memory MCP server requires no external API key. The first memory write or search downloads the default potion-multilingual-128M embedding model to ~/.cam/models/; offline use falls back to a lexical hash embedder.
Tools and capabilities
- List files or symbol outlines with
ls.
- Read a specific symbol body with
read.
- Find one-hop callers or callees with
ref.
- Search stored project knowledge with
recall.
- Add summaries and notes with
add.
- Maintain graph data incrementally with
sync or watch.
- Use local SQLite storage and on-disk embeddings without external service calls.
Limitations and notes
The codeagent-memory MCP server is designed for local workspaces and supports the nine languages listed above. Its graph depends on indexing the repository, and live updates require running cam watch separately. Embedding-based memory search downloads a model on first use unless the local fallback is used offline.
The README documents Windows, macOS, and Linux support. It also describes integrations with Cursor, Claude Code, Codex, Windsurf, GitHub Copilot, Cline, Continue, and JetBrains, with host-specific MCP configuration details available in the project documentation.