Mem0 Cloud
A hosted agent-memory API shaped like mem0's REST API (an alternative to running mem0 yourself):...
我该使用它吗
质量与安全性
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"mem0-cloud": {
"url": "https://mem0-cloud.saastemly.com/mcp"
}
}
}远程端点
https://mem0-cloud.saastemly.com/mcpstreamable-http它能做什么
工具清单
工具(4)
🟡add_memory(memory_key, messages, user_id, agent_id, app_id, ...)
Store memories from a conversation, like mem0's add: an AI model extracts durable facts about the user from the messages (or, with infer=false, stores each message as is), embeds them and saves them privately under your memory_key (a secret string you generate; required). Identical facts are stored once. Needs at least one of user_id, agent_id, app_id, run_id. Memories are kept for 365 days. Returns {event_id, status, results:[{id, memory, event: ADD|NONE}]}. Price: $0.008 a call (3 free calls a day without an API key).
输入模式
{
"type": "object",
"properties": {
"memory_key": {
"type": "string",
"description": "Your secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable."
},
"messages": {
"type": "array",
"description": "Conversation turns, each {role: user|assistant|system, content: string}; up to 6000 bytes as JSON. A plain string is also accepted (one user message).",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"description": "user, assistant or system"
},
"content": {
"type": "string",
"description": "The message text"
}
}
}
},
"user_id": {
"type": "string",
"description": "Entity: the user the memories are about (1-128 characters)"
},
"agent_id": {
"type": "string",
"description": "Entity: the agent the memories belong to (1-128 characters)"
},
"app_id": {
"type": "string",
"description": "Entity: the app (1-128 characters)"
},
"run_id": {
"type": "string",
"description": "Entity: the session or run (1-128 characters)"
},
"metadata": {
"type": "object",
"description": "Custom key/value metadata stored with every memory (up to 2000 bytes as JSON)"
},
"infer": {
"type": "boolean",
"description": "Default true: extract facts with the model. false: store each message verbatim (up to 10 messages of 300 characters)"
},
"expiration_date": {
"type": "string",
"description": "Optional YYYY-MM-DD: the memory is hidden from search and listing after that day (unless show_expired is true)"
},
"custom_instructions": {
"type": "string",
"description": "Optional extra extraction instructions (with includes and excludes, up to 800 bytes together)"
},
"includes": {
"type": "string",
"description": "Optional: what to focus on when extracting"
},
"excludes": {
"type": "string",
"description": "Optional: what not to extract"
}
},
"required": [
"memory_key",
"messages"
]
}🟢search_memories(memory_key, query, filters, top_k, threshold, ...)
Search your stored memories by meaning, like mem0's search: embeds the query and returns the closest memories with a relevance score from 0 to 1. Only memories stored under the same memory_key (your secret string; required) are searched. filters must name at least one of user_id, agent_id, app_id, run_id. Returns {results:[{id, memory, score, metadata, ...}]}. Price: $0.004 a call (3 free calls a day without an API key).
输入模式
{
"type": "object",
"properties": {
"memory_key": {
"type": "string",
"description": "Your secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable."
},
"query": {
"type": "string",
"description": "What to look for, in natural language (up to 500 characters)"
},
"filters": {
"type": "object",
"description": "mem0 filters: at least one of user_id, agent_id, app_id, run_id, each a string, \"*\" or {\"in\": [up to 20 strings]}; AND lists of those. OR and NOT are not supported."
},
"top_k": {
"type": "integer",
"description": "How many memories to return, 1-100 (default 10)"
},
"threshold": {
"type": "number",
"description": "Minimum relevance score, 0-1 (default 0.1; 0 disables)"
},
"show_expired": {
"type": "boolean",
"description": "Include memories whose expiration_date has passed (default false)"
}
},
"required": [
"memory_key",
"query",
"filters"
]
}🟢get_memories(memory_key, memory_id, user_id, agent_id, app_id, ...)
Read your stored memories, like mem0's get memory and get all memories. With memory_id: returns that one memory (404 if it is not yours). Without it: returns a page {count, next, previous, results} of the memories matching user_id, agent_id, app_id or run_id (at least one; "*" matches any value), newest first. Requires your memory_key (a secret string you generate): a different key sees nothing. Price: $0.002 a call (3 free calls a day without an API key).
输入模式
{
"type": "object",
"properties": {
"memory_key": {
"type": "string",
"description": "Your secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable."
},
"memory_id": {
"type": "string",
"description": "UUID of one memory to fetch; leave out to list memories instead"
},
"user_id": {
"type": "string",
"description": "Entity: the user the memories are about (1-128 characters)"
},
"agent_id": {
"type": "string",
"description": "Entity: the agent the memories belong to (1-128 characters)"
},
"app_id": {
"type": "string",
"description": "Entity: the app (1-128 characters)"
},
"run_id": {
"type": "string",
"description": "Entity: the session or run (1-128 characters)"
},
"page": {
"type": "integer",
"description": "Page number, from 1 (default 1)"
},
"page_size": {
"type": "integer",
"description": "Memories per page, 1-100 (default 50)"
},
"show_expired": {
"type": "boolean",
"description": "Include memories whose expiration_date has passed (default false)"
}
},
"required": [
"memory_key"
]
}🔴delete_memories(memory_key, memory_id, user_id, agent_id, app_id, ...)
Delete your stored memories, like mem0's delete memory and delete all memories. With memory_id: deletes that one memory (404 if it is not yours). Without it: deletes up to 200 of your memories matching user_id, agent_id, app_id or run_id (at least one), and says if more remain. Requires your memory_key (a secret string you generate): other keys cannot delete your memories. Price: $0.002 a call (3 free calls a day without an API key).
输入模式
{
"type": "object",
"properties": {
"memory_key": {
"type": "string",
"description": "Your secret: a random string of 16-256 characters that you generate once and keep (also accepted as the X-Memory-Key header). Memories are stored and searched only under its hash, so nobody who lacks it can read them, whatever user_id they send. Lose it and the memories are unreachable."
},
"memory_id": {
"type": "string",
"description": "UUID of one memory to delete; leave out to delete by entity instead"
},
"user_id": {
"type": "string",
"description": "Entity: the user the memories are about (1-128 characters)"
},
"agent_id": {
"type": "string",
"description": "Entity: the agent the memories belong to (1-128 characters)"
},
"app_id": {
"type": "string",
"description": "Entity: the app (1-128 characters)"
},
"run_id": {
"type": "string",
"description": "Entity: the session or run (1-128 characters)"
}
},
"required": [
"memory_key"
]
}社区
证据