# DeepMem MCP server

> Provides a persistent, Mem0-compatible memory layer for AI agents using hybrid retrieval and LLM fact extraction.

- Repository: https://github.com/deepmemteam/deepmem
- Page: https://hostedmcp.org/servers/deepmemteam/deepmem
- Transport: remote
- Stars: 114
- License: MIT
- Latest version: 0.1.0

## Install

### Claude Code

```sh
claude mcp add --transport http deepmem https://deepmem.dev/mcp
```

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

```json
{
  "mcpServers": {
    "deepmem": {
      "url": "https://deepmem.dev/mcp"
    }
  }
}
```

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

```json
{
  "servers": {
    "deepmem": {
      "type": "http",
      "url": "https://deepmem.dev/mcp"
    }
  }
}
```

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

```toml
[mcp_servers.deepmem]
url = "https://deepmem.dev/mcp"
```

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

```json
{
  "mcpServers": {
    "deepmem": {
      "httpUrl": "https://deepmem.dev/mcp"
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DEEPMEMORY_BASE_URL` | no | no |  |
| `DEEPMEMORY_DEBUG` | no | no |  |
| `DEEPMEM_API_KEY` | no | no |  |

## FAQ

### Is DeepMem compatible with Mem0?

Yes, it is a drop-in replacement that is fully compatible with the Mem0 API, allowing for migration with a single import change.

### Does DeepMem support Claude Desktop and Cursor?

Yes, it includes a built-in MCP server that allows Claude Desktop and Cursor to read and write memories directly as tools.

### How does the memory retrieval work?

It uses hybrid retrieval which combines vector similarity, BM25 keyword matching, entity boosting, and time-decay scoring.
