Skip to main content
Glama

AutoMem MCP: Give Your AI Perfect Memory

One command. Infinite memory. Perfect recall across all your AI tools.

npx @verygoodplugins/mcp-automem@latest install

Your AI assistant now remembers everything. Forever. Across every conversation.

https://github.com/user-attachments/assets/fd79112b-5158-4320-a054-8c18ab1ea314

Works with Claude Desktop, Cursor IDE, Claude Code, GitHub Copilot (coding agent), ChatGPT, ElevenLabs, OpenAI Codex, OpenClaw, Hermes, Grok Build, Google Antigravity - any MCP-compatible AI platform.

The Problem We Solve

Every AI conversation starts from zero. Claude forgets your coding style. Cursor can't learn your patterns. Your assistant doesn't remember yesterday's decisions.

Until now.

AutoMem MCP connects your AI to persistent memory powered by AutoMem - a graph-vector memory service.

Related MCP server: my-memory-mcp

What You Get

🧠 Persistent Memory Across Sessions

  • AI remembers decisions, patterns, and context forever

  • Works across all MCP platforms - Claude Desktop, Cursor, Claude Code, OpenAI Codex, OpenClaw, Hermes, Grok Build, Google Antigravity

  • Cross-device sync - same memory on Mac, Windows, Linux

🏆 Graph-Vector Architecture

  • 11 public authorable relationship types between memories (recall results may also include read-only system/internal relations that are not valid associate_memories inputs)

  • Research-validated approach (HippoRAG 2: 7% better associative memory)

  • Sub-second retrieval even with millions of memories

🚀 Works Everywhere You Code

Platform

Support

Setup Time

Claude Desktop

✅ Full

30 seconds

Cursor IDE

✅ Full

30 seconds

Claude Code

✅ Full

30 seconds

GitHub Copilot

✅ Full

2 minutes

OpenAI Codex

✅ Full

30 seconds

OpenClaw

✅ Full

30 seconds

Hermes Agent

✅ Full

30 seconds

Grok Build

✅ Full

30 seconds

Google Antigravity

✅ Full

30 seconds

Any MCP client

✅ Full

30 seconds

See It In Action

Claude Desktop with Personal Preferences

Claude Desktop Using Memory Claude automatically recalls memories using the Personal Preferences template

Cursor IDE with Memory Rules

Cursor with Memory Cursor uses AutoMem project rules to recall context and save durable memories during work

Claude Code with Session Memory

Claude Code Memory Capture Session-start recall plus LLM-judged storage: Claude decides what's durable and stores it via the memory tools

More platform walkthroughs (Codex, Hermes, Antigravity, remote MCP) live in the Installation Guide.

Quick Start

1. Set Up AutoMem Service

You need a running AutoMem service (the memory backend). Choose one:

Option A: Local Development (fastest, free)

git clone https://github.com/verygoodplugins/automem.git
cd automem
make dev

Service runs at http://localhost:8001 - perfect for single-machine use.

Option B: Railway Cloud (recommended for production)

Deploy on Railway

One-click deploy with $5 free credits. Typical cost: ~$0.50-1/month after trial.

👉 AutoMem Service Installation Guide - Complete setup instructions for local, Railway, Docker, and production deployments.


2. Install MCP Client

Claude Desktop - One-Click Install

Download the extension, then open Settings → Extensions → Advanced settings → Install Extension in Claude Desktop and select the file:

⬇️ Download AutoMem for Claude Desktop (.mcpb)

