# devin-memory MCP server

> Provides an anti-poisoning memory store for AI agents with provenance, versioning, and a quarantine gate to prevent memory corruption.

- Repository: https://github.com/Icaro0310/devin-memory
- Page: https://hostedmcp.org/servers/icaro0310/devin-memory
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.3.0

## Install

### Claude Code

```sh
claude mcp add devin-memory -- uvx devin-memory-mcp
```

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

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

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "devin-memory": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "devin-memory-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"devin-memory","type":"stdio","command":"uvx","args":["devin-memory-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add devin-memory -- uvx devin-memory-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

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

### Gemini CLI

```sh
gemini mcp add -s user devin-memory uvx -- devin-memory-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DEVIN_MEMORY_DB` | no | no | Path to memory.db (default: ./memory.db) |

## Tools (13)

- `retain`: Screen and store a durable memory. The quarantine gate runs on every write — entries flagged secret:/injection:/limit:/shape: land in quarantine, never in recall. ``expires_at`` is an optional ISO-8601 TTL — past it, the entry stops surfacing in recall/prime (the row stays for audit). Returns the stored entry.
- `recall`: Keyword-ranked recall over active memories only — quarantined, retracted and expired entries never leak into context unless ``include_expired`` is set. Recency decay favors fresh memories.
- `screen`: Dry-run the anti-poisoning gate: returns the status retain would produce (active | quarantined + reasons) without writing.
- `list`: List memory entries, optionally by status (active, proposed, quarantined, retracted) and/or a ``since`` creation cutoff — ISO-8601 date or a relative duration like ``24h`` / ``7d``.
- `retract`: Withdraw an entry — kept for history, never recalled again.
- `supersede`: Replace an entry with a corrected version (versioned); ``expires_at`` overrides the TTL, empty keeps the old one.
- `quarantine`: Move an entry to the quarantine lane (review hold). On a supersession successor, ``hold_supersede`` also restores the superseded parent to active while the successor is reviewed — restoring a row is promotion-shaped, so the flag is ignored unless the server runs with DEVIN_MEMORY_MCP_PROMOTE=1.
- `conflicts`: Contradiction pairs linked at retain time (both kept).
- `prime`: Compact recalled-context block for a workspace — global plus workspace-scoped active memories, token-bounded.
- `verify`: Audit an entry's provenance: always checks the write-time provenance seal (VERIFIED_SEALED / UNSEALED / TAMPER_SUSPECT), and cross-checks source_session_id/source_rowid when a sessions.db path is given (read-only).
- `extract`: Mine a Devin session (read-only sessions.db) for durable knowledge -> proposed entries awaiting approve.
- `compact`: Deduplicate the store: same content+workspace+profile live entries -> one survivor, the rest retracted (never deleted). Dry-run unless apply=True; apply also vacuums the file.
- `quarantine_digest`: Deterministic sha256 audit digest of the quarantine lane — count + taxonomy reason buckets + set hash, no content.

## FAQ

### What is the main purpose of devin-memory?

It serves as an anti-poisoning memory store for Devin that provides durable facts with provenance, versioning, and a quarantine gate to prevent agent memory from being corrupted by bad sessions or injected content.

### How does it handle suspicious content?

It uses a quarantine gate that screens every write for secret and injection shapes, holding suspicious entries until a human releases them.

### Can I use this with other MCP clients besides Devin?

Yes, the server can be called from Claude Desktop, Cursor, Zed, JetBrains, or any other MCP client.

### Does it support session provenance?

Yes, every entry can carry a source session ID and row ID, which can be audited against Devin's sessions database.
