claude-mem MCP server

OfficialAlex Newman (thedotmack)115,847Config last verified Nov 10, 2026

claude-mem's MCP server searches the observations its hooks record from your agent sessions, stored locally in SQLite with FTS5 and a Chroma index.

claude-mem records coding-agent sessions through hooks in Claude Code, Codex, Cursor, OpenCode and other agents. An observer model compresses each session's tool use into typed observations and session summaries, which are stored on your machine in SQLite at ~/.claude-mem/claude-mem.db with FTS5 keyword search, while Chroma adds search by meaning. Memory is grouped by project, and relevant context is injected when a new session starts, so recall begins before the agent calls any tool. Cloud sync to cmem.ai is opt-in.

The MCP server, launched by the installed plugin or by npx claude-mem mcp over stdio, advertises 19 tools in the default local worker runtime. Recall is a three-step flow: search returns a compact index of observation IDs, timeline shows what happened around one, and get_observations fetches only the chosen records. Around it sit a one-call dumb_search, save_memory for deliberate notes, raw tool input and output by ID, a per-project to-do list, tree-sitter code navigation, and six tools that build and query knowledge corpora from filtered observations. team_brief and team_search appear only after joining TeamBrain, and a separate server runtime swaps in observation_* tools for a hosted API. claude-mem is Apache 2.0 and free locally; CMEM Pro costs $30 a month after a 30-day trial and adds a hosted observer, cloud sync and a private MCP link. TeamBrain, its sharing feature, was a pilot with no public pricing when we checked, so in practice the memory belongs to one person's machine.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "claude-mem": {
      "command": "npx",
      "args": [
        "-y",
        "claude-mem",
        "mcp"
      ]
    }
  }
}
Or via CLI
bash
claude mcp add claude-mem -- npx -y claude-mem mcp

Available tools

ToolDescription
important_workflowReturn the recommended search workflow: search, then timeline, then get_observations for selected IDs, with get_tool_uses as a rare follow-up.
searchStep 1: search memory and return a compact index of observation IDs, filterable by project, agent, type, observation type and date range.
timelineStep 2: show the observations recorded before and after an anchor ID, or an anchor found from a query.
get_observationsStep 3: fetch full details for up to 100 selected observation IDs.
get_tool_usesFetch the original, unsummarized tool input and output for tool calls already identified by ID.
dumb_searchOne-call lookup that matches records by title word overlap and returns them with nearby context; faster and shallower than the three-step search.
save_memorySave an explicit note, decision, correction or handoff into local memory, optionally tied to a project.
session_start_contextRender the exact context the SessionStart hook injects for one or more projects.
work_state_writeAppend to a per-project to-do list and working state kept across sessions; open items are shown at the start of every session. Hidden when CLAUDE_MEM_WORK_STATE_ENABLED=false.
work_state_readRead a project's to-do lists and working state, optionally including done and dropped items.
smart_searchSearch the codebase for symbols, functions and classes with tree-sitter parsing, returning folded structural views with token counts.
smart_outlineShow a file's structure, every symbol with its signature and the bodies folded.
smart_unfoldReturn the full source of one symbol from a file.
build_corpusBuild a named knowledge corpus from observations filtered by project, type, concept, file, query or date.
list_corporaList knowledge corpora with their stats and priming status.
prime_corpusStart a model session loaded with a corpus's observations; required before query_corpus.
query_corpusAsk a question of a primed corpus.
rebuild_corpusRe-run a corpus's stored filter to pick up new observations, refusing if the rebuild would drop a large share unless forced.
reprime_corpusStart a fresh session for a corpus, clearing earlier questions and answers.
team_briefTeamBrain brief for a project: overlapping work, recent plans and decisions, who is active, and work delegated to you. Listed only after joining a TeamBrain team.
team_searchSearch observations, plans and decisions teammates shared through TeamBrain. Listed only after joining a TeamBrain team.

What you can do with it

Find how you fixed something last week

The agent runs search for the error or file name, reads the timeline around the matching observation, and pulls the full record with get_observations, without loading every past session into context.

Carry open work across sessions

work_state_write keeps a per-project to-do list, and whatever is still open is shown when the next session in that project starts.

FAQ

Is it free?
Yes, locally. claude-mem is open source under Apache 2.0, though the observer model that writes observations runs on your Anthropic plan or your own OpenRouter or Gemini key. CMEM Pro costs $30 a month after a 30-day trial and adds a hosted observer, cloud sync and a private MCP link.
Does it support remote or OAuth?
The open-source server runs over stdio, or over Streamable HTTP bound to loopback (127.0.0.1, port 37790 by default); it refuses non-local hosts. Remote access comes through CMEM Pro's private MCP link.
How does it compare to a team memory service like Glen?
Both capture agent sessions through hooks without the agent deciding to save. claude-mem stores one person's sessions on their machine, with TeamBrain sharing still a pilot. Glen is hosted, records every teammate's Claude Code, Codex and Cursor sessions into one org memory, and filters recall by what each user may see.
Compare claude-mem alternatives →← Browse all agent-memory servers