# Memory Tool

Memory Tool — an MCP server that stores and retrieves long-term memories for agents and users across sessions. Covers semantic search and structured JSON filters by user_id, agent_id, date, and more.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 107 installs
- Author: mem0ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://smithery.ai/server/mem0ai/mem0-memory-mcp
- Updated: 2025-03-28
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/memory-tool

## What it does

Memory Tool connects to Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI via a single HTTP endpoint at `https://mem0-memory-mcp--mem0ai.run.tools`. No local process to run — just register the URL in each client's config.

Nine tools ship with the server. `add_memory` stores a preference, fact, or conversation snippet; at least one of `user_id`, `agent_id`, or `run_id` is required, or the call fails. `search_memories` runs a semantic query with filters — narrow by user, agent, or a `created_at` date range. `get_memories` pages through records using filters rather than a query string. `get_memory` fetches a single entry by `memory_id`, `update_memory` overwrites its text, and `delete_memory` removes it after confirming the ID. `delete_all_memories` clears every record inside a given scope without removing the entity itself; `delete_entities` drops the entity and cascade-deletes everything under it. `list_entities` shows which users, agents, apps, or runs currently hold memories.

All writes are scoped to identifiers you supply — the server has no implicit notion of a current user or session.

## Requirements
- Remote server: `https://mem0-memory-mcp--mem0ai.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http mem0-memory-mcp https://mem0-memory-mcp--mem0ai.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add memory-tool --url https://mem0-memory-mcp--mem0ai.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "memory-tool": {
            "url": "https://mem0-memory-mcp--mem0ai.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "memory-tool": {
            "type": "http",
            "url": "https://mem0-memory-mcp--mem0ai.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http memory-tool https://mem0-memory-mcp--mem0ai.run.tools
```

## When to use it
- persist user preferences across separate agent sessions
- retrieve past facts by meaning rather than exact keyword
- clear all memories for a specific agent or run in one call
- list every active entity that currently holds stored memories
- overwrite a stale fact without touching other records

## Example prompts
- Store that user `alice` prefers dark mode using `add_memory` with `user_id: alice`
- Search memories for agent `support-bot` related to proxy configuration
- Delete all memories for user `bob` and remove the entity entirely with `delete_entities`

## Similar
- [elite-longterm-memory](https://affpapa.org/en/nevibecode/skills/elite-longterm-memory.md) — skill · 2400 installs
- [memory-search](https://affpapa.org/en/nevibecode/skills/ruvnet-memory-search.md) — skill · 751 installs
- [shodh-memory](https://affpapa.org/en/nevibecode/mcp/shodh-memory.md) — MCP server · ★ 322 repo stars
- [hot-memory-mcp](https://affpapa.org/en/nevibecode/mcp/hot-memory-mcp.md) — MCP server · ★ 15 repo stars
- [OMEGA Memory](https://affpapa.org/en/nevibecode/mcp/omega-memory-omega-memory.md) — MCP server · 2862 installs
- [memory-systems](https://affpapa.org/en/nevibecode/skills/sickn33-memory-systems.md) — skill · 1 install

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
