Index Agentica

Memory servers for coding agents compared: m3 Memory vs agentmemory vs Basic Memory vs MCP Memory Service

Four self-hosted memory servers that give Claude Code, Codex, Cursor and other MCP clients one shared memory across sessions and tools. Covers install, storage, search, how memories get captured, hosted options and license.

Type
Comparison
Author
Agentica Author
Published
Last verified

Comparison

Memory servers for coding agents compared: m3 Memory vs agentmemory vs Basic Memory vs MCP Memory Service
EntryInstallStorageSearchHow memories get inHosted optionLicense
m3 Memorypipx install m3-memory, then m3 setup (detects agents and wires them up) and m3 doctor. PyPI 2026.10.25.0, Python 3.12+One SQLite file by default; PostgreSQL 16-18 as an alternative (pgvector optional), shared directly or synced hourly hub-and-spokeHybrid keyword plus vector; knowledge-graph links up to 3 hops; supersession keeps earlier versions when a decision changesAgents call MCP tools (only 6 of 100+ load at startup); chat-log capture saves turns before compaction for Claude Code, Codex, Gemini CLI, Antigravity, OpenCode, OpenClaw and AiderNone; runs on your machine, works offlineApache-2.0
agentmemorynpx -y @agentmemory/agentmemory@latest (interactive setup; Node.js 20+). npm 0.9.31Local data directory outside the repo (state_store.db); API on localhost:3111, viewer on :3113BM25 keyword search with no API key (keyless mode); local or remote embeddings add semantic search; graph matches fused in smart searchLifecycle hooks and native plugins capture sessions automatically (12 hooks in Claude Code, 6 in Codex), with secret scrubbing; 54 MCP tools plus RESTNone; local server, or self-host it remotely behind a secretApache-2.0
Basic Memoryuv tool install basic-memory --prerelease=allow (Python 3.12+; needs a FastMCP 4 pre-release). PyPI 0.24.1Plain Markdown files on disk with a local SQLite index; Postgres (optionally with Milvus vectors) for larger deploymentsHybrid full-text plus vector (FastEmbed) with optional cross-encoder reranking; wikilinks and observations form a knowledge graphThe AI writes and edits notes through MCP tools, and humans edit the same Markdown (for example in Obsidian); a Claude Code plugin adds hooks and skillsBasic Memory Cloud: $15/month (7-day trial), cross-device sync, Teams workspacesAGPL-3.0
MCP Memory Servicepip install mcp-memory-service, then memory server (stdio) or memory server --http. PyPI 12.4.0, Python 3.10+SQLite locally, Cloudflare for multi-device sync, or Hybrid (local reads with background sync to Cloudflare or another instance); Milvus optionSemantic search with local ONNX embeddings, tag search and a typed knowledge graph (causes, fixes, contradicts); scheduled consolidationMCP tools, a REST API (POST /api/memories) with X-Agent-ID tagging, and optional hooks for Claude Code and Codex that retrieve and store contextNone official; self-host, including remote MCP over HTTPS with OAuth 2.0 for claude.ai and ChatGPTApache-2.0

Verdict: Want a memory you can read and edit yourself? Basic Memory keeps everything as Markdown, but note the AGPL license and the pre-release install flag. Want capture with no effort in Claude Code or Codex? agentmemory's hooks record sessions automatically and work without an API key. Want one store for several agents and machines, with version history and a small startup tool footprint? m3 Memory with SQLite or PostgreSQL. Building a multi-agent pipeline (LangGraph, CrewAI) that needs plain REST plus MCP and OAuth? MCP Memory Service.

Coding agents forget everything between sessions. These four servers fix that in the same basic way: a local process stores memories, and every agent you use reaches it over MCP, so a decision you made in Claude Code on Monday is there when you open Codex or Cursor on Friday. They differ in how memories get captured, what the store looks like, and how far they scale beyond one laptop.

These are not the same thing as the memory SDKs in Agent memory layers compared (Mem0, Letta, Graphiti and others). Those are libraries you build into your own agent. The servers here are for agents you already use and can't change.

Capture: tools, hooks or files

This is the biggest practical difference.

Context cost

A memory server with dozens of tools can use a lot of the context window before the agent does anything. m3 Memory says it registers only 6 of its 100+ tools at startup (about 3,200 tokens by its own count) and loads the rest on demand. agentmemory exposes 54 MCP tools and ships skills that tell the agent when to use them. If your client supports per-server tool filtering, use it. If you're on Claude Code, Add MCP servers to Claude Code covers the config.

One laptop or a team

All four run locally with SQLite or local files. To share memory across machines:

Claims to treat with care

Each README reports its own benchmark results (for example m3 Memory's "right session first for 91.8% of questions" and agentmemory's LongMemEval numbers). They were not reproduced here, and they use different setups. To compare memory systems on your own terms, OmniMemEval is an open evaluation framework for memory backends (LoCoMo, LongMemEval and others), and Give an agent long-term memory covers the design trade-offs.

Before you install

Directory entries in this comparison

Related

Sources

Machine-readable