CounterpartsGuideMemory MCP serverDirectory

Best memory MCP server, and how to set one up

Updated

A memory MCP server gives the model tools to save and look things up. Nothing happens until the model decides to call them, and often it doesn’t. Mem0’s own docs put it plainly: in claude.ai, Claude “rarely reaches for a third-party memory tool on its own” (Mem0, Claude.ai integration).

So the first thing to sort servers by is what brings memory into the conversation without being asked. In Claude Code that’s a hook: a small program that runs at session start or before each prompt and puts notes in front of Claude. A server can also send instructions saying when to use its tools; Claude Code reads them, and claude.ai and, for custom connectors, Claude Desktop, by open reports on Anthropic’s tracker, drop them. Everything else waits for a tool call.

Our picks, by where you use Claude:

  • Claude Code, on a Mac or Linux: Counterparts, the memory we make. Its hooks load a short briefing at the start of every session and bring up related memories as you talk, so nothing waits on Claude remembering to look. Claude writes the memories itself, in its own words, into one file on your machine, with no API key or account. Counterparts doesn’t run on Windows; there, pick one of the hook-based servers in the table and check its docs for Windows first.
  • Claude Desktop, on a Mac: Counterparts too, set up as below. Desktop has no hooks, so here memory comes in through a wake tool: start a chat with the “Start with Counterparts” prompt, or ask Claude to wake its memory. Set its tools to Always allow, and if the chat’s + › Connectors menu shows Tool access, set it to Always available in each chat.
  • claude.ai on the web and in the Claude apps: a hosted version of Counterparts for claude.ai is coming soon, in beta; sign up on the home page to hear when it opens. Today, use a remote server: Basic Memory Cloud if you want notes you can read and edit, Supermemory or Mem0 if a free start matters more. All three reach claude.ai only through tool calls, so the fixes below matter most here.
  • Cursor, VS Code and others: Counterparts doesn’t work there. Engram Alpha, claude-mem and Supermemory’s Cursor plugin brief a Cursor session by hook, and Engram Alpha also briefs a Codex session by hook; any server in the table works as tools.

An AI drafted this page from the sources below and another AI checked it. No person has run these steps. An AI ran the reference server, Counterparts’ terminal setup, and Claude Code’s claude mcp add and claude mcp add-json in a throwaway folder; nothing was run in Claude Desktop, claude.ai, Cursor or VS Code. Counterparts is ours: Mike LaPeter makes it.

Why doesn’t my agent call its memory tools?

Four causes, each from the makers’ own docs or Anthropic’s tracker:

  1. The model decides. A memory server hands over tools and Claude chooses when to use them. Mem0 describes its server that way: it “hands your agent a set of memory tools, so it can decide for itself when to save something, look something up”. VS Code’s troubleshooting page lists “An MCP tool is not being invoked” and suggests you “State the tool name and the action it should perform in your prompt”.
  2. Claude Code loads MCP tools on demand. “Tool search is enabled by default: MCP tools are deferred and discovered on demand”, and “Only tool names and server instructions load at session start” (Claude Code MCP docs). Claude has to think of searching for a memory tool before it can call one.
  3. claude.ai and Claude Desktop’s custom connectors drop server instructions. An open issue on Anthropic’s claude-ai-mcp tracker reports that the instructions a server sends never reach the model. One user tested it with a hidden word: “claude.ai drops instructions; it does not truncate them”, while Claude Code returned it. In October two more reports said the same of Claude Desktop’s custom connectors. One later comment saw it only with connectors an organization added. These are users’ reports; no one from Anthropic has replied in the thread.
  4. Something else gets there first. claude.ai has its own memory, and by Mem0’s docs, “Claude’s system prompt tends to favor its built-in memory”. In Claude Desktop, each tool asks permission until you allow it; Counterparts’ setup notes say that until a tool may run, “the model does not call one nobody asked for”.

What fixes it, by client:

ClientWhat brings memory inWhat to set
Claude Code

A plugin’s SessionStart or UserPromptSubmit hook; Claude Code adds their output to Claude’s context (hooks docs). Server instructions also load.

Use a server that comes with hooks. For a tool-only server, set "alwaysLoad": true on it so its tools are always in view, and add a line to CLAUDE.md saying when to search memory.

