← Back to directory
M

MARM Memory MCP Server

Community
Local-first persistent memory and semantic recall for AI agents
Category
Dev Tools #74 of 438
Stars
★ 422 Very popular
Transport
stdio (local process) · Streamable HTTP
Runtime
Python 3.10+ · Docker 20.10.0+
Credentials
Optional API key
License
Apache-2.0
Last commit
Tools
14
63FMRS · C

MARM Memory is a local-first MCP memory server that fuses session memory, a code graph, and a concept graph into one embedded SQLite store, exposing 14 tools over STDIO or HTTP. It suits self-hosters who want persistent context shared across multiple AI coding clients without sending memory to the cloud; recall uses an FTS5 exact lane plus semantic reranking, and the project's own benchmarks show recall latency scaling slowly with memory size. Note that it is not an official vendor product, and HTTP exposure, Docker mounts, and optional consolidation/compaction features add setup complexity and real performance tradeoffs, so verify keys, network binding, and data-directory permissions before deploying.

Strongest · Documentation 15/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
11/20
Maintenance
13/20
Documentation
15/20
Setup experience
14/20
Why each score
Reliability 10/20
The static evidence is limited to the README, server.json, and repository metadata; no committed test files, CI workflow bodies, or source code are present. Verifiable-looking reliability evidence includes the declared 14 tools matching the README parameter tables, explicit degradation semantics (graph tools return 'graph backend unavailable' while the other 9 keep working), concept-graph failure never blocking core memory, a 1MB response limiter, an explicit recall_scan_truncated flag, a serialized write queue, and a described subprocess crash-respawn path. These are concrete and internally coherent design intent, but they are self-reported and cannot be checked statically. The README itself admits run-to-run variance and a concurrent gather/serial ratio of 0.63-0.86 that it labels measurement noise, so the performance numbers are not independently verifiable. The README is visibly truncated mid-sentence ('caught at s'). With no visible test coverage, fixtures, or reproducible verification steps, the static calibration rule forces a cap of 12 and requires deducting for uncertainty. Score 10: happy path is plausible, edge and failure paths are thinly evidenced.
Security and permissions 11/20
No red line is triggered: no malware, credential theft, covert exfiltration, or fabricated identity indicators; localhost-by-default binding and a mandatory MARM_API_KEY for Docker HTTP exposure are reasonable least-privilege stances. Deductions remain. SERVER_HOST defaults contradict each other between the manifest (0.0.0.0) and the README (localhost by default); taking the manifest at face value means listening on all interfaces by default, a potential exposure surface. The 'trusted' profile explicitly disables rate limiting and --expose-network binds to 0.0.0.0, neither of which has a built-in confirmation step, relying on the user to add a firewall and TLS proxy per the docs. Examples include 'MARM_API_KEY=test' and 'your-generated-key' placeholders, which are not real secrets so no leak occurs, but placing a throwaway-key pattern in copyable positions carries practical risk. Data-plane handling (zero cloud, everything under ~/.marm) is clearly disclosed, while permission granularity for console key import and cross-process locking is only partially described. Score 11: no red line, but exposure and permission controls are incomplete.
Maintenance 13/20
There is an Apache-2.0 license, clear attribution (Ryan Lyell / marm-memory), consistent semantic versioning at 2.48.0 across manifest, README, and Docker tags, plus a Discord community and GitHub Issues/Discussions channels. The README's change narrative (the v2.44.4 log-lane fix and the v2.33.1 to v2.44.3 LoCoMo progression) indicates an ongoing release cadence, and 350 stars with 12 open issues and an unarchived repository support continued activity. Deductions: no source-level dependency update policy, release signing, SECURITY.md, or security-response process is in evidence; the CodeQL and Publish badges point at CI whose contents are not provided; and one competitor comparison table self-describes its snapshot as 'Q3 2026' while admitting it comes from public docs rather than testing, which is a questionable time basis. Score 13: active with clear ownership, but governance and security-response channels are under-evidenced.
Documentation 15/20
Documentation is layered and substantial: quick start, six run configurations (pip HTTP/STDIO, Docker HTTP/STDIO, swarm profiles), client config examples for Claude Code, VS Code, Cursor, Codex, Gemini, Qwen, and Grok, parameter tables for all 14 tools, environment variable descriptions, internals (WAL, FTS5, chunked embeddings, write queue, isolated concept-graph DB), troubleshooting (401 vs 406 semantics), and backup/data-location guidance, plus docs-site and API-reference links. Deductions: (1) SERVER_HOST's default is directly contradictory between the manifest (0.0.0.0) and the README (localhost by default), a capability/config documentation conflict; (2) benchmarks openly admit run variance and the LoCoMo section reports ranges rather than point results, with some figures framed as 'shape not absolute values', limiting reviewability; (3) the README is truncated with an unfinished final sentence; (4) the cost model is described only in token terms with no concrete budget table. Score 15: usable layered docs with internal contradictions and unfinished content.
Setup experience 14/20
Installation paths are clear and varied: pip install followed by marm-memory init / start, or marm-mcp-stdio; Docker offers docker run, docker compose, docker stdio-command, and controlled flags such as --dry-run, --data-dir, and --repo, with key handling that writes to ~/.marm/.env instead of shell history, and examples for Windows/macOS/Linux including PowerShell syntax. Per the static calibration rule, scoring setup above 15 requires verifiable execution evidence in the files (real CI workflows plus committed tests covering key paths); the evidence shows only badge references to CI, with no workflow bodies or test files, so a cap of 15 applies. Deductions: default port 8001 plus the need to understand the HTTP/STDIO/Docker/multi-client matrix still leaves manual steps for newcomers; the manifest/README host-default conflict adds troubleshooting cost; and Docker code-graph indexing requires recreating the container with a repo mount, adding complexity. Score 14: reachable in a few steps with ample examples, but unverified and with ambiguous configuration semantics.

