Skip to main content
Glama
README.md
# AutoMem MCP: Give Your AI Perfect Memory

<p align="center">
  <img src="assets/icon.svg" alt="AutoMem" width="80" height="80" />
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@verygoodplugins/mcp-automem"><img src="https://img.shields.io/npm/v/@verygoodplugins/mcp-automem" alt="Version" /></a>
  <a href="LICENSE"><img src="https://img.shields.io/npm/l/@verygoodplugins/mcp-automem" alt="License" /></a>
  <a href="https://automem.ai/discord"><img src="https://img.shields.io/badge/Discord-Join%20Community-5865F2?logo=discord&logoColor=white" alt="Discord" /></a>
  <a href="https://x.com/automem_ai"><img src="https://img.shields.io/badge/X-@automem__ai-000000?logo=x&logoColor=white" alt="X (Twitter)" /></a>
</p>

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

```bash
npx @verygoodplugins/mcp-automem setup
```

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

<div align="center">

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

</div>

<p align="center"><sub><b>The guided installer</b> โ€” <code>npx @verygoodplugins/mcp-automem install</code> walks you through local, hosted, or existing-endpoint setup.</sub></p>

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](https://github.com/verygoodplugins/automem)** - a graph-vector memory service.

## 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](screenshots/claude-desktop-with-instructions.jpg)
_Claude automatically recalls memories using the Personal Preferences template_

### Cursor IDE with Memory Rules

![Cursor with Memory](screenshots/cursor-2.jpg)
_Cursor uses automem.mdc rule to automatically recall and store memories_

### Claude Code with Session Memory

![Claude Code Memory Capture](screenshots/claude-code-1.jpg)
_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](INSTALLATION.md)**.

## Quick Start

### 1. Set Up AutoMem Service

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

**Option A: Local Development** (fastest, free)

```bash
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](https://railway.com/button.svg)](https://github.com/verygoodplugins/automem/blob/main/INSTALLATION.md#railway-deployment)

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

๐Ÿ‘‰ **[AutoMem Service Installation Guide](https://github.com/verygoodplugins/automem/blob/main/INSTALLATION.md)** - Complete setup instructions for local, Railway, Docker, and production deployments.

---

### 2. Install MCP Client

#### Claude Desktop - One-Click Install

Download and double-click to install AutoMem in Claude Desktop:

**[โฌ‡๏ธ Download AutoMem for Claude Desktop (.mcpb)](https://github.com/verygoodplugins/mcp-automem/releases/latest/download/mcp-automem.mcpb)**

After installing:
1. Claude Desktop will prompt you for your **AutoMem Endpoint** (`http://127.0.0.1:8001` for local)
2. Optionally enter your **API Key** (required for Railway, skip for local)
3. Click Enable