After installing:

  1. Claude Desktop will prompt you for your AutoMem API URL (http://127.0.0.1:8001 for local)

  2. Optionally enter your API Key (required for Railway, skip for local)

  3. Click Enable

The bundle includes a fixed version of the MCP server. To update, download and install the latest .mcpb again; restarting Claude or updating the npm package does not upgrade an installed bundle. See updating Claude Desktop for version checks and migration from JSON configuration. The AutoMem backend runs separately.

Then add the paste-ready Personal Preferences starter from templates/CLAUDE_DESKTOP_INSTRUCTIONS.md. That's it: Claude now has persistent memory and knows when to use it.

Other Platforms

Connect your AI tools to the AutoMem service you just started.

# Guided install - pick where AutoMem runs, verify it, write .env, and
# configure your agents (Codex, Claude Code, Cursor, OpenClaw, Hermes)
npx @verygoodplugins/mcp-automem@latest install

Every change is shown in a review plan before anything is written, and each modified file keeps a .bak backup. Add --dry-run to preview, --yes to apply non-interactively. See the Installation Guide for all flags.

setup is an alias of install. To print config snippets again later, use npx @verygoodplugins/mcp-automem@latest config.

After an interactive install, you can start a short welcome conversation that learns how you work and shows you the memory operations as they happen. Choose Not now to skip it, or run npx @verygoodplugins/mcp-automem@latest welcome later.

3. Platform-Specific Setup

For Claude Code (plugin — recommended):

# In Claude Code:
/plugin marketplace add verygoodplugins/mcp-automem
/plugin install automem@verygoodplugins-mcp-automem

Claude Code prompts for your AutoMem URL and API key at enable time, bundles the MCP server and silent recall/store-tracking hooks, and auto-updates. Prefer hooks and permissions written directly into ~/.claude/ instead? Run npx @verygoodplugins/mcp-automem@latest claude-code.

On Windows, the hook payload assumes a POSIX shell environment such as Git Bash, MSYS2, or WSL — only bash is required (the hooks are pure bash+sed).

For Cursor IDE:

Run the guided installer from your project and select Cursor:

npx @verygoodplugins/mcp-automem@latest install

By default this installs the AutoMem Cursor plugin into ~/.cursor/plugins/local/automem (MCP server, session-start recall hook, and always-on rule) and configures it with the connection you chose. --cursor-mode files instead writes ~/.cursor/mcp.json plus project memory rules and a session-start hook. Already have an endpoint? Use npx @verygoodplugins/mcp-automem@latest cursor --endpoint https://your-automem.example.

The one-click button configures only the MCP server for a local AutoMem instance. Update its endpoint/key in Cursor if needed, then run the CLI above to add project rules and the hook:

Install MCP Server

Other platforms — Claude Desktop (one-click .mcpb above, plus the Personal Preferences template), OpenAI Codex, Hermes Agent, Grok Build, OpenClaw, Google Antigravity, and GitHub Copilot:

👉 Full Installation Guide for every platform's setup and verification steps


Remote MCP via HTTP

An optional sidecar service (deployable to Railway or any Docker host) connects AutoMem to platforms that support remote MCP over Streamable HTTP or SSE — ChatGPT (Developer Mode connectors), Claude.ai web and Claude Mobile, and ElevenLabs Agents.

👉 Remote MCP setup for deployment, connect URLs, and per-platform screenshots.

Architecture

┌─────────────────────────────────────────────┐
│         Your AI Platforms                   │
│  Claude Desktop │ Cursor │ Claude Code      │
└──────────────┬──────────────────────────────┘
               │ MCP Protocol
               ▼
┌──────────────────────────────────────────────┐
│   @verygoodplugins/mcp-automem (this repo)  │
│   • Translates MCP calls → AutoMem API      │
│   • Platform integrations & rules           │
│   • Handles authentication                   │
└──────────────┬───────────────────────────────┘
               │ HTTP API
               ▼
┌──────────────────────────────────────────────┐
│        AutoMem Service (separate repo)       │
│        github.com/verygoodplugins/automem    │
│   ┌────────────┐      ┌────────────┐        │
│   │  FalkorDB  │      │   Qdrant   │        │
│   │  (Graph)   │      │ (Vectors)  │        │
│   └────────────┘      └────────────┘        │
└──────────────────────────────────────────────┘

This repo (mcp-automem):

  • MCP client that connects AI platforms to AutoMem

  • Platform-specific integrations (Cursor rules, Claude Code hooks, etc.)

  • Setup wizards and configuration tools

AutoMem service:

  • Backend memory service with graph + vector storage

  • Deployment guides (local, Railway, Docker, production)

  • API server with FalkorDB + Qdrant

Features

Core Memory Operations

  • store_memory — Save memories with content, tags, importance, metadata. Two modes:

    • Single (default): top-level content plus optional fields, including embedding, t_valid, t_invalid, custom id.

    • Batch: memories: [...] (≤500 items) for bulk ingestion. Per-item id/embedding/t_valid/t_invalid are not supported in batch mode.

  • recall_memory — Three modes selected by which params you pass:

    • ID fetch: memory_id → fetches one memory by ID; updates last_accessed.

    • Tag enumeration: tags + exhaustive: true → paginated exact-match listing for cleanup/audit workflows where ranked recall undercounts. Pair with limit (≤200) and offset; returns has_more, plus next_offset for the next page while more remain.

    • Ranked retrieval (default): hybrid search across vector, keyword, tags, recency/state controls, score filters, and graph expansion. Supports state_mode, recency_bias, scope_fallback, expand_respect_tags, min_score, adaptive_floor, and diagnostics such as tag_scope, score_filter, query_time_ms, vector_search, and per-result outside_tag_scope/state_replaces.

  • associate_memories — Create relationships (11 public authorable types; recall results may also include read-only system relations). Supports single-pair mode and batch mode via associations: [...] (≤500) with relation-specific props like reason, context, resolution, observations, transformation, and role.

  • update_memory — Modify existing memories

  • delete_memory — Two modes:

    • Single (default): memory_id → removes one memory and its embedding.

    • Bulk-by-tag: tags: [...] → bulk-delete all memories matching ANY tag (exact, case-insensitive). No dry-run; verify with recall_memory({ tags, exhaustive: true }) first.

  • check_database_health — Monitor service health, degraded state, sync counts, vector dimensions, and enrichment diagnostics when the service provides them

Advanced Recall (v0.8.0+)

Multi-hop Reasoning - Answer complex questions like "What is Amanda's sister's career?"

mcp__memory__recall_memory({
  query: "What is Amanda's sister's career?",
  expand_entities: true, // Finds "Amanda's sister is Rachel" → memories about Rachel
});

Context-Aware Coding - Recall prioritizes language and style preferences

mcp__memory__recall_memory({
  query: "error handling patterns",
  language: "typescript",
  context_types: ["Style", "Pattern"],
});

Platform Integrations

Cursor IDE

  • ✅ Guided setup configures the global MCP server with your endpoint and API key

  • ✅ Project memory rules in .cursor/rules/automem.mdc

  • ✅ Session-start hook prompts recall, with rules as a fallback

  • ✅ Model-judged storage during work; hooks never write memories

  • ✅ Auto-detects project context (package.json, git remote)

Claude Code

  • ✅ Native plugin - MCP server, silent hooks, and skill in one /plugin install, with enable-time config prompts and auto-updates

  • ✅ LLM-judged storage - session-start guidance nudges Claude to store, verify, and associate durable memories during normal work

  • ✅ Memory rules in CLAUDE.md guide Claude's memory usage

GitHub Copilot

  • ✅ Standalone hook JSON files installed into $COPILOT_HOME/hooks/ or ~/.copilot/hooks/

  • ✅ Memory rules template for copilot-instructions.md

  • ✅ Format flag - --format cli (camelCase) or --format vscode (PascalCase)

  • ✅ Setup: npx @verygoodplugins/mcp-automem@latest copilot --yes

Claude Desktop

  • ✅ Direct MCP integration

  • ✅ Paste-ready Personal Preferences starter template

  • ✅ Full memory API access

Why AutoMem MCP?

vs. Building Your Own

  • ✅ 2 years of R&D already done

  • ✅ Research-validated architecture (HippoRAG 2, MELODI, A-MEM)

  • ✅ Working integrations across all MCP platforms

  • ✅ Active development and community

vs. Other Memory Solutions

  • ✅ True graph relationships (not just vector similarity)

  • ✅ Universal MCP compatibility (works with any MCP client)

  • ✅ 7 memory types (Decision/Pattern/Preference/Style/Habit/Insight/Context)

  • ✅ Self-hostable ($5/month vs $150+ for alternatives)

vs. Native AI Memory

  • ✅ Persistent across sessions (not just context window)

  • ✅ Cross-platform (same memory in Claude, Cursor, Code)

  • ✅ Structured relationships (not just RAG)

  • ✅ Infinite scale (no context window limits)

Documentation

MCP Client & Integrations (this repo)

AutoMem Service (separate repo)

The Science Behind AutoMem

The AutoMem service implements cutting-edge 2025 research:

  • HippoRAG 2 (OSU, June 2025): Graph-vector approach achieves 7% better associative memory

  • A-MEM (July 2025): Dynamic memory organization with Zettelkasten principles

  • MELODI (DeepMind, 2025): 8x memory compression without quality loss

  • ReadAgent (DeepMind, 2024): 20x context extension through gist memories

This MCP package provides the bridge between your AI and that research-validated memory system. The backend has also been benchmarked on the neutral Agent Memory Benchmark, including BEAM large-context scaling tiers — reproducible end to end, so you can run it yourself.

Community & Support

Contributing

We welcome contributions! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes with tests

  4. Submit a pull request with a Conventional Commit title such as fix:, feat:, docs:, or chore:

  5. Do not prefix the PR title with labels like [codex] or [wip] because the squash-merge commit is taken from the PR title

Run npm test for the local unit and mock-host suites. For real service checks, start an isolated AutoMem test instance, then run:

AUTOMEM_TEST_API_URL=http://127.0.0.1:18011 \
AUTOMEM_TEST_API_KEY=test-token \
AUTOMEM_REQUIRE_SERVICE=1 npm run test:integration

The integration suite creates and deletes synthetic memories, so use a disposable test database. It probes health before collecting tests, reads vector dimensions from health (or AUTOMEM_TEST_VECTOR_SIZE), and waits for indexing instead of using fixed sleeps. Without AUTOMEM_REQUIRE_SERVICE=1, an unavailable service skips the optional local suite. Required mode, also enabled by CI=true, fails on an unavailable service, zero tests, or any skipped tests. The AutoMem service integration CI job runs required mode against isolated FalkorDB/Qdrant services and a pinned AutoMem service checkout.

License

MIT - Because great memory should be free.


Ready to give your AI perfect memory?

npx @verygoodplugins/mcp-automem@latest install

Built with obsession. Validated by neuroscience. Powered by graph theory. Works with every MCP-enabled AI.

Designed by Jack Arturo at Very Good Plugins 🧡

Transform your AI from a tool into a teammate. Start now.

Available Tools

6 tools
associate_memoriesAssociate MemoriesA
Idempotent

Create typed relationships between memories. This builds a knowledge graph that improves recall by surfacing related context. Supports single-pair mode or batch mode with associations[] (max 500).

When to use:

  • After storing a new memory: link it to related existing memories

  • When a bug fix relates to an original feature implementation

  • When a new decision updates or invalidates a previous one

  • To connect patterns with their concrete examples

Authorable relationship types:

  • RELATES_TO: General relationship (default)

  • LEADS_TO: Causal relationship (A caused B)

  • OCCURRED_BEFORE: Temporal ordering

  • PREFERS_OVER: Chosen alternative

  • EXEMPLIFIES: Concrete example of a pattern

  • CONTRADICTS: Conflicts with another memory

  • REINFORCES: Strengthens another memory's validity

  • INVALIDATED_BY: Superseded by another memory

  • EVOLVED_INTO: Updated version of a concept

  • DERIVED_FROM: Implementation of a decision/pattern

  • PART_OF: Component of a larger effort

Read-only/internal relations:

  • System/internal relations such as SIMILAR_TO, PRECEDED_BY, EXPLAINS, SHARES_THEME, PARALLEL_CONTEXT, and DISCOVERED may appear in recall results, but they are not valid inputs for associate_memories.

Examples:

  • associate_memories({ memory1_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", memory2_id: "3c9e7b2a-1f4d-4a8e-9b6c-5d2e8f1a7c34", type: "RELATES_TO", strength: 0.9 }) // bug fix → feature

  • associate_memories({ memory1_id: "3c9e7b2a-1f4d-4a8e-9b6c-5d2e8f1a7c34", memory2_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", type: "EVOLVED_INTO", strength: 0.8 }) // old decision → new

  • associate_memories({ associations: [{ memory1_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", memory2_id: "3c9e7b2a-1f4d-4a8e-9b6c-5d2e8f1a7c34", type: "RELATES_TO", strength: 0.8 }] })

Inputs: role, type, reason, context, +10 more. Returns: failed, message, success, summary, +3 more

check_database_healthCheck Database HealthA
Read-onlyIdempotent

Check the health status of the AutoMem service and its connected databases (FalkorDB graph + Qdrant vectors).

When to use:

  • Before a session to verify the memory service is available

  • When memory operations are failing unexpectedly

  • To check storage statistics

Example:

  • check_database_health({})

Inputs: no named parameters. Returns: error, status, backend, statistics

delete_memoryDelete MemoryA
Destructive

Delete a memory by ID (memory_id) or bulk-delete by tag (tags). Use sparingly — consider update_memory instead.

Mode 1 — Single (default): pass memory_id to delete one memory and its embedding. Idempotent: re-running on the same ID is a no-op.

Mode 2 — Bulk-by-tag: pass tags: [...] to delete ALL memories tagged with ANY of these tags. Tag matching is exact (case-insensitive), any-of mode. There is NO dry-run. This can delete thousands of memories in one call. NOT idempotent in practice — re-running may catch new memories that were tagged the same way after the first call. Verify with recall_memory({ tags, exhaustive: true }) first if uncertain.

When to use:

  • Memory contains incorrect information that can't be corrected (Mode 1)

  • Memory is a duplicate (Mode 1)

  • Cleanup of benchmark/test data scoped by tag (Mode 2)

  • Removing all memories under a deprecated tag namespace (Mode 2)

Examples:

  • delete_memory({ memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91" }) // Mode 1

  • delete_memory({ tags: ["benchmark-test"] }) // Mode 2, bulk by tag

Inputs: tags, memory_id. Returns: tags, message, memory_id, deleted_count

recall_memoryRecall MemoryA
Read-onlyIdempotent

Recall memories from AutoMem in one of three modes. The mode is selected by which params you pass.

Mode 1 — ID fetch: pass memory_id to retrieve a single memory by ID. All other params are ignored. Routes to GET /memory/{id} and updates last_accessed.

Mode 2 — Tag enumeration: pass tags + exhaustive: true for paginated exact-match listing (NOT ranked retrieval). Use this for cleanup/audit workflows where ranked retrieval silently undercounts large tag sets. Pair with limit (≤200) and offset. Returns has_more/limit/offset page metadata; next page at next_offset. Tag matching is exact, case-insensitive, any-of mode — tag_match: "prefix" and tag_mode: "all" are rejected in this mode.

Mode 3 — Ranked retrieval (default): hybrid search across vector, keyword, tags, recency, and optional graph expansion. The primary tool for finding relevant context. By default, ranked recall requests current active memories only; set current_only: false for audits.

When to use ranked (mode 3):

  • At conversation start: recall context about the current project/topic

  • Before making decisions: check for past decisions on similar topics

  • When debugging: search for similar past errors and their solutions

  • For complex questions: use expand_entities for multi-hop reasoning

When to use enumeration (mode 2): when you need to know how many memories carry a tag, or to walk all of them for cleanup/migration. Ranked recall ignores low-importance hits — enumeration does not.

Examples:

  • recall_memory({ query: "database architecture decisions", tags: ["my-project"], limit: 5 })

  • recall_memory({ memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91" }) // Mode 1

  • recall_memory({ tags: ["benchmark-test"], exhaustive: true, limit: 50 }) // Mode 2 (add offset for later pages)

  • recall_memory({ query: "auth", exclude_tags: ["deprecated"] }) // Mode 3 with exclusion

  • recall_memory({ query: "What is Sarah's sister's job?", expand_entities: true }) // Mode 3 multi-hop

Inputs: end, sort, tags, limit, +34 more. Returns: mode, sort, count, limit, +19 more

store_memoryStore MemoryA

Store memory in one of two modes — single-memory (set top-level content) or batch (set memories: [...] for up to 500).

Mode 1 — Single (default): pass top-level content plus any optional fields (tags, importance, metadata, type, confidence, embedding, t_valid, t_invalid, etc.).

Mode 1b — Supersede/correct: pass top-level content plus supersedes_memory_id. The server stores the replacement, marks the old memory invalid with t_invalid=now, merges supersede metadata, and associates old → new with INVALIDATED_BY (default) or EVOLVED_INTO.

Mode 2 — Batch: pass memories: [{ content, tags?, importance?, metadata?, timestamp?, type?, confidence? }, ...] to store up to 500 memories in one request. Faster for bulk ingestion (imports, benchmark seeding). Batch mode does NOT accept embedding, t_valid, or t_invalid per-item — use single mode for those.

Content size guidelines (per item):

  • Target: 150-300 characters (one meaningful paragraph)

  • Maximum: 500 characters (auto-summarized if exceeded)

  • Hard limit: 2000 characters (rejected)

  • Format: "Brief title. Context and details. Impact/outcome."

When to use:

  • After making a decision: store the reasoning and outcome

  • When discovering a pattern: store the pattern and where it applies

  • After fixing a bug: store the root cause and solution

  • When learning user preferences: store what they prefer and why

  • For bulk ingestion (imports, seeding): use batch mode

Examples:

  • store_memory({ content: "Chose PostgreSQL over MongoDB for user service. Need ACID for transactions.", tags: ["architecture", "database"], importance: 0.9 })

  • store_memory({ content: "User prefers early returns over nested conditionals.", tags: ["code-style"], importance: 0.7 })

  • store_memory({ content: "User now prefers SQLite for small local tools.", supersedes_memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", supersede_reason: "Correction from user" })

Inputs: tags, type, content, t_valid, +12 more. Returns: qdrant, stored, message, memory_id, +5 more

update_memoryUpdate MemoryA
Idempotent

Update an existing memory's content, tags, importance, or metadata. Use this to correct or enhance memories rather than storing duplicates.

When to use:

  • To correct inaccurate information in a memory

  • To add tags that were forgotten

  • To adjust importance based on new understanding

  • To add metadata after the fact

Examples:

  • update_memory({ memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", importance: 0.95 }) // Increase importance

  • update_memory({ memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", tags: ["project-x", "critical", "auth"] }) // Add tags

  • update_memory({ memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", content: "Updated: PostgreSQL chosen for ACID + team expertise" })

Inputs: memory_id (required), tags, type, content, +8 more. Returns: message, memory_id

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool targets a distinct operation (store, recall, update, delete, associate, health), and the mode-based descriptions make the boundaries mostly clear. The only real overlap is between store_memory's supersede mode and update_memory — both mutate an existing memory — but the descriptions do enough to steer an agent toward the right one.

    Naming Consistency5/5

    All six tools follow a strict verb_noun snake_case pattern: store_memory, recall_memory, update_memory, delete_memory, associate_memories, check_database_health. No deviations or mixed conventions.

    Tool Count5/5

    Six tools is well-scoped for a memory service: four CRUD ops, one graph-linking op, and one health check. Nothing feels padded or missing at the count level.

    Completeness4/5

    Full memory lifecycle is covered (create, read via three recall modes, update, delete, associate, health), including bulk and supersede paths. The notable gap is that associations, once created, cannot be removed or modified — there is no delete/update_association — so erroneous graph edges are permanent.

    Maintenance

    ActivityMaintained
    ResponsivenessMixed handling

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A MCP server that provides persistent memory for AI assistants, storing personal information, relationships, and observations to enable personalized and contextual conversations.
      4
      -
    • A
      license
      A
      quality
      D
      maintenance
      A persistent, self-organizing memory MCP server for AI assistants, using semantic search, knowledge graphs, and reinforcement learning to automatically manage and retrieve memories.
      13
      MIT