Claude Desktop

No hooks. Instructions are reported dropped for custom connectors; untested for local servers.

Set the server’s tools to Always allow. If the chat’s + › Connectors menu shows Tool access, set it to Always available (it applies to that chat; untested whether it applies to a local server). Put a “check memory first” line in a Project’s instructions, as the reference server’s README suggests.

claude.ai

No hooks; instructions reported dropped.

In the chat, + › Connectors › Tool access › Always available (“A specific connector needs to work every time without fail”, Anthropic’s help); it applies to that conversation. Put the “check memory first” line in a Project’s instructions, or ask by name: “search my mem0 memories for...”. Mem0’s docs also suggest pausing Claude’s own memory (Settings › Capabilities › Memory) if you want the server to be the main one.

Cursor

Hooks, for servers that ship them (Engram Alpha, claude-mem, Supermemory’s plugin). Cursor uses MCP tools “when relevant”.

For a tool-only server, a Cursor rule; Graphiti’s docs ask you to “Add the Graphiti rules to Cursor’s User Rules”.

The servers side by side

Every row was read from its maker’s docs, README or source on 4 November 2026, and is sorted by what brings memory in. “Hook” means a Claude Code hook unless the row says otherwise. Each row gives defaults.

ServerWhat brings memory in without a tool callWhere the data livesKey or accountClients its docs cover
Counterparts (ours)

Claude Code: hooks load a briefing at session start and related memories as you talk. Claude Desktop: no hooks; a wake tool whose description tells Claude to call it first in every new chat, and a “Start with Counterparts” prompt that asks Claude to wake it. Its server instructions say the same; Desktop is reported to drop those for custom connectors

One SQLite file in ~/.counterparts

None

Claude Code and Claude Desktop, Mac and Linux (Desktop on Mac); claude.ai coming soon

claude-mem

Hook: prior sessions’ notes “silently injected” at session start; Cursor hooks too

~/.claude-mem on your machine; with CMEM Pro, notes are written through its hosted service

The interactive installer pre-selects CMEM Pro (a 30-day trial, then a subscription, or it falls back to your Claude plan); npx claude-mem install --provider claude skips the sign-in and uses your Claude plan

Claude Code, Cursor, OpenCode, Codex and more; Claude Desktop gets the search tools only

trusty-memory

Hook: before every prompt it adds matching notes, “without paying the per-message MCP tool-call tax”

Your machine

None (an OpenRouter key for two optional features)

Claude Code, Codex, any MCP client on the same machine

Engram Alpha

Hook: “the session starts pre-briefed without the agent asking” (Claude Code, Codex and Cursor); also server instructions

One file in your repo

None

Claude Code, Codex, Cursor, Windsurf, Gemini CLI and more (Claude Desktop isn’t listed; claude.ai can’t reach it)

Basic Memory

Server instructions; its Claude Code plugin adds a session-start brief and a checkpoint before compaction

Markdown in ~/basic-memory, or Basic Memory Cloud

None locally (needs uv); Cloud from $19/month on its billing page

Claude Desktop, Claude Code, Cursor, VS Code, ChatGPT; claude.ai through Cloud

Supermemory

Server instructions say when to use its tools; its Claude Code plugin loads your profile at session start and searches before each prompt; its Cursor plugin does similar

Supermemory’s cloud

An account (OAuth); free plan with $5 of credits a month

claude.ai, Claude Desktop, ChatGPT, Cursor, other MCP clients; plugins for Claude Code and Cursor

Mem0

Its hosted server, by its docs: the agent “can decide for itself”; no lifecycle hooks. Its Claude Code plugin adds up to five memories before Claude’s first reply in a session, when the first prompt is 20 characters or more

Your Mem0 account

A Mem0 account or key; free plan, with Mem0 paying model calls for 30 days, then your own LLM key

Claude, Claude Code, Codex, Cursor, Windsurf, VS Code, OpenCode; claude.ai as a connector

Cognee

Its Claude Code plugin adds context on each prompt; the MCP server alone is tools only

Local databases, or Cognee Cloud

An LLM key, or the plugin runs on your Claude subscription