Static review · not runListed 2026-09-10

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesConnects to a database

Best for

  • Developers who want memory to stay entirely local instead of depending on a cloud vector database
  • Users who switch between multiple MCP clients and need context to carry over
  • Agent users who need code-structure awareness and change-impact analysis
  • Self-hosters comfortable running a Python package or Docker container

Not for

  • Teams that require an officially hosted cloud service or SLA
  • Pure API integrations that do not use an MCP client
  • Restricted environments that cannot run local processes or containers
  • Users expecting a fully managed zero-configuration cloud product

Required permissions

  • Read/write access to the local data directory (default ~/.marm/, or %USERPROFILE%\.marm\ on Windows) holding the SQLite memory database, index database, and logs
  • HTTP mode binds to localhost:8001 by default and can be exposed to the network with SERVER_HOST=0.0.0.0
  • Docker deployments need a mounted data volume, and code indexing needs read-only repo mounts
  • Network access on first code-graph use to download the graph engine binary (~269MB, one time)
  • Docker HTTP mode requires a MARM_API_KEY environment variable for Bearer authentication

Risks and side effects

  • Exposing the HTTP port with SERVER_HOST=0.0.0.0 without a firewall and TLS proxy can leave memory data reachable by unauthorized parties
  • Memories and code index data are stored as plaintext SQLite files that any process able to read the directory can access
  • In Docker, code-graph tools can only see mounted container paths; using host paths causes index failures
  • Enabling write-time consolidation (CONSOLIDATION_ENABLED=1) raises median write cost from about 6.5ms to 58.1ms
  • Recall latency temporarily increases while the concept-graph backlog drains (measured about 8ms to 16ms median on a real corpus)
  • Graph tools degrade with an error if the graph engine fails to start, for example with no network on first download, a full disk, or schema drift

Setup

Before you start

Runtime:Python 3.10+ · Docker 20.10.0+

