
Membase vs Mem0: Which Memory Layer Should You Use in 2026?
Disclosure: Membase is our product. We wrote this comparison to be useful to developers choosing between the two, so we say plainly where Mem0 is the better fit. Mem0’s features, pricing and compliance were checked on its pricing page, docs and comparison pages in October 2026; see “How we compared” at the end.
Quick links: Get a free Membase API key · Python SDK · MCP server · Docs · GitHub
TL;DR
Both are hosted memory APIs for AI agents with Python and TypeScript SDKs, a REST API and a hosted MCP server. They differ in whose memory it is:
- Mem0 gives your application memory about its users. One API key reaches every user, and you scope memory with user_id, agent_id and run_id. It's open source (Apache 2.0), production-proven, and lists SOC 2 Type 1 and HIPAA.
- Membase gives one memory to your agents and the AI tools around them: Claude Code, Cursor, Codex and ChatGPT read and write the same memory as your code. Each memory has its own scoped keys, and every search result comes back with its source. Free in beta.
Choose Mem0 for a multi-tenant SaaS app that needs per-user memory behind one key, a self-hosted open-source stack, or compliance paperwork today.
Choose Membase when several agents and your team’s AI tools should share one memory, with separate access for each, and answers you can trace back to a source.

Membase vs Mem0 at a glance
| Membase | Mem0 | |
|---|---|---|
| Best for | One memory shared by your agents and your AI tools | Per-user memory inside a multi-tenant app |
| What gets stored | Documents and notes, learned into timestamped episodes and topic trees, each tied to its source | Facts extracted from messages, linked by shared entities |
| How memory is scoped | Per account; a “container” is a topic, such as Project decisions | user_id, agent_id, run_id, plus app_id and projects on Platform |
| Access control | Keys per memory: level (Read, Read & write, Full) and reach (which memories); OAuth consent for MCP apps | API keys per project; org and project roles on Platform |
| Changing facts | Episodes keep who said what and when; no automatic overwrite | Dream: newer facts supersede older ones, duplicates merged (all Platform plans) |
| Graph | No entity graph | Entity linking (“graph memory”) on Platform |
| MCP | Hosted: api.app.membase.com/mcp-http; local: membase --local mcp | Hosted: mcp.mem0.ai/mcp |
| AI apps it connects to | Claude Code, Cursor, Codex, ChatGPT, Claude, Grok; Chrome extension for 6 chat apps | Claude, Claude Code, Codex, Cursor, Windsurf, VS Code, OpenCode |
| Self-hosting | Local mode (unibaseio-membase[local]); compiled engine | Open-source SDK and server (Docker) |
| License | Proprietary; SDKs, CLI and MCP server are public | Apache 2.0 open source; Platform is managed |
| Pricing | Free in beta · Paid plans coming soon | Free (10K adds, 1K retrievals/mo) · $19 · $249 · Enterprise |
| Compliance | Beta; no published certifications yet | SOC 2 (Type 1), HIPAA, per Mem0 |
| Maturity | Beta, launched 2026 | Most widely used memory layer; ~62K GitHub stars |
What each one is
Mem0 is the most widely adopted memory layer for AI agents. You send conversation turns to add, Mem0 extracts durable facts ("User prefers aisle seats"), and you call search before the next model call. It comes as an open-source library you host, and as Mem0 Platform, a managed API with a dashboard, graph memory, webhooks and memory consolidation.
Membase, built by Unibase, is a hosted memory layer that your code and your AI tools share. You add facts, documents, web pages or chat exports to a memory (a “container”); a learning run turns them into timestamped episodes and topic trees. Your agents reach it through the SDK or REST, and Claude Code, Cursor, Codex and ChatGPT reach the same memory through MCP.
6 differences that decide the choice
1. Whose memory it is: your app’s users, or you and your agents
This is the biggest difference, and it decides most cases.
Mem0 is built for an application that serves many end users. One API key reaches all of them, and each call carries a user_id (and optionally agent_id, run_id, app_id). Your app owns the memory about its users.
Membase treats the account as the tenant. A container is a topic, not an end user. If your product serves many people, each person connects their own Membase account, by OAuth consent over MCP or with their own key. There are no app-wide keys reaching every user’s memory, and no user-ID tags.
What that means for you: if you’re building a consumer or SaaS app with thousands of end users behind your backend, Mem0’s user_id model fits better today. If you're building agents for yourself or your team, or a product where users bring and own their memory, Membase fits better.
2. Who can read the memory: one app, or your agents and your AI tools
Mem0 memory lives inside your application. Its hosted MCP server lets an AI client such as Claude Code use your Mem0 memory, which is useful for a developer’s own coding memory.
Membase is designed for one memory read from many places. Your support agent writes call notes through the SDK; Claude Code answers from the same notes over MCP; a teammate searches them from ChatGPT or Claude. The Chrome extension also saves context from ChatGPT, Claude, Gemini, Grok, DeepSeek and Kimi into it.
Access is per memory. Each developer key has a level (Read, Read & write, or Full) and a reach (which memories it can see), plus an expiry. Apps that connect over MCP get read-only access to the memories the owner approves. Revoke one agent without touching the others. Deleting or forgetting needs a Full-access key and an explicit confirm=true.
3. How memory is built and kept current
Mem0 extracts facts from messages with an LLM, deduplicates them and links memories that mention the same entities (people, places, projects). The extraction step is add-only, so it never silently rewrites an old fact. On Mem0 Platform, a background layer called Dream then marks an older fact as outdated when a newer one contradicts it and merges duplicates, on all plans; Pro adds Synthesis, which distills patterns (“this user is an early riser”). The open-source library stays additive: you call update or delete yourself.
Membase reads what you add (notes, documents, chat exports) and narrates it into timestamped episodes that keep who said what, and when, together. Episodes are organized into topic trees inside each container. Membase doesn’t keep an entity graph and doesn’t overwrite older facts automatically; instead, because each episode carries its time and source, the newest statement and its context come back together at search time.
What that means for you: if your app needs “the current truth about this user” maintained for it, Mem0 Platform’s Dream does that out of the box. If your agents need to show where a memory came from, Membase returns the source with every result.
4. Search and retrieval
Mem0 combines semantic (vector), keyword (BM25) and entity scores into one ranked list, and supports rich filters (AND/OR/NOT over user, agent, run, metadata) plus temporal ranking on Platform.
Membase fuses keyword and vector search, then a retrieval step reads the first hits and asks follow-up queries (up to three rounds) before settling. Every result carries the container it came from and its source document. Search takes a query, an optional container and a limit; metadata filters aren’t supported, so put constraints into the query or split memories into containers.
5. MCP and AI tools
Both run a hosted MCP server with OAuth sign-in or an API key as a bearer token.
| Membase MCP | Mem0 MCP | |
|---|---|---|
| Endpoint | https://api.app.membase.com/mcp-http | https://mcp.mem0.ai/mcp |
| Local option | membase --local mcp | Use the OSS library instead |
| Tools | Search, add memories and documents, list containers and documents, read the profile, forget, delete | Add, search, get, update and delete memories; list entities and events |
| Scoped by | Which memories the key or consent reaches | User, agent, app or run filters |
| Apps connected by consent | Read-only | Full tool set after sign-in |
Add Membase to Claude Code in one line:
claude mcp add --transport http membase https://api.app.membase.com/mcp-http \
--header "Authorization: Bearer $MEMBASE_API_KEY"
Watch it in under two minutes: Give Claude Code permanent memory with Membase (MCP).
6. Self-hosting, license and maturity
Mem0 is open source under Apache 2.0, with a Docker setup for a self-hosted REST server. You pick the vector store and model. Some features (graph memory, Dream, webhooks, the dashboard) are Platform-only. It’s the most established option, with about 62K GitHub stars, and lists SOC 2 Type 1 and HIPAA on its managed platform.
Membase has a local mode: pip install 'unibaseio-membase[local]' runs memory on your machine with OpenAI, Anthropic, Ollama or any OpenAI-compatible model. The engine it installs is compiled and proprietary; the SDKs, CLI and MCP server are public. Membase is in beta, so expect the API to change, and it doesn't publish compliance certifications yet.
The same task in both: add a fact, then search it
Mem0 Platform
from mem0 import MemoryClient
client = MemoryClient(api_key="...")
client.add([{"role": "user", "content": "We picked Postgres for the ledger service."}],
user_id="alice")
client.search("what database is the ledger on?", filters={"user_id": "alice"})
Membase
from membase import Membase
m = Membase() # reads MEMBASE_API_KEY
m.memories.add("We picked Postgres for the ledger service.", container="Engineering")
m.search("what database is the ledger on?")
The shape is the same. The difference is the scope argument: Mem0 asks which user, Membase asks which memory.
Pricing
Mem0 (pricing):
| Plan | Price | Adds / month | Retrievals / month | Notes |
|---|---|---|---|---|
| Hobby | Free | 10,000 | 1,000 | 1 project |
| Starter | $19/mo | 50,000 | 5,000 | 1 project |
| Pro | $249/mo | 500,000 | 50,000 | Graph memory, Dream Synthesis, unlimited projects |
| Enterprise | Custom | Unlimited | Unlimited | On-prem, SSO, audit logs, SLA |
Retrievals run out first when several agents share a project: ten agents doing 20 lookups a day use about 6,000 a month, past the Starter quota.
Membase: Free in beta · Paid plans coming soon. The free plan includes a chat-turn allowance for the built-in assistant; when it’s used up, your memories stay and you can connect your own model key.
Benchmarks
Both publish benchmark results on LoCoMo and LongMemEval. Membase’s core engine reports 93.1% on LoCoMo, 92.6% on LongMemEval_S and 92.2% on DMR, using about 3× fewer tokens than the full history on LoCoMo and 11× fewer on LongMemEval_S (method and results). Mem0 publishes its own results and token counts on its comparison pages.
We don’t put the two side by side: each vendor runs its own setup, with different reader models, judges and LongMemEval variants, so the numbers aren’t comparable. Run both on a sample of your own conversations before you decide.
Which should you choose?
- SaaS or consumer app, thousands of end users behind one backend → Mem0
- You need SOC 2 or HIPAA documentation now → Mem0
- You want to self-host open-source code you can read and change → Mem0 (OSS)
- You want “current truth per user” maintained automatically → Mem0 Platform (Dream)
- Several agents share one memory, each with its own scoped key → Membase
- Claude Code, Cursor, Codex and ChatGPT should read the same memory as your code → Membase
- Answers must show which document they came from → Membase
- Your users should own their memory and grant access per app → Membase
- You want to start free with no request quotas while you build → Membase (beta)
Using both is reasonable too: Mem0 for per-user memory inside your product, Membase for your team’s own working memory across agents and AI tools.
Moving from Mem0 to Membase
| Mem0 | Membase |
|---|---|
| user_id | One Membase account per user, connected by MCP consent or their own key |
| agent_id / run_id | A container, such as Acme pilot |
| add(messages, user_id=…) | add(text, container=…, custom_id=…) |
| search(q, filters=…) | search(q, container=…, limit=…) |
- Export your memories from Mem0 (for example with get_all or a memory export job).
- Write each one into the matching container, with the Mem0 memory ID as custom_id, so re-running the import never creates duplicates.
- Keep timestamps: put the original date in the text when it matters.
- Point your agents’ SDK calls and MCP config at Membase.
- Keep Mem0 read access until you’ve compared answers on your own test questions.
Full walkthrough with code: How to Add Long-Term Memory to an AI Agent.
Start building with Membase
- Get an API key: Membase web app → Connect › Developer keys
- Python SDK: pip install unibaseio-membase · PyPI
- TypeScript SDK: npm install @unibaseio/membase · npm
- MCP server: setup guide · https://api.app.membase.com/mcp-http
- Videos: Add memory with the Membase SDK · Give Claude Code permanent memory (MCP)
- Docs: docs.membase.com · Help: Discord
How we compared
We read Mem0’s pricing page, documentation (How Mem0 Works, Platform vs Open Source, Graph Memory, Dream, MCP) and its comparison page in October 2026, and Membase’s docs and SDK. Benchmark figures are as each vendor published them; we did not re-run Mem0’s. Membase is our product. Spot an error? Email support@membase.com and we’ll fix it.
Sources
- Mem0 pricing
- How Mem0 works
- Mem0 Platform vs Open Source
- Mem0 Dream and Graph Memory
- Mem0 MCP
- Mem0 vs Hindsight (compliance and benchmarks as published by Mem0)
- Membase docs: memory operations, multi-user isolation, authentication
- Membase research and the Membase SDK on GitHub