membase
Memory serverOfficial Unibase project
Created by Unibase
Published in unibaseio/membase. Publisher page
139 GitHub stars
What it is
npm workspaces: @unibaseio/membase (typescript/), @unibaseio/membase-cli (cli/) and @unibaseio/membase-ai-sdk (integrations/ai-sdk/).
AutoGineer overview, from the brain’s own files
Membase acts as a centralized memory layer for AI agents, allowing users to store facts, documents, and media in a single location that is accessible across various AI models and tools. By decoupling memory from specific AI providers, it ensures that knowledge is persistent and reusable, preventing the need to re-explain context when switching between different agents or platforms. Membase supports both a hosted service and a local execution mode, providing flexibility for data privacy and integration requirements. It features a robust CLI, Python and TypeScript SDKs, and an MCP server, enabling seamless connectivity with popular AI development environments like Claude Code, Cursor, and various agent frameworks.
How it works
Memory model: SQL database
AutoGineer overview, from the brain’s own files
Membase functions as a memory server that stores information in a structured format. Users can add data such as facts, documents, or media files through the CLI or SDK. This data is then indexed and made available to AI agents via an MCP server or API. The system manages memory isolation through project-specific contexts and supports both cloud-hosted storage and local storage options where the memory resides on the user's machine.
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 1 |
| assets | attachments | 11 |
| docs | docs | 1 |
| scripts | scripts | 3 |
| tests | tests | 8 |
| cli | folder | 9 |
| integrations | folder | 130 |
| membase | folder | 23 |
| typescript | folder | 12 |
Requirements
Runtimes: Node.js, Python >=3.10
Databases: PostgreSQL
API keys (by name): MEMBASE_API_KEY, OPENAI_API_KEY
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)
Set it up
Add membase to .mcp.json:
{ "mcpServers": { "membase": { "type": "http", "url": "https://api.app.membase.com/mcp-http" } } }Or add it with the Claude Code CLI:
claude mcp add --transport http membase https://api.app.membase.com/mcp-httpYour data is sent to api.app.membase.com.
- Not scanned by AutoGineerIts dependencies are installed by pip or uv when you run it and were not scanned by AutoGineer (1 declared). https://pypi.org/project/unibaseio-membase/
Created by Unibase. Published in unibaseio/membase. Licence: MIT License.
Usage
AutoGineer overview, from the brain’s own files
- Integrate Membase into AI agent workflows to provide persistent long-term memory.
- Use the CLI to import chat exports from various platforms into a unified knowledge base.
- Connect AI coding assistants to Membase via MCP to maintain project-specific context.
- Manage and query multi-modal data including text, documents, and media files.
- Utilize the SDK to build custom agent integrations that read and write to the Membase memory layer.
- “membase --local add "The project uses Postgres for the primary database."”
- Stores the fact in the local memory instance for future retrieval by any connected AI agent.
- “membase --local search "What database are we using?"”
- Returns the relevant fact from the local memory store, providing the agent with accurate project context.
Documentation by Unibase
<p align="center"> <img src="https://raw.githubusercontent.com/unibaseio/membase/main/assets/membase-logo.png" width="72" alt="Membase"> </p>
<h1 align="center">Membase</h1>
<p align="center"> <b>One memory. Every AI. Only yours.</b><br> Teach it once. Every AI remembers. </p>
<p align="center"> <a href="https://pypi.org/project/unibaseio-membase/"><img src="https://img.shields.io/pypi/v/unibaseio-membase?label=pypi" alt="PyPI"></a> <a href="https://www.npmjs.com/package/@unibaseio/membase"><img src="https://img.shields.io/npm/v/@unibaseio/membase?label=npm" alt="npm"></a> <a href="https://github.com/unibaseio/membase/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT"></a> </p>
<p align="center"> <a href="https://membase.com">Website</a> · <a href="https://docs.membase.com">Docs</a> · <a href="https://app.membase.com">Web app</a> · <a href="https://discord.gg/nB9EfPGsSf">Discord</a> · <a href="https://x.com/Unibase_AI">X</a> </p>
<p align="center"> <img src="https://raw.githubusercontent.com/unibaseio/membase/main/assets/hero.svg" width="840" alt="Add sources, manage one memory, use it from every AI and app"> </p>
Membase is the memory layer for AI agents. It keeps one memory for everything you and your agents know, and every AI you use reads it. You stop re-explaining yourself each time you switch models or tools.
Add. Facts, documents, web pages and chat exports from Claude or ChatGPT go into one memory.
Manage. Memories keep projects apart; search them, ask them questions, forget what should go.
Use. Your code, Claude Code, Cursor, Codex and ChatGPT read the same memory through the SDK or MCP.
This repository is the developer side: Python and TypeScript clients, the membase command line
and an MCP server. The memory lives in your Membase account, which the
web app and browser extension also fill, or on your machine with
unibaseio-membase[local].
Write once, read from any AI
<p align="center"> <img src="https://raw.githubusercontent.com/unibaseio/membase/main/assets/in-action.svg" width="840" alt="Your app writes a memory; any AI reads it, here Claude Code"> </p>
Recordings: Python SDK (57 s) · Claude Code (1 min 33 s). The answer above is illustrative.
Accuracy
<p align="center"> <img src="https://raw.githubusercontent.com/unibaseio/membase/main/assets/results.svg" width="840" alt="LoCoMo 93.1%, LongMemEval_S 92.6%, DMR 92.2%"> </p>
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: membase.com/research
Quickstart
<p align="center"> <img src="https://raw.githubusercontent.com/unibaseio/membase/main/assets/architecture.svg" width="840" alt="Hosted, local in process, or local over HTTP"> </p>
pip install unibaseio-membase # hosted · Python 3.10+ · needs MEMBASE_API_KEY
pip install 'unibaseio-membase[local]' # local · Python 3.12 or 3.13 · needs OPENAI_API_KEY
pip install 'unibaseio-membase[media]' # local + photos, videos and audio
npm install @unibaseio/membase # TypeScript · Node 18+
npm install -g @unibaseio/membase-cli # the `membase` command (hosted) without Pythonfrom membase import Membase
m = Membase() # hosted
# m = Membase(local=True) # local, in ~/.membase
m.memories.add("We picked Postgres for the ledger service.") # a fact
m.search("what database is the ledger on?") # {"items": [...], "partial": [...]}
m.add("Design notes …", custom_id="design-1") # a document
m.profile_facts.list() # who the user is (Your profile ticked)
m.capabilities() # what this key may do, and the rulesNo call names a Memory: reads cover every Memory the key reaches, and writes land in its write
target (a key that reaches several Memories and has none is refused with WriteTargetRequiredError).
Ids are typed (mem_… a fact, doc_… a document, med_… a photo or video), lists are
{items, has_more, partial}, and a removal without confirm=True raises ConfirmationRequiredError.
Local memory answers the same routes with the same shapes.
Every method, its REST route and MCP tool, and the access it needs: SDK reference.
Upgrading from 0.3: see the changelog.
The Python package is unibaseio-membase (import membase); membase on PyPI is unrelated.
Command line
membase --local add "We picked Postgres for the ledger"
membase --local search "what did we pick for the ledger?"
membase --local memories list
membase --local ask "Which database is the ledger on?"
membase --local import ~/Downloads/claude-export.json # Claude, ChatGPT, markdown or JSON chats
membase --local agent ingest trace.json --agent coder
membase --local agent search "fix flaky deploy" --agent coder
membase --local media add ~/Movies/trip.mp4 # shots, speech and speakers
membase --local media search "someone skiing" # any languageWithout --local (or --store DIR, both before the command) commands use the hosted API; agent,
import and serve need unibaseio-membase[local], and media add and media ask (local only)
need unibaseio-membase[media]: see Media memory. A local store
with several Memories writes where MEMBASE_WRITE_TARGET names.
MCP
<p align="center"> <img src="https://raw.githubusercontent.com/unibaseio/membase/main/assets/mcp.svg" width="840" alt="MCP clients, hosted or local server, same tools"> </p>
claude mcp add membase -- membase --local mcp # local
claude mcp add --transport http membase https://api.app.membase.com/mcp-http \
--header "Authorization: Bearer $MEMBASE_API_KEY" # hostedHosted without the header, the connection signs you in and is read-only. Setup for Claude, ChatGPT, Cursor, Codex and other clients: Connect your AI.
Gemini CLI, as an extension (it signs you in on first use; /mcp auth membase signs in again):
gemini extensions install https://github.com/unibaseio/membaseCline: add the server to cline_mcp_settings.json; llms-install.md has the
entry, with and without a developer key.
Docs
SDK reference: methods, REST routes, MCP tools, access levels
Memory operations: Memories, facts, documents, media, profile, ask
Authentication: keys and what each one can reach
Connect your AI: per-client MCP setup
Agent framework integrations: LangChain, Microsoft Agent Framework, Dify, Hermes Agent, OpenClaw and Strands Agents
Local engine: what it stores,
membase serve, settings
License
MIT; see LICENSE. unibaseio-membase[local] also
installs unibaseio-membase-core, the compiled engine, under its own Unibase license.
server.json
Shown as plain text.
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "com.membase/membase",
"description": "Long-term memory for you and your AIs: search memories, read the profile, add facts and documents.",
"version": "1.0.1",
"websiteUrl": "https://app.membase.com",
"repository": { "url": "https://github.com/unibaseio/membase", "source": "github" },
"remotes": [
{ "type": "streamable-http", "url": "https://api.app.membase.com/mcp-http" }
]
}
210 files · 192 not served here
- .github/workflows/ci.yml (not served here)
- .gitignore (not served here)
- ATTRIBUTION.md
- CHANGELOG.md
- LICENSE
- README.md
- assets/architecture.svg (not served here)
- assets/hero.svg (not served here)
- assets/in-action.svg (not served here)
- assets/mcp.svg (not served here)
- assets/membase-logo-400.png (not served here)
- assets/membase-logo.png (not served here)
- assets/membase-logo.svg (not served here)
- assets/memory-types.svg (not served here)
- assets/results.svg (not served here)
- assets/videos/sdk.mp4 (not served here)
- assets/videos/switch-ai.mp4 (not served here)
- cli/LICENSE
- cli/README.md (not served here)
- cli/package.json (not served here)
- cli/src/cli.ts (not served here)
- cli/src/run.test.ts (not served here)
- cli/src/run.ts (not served here)
- cli/tsconfig.build.json (not served here)
- cli/tsconfig.json (not served here)
- cli/vitest.config.ts (not served here)
- docs/reference.md
- gemini-extension.json
- glama.json (not served here)
- integrations/.gitignore (not served here)
- integrations/README.md (not served here)
- integrations/agent-framework/LICENSE
- integrations/agent-framework/README.md (not served here)
- integrations/agent-framework/examples/live_smoke.py (not served here)
- integrations/agent-framework/pyproject.toml (not served here)
- integrations/agent-framework/src/agent_framework_membase/__init__.py (not served here)
- integrations/agent-framework/src/agent_framework_membase/_common.py (not served here)
- integrations/agent-framework/src/agent_framework_membase/_provider.py (not served here)
- integrations/agent-framework/src/agent_framework_membase/_tools.py (not served here)
- integrations/agent-framework/src/agent_framework_membase/_version.py (not served here)
- integrations/agent-framework/src/agent_framework_membase/py.typed (not served here)
- integrations/agent-framework/tests/conftest.py (not served here)
- integrations/agent-framework/tests/test_provider.py (not served here)
- integrations/agent-framework/tests/test_tools.py (not served here)
- integrations/ai-sdk/LICENSE
- integrations/ai-sdk/README.md (not served here)
- integrations/ai-sdk/package.json (not served here)
- integrations/ai-sdk/src/index.test.ts (not served here)
- integrations/ai-sdk/src/index.ts (not served here)
- integrations/ai-sdk/tsconfig.build.json (not served here)
- integrations/ai-sdk/tsconfig.json (not served here)
- integrations/ai-sdk/vitest.config.ts (not served here)
- integrations/chatgpt/README.md (not served here)
- integrations/chatgpt/plugin/assets/icon.png (not served here)
- integrations/chatgpt/plugin/assets/logo.png (not served here)
- integrations/chatgpt/plugin/mcp.json (not served here)
- integrations/chatgpt/plugin/plugin.json (not served here)
- integrations/chatgpt/plugin/skills/membase-memory/SKILL.md (not served here)
- integrations/dify/.gitignore (not served here)
- integrations/dify/README.md (not served here)
- integrations/dify/examples/live_smoke.py (not served here)
- integrations/dify/plugin/.difyignore (not served here)
- integrations/dify/plugin/PRIVACY.md (not served here)
- integrations/dify/plugin/README.md (not served here)
- integrations/dify/plugin/_assets/icon.svg (not served here)
- integrations/dify/plugin/main.py (not served here)
- integrations/dify/plugin/manifest.yaml (not served here)
- integrations/dify/plugin/membase_dify/__init__.py (not served here)
- integrations/dify/plugin/membase_dify/client.py (not served here)
- integrations/dify/plugin/provider/membase.py (not served here)
- integrations/dify/plugin/provider/membase.yaml (not served here)
- integrations/dify/plugin/requirements.txt (not served here)
- integrations/dify/plugin/tools/get_profile.py (not served here)
- integrations/dify/plugin/tools/get_profile.yaml (not served here)
- integrations/dify/plugin/tools/save_memory.py (not served here)
- integrations/dify/plugin/tools/save_memory.yaml (not served here)
- integrations/dify/plugin/tools/search_memory.py (not served here)
- integrations/dify/plugin/tools/search_memory.yaml (not served here)
- integrations/dify/pyproject.toml (not served here)
- integrations/dify/scripts/precheck.sh (not served here)
- integrations/dify/tests/test_plugin.py (not served here)
- integrations/google-adk/LICENSE
- integrations/google-adk/README.md (not served here)
- integrations/google-adk/examples/membase_agent/__init__.py (not served here)
- integrations/google-adk/examples/membase_agent/agent.py (not served here)
- integrations/google-adk/pyproject.toml (not served here)
- integrations/google-adk/src/membase_google_adk/__init__.py (not served here)
- integrations/google-adk/src/membase_google_adk/memory.py (not served here)
- integrations/google-adk/src/membase_google_adk/py.typed (not served here)
- integrations/google-adk/tests/conftest.py (not served here)
- integrations/google-adk/tests/test_memory.py (not served here)
- integrations/haystack/LICENSE
- integrations/haystack/README.md (not served here)
- integrations/haystack/pyproject.toml (not served here)
- integrations/haystack/src/membase_haystack/__init__.py (not served here)
- integrations/haystack/src/membase_haystack/memory.py (not served here)
- integrations/haystack/src/membase_haystack/py.typed (not served here)
- integrations/haystack/tests/conftest.py (not served here)
- integrations/haystack/tests/test_memory.py (not served here)
- integrations/hermes/.gitignore (not served here)
- integrations/hermes/LICENSE
- integrations/hermes/README.md (not served here)
- integrations/hermes/__init__.py (not served here)
- integrations/hermes/examples/live_smoke.py (not served here)
- integrations/hermes/plugin.yaml (not served here)
- integrations/hermes/pyproject.toml (not served here)
- integrations/hermes/tests/conftest.py (not served here)
- integrations/hermes/tests/test_provider.py (not served here)
- integrations/langchain/LICENSE
- integrations/langchain/README.md (not served here)
- integrations/langchain/examples/live_smoke.py (not served here)
- integrations/langchain/pyproject.toml (not served here)
- integrations/langchain/src/langchain_membase/__init__.py (not served here)
- integrations/langchain/src/langchain_membase/_common.py (not served here)
- integrations/langchain/src/langchain_membase/middleware.py (not served here)
- integrations/langchain/src/langchain_membase/py.typed (not served here)
- integrations/langchain/src/langchain_membase/retrievers.py (not served here)
- integrations/langchain/src/langchain_membase/tools.py (not served here)
- integrations/langchain/tests/__init__.py (not served here)
- integrations/langchain/tests/unit_tests/__init__.py (not served here)
- integrations/langchain/tests/unit_tests/conftest.py (not served here)
- integrations/langchain/tests/unit_tests/test_agent.py (not served here)
- integrations/langchain/tests/unit_tests/test_live_smoke_offline.py (not served here)
- integrations/langchain/tests/unit_tests/test_retriever.py (not served here)
- integrations/langchain/tests/unit_tests/test_standard.py (not served here)
- integrations/langchain/tests/unit_tests/test_tools.py (not served here)
- integrations/openclaw/.gitignore (not served here)
- integrations/openclaw/LICENSE
- integrations/openclaw/README.md (not served here)
- integrations/openclaw/examples/live-smoke.ts (not served here)
- integrations/openclaw/openclaw.plugin.json (not served here)
- integrations/openclaw/package-lock.json (not served here)
- integrations/openclaw/package.json (not served here)
- integrations/openclaw/src/config.ts (not served here)
- integrations/openclaw/src/index.ts (not served here)
- integrations/openclaw/src/membase.ts (not served here)
- integrations/openclaw/src/policy.ts (not served here)
- integrations/openclaw/src/provider.ts (not served here)
- integrations/openclaw/src/tools.ts (not served here)
- integrations/openclaw/test/baseurl.test.ts (not served here)
- integrations/openclaw/test/helpers.ts (not served here)
- integrations/openclaw/test/loader.test.ts (not served here)
- integrations/openclaw/test/plugin.test.ts (not served here)
- integrations/openclaw/test/provider.test.ts (not served here)
- integrations/openclaw/test/recall.test.ts (not served here)
- integrations/openclaw/tsconfig.json (not served here)
- integrations/openclaw/tsconfig.test.json (not served here)
- integrations/openclaw/vitest.config.ts (not served here)
- integrations/strands/.gitignore (not served here)
- integrations/strands/LICENSE
- integrations/strands/README.md (not served here)
- integrations/strands/catalog/membase-strands.yaml (not served here)
- integrations/strands/examples/live_smoke.py (not served here)
- integrations/strands/pyproject.toml (not served here)
- integrations/strands/src/membase_strands/__init__.py (not served here)
- integrations/strands/src/membase_strands/py.typed (not served here)
- integrations/strands/src/membase_strands/store.py (not served here)
- integrations/strands/tests/conftest.py (not served here)
- integrations/strands/tests/test_store.py (not served here)
- llms-install.md
- membase/__init__.py (not served here)
- membase/__main__.py (not served here)
- membase/_version.py (not served here)
- membase/cli.py (not served here)
- membase/client.py (not served here)
- membase/errors.py (not served here)
- membase/local/__init__.py (not served here)
- membase/local/backend.py (not served here)
- membase/local/ids.py (not served here)
- membase/local/routes.py (not served here)
- membase/local/server.py (not served here)
- membase/mcp/__init__.py (not served here)
- membase/mcp/automem.py (not served here)
- membase/mcp/automem_tools.py (not served here)
- membase/media/__init__.py (not served here)
- membase/media/cli.py (not served here)
- membase/media/client.py (not served here)
- membase/media/local.py (not served here)
- membase/media/mcp.py (not served here)
- membase/media/requirements.py (not served here)
- membase/media/routes.py (not served here)
- membase/py.typed (not served here)
- membase/requirements.py (not served here)
- package-lock.json (not served here)
- package.json (not served here)
- pyproject.toml (not served here)
- scripts/figures.py (not served here)
- scripts/make_alias_packages.py (not served here)
- scripts/seed_reviewer_account.py (not served here)
- server.json
- tests/test_automem.py (not served here)
- tests/test_cli_local.py (not served here)
- tests/test_client.py (not served here)
- tests/test_local.py (not served here)
- tests/test_mcp.py (not served here)
- tests/test_media.py (not served here)
- tests/test_requirements.py (not served here)
- tests/test_typescript.py (not served here)
- typescript/LICENSE
- typescript/README.md (not served here)
- typescript/package.json (not served here)
- typescript/src/client.test.ts (not served here)
- typescript/src/client.ts (not served here)
- typescript/src/e2e.test.ts (not served here)
- typescript/src/errors.ts (not served here)
- typescript/src/index.ts (not served here)
- typescript/src/local.test.ts (not served here)
- typescript/tsconfig.build.json (not served here)
- typescript/tsconfig.json (not served here)
- typescript/vitest.config.ts (not served here)
Advantages
- Provides a unified memory source that works across different AI models and tools, eliminating redundant context setup. evidence: README.md
- Supports both hosted and local-first deployment options to accommodate different privacy and infrastructure needs. evidence: README.md
Limitations
- Local memory features require specific Python versions (3.12 or 3.13) and additional dependencies. evidence: pyproject.toml
- Operations involving multiple memories require an explicit write target to be defined to avoid errors. evidence: README.md
Security
Risk level: No risk found
This brain runs
MCP servers (1)
gemini-extension.json(membase):https://api.app.membase.com/mcp-http· uses the network
Attribution and licence
- Created by
- Unibase
- Declared authors
- Unibase (declared in pyproject.toml)
- Publisher
- Unibase (Official Unibase project)
- Source
- unibaseio/membase · commit 5910023
- Licence
- MIT License (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Unibase.
Install from source
192 of its files are not served here, so there is no ZIP. unibaseio/membase at 5910023