Then add the paste-ready Personal Preferences starter from [`templates/CLAUDE_DESKTOP_INSTRUCTIONS.md`](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.

```bash
# Guided install - pick where AutoMem runs, verify it, write .env, and
# configure your agents (Codex, Claude Code, Cursor, OpenClaw, Hermes)
npx @verygoodplugins/mcp-automem 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](INSTALLATION.md#guided-install-fastest)
for all flags.

Just need the `.env` + config snippets without the agent setup? Use the lighter wizard:

```bash
# Creates .env and prints config for your AI platform
npx @verygoodplugins/mcp-automem setup
```

**When prompted:**

- **AutoMem Endpoint:** `http://localhost:8001` (or your Railway URL if deployed)
- **API Key:** Leave blank for local development (or paste your token for Railway)

The wizard will:

- โœ… Save your endpoint and API key to `.env`
- โœ… Generate config snippets for Claude Desktop/Cursor/Code
- โœ… Validate connection to your AutoMem service

### 3. Platform-Specific Setup

**For Claude Code (plugin โ€” recommended):**

```text
# 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 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:**

[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=memory&config=eyJlbnYiOnsiQVVUT01FTV9BUElfVVJMIjoiaHR0cDovLzEyNy4wLjAuMTo4MDAxIiwiQVVUT01FTV9BUElfS0VZIjoieW91ci1hcGkta2V5LWlmLXJlcXVpcmVkIn0sImNvbW1hbmQiOiJucHggLXkgQHZlcnlnb29kcGx1Z2lucy9tY3AtYXV0b21lbSJ9)

```bash
# Or use CLI to install automem.mdc rule file
npx @verygoodplugins/mcp-automem cursor
```

**Other platforms** โ€” Claude Desktop (one-click `.mcpb` above, plus the [Personal Preferences template](templates/CLAUDE_DESKTOP_INSTRUCTIONS.md)), [OpenAI Codex](INSTALLATION.md#openai-codex), [Hermes Agent](INSTALLATION.md#hermes-agent), [Grok Build](INSTALLATION.md#grok-build), [OpenClaw](INSTALLATION.md#openclaw), [Google Antigravity](INSTALLATION.md#google-antigravity), and [GitHub Copilot](INSTALLATION.md#github-copilot-coding-agent-githubcom):

๐Ÿ‘‰ **[Full Installation Guide](INSTALLATION.md)** 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](INSTALLATION.md#remote-mcp-via-http-sidecar)** 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](https://github.com/verygoodplugins/automem):**

- 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`.
  - **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?"

```javascript
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

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

### Platform Integrations

#### Cursor IDE

- โœ… **Memory-first rule file** (`automem.mdc` in `.cursor/rules/`)
- โœ… **Automatic memory recall** at conversation start
- โœ… **Auto-detects project context** (package.json, git remote)
- โœ… **Global user rules option** for all projects
- โœ… **Simple setup** via CLI or one-click install

#### 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 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)

- ๐Ÿ“ฆ **[Installation Guide](INSTALLATION.md)** - MCP client setup for all platforms
- ๐ŸŒ **[Remote MCP via HTTP](INSTALLATION.md#remote-mcp-via-http-sidecar)** - Connect ChatGPT, Claude Web/Mobile, ElevenLabs
- ๐ŸŽฏ **[Cursor Setup](INSTALLATION.md#cursor-ide)** - IDE integration with rules
- ๐Ÿค– **[Claude Code Setup](templates/CLAUDE_CODE_INTEGRATION.md)** - Plugin install, hooks, and memory rules
- โš ๏ธ **[Deprecations](DEPRECATION.md)** - History of the plugin deprecation and its reversal
- ๐Ÿš€ **[OpenAI Codex Setup](INSTALLATION.md#openai-codex)** - Codex CLI/IDE/Cloud integration
- ๐Ÿช **[Google Antigravity Setup](INSTALLATION.md#google-antigravity)** - Raw MCP config via Antigravity's MCP Store
- ๐Ÿ“– **[MCP Tools Reference](INSTALLATION.md#mcp-tools)** - All memory operations
- ๐Ÿ“ **[Changelog](CHANGELOG.md)** - Release history

### AutoMem Service (separate repo)

- ๐Ÿ—๏ธ **[AutoMem Service](https://github.com/verygoodplugins/automem)** - Backend repository
- ๐Ÿš€ **[Service Installation](https://github.com/verygoodplugins/automem/blob/main/INSTALLATION.md)** - Local, Railway, Docker deployment
- โš™๏ธ **[API Documentation](https://github.com/verygoodplugins/automem#api-reference)** - REST API reference
- ๐Ÿงช **[Evaluation Lab](https://github.com/verygoodplugins/automem-evals)** - Exploratory recall-quality benchmarks and ruleset A/B testing

## The Science Behind AutoMem

The AutoMem service implements cutting-edge 2025 research:

- **[HippoRAG 2](https://arxiv.org/abs/2502.14802)** (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](https://automem.ai/benchmarks), including BEAM large-context scaling tiers โ€” reproducible end to end, so you can run it yourself.

## Community & Support

- ๐Ÿ’ฌ **[Discord](https://automem.ai/discord)** - Join the community, get help, share feedback
- ๐Ÿฆ **[X Community](https://x.com/i/communities/2013114118912225326)** - Discussion and updates
- ๐Ÿ“ฃ **[@automem_ai](https://x.com/automem_ai)** - Official announcements
- ๐Ÿ“ฆ **[NPM Package](https://www.npmjs.com/package/@verygoodplugins/mcp-automem)** - This MCP client
- ๐Ÿ”ฌ **[AutoMem Service](https://github.com/verygoodplugins/automem)** - Backend repo with deployment guides
- ๐Ÿ› **[GitHub Issues](https://github.com/verygoodplugins/mcp-automem/issues)** - Bug reports and feature requests

## 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

## License

MIT - Because great memory should be free.

---

**Ready to give your AI perfect memory?**

```bash
npx @verygoodplugins/mcp-automem setup
```

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

_Designed by Jack Arturo at [Very Good Plugins](https://verygoodplugins.com)_ ๐Ÿงก

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

TDQS

A4.4/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a clearly distinct operation: store, recall, associate, update, delete, and health-check. Even though recall_memory has multiple modes, the mode selection is explicit and non-overlapping with other tools.

Naming Consistency4/5

The core tools follow a consistent verb_noun pattern: store_memory, recall_memory, update_memory, delete_memory. Minor deviations are associate_memories (plural) and check_database_health (different object noun), but the convention remains predictable and readable.

Tool Count5/5

Six tools is well-scoped for a memory server: basic CRUD, relationship management, and health checking. Each tool serves a distinct purpose and none feel redundant or excessive.

Completeness5/5

The tool surface covers the full memory lifecycle: store, recall, update, delete, and graph association. Recalled enumeration and bulk delete modes also cover maintenance/audit workflows, leaving no obvious dead ends.

Maintenance

ActivityMaintained
ResponsivenessWithin a week