Skip to main content
Glama
README.md
# Recall ☁️

**Persistent memory MCP server for AI coding agents.**

Store, search, and retrieve context across sessions. Built on SQLite + FTS5.

Works with **Claude Code**, **Cursor**, **GitHub Copilot**, **Gemini CLI**, and any MCP-compatible agent.

## Why?

AI coding agents are stateless. Every new session starts from zero. You re-explain your architecture, re-discover patterns, re-learn the same conventions. 

Recall gives your agent a memory that persists. Store decisions, patterns, bug fixes, architecture notes — anything worth remembering. Next session, search and retrieve instantly.

## Install

```bash
npm install -g recall-mcp
```

Or use directly with npx:

```bash
npx recall-mcp
```

## Configure

### Claude Code

Add to your `.claude/settings.json`:

```json
{
  "mcpServers": {
    "recall": {
      "command": "npx",
      "args": ["recall-mcp"]
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "recall": {
      "command": "npx",
      "args": ["recall-mcp"]
    }
  }
}
```

### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "recall": {
      "command": "npx",
      "args": ["recall-mcp"]
    }
  }
}
```

## Tools

### `recall_store`
Store or update a memory. If a memory with the same key exists, it gets updated.

```
key: "project.auth.decision"
content: "Using JWT with RS256. Public key rotated weekly via /keys endpoint."
tags: ["decision", "architecture", "auth"]
scope: "my-project"
```

### `recall_get`
Retrieve a specific memory by key.

```
key: "project.auth.decision"
scope: "my-project"  // optional
```

### `recall_search`
Full-text search across all memories. Returns ranked results.

```
query: "authentication pattern"
limit: 10
scope: "my-project"  // optional
```

### `recall_list`
List recent memories, optionally filtered by scope.

```
scope: "my-project"  // optional
limit: 20
```

### `recall_delete`
Delete a memory by key.

```
key: "project.auth.decision"
scope: "my-project"  // optional
```

### `recall_stats`
Show memory statistics — total count, breakdown by scope.

## How It Works

- **Storage**: SQLite with WAL mode. All data stored locally in `~/.recall/recall.db`.
- **Search**: FTS5 full-text search with automatic ranking. Fast even with thousands of memories.
- **Scoping**: Memories are scoped to `global` by default. Use project-specific scopes to keep project context separate.
- **Auto-indexing**: Every store/update/delete automatically syncs the FTS index via SQLite triggers.

## Use Cases

- **Architecture decisions** — "Why did we choose X over Y?" → stored and searchable
- **Bug fix patterns** — "This weird null pointer was caused by..." → never debug the same thing twice
- **Code conventions** — "In this project, we use..." → agents follow your rules automatically
- **Project context** — Store project structure, key files, gotchas for instant onboarding
- **Cross-session learning** — Agent remembers what it learned last session

## Configuration

| Env Var | Default | Description |
|---------|---------|-------------|
| `RECALL_DB_PATH` | `~/.recall/recall.db` | Path to the SQLite database file |

## License

MIT