Claude Code, Claude Desktop, Cursor, Cline, Codex; claude.ai through Cognee Cloud

mcp-memory-service

Optional hooks load memories at session start; the server alone is tools only

SQLite on your machine, or Cloudflare

None locally

Claude Code, Claude Desktop, Cursor, VS Code and many more; claude.ai if you host it over HTTPS

Graphiti MCP (Zep)

Server instructions only

A graph database you run in Docker

An OpenAI (or other LLM) key

Claude Desktop through a bridge, Cursor, VS Code

Zep Context MCP

By its docs, none: a skill tells the assistant when to search

Zep’s cloud

An administrator sets it up for a work email domain; one seat free

Claude, ChatGPT, Claude Code, Codex, Cursor

Knowledge Graph Memory Server (the MCP project’s reference server)

None: no instructions, no hooks. Its README offers a prompt to paste into a Project

One JSONL file, in the package’s own folder unless you set MEMORY_FILE_PATH

None

Claude Desktop, VS Code, any MCP client on the same machine; not claude.ai

Hyperconsciousness

None, on purpose: “Automatic injection ... remain harness decisions”

An encrypted store on a machine you run

None

Codex, any MCP client

Hosted servers whose code isn’t public (Mem0’s, Zep Context, Basic Memory Cloud) are described from their docs.

Two more come up in searches. Letta’s hosted MCP server runs Letta agents for you; its tools don’t read or write your own memory. Screenpipe’s MCP server searches recordings of your screen, which is a different job.

Hooks exist in Claude Code, Cursor, Codex and a few other coding agents, and not in Claude Desktop’s chat or claude.ai. So the same server can bring memory in by itself in one client and wait for a tool call in another. And the remote servers, the only kind claude.ai can reach, keep your notes in their maker’s cloud; whatever Claude reads still goes to Anthropic as usual.

Our directory has 21 memory systems, each graded on the same 11 mechanisms of human memory; this table has the ones whose makers’ docs give them an MCP route to memory, plus mcp-memory-service, which isn’t in the directory. It leaves out agent-qa, a test harness.

How to set one up

Claude Code

Counterparts (ours), Mac or Linux. In Claude Code:

/plugin marketplace add mlapeter/counterparts
/plugin install counterparts@counterparts

Restart Claude Code. The first session offers a short getting-to-know-you. Or from a terminal with bun 1.3+ or Node 22.15+: bun add -g counterparts (or npm install -g counterparts@latest), then counterparts, give your name, let it connect Claude Code, restart, and run counterparts doctor. It runs beside CLAUDE.md and Claude Code’s auto memory and doesn’t touch their files. The Claude Code page has the rest, and our guide to Claude Code memory plugins compares it with the other plugins.

Any other server. Claude Code’s command is claude mcp add <name> -- <command> for a local server and claude mcp add --transport http <name> <url> for a remote one. It saves to the current project unless you add --scope user (every project) or --scope project (a shared .mcp.json). For the reference server, with its file somewhere safe (make the folder first; in our test, a missing folder made every save fail with “no such file or directory”):

mkdir -p ~/.mcp-memory
claude mcp add memory --scope user --env MEMORY_FILE_PATH=$HOME/.mcp-memory/memory.jsonl -- npx -y @modelcontextprotocol/server-memory

Check it with /mcp. A tool-only server is the case where "alwaysLoad": true helps. Add it to the server’s entry in ~/.claude.json (local and user scope) or .mcp.json (project scope), or add the server with it in one line, in place of the add line above (or run claude mcp remove memory --scope user first):

claude mcp add-json memory --scope user '{"type":"stdio","command":"npx","args":["-y","@modelcontextprotocol/server-memory"],"env":{"MEMORY_FILE_PATH":"~/.mcp-memory/memory.jsonl"},"alwaysLoad":true}'

With it, the server’s tools “load into context regardless of the ENABLE_TOOL_SEARCH setting”. Add one line to CLAUDE.md as well, such as “Search memory before answering about past work”.

Claude Desktop

