# codeagent-memory

> codeagent-memory is an open-source MCP server for knowledge and memory. Local code graph and long-term memory for coding agents, via MCP or a shared CLI. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/hanochzhu/codeagent_memory
- **MCP Registry name:** io.github.HanochZhu/codeagent-memory
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The cam tool gives a coding agent two local stores in one Rust binary. The code graph holds tree-sitter symbols and one-hop callers and callees as a virtual filesystem, so an agent lists files, reads a single symbol body or follows references rather than dumping whole files. The memory tree keeps project facts, architecture decisions, debugging write-ups and habits, which the agent queries by recall and extends with new entries that can branch from a parent or supersede an older revision.

Recall fuses local embeddings with identifier-aware BM25 using rank fusion, and an Ebbinghaus-style retention score nudges ranking and marks memories as stale or needing an update without deleting history. The main agent reaches it over MCP, while subagents that rarely inherit MCP tools run the same CLI with JSON output against the shared database on disk.

It runs entirely locally with no API keys. The first memory call downloads an embedding model, and falls back to a lexical embedder if offline. Nine languages are indexed, and an OCI image is published.

## Features

- **Symbol-level reads:** Read one function or type instead of a whole file.
- **Caller and callee lookup:** Follow one-hop references in either direction.
- **Persistent memory:** Store decisions and fixes that survive across sessions.
- **Hybrid recall:** Blend embeddings and keyword matching to retrieve notes.
- **Revision chains:** Link updates so older entries fold under the newest one.
- **MCP and CLI:** Main agents use MCP; subagents use the same CLI.

## Good for

- Let an agent remember an architecture decision next session
- Read a single function without opening the file
- Trace who calls a function
- Share one memory store between a main agent and subagents

## Install

### Claude Code (Terminal)

```sh
claude mcp add codeagent-memory -- docker run -i --rm ghcr.io/hanochzhu/codeagent-memory:0.1.7
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "codeagent-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hanochzhu/codeagent-memory:0.1.7"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "codeagent-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hanochzhu/codeagent-memory:0.1.7"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "codeagent-memory": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hanochzhu/codeagent-memory:0.1.7"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "codeagent-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hanochzhu/codeagent-memory:0.1.7"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "codeagent-memory": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/hanochzhu/codeagent-memory:0.1.7"
      ]
    }
  }
}
```

## FAQ

### Does it call external APIs?

No, the README says it is 100% local with no API keys.

### What languages does it index?

Rust, Python, TypeScript, JavaScript, Go, Java, C, C++ and C#.

### How do I run it?

Install with cargo, or use the published Docker image, and add cam mcp to your host config.

### What licence?

MIT.

### Is codeagent-memory free?

Yes. codeagent-memory is open source, so you can use and self-host it for free.

### How do I add codeagent-memory to Claude Code?

Run this command in your terminal: claude mcp add codeagent-memory -- docker run -i --rm ghcr.io/hanochzhu/codeagent-memory:0.1.7

### What are the best alternatives to codeagent-memory?

The closest alternatives to codeagent-memory are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/codeagent-memory
