marm-memory

Local SQLite memory for coding agents, with recall, a code graph and a concept graph

By Ryan Lyell (individual) Python Local · stdio, Streamable HTTP Knowledge and memoryDeveloper tools

54 popularity score ★ 434 ↓ 4.1k/mo

Connect your client

Local (once it is running)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add --transport http marm-memory http://localhost:8001/mcp
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "marm-memory": {
      "url": "http://localhost:8001/mcp"
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "marm-memory": {
      "type": "http",
      "url": "http://localhost:8001/mcp"
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.marm-memory]
url = "http://localhost:8001/mcp"
Gemini CLITerminal
gemini mcp add --scope user --transport http marm-memory http://localhost:8001/mcp
Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

FirstTerminal
pip install marm-mcp-server
Claude CodeTerminal
claude mcp add marm-memory -- marm-mcp-stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "marm-memory": {
      "command": "marm-mcp-stdio",
      "args": []
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "marm-memory": {
      "command": "marm-mcp-stdio",
      "args": []
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "marm-memory": {
      "type": "stdio",
      "command": "marm-mcp-stdio",
      "args": []
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.marm-memory]
command = "marm-mcp-stdio"
args = []
Gemini CLITerminal
gemini mcp add --scope user marm-memory marm-mcp-stdio
Local (Docker)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

Claude CodeTerminal
claude mcp add marm-memory -- docker run --rm -i -v '<ABSOLUTE_PATH>:/home/marm/.marm' --entrypoint python lyellr88/marm-mcp-server:latest -m marm_mcp_server.server_stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "marm-memory": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "<ABSOLUTE_PATH>:/home/marm/.marm",
        "--entrypoint",
        "python",
        "lyellr88/marm-mcp-server:latest",
        "-m",
        "marm_mcp_server.server_stdio"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "marm-memory": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "<ABSOLUTE_PATH>:/home/marm/.marm",
        "--entrypoint",
        "python",
        "lyellr88/marm-mcp-server:latest",
        "-m",
        "marm_mcp_server.server_stdio"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "marm-memory": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "<ABSOLUTE_PATH>:/home/marm/.marm",
        "--entrypoint",
        "python",
        "lyellr88/marm-mcp-server:latest",
        "-m",
        "marm_mcp_server.server_stdio"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.marm-memory]
command = "docker"
args = ["run", "--rm", "-i", "-v", "<ABSOLUTE_PATH>:/home/marm/.marm", "--entrypoint", "python", "lyellr88/marm-mcp-server:latest", "-m", "marm_mcp_server.server_stdio"]
Gemini CLITerminal
gemini mcp add --scope user marm-memory docker -- run --rm -i -v '<ABSOLUTE_PATH>:/home/marm/.marm' --entrypoint python lyellr88/marm-mcp-server:latest -m marm_mcp_server.server_stdio

Settings 10

SERVER_HOST Optional: HTTP bind address, 127.0.0.1 by default; 0.0.0.0 exposes it and makes MARM_API_KEY mandatory.
MARM_API_KEY Optional: Bearer key for HTTP when network-exposed or in Docker HTTP; not used over STDIO.
SERVER_PORT Optional: HTTP port, 8001 by default.
MARM_DB_PATH Optional: Memory database file, ~/.marm/marm_memory.db by default.
MARM_RATE_LIMIT_RPM Optional: HTTP requests per minute per IP, 80 by default; 0 turns limiting off.
GRAPH_ENABLED Optional: Set to false to switch off the six code-graph tools.
SEMANTIC_SEARCH_ENABLED Optional: Set to 0 to run without the embedding model (keyword recall only).
CONSOLIDATION_ENABLED Optional: Set to 1 to merge near-duplicate memories at write time (off by default).
MARM_LLM_ENABLED Optional: Turn on optional generation through a local model server (off by default).
MARM_LLM_URL Optional: Local OpenAI-compatible endpoint for generation, http://127.0.0.1:18080 by default.

In a container, a setting goes in with -e NAME=value after docker run.

What it does

marm-memory (published on PyPI as marm-mcp-server) keeps a store of notes, session logs and summaries on your own machine so that an assistant can pick up context in a later chat, or in a different client. Everything sits in SQLite files under ~/.marm. Recall mixes a keyword pre-filter with re-ranking by a local sentence-embedding model, and the same store can be shared by several agents when the server runs over HTTP.

Beyond plain memory it bundles two graphs. A code graph indexes a local repository (through the separate codebase-memory-mcp engine) so an agent can look up symbols, trace calls, see an architecture overview and estimate what a git diff touches; once a repo is indexed it is re-indexed as files change. A concept graph pulls people, decisions, errors and ideas out of stored memories and links them back to code. Tools also cover deleting entries, a session notebook, reviewed clean-up of near-duplicate memories, and turning a pasted conversation into proposed memories.

It runs over STDIO with no key, or as a local HTTP service at http://localhost:8001/mcp that several clients can share; the pip package also ships a CLI (marm-memory) and a browser console on port 8002. At v2.60.1 the STDIO entry point registers 16 tools: eight memory tools defined in server_stdio.py and eight graph tools registered from a separate module. In that file marm_smart_recall returns 5 results by default, searches only the current session ("default") unless search_all is set, and returns about 200 characters per result unless detail is raised to 2 or 3.

What it needs

RuntimePython 3.10+orDocker

Python 3.10 or newer with pip (pip install marm-mcp-server), or Docker for the container. Runs on Windows, macOS and Linux; the docs ask for about 100 MB of disk and 512 MB of RAM. The first run downloads the embedding model, and on pip installs the first graph tool call downloads the codebase-memory engine binary, so both need internet access once. HTTP mode is started separately (marm-memory start) and clients then connect to http://localhost:8001/mcp. Optional text generation needs a local OpenAI-compatible model server.

Limits

Recall returns 5 results from the current session by default; set limit, or search_all to look across sessions. If the graph engine cannot start (no network for its first download, disk full) or GRAPH_ENABLED=false is set, the code-graph tools return an error while the memory tools keep working. In Docker the graph tools see only paths mounted into the container, and a mount cannot be added to a running container. Memories are written only when the agent calls a tool; nothing is captured on its own. The makers' own retrieval benchmark (LoCoMo) puts multi-hop questions at 44.9%. Write-time de-duplication and compaction are off by default.

Who it suits

Suits developers who switch between several coding assistants and want one private, local memory they can all reach, especially when they also want repository structure on hand without re-reading the code. STDIO suits one agent on one machine; HTTP suits several agents sharing a store. It is maintained by one developer, not a vendor. Anyone wanting hosted or synced memory across machines should look elsewhere: it keeps everything in local files and has no cloud sync.

Tools 16

marm_smart_recall
Search stored memories by keyword and meaning, with related graph context when it exists
marm_log_entry
Add an entry to a session log; it also becomes searchable memory
marm_log_show
List sessions and their log entries
marm_delete
Remove a log session, log entry or notebook entry
marm_summary
Produce a summary of a session ready to paste elsewhere
marm_notebook
Keep session notes and save them as lasting, graph-linked documents
marm_compaction
Find, review and apply merges of near-duplicate memories
marm_distill
Turn a raw conversation into memory proposals checked against the store
marm_graph_index
Index a repository into the code graph, list projects, toggle re-indexing
marm_code_lookup
Find symbols, text or a symbol's source in indexed code
marm_code_context
Gather ranked symbols, their source and related memories for one task
marm_graph_trace
Follow call paths and data flow from a function
marm_graph_architecture
Show modules, node and edge counts and schema of an indexed repo
marm_graph_impact
Estimate which symbols a git diff affects and how risky it is
marm_concept_build
Rebuild the concept graph or index older memories into it
marm_concept_recall
Query entities, relationships and linked code symbols in the concept graph

Similar servers