Counterparts (ours), Mac. From a terminal, install the command with bun add -g counterparts (or npm install -g counterparts@latest with Node 22.15+); the Claude Code plugin doesn’t put a counterparts command on your PATH. Quit Claude Desktop, run counterparts install --host claude-desktop --budget 9000, and reopen Desktop. It uses the same memory as Claude Code, in ~/.counterparts. Then set the counterparts tools to Always allow, or a chat can’t wake its memory on its own, and if the chat’s + › Connectors menu shows Tool access, set it to Always available in each chat. Our server sends Desktop instructions to call wake first, and offers a “Start with Counterparts” prompt that asks Claude to wake its memory before anything else. Desktop is reported to drop instructions from custom connectors (untested for local servers like this one). The wake tool’s own description also tells Claude to call it first in a new chat, and tool descriptions do reach the model in Desktop. Nobody has tested how often Claude does that unasked, so the prompt is the sure way in.

Any local server. Open claude_desktop_config.json directly (on a Mac in ~/Library/Application Support/Claude/, on Windows in %APPDATA%\Claude\), or from Desktop: Settings › Developer › Edit Config in the older Settings layout (in the newer one, Settings › Desktop app › Extensions (Manage) › Local MCP servers shows each server’s connection status and logs). Add the server under mcpServers:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"],
      "env": { "MEMORY_FILE_PATH": "/Users/you/.mcp-memory/memory.jsonl" }
    }
  }
}

Use your own full path there, and create the folder first (mkdir -p ~/.mcp-memory). Quit Desktop completely and reopen it; the MCP project’s guide says it “needs to restart to load the new configuration”. If the server doesn’t show up, its log is ~/Library/Logs/Claude/mcp-server-memory.log on a Mac. Servers packed as Desktop extensions (.mcpb) install from Settings › Desktop app › Extensions instead. Remote servers go in as connectors, the same way as claude.ai.

claude.ai (web and apps)

claude.ai reaches only remote servers, over the public internet: Anthropic’s cloud connects to the server, “rather than from your local device”, and servers in Desktop’s config file “aren’t available in Cowork or claude.ai” (Anthropic’s help). Custom connectors are on every plan; Free allows one, and on Team and Enterprise an Owner adds them.

  1. Go to Customize › Connectors, click + Add, then Add custom connector.
  2. Paste the server’s address and sign in to its service when asked. Addresses from the makers’ docs: Basic Memory Cloud https://cloud.basicmemory.com/mcp (also listed in Claude’s Connectors Directory), Supermemory https://mcp.supermemory.ai/mcp, Mem0 https://mcp.mem0.ai/mcp/, Cognee Cloud https://mcp.aws.cognee.ai/mcp.
  3. In a chat, turn it on under + › Connectors, and set Tool access to Always available.
  4. Tell Claude when to use it, in a Project’s instructions or by asking by name.

A connector added on claude.ai also shows up in Claude Desktop and the phone apps. Counterparts for claude.ai will work the same way, as a custom connector; it’s coming soon, in beta; sign up on the home page to hear when it opens.

Cursor and VS Code

Cursor reads .cursor/mcp.json in a project or ~/.cursor/mcp.json for every project, under mcpServers, the same shape as Desktop’s; restart Cursor after saving. In VS Code, run MCP: Add Server from the Command Palette. VS Code now labels the older .vscode/mcp.json deprecated in that flow, and its docs warn that “Adding a configuration isn’t proof that the agent can use the server”. For a brief at the start of each Cursor session, Engram Alpha registers “a sessionStart hook in .cursor/hooks.json”, and Supermemory’s Cursor plugin “Loads your persistent profile when a Cursor conversation starts”.

The reference server’s file goes missing

The reference server is the one most guides start with, and its default file location surprises people. With no MEMORY_FILE_PATH, it writes memory.jsonl inside its own package folder. Run through npx in our throwaway test, that was npm’s cache: ~/.npm/_npx/<hash>/node_modules/@modelcontextprotocol/server-memory/dist/memory.jsonl. An open issue on the servers repo says that there “a reinstall, an update or a cleared npx cache can delete the graph”. Set MEMORY_FILE_PATH to a full path in a folder that exists, as in the examples above; a leading ~ is expanded.

In the same test, its search matches text: a note “prefers tea” came back for “tea” and not for “drinks”. And on Node 20, npx quietly ran version 1.0.0, because 2.0.0 and later need Node 24. The repo calls its servers “educational examples for developers building their own MCP servers, not as production-ready solutions”.

