MemOS MCP server
Commit Nov 11, 2026Provides a local-first, persistent SQLite-based memory layer for AI agents to store and recall information across sessions.
Also known as Markgatcha/memos
- Stars
- 10
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 11, 2026
- License
- MIT
What is MemOS MCP?
MemOS provides a local-first, persistent SQLite-based memory layer for AI agents to store and recall information across sessions.
Summary generated from the project's README
About MemOS MCP server
MemOS provides a local-first memory layer designed for AI agents to maintain persistent information across different sessions. It functions as a single SQLite database file stored on your own hardware, ensuring that your data remains under your control without requiring cloud services or external API keys. This setup is ideal for developers using tools like Claude Code, Cursor, Codex, or various MCP clients that need to recall specific details after a restart.
The system uses a hybrid retrieval method combining SQLite FTS5 with embeddings to find relevant information. It supports advanced memory features such as typed graph edges, temporal validity for time-sensitive data, and trust scores to manage information provenance. Developers can interact with the memory through a TypeScript SDK, a command line interface, or as an MCP server via stdio and Streamable HTTP. It is built to be portable, allowing you to back up, encrypt, or export your memory as JSON, Markdown, or Obsidian files.
What you can do with it
- 1Maintain long-term agent memoryGive your coding assistant a way to remember user preferences and project details between restarts.
- 2Manage complex information relationshipsUse graph-based memory to track how different pieces of information relate, contradict, or support one another.
- 3Automate configuration for AI toolsQuickly set up the necessary MCP configurations for specific development environments.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablemarkgatcha/memos is public and reachablegithub.com/markgatcha/memos ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-11github.com/markgatcha/memos ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubStart here
npx -y @mem-os/sdk store "Prefers pnpm over npm" --db ./memos.db # store
npx -y @mem-os/sdk search "package manager" --db ./memos.db # recall
import { MemOS } from "@mem-os/sdk";
const memos = new MemOS(); // one SQLite file, zero config
await memos.store("Prefers pnpm over npm");
const hits = await memos.search("package manager");
Works with Claude Code · Cursor · Codex · Gemini CLI · Hermes · OpenClaw · Cline · Zed · Goose · Kilo · Ollama · LangChain · CrewAI · any MCP client. memos connect <harness> writes the config for you — see the harness matrix.
Why it is different: the memory is a single SQLite file on your disk (export it, back it up, delete it) · no network calls required · typed graph edges, temporal validity, trust scores, and provenance · MIT, no paid tier.
Reproducible retrieval
| Benchmark | Result |
|---|---|
| LongMemEval-S, full 500 | 99.4% Hit@20 · 98.3% evidence recall · 96.4% all-evidence@20 |
| ConvoMem, 387 scored | 91.0% Hit@10 · 89.4% evidence recall@10 |
| LoCoMo, full 1,986 | 65.0% Hit@10 · 59.8% evidence recall@10 |
Evidence-ID scored, no LLM judge. The LoCoMo conversations 0–1 subset (304 questions) reaches 79.8% Hit@10; the full-set number is the headline. Canonical source: website/data/benchmarks.json, generated from the raw artifacts in docs/artifacts/. Commands and caveats: benchmarks/README.md.
New here? Ingest your notes in 60 seconds — install, point at a folder, search it.
Installing? Agent-readable install contract · Harness matrix · MCP compatibility policy · per-harness snippets
Contributing? Good first issues · CONTRIBUTING.md · open benchmark leaderboard
Install
# TypeScript / Node.js
npm install @mem-os/sdk
# or run it without installing
npx -y @mem-os/sdk init --yes
# Python HTTP server
pip install mem-os-python
memos-server # http://localhost:7400
The npm package tracks tagged releases and can briefly lag main. The GitHub source is the canonical, always-current build (v1.6.27). For the latest source build, see Installation.
Connect a harness
npx -y @mem-os/sdk connect claude-code --write
npx -y @mem-os/sdk connect cursor --write
npx -y @mem-os/sdk connect codex --write
connect writes the real MCP config, keeps a backup, and prints the restart step. For every supported harness, see the harness matrix.
What you get
| Capability | What it means |
|---|---|
| One file you own | A single SQLite database; copy it, back it up, encrypt it, delete it |
| Hybrid retrieval | SQLite FTS5 + embeddings, fused and relevance-gated |
| Graph memory | Typed edges: relates_to, contradicts, supports, derived_from, temporal_precedes |
| Temporal validity | validFrom / validTo and point-in-time search |
| Trust and provenance | Source, trust score, version timeline, quarantine queue |
| Context packs | Token-budgeted memory bundles with citations |
| Consolidation | Dedupe, archive, summarize clusters, decay stale memories without losing history |
| MCP native | stdio and Streamable HTTP, with a published compatibility policy |
| Four surfaces | TypeScript SDK, CLI, MCP server, HTTP API — all on the same store |
| Adapters | OpenAI, Anthropic, Vercel, LangChain, CrewAI, Ollama |
| Portability | Import ChatGPT/Claude memory, export JSON/Markdown/Obsidian, backup/restore |
| Image memory | Captions plus optional CLIP pixel search |
Documentation
| I want to… | Read |
|---|---|
| Install in five minutes | Installation |
| Point it at my notes | Ingest your notes |
| Connect my coding agent | Harness matrix |
| Understand nodes, trust, time, packs | Memory model |
| Look up a command, tool, or route | CLI · MCP tools · HTTP API |
| Operate a store | Security model · Operations |
| See benchmark details | Results in plain English |
| Understand the architecture | ARCHITECTURE.md |
| See what is planned | ROADMAP.md |
Benchmarks
Retrieval-only, evidence-ID scored, no reader model and no LLM judge:
| Benchmark | Result |
|---|---|
| LongMemEval-S, full 500 | 99.4% Hit@20 · 96.4% all-evidence@20 |
| ConvoMem, 387 scored | 91.0% Hit@10 · 89.4% evidence recall@10 |
| LoCoMo, full 1,986 | 65.0% Hit@10 · 59.8% evidence recall@10 |
End-to-end is reported separately: 78% on a 50-question LongMemEval-S sample, self-judged with the same model. It is not comparable to vendor numbers produced with a gpt-4o judge.
The full methodology, per-category breakdowns, and the reproducible leaderboard live in Benchmark Results and benchmarks/README.md. Raw artifacts are committed under docs/artifacts/.
Part of the AI Trio
| Project | Role |
|---|---|
| universal-mcp-toolkit | MCP transport, server registry, and tool routing |
| memos | Graph-based persistent memory across sessions |
| llm-guardian | Token folding, budgets, and provider proxies |
Each project works standalone. The integrations are optional: umt link memos exposes this store as an MCP server, and Guardian can inject a MemOS context pack when MEMOS_NAMESPACE is set. Nothing here requires the other two.
Contributing
License
MIT — use it anywhere, for any purpose, no attribution required.
MemOS MCP questions
How is the memory stored?
The memory is stored in a single SQLite file on your local disk, allowing you to back it up, export it, or delete it easily.
Can I use this with Claude Code or Cursor?
Yes, it is compatible with many AI clients including Claude Code, Cursor, Codex, and others via the connect command.