MARM_API_KEY optionalsecret Bearer key required for Docker or exposed HTTP mode; not needed for local pip/STDIO. Generate via marm-memory key init or docker run --rm lyellr88/marm-mcp-server --generate-key.
Other optional settings (19)
MARM_DB_PATH optional Path to the SQLite database file, default /app/data/marm_memory.db.
MARM_LOG_LEVEL optional Logging level (DEBUG/INFO/WARNING/ERROR), default INFO.
SERVER_HOST optional Host address to bind to, default 0.0.0.0; no key needed for localhost-only use.
SERVER_PORT optional HTTP port to bind to, default 8001.
RECALL_SCAN_LIMIT optional Max embedded memories the semantic fallback scans per query (default 10000); exceeding it sets recall_scan_truncated=true.
MARM_PROJECT optional Overrides automatic project detection from the working directory.
MARM_PLATFORM optional Overrides automatic platform (client) detection.
GRAPH_ENABLED optional Set to false to disable the graph engines; graph tools then return a degraded-mode error.
CONCEPT_AUTO_INDEX optional Set to false to stop automatic indexing of new memories into the concept graph (manual builds only).
CONCEPT_INDEX_DEBOUNCE_SECONDS optional Debounce interval for background concept indexing, default 30 seconds.
CONCEPT_INDEX_BATCH_SIZE optional Memories processed per concept-indexing batch, default 20.
CONCEPT_BUILD_ROW_CAP optional Page size for full concept builds, default 500.
CONSOLIDATION_ENABLED optional Set to 1 to enable write-time dedup/merge (~9x write cost), off by default.
CONSOLIDATION_THRESHOLD optional Cosine similarity threshold for semantic merge during consolidation.
COMPACTION_ENABLED optional Set to 1 to enable detection of memory compaction candidates.
COMPACTION_STAGING_TTL_HOURS optional Expiry time in hours for staged compaction summaries.
MAX_QUEUE_SIZE optional Upper bound on the internal serialized write queue.
FTS_CANDIDATE_LIMIT optional Cap on FTS pre-filter candidates in hybrid recall, default 200.
GRAPH_AUTO_INDEX optional Environment toggle for repo auto re-indexing; the persistent switch takes precedence.
  1. Install the Python package: pip install marm-mcp-server (requires Python 3.10+).
  2. Initialize and write client configs: marm-memory init --g-claude --g-codex --g-gemini (also supports --g-qwen and --g-kiro; run without flags to install into the current project folder).
  3. Alternatively, tell your agent to use the marm-init skill, which handles Python/Docker, HTTP/STDIO, keys, and client configs interactively in chat.
  4. Manual start: run marm-memory start for HTTP, then connect the client, e.g. claude mcp add --transport http marm-memory http://localhost:8001/mcp; Codex uses codex mcp add marm-memory --url http://localhost:8001/mcp.
  5. Private STDIO mode: run marm-mcp-stdio (or python -m marm_mcp_server.server_stdio), then claude mcp add --transport stdio marm-memory-stdio marm-mcp-stdio.
  6. Docker HTTP requires a key: generate one with docker run --rm lyellr88/marm-mcp-server:latest --generate-key, run the container mounting ~/.marm:/home/marm/.marm with MARM_API_KEY set, then add the Authorization: Bearer header in your client.
  7. Docker STDIO needs no key: docker run --rm -i -v ~/.marm:/home/marm/.marm --entrypoint python lyellr88/marm-mcp-server:latest -m marm_mcp_server.server_stdio.
  8. Verify with curl http://localhost:8001/health.
