add_memory
Store user preferences, facts, or conversation snippets in the Mem0 MCP Server to maintain consistent programming practices and context across sessions.
Instructions
Store a new preference, fact, or conversation snippet. Requires at least one: user_id, agent_id, or run_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Plain sentence summarizing what to store. Required even if `messages` is provided. | |
| messages | No | Structured conversation history with `role`/`content`. Use when you have multiple turns. | |
| user_id | No | Override the default user scope for this write. | |
| agent_id | No | Optional agent identifier. | |
| app_id | No | Optional app identifier. | |
| run_id | No | Optional run identifier. | |
| metadata | No | Attach arbitrary metadata JSON to the memory. | |
| enable_graph | No | Set true only if the caller explicitly wants Mem0 graph memory. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |