---
canonical_url: "https://docs.composio.dev/toolkits/mem0_mcp"
markdown_url: "https://docs.composio.dev/toolkits/mem0_mcp.md"
product: "platform"
version: null
last_updated: null
---

# Mem0 MCP

Add, search, list, update and delete long-term memories for users, agents and runs, list memory entities and track memory events through Mem0's hosted MCP server.

- **Category:** model context protocol
- **Auth:** DCR_OAUTH
- **Composio-managed OAuth available?** No
- **Tools:** 11
- **Triggers:** 0
- **Slug:** `MEM0_MCP`
- **Version:** 00000000_00

## Tools

### Add memory

**Slug:** `MEM0_MCP_ADD_MEMORY`

Store a new preference, fact, or conversation snippet. Requires at least one: user_id, agent_id, or run_id. Returns an event_id for async polling via get_event_status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | No | Plain sentence summarizing what to store. Provide this or `messages`. |
| `infer` | string | No | Extract structured memories via LLM (default true). Set false to store raw text without extraction. |
| `app_id` | string | No | Optional app identifier. |
| `run_id` | string | No | Optional run identifier. |
| `user_id` | string | No | Override the default user scope for this write. |
| `agent_id` | string | No | Optional agent identifier. |
| `messages` | string | No | Structured conversation history with `role`/`content`. Use when you have multiple turns. |
| `metadata` | string | No | Attach arbitrary metadata JSON to the memory. |

### Delete all memories

**Slug:** `MEM0_MCP_DELETE_ALL_MEMORIES`

Delete every memory in the given user/agent/app/run but keep the entity.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | No | Optional app scope to delete. |
| `run_id` | string | No | Optional run scope to delete. |
| `user_id` | string | No | User scope to delete; defaults to server user. |
| `agent_id` | string | No | Optional agent scope to delete. |

### Delete entities

**Slug:** `MEM0_MCP_DELETE_ENTITIES`

Remove an entity and cascade-delete its memories.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | No | Delete this app and its memories. |
| `run_id` | string | No | Delete this run and its memories. |
| `user_id` | string | No | Delete this user and its memories. |
| `agent_id` | string | No | Delete this agent and its memories. |

### Delete memory

**Slug:** `MEM0_MCP_DELETE_MEMORY`

Delete one memory after the user confirms its memory_id.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `memory_id` | string | Yes | Exact memory_id to delete. |

### Get event status

**Slug:** `MEM0_MCP_GET_EVENT_STATUS`

Check the status of a specific memory operation event by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_id` | string | Yes | UUID of the event to check. |

### Get memories

**Slug:** `MEM0_MCP_GET_MEMORIES`

Page through memories using filters instead of search.

        Use filters to list specific memories. Common filter patterns:
        - Single user: {"AND": [{"user_id": "john"}]}
        - Agent memories: {"AND": [{"agent_id": "agent_name"}]}

        Pagination: Use page (1-indexed) and page_size for browsing results.
        user_id is automatically added to filters if not provided.
        

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | string | No | 1-indexed page number when paginating. |
| `filters` | string | No | Structured filters; user_id injected automatically. |
| `page_size` | string | No | Number of memories per page (default 10). |

### Get memory

**Slug:** `MEM0_MCP_GET_MEMORY`

Fetch a single memory by ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `memory_id` | string | Yes | Exact memory_id to fetch. |

### List entities

**Slug:** `MEM0_MCP_LIST_ENTITIES`

List which users/agents/apps/runs currently hold memories.

### List events

**Slug:** `MEM0_MCP_LIST_EVENTS`

List memory operation events with optional filters and pagination.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | string | No | 1-indexed page number. |
| `page_size` | string | No | Events per page (default 50, max 100). |
| `event_type` | string | No | Filter by type: ADD, SEARCH, UPDATE, DELETE, GET_ALL, DELETE_ALL. |

### Search memories

**Slug:** `MEM0_MCP_SEARCH_MEMORIES`

Run a semantic search over existing memories.

        Use filters to narrow results. Common filter patterns:
        - Single user: {"AND": [{"user_id": "john"}]}
        - Agent memories: {"AND": [{"agent_id": "agent_name"}]}
        - Recent memories: {"AND": [{"user_id": "john"}, {"created_at": {"gte": "2024-01-01"}}]}

        user_id is automatically added to filters if not provided.
        

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | Natural language description of what to find. |
| `top_k` | string | No | Number of results to return (1-1000, default 10). |
| `rerank` | string | No | Re-rank results for better relevance (adds 200-400ms latency). Default false. |
| `filters` | string | No | Additional filter clauses (user_id injected automatically). |
| `threshold` | string | No | Minimum similarity score (0.0-1.0). Default 0.1; pass 0.0 to disable filtering. |

### Update memory

**Slug:** `MEM0_MCP_UPDATE_MEMORY`

Update an existing memory's text and/or metadata.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `text` | string | No | Replacement text for the memory. |
| `metadata` | string | No | Metadata to merge into the memory. |
| `memory_id` | string | Yes | Exact memory_id to update. |