.mcp.json
{
  "mcpServers": {
    "marm-memory-local": {
      "type": "http",
      "url": "http://localhost:8001/mcp"
    },
    "marm-memory-docker": {
      "type": "http",
      "url": "http://localhost:8001/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MARM_API_KEY}"
      }
    }
  }
}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "marm-memory-local": {
      "type": "http",
      "url": "http://localhost:8001/mcp"
    },
    "marm-memory-docker": {
      "type": "http",
      "url": "http://localhost:8001/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MARM_API_KEY}"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add --transport http marm-memory-local http://localhost:8001/mcp
claude mcp add --transport http marm-memory-docker http://localhost:8001/mcp --header 'Authorization: Bearer ${env:MARM_API_KEY}'

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After marm-memory start, run curl http://localhost:8001/health to confirm the service is healthy; once connected, the client should list the 14 tools such as marm_log_entry and marm_smart_recall, and an agent can store a test memory with marm_log_entry then retrieve it with marm_smart_recall.

Troubleshooting

  1. A 401 Unauthorized means the key is missing or mismatched; confirm MARM_API_KEY matches and restart the client after changing env vars
  2. In Docker HTTP smoke tests a 406 Not Acceptable on GET /mcp is expected and means auth reached the MCP endpoint
  3. Codex's --bearer-token-env-var takes the environment variable name, not the raw key; start or restart Codex from the same shell after setting it
  4. A recall response containing recall_scan_truncated=true means the semantic fallback hit the RECALL_SCAN_LIMIT cap; narrow the session/query or raise the env var
  5. If graph tools report graph backend unavailable, check network and disk space or confirm GRAPH_ENABLED is not false; the other 9 tools keep working
  6. When concept tools misbehave, run marm-memory knowledge status first and reinstall MARM if the bundled runtime is damaged
  7. Run marm-memory doctor to diagnose the local install and marm-memory upgrade --check to compare against PyPI

Things to try

Once connected, you can ask your AI assistant things like:

  • Log this database design discussion into the session auth-research-2025-01
  • Search our memory for what we discussed yesterday about JWT authentication
  • Index this repository and then give me an architecture overview
  • Delete the notebook entry named jwt-validation-pattern

Tools 14

marm_log_entry writes
Log important information to MARM's memory system
marm_smart_recall read-only
Hybrid memory recall with bounded concept and linked-code context when available
marm_summary read-only
Generate intelligent summaries from memory data
marm_notebook writes
Unified notebook — add, use, show, status, clear, or save entries (action parameter required)
marm_log_show read-only
Display memory log entries
marm_delete destructive
Delete a log session, log entry, or notebook entry (type='log'|'notebook')
marm_compaction destructive
Review, stage, apply, or discard agent-assisted memory compaction candidates
marm_graph_index writes
Index a repository into the bundled code graph, check index status, or list indexed projects
Show 6 more tools
marm_code_lookup read-only
Find symbols, source snippets, or text matches in an indexed repository
marm_graph_trace read-only
Trace call paths or data flow through the indexed code graph
marm_graph_architecture read-only
Return high-level architecture, node and edge summaries, modules, and graph schema
marm_graph_impact read-only
Estimate change impact from git diff context and affected graph symbols
marm_concept_build writes
Extract entities and typed relationships from stored memories into the concept graph
marm_concept_recall read-only
Explicitly query platform-aware concept entities, relationships, and linked code symbols

Use cases

Sharing one project memory and decision log across multiple AI clients such as Claude Code, Codex, and Gemini
Giving coding agents a structural index of a repository to cut repeated grep and full-file read token cost
Connecting decisions, errors, tools, and people across sessions through the concept graph
Running a local SQLite memory service in offline or privacy-sensitive environments with no cloud sync
Supporting multi-agent collaboration through swarm rate-limit profiles that serialize memory writes

Supported clients

Claude Code
VS Code / GitHub Copilot Agent
Cursor
Codex
Gemini CLI
Qwen Code
xAI / Grok Remote MCPPartial support

Listed from the project's documentation, not tested by this site.

Overview

MARM Memory is a local-first MCP server that gives AI agents a permanent, private memory across Claude Code, Codex, Grok, Gemini, VS Code, and Cursor. It fuses session history, repository code indexing, and a concept graph into an embedded SQLite store, enabling zero-cloud, privacy-first context retention and instant recall, including for multi-agent swarms. The server exposes 14 MCP tools: 7 core memory tools (logging, hybrid recall, summaries, notebooks, log viewing, deletion, and compaction) plus 5 code-graph tools (repo indexing, symbol lookup, call tracing, architecture overview, change-impact analysis) and 2 concept-graph tools (entity/relationship build and query). Recall uses a hybrid pipeline of an FTS5 BM25 exact lane plus semantic reranking, with long memories chunked into overlapping rows and collapsed back to the parent memory. Both STDIO and HTTP transports are supported, with managed swarm, swarm-max, and trusted rate-limit profiles for shared deployments.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision 97871d57ce7a Data synced 2026-10-19 Read the FMRS scoring method