What people report

These come from archived copies of r/mcp comments, read through the Arctic Shift archive; nobody opened them live on Reddit. Each scored 1 in the archive, and most of the commenters build tools of their own.

  • On a shared memory across tools: “All your tools share one memory but you still have to tell them to check it.” (comment)
  • On the fix that held up: “stop offering the memory as a tool and inject it instead. a hook at session start that drops a one line index of every memory into context beats hoping the model chooses to call something.” They keep the full notes behind the tool, and say the model then calls it “reliably, because it already knows the thing exists”. (comment)
  • On saving, the other half: with injection, “the model cannot forget to call save, because save is not an action it controls”, at the cost that “the context window fills with junk” if the memory layer keeps the wrong things. (comment)
  • On server instructions in other clients: “not every client passes it through. Cline currently drops it entirely”. (comment)
  • And a case for no server at all: “put the durable project facts in a markdown file in the repo and point every agent at it from its instructions. I ran a two-agent setup like this and the file beat the memory server”. (comment)

A builder of a different kind of server saw the same thing: the model would “list the tools, and then just never call them. Nothing errored.” Rewriting the descriptions to say when to use each tool fixed it (comment).

Questions people ask

What’s the best memory MCP server for Claude Code?

One that comes with hooks, so memory arrives without Claude deciding to look. We think Counterparts, the memory we make, is the strongest choice for Claude to know you and your work across sessions: hooks load a briefing it wrote itself at the start of each session, on your Mac or Linux machine, with no key or account. claude-mem, trusty-memory, Engram Alpha and the Claude Code plugins of Basic Memory, Supermemory, Mem0 and Cognee also use hooks; our plugins guide compares them.

Where is claude_desktop_config.json on a Mac?

~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it’s %APPDATA%\Claude\claude_desktop_config.json. In the older Settings layout, Settings › Developer › Edit Config opens it; otherwise open the file directly.

My MCP server isn’t showing up in Claude Desktop after a restart. What now?

Quit Desktop completely rather than closing the window, then reopen it. If it’s still missing, read ~/Library/Logs/Claude/mcp.log and mcp-server-<name>.log (on Windows, %APPDATA%\Claude\logs): the second holds the server’s own errors. For an npx server, check the Node version it needs; the reference server’s current release needs Node 24.

Do I need to restart Claude Code after adding an MCP server?

Claude Code’s docs say it reads .mcp.json at session start, so restart after editing that file. /mcp shows each server’s state, and /mcp reconnect all reconnects them.

Can claude.ai use a memory MCP server running on my computer?

No. claude.ai connects from Anthropic’s cloud, so the server has to be reachable on the public internet. A local server works in Claude Desktop and Claude Code; for claude.ai, use a remote one such as Basic Memory Cloud, Supermemory or Mem0, or wait for Counterparts for claude.ai, which is coming soon, in beta; sign up on the home page to hear when it opens.

Does a memory MCP server work with any client?

The tools do, in any client that speaks MCP. What brings memory in by itself doesn’t travel: hooks belong to coding agents (Claude Code, and Cursor or Codex for some servers), and server instructions are read by Claude Code but reported dropped by claude.ai and by Claude Desktop’s custom connectors.

Can Claude Desktop and claude.ai share one memory?

Yes, if both reach the same server: a connector added on claude.ai also appears in Desktop and the phone apps. Both then read and write the same notes. How each chat uses them depends on what Claude decides to look up there.

Local memory MCP: Markdown files or SQLite?

Markdown (Basic Memory) gives you notes you can open, edit and sync with tools you already use. A database on your disk (Counterparts keeps one SQLite file; claude-mem and mcp-memory-service also use SQLite) lets the server search by meaning; the reference server’s JSONL file is readable but searched by plain text. Either way it’s on your disk, and what Claude reads from it goes to Anthropic like the rest of the chat.

Should I use the official MCP memory server?

It’s a small, readable example with no keys, and it works. It brings nothing in by itself, so add a line to your instructions telling Claude to check memory, and set MEMORY_FILE_PATH so the file doesn’t live in npm’s cache.

Questions? Ask in r/AIMemorySystems.