# madeleine

> madeleine is an open-source MCP server for knowledge and memory. Agent memory that resurfaces when a place, time, sound or sensor reading matches. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, macOS, Linux, Windows
- **Repository:** https://github.com/fabianimv/madeleine
- **MCP Registry name:** io.github.fabianimv/madeleine
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-23

## About

madeleine adds a second memory pathway for agents. Most memory is voluntary: the agent searches and gets results. Here each memory is stored with the sensory fingerprint present when it was recorded, such as place, time of day, text, image, sound or biometrics, and incoming cues are matched against those fingerprints continuously.

When enough channels line up and a threshold is cleared, the memory is queued as an involuntary recollection and delivered with the agent's next prompt. A refractory period of six hours by default stops the same memory firing repeatedly, and context such as time alone can strengthen a match but never cause one.

Cues can arrive through MCP, an HTTP API, Home Assistant, iOS Shortcuts or wearables. Everything lives in a local SQLite file with no telemetry, raw media is discarded after embedding, and the HTTP server binds to 127.0.0.1. Text matching uses a lexical hash by default, with optional sentence-transformer, image and audio extras.

## Features

- **Cue matching:** Matches place, time, text, image, audio and biometric cues to stored memories.
- **Push delivery:** Queued recollections reach each Claude Code prompt through a hook.
- **Habituation:** A refractory period keeps repeats quiet.
- **Local SQLite store:** No cloud and no telemetry.
- **Integrations:** Home Assistant, iOS Shortcuts and plain HTTP cues.
- **Demo mode:** uvx madeleine-mcp demo runs the full loop offline.

## Good for

- Recall a memory when you arrive at a place
- Connect a smart home or wearable to agent memory
- Give an assistant time-of-day aware recall
- Experiment with sensory memory research

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add madeleine -- uvx madeleine-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add madeleine -- uvx madeleine-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.madeleine]
command = "uvx"
args = ["madeleine-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user madeleine uvx -- madeleine-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "madeleine": {
      "command": "uvx",
      "args": [
        "madeleine-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 7 tools changes data; 5 names don't say. From the server's own tool labels and tool names; not verified by us.

- `remember`: Store a memory with its sensory fingerprint
- `recall`: Search stored memories
- `sense`: Send a cue that may trigger recollections
- `pending_recollections`: Fetch queued involuntary recollections
- `get_memory` (name suggests: reads): Read one memory
- `update_memory` (name suggests: changes): Edit a memory
- `forget`: Delete a memory

## FAQ

### How do I try madeleine?

Run uvx madeleine-mcp demo; it works offline and downloads nothing.

### Where is data kept?

In a local SQLite file at ~/.madeleine/madeleine.db with owner-only permissions.

### Does madeleine work outside Claude Code?

Yes, but other clients get recollections by calling pending_recollections.

### Is raw audio or image data stored?

No, not unless you ask; bytes are embedded and discarded.

### Is madeleine free?

Yes. madeleine is open source, so you can use and self-host it for free.

### How do I add madeleine to Claude Code?

Run this command in your terminal: claude mcp add madeleine -- uvx madeleine-mcp

### What are the best alternatives to madeleine?

The closest alternatives to madeleine are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Myco: Agent-First Cognitive Substrate.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [Myco: Agent-First Cognitive Substrate](https://ai-powered.com/mcp/myco-agent-first-cognitive-substrate): Myco: Agent-First Cognitive Substrate is an open-source MCP server for knowledge and memory.
- [Source Library](https://ai-powered.com/mcp/source-library): Source Library is an open-source MCP server for knowledge and memory.
- [keepplain-plugin](https://ai-powered.com/mcp/keepplain-plugin): keepplain-plugin is a freemium MCP server for knowledge and memory.
- [Second Brain](https://ai-powered.com/mcp/second-brain-2): Second Brain is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/madeleine
