Server data from the Official MCP Registry
Local-first, source-traceable agent memory — no LLM at ingest, fully offline
Local-first, source-traceable agent memory — no LLM at ingest, fully offline
Valid MCP server (1 strong, 3 medium validity signals). No known CVEs in dependencies. ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
8 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: MIDAS_MCP_DB
Environment variable: MIDAS_MCP_EMBEDDER
Environment variable: MIDAS_MCP_MAX_RECORDS
Environment variable: MIDAS_MCP_MIN_IMPORTANCE
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-vornicx-midas": {
"env": {
"MIDAS_MCP_DB": "your-midas-mcp-db-here",
"MIDAS_MCP_EMBEDDER": "your-midas-mcp-embedder-here",
"MIDAS_MCP_MAX_RECORDS": "your-midas-mcp-max-records-here",
"MIDAS_MCP_MIN_IMPORTANCE": "your-midas-mcp-min-importance-here"
},
"args": [
"midas-memory-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
Local-first, eval-first memory for long-horizon AI agents — no LLM at ingest.
Midas is a small Python SDK (and an MCP server) that gives AI agents durable memory across long, multi-session work — coding agents, research agents, assistants — without sending every turn through an LLM to "extract" facts. It runs on your machine, costs nothing per message, and every recalled memory is traceable to its source.
Status: early. The API may change. Built narrow and measured-first.
Your AI assistant forgets everything between sessions — every new chat starts from zero. Midas is a memory that lives next to your AI, on your computer. It does four simple things:
The trick that makes it cheap, private, and local: Midas never sends your conversation to an AI to "process" it. It uses fast local math (embeddings — turning text into vectors and comparing them). The only AI involved is the one you're already talking to.
Why "no LLM at ingest" matters: other memory tools call an LLM to summarize every session — you pay in tokens forever, in latency, and by sending every turn to a provider. Midas trades that for cheap, local, auditable retrieval.
You need Python 3.11+. Check with python --version (or python3 --version). If you don't have it:
python.org/downloads, or winget install Python.Python.3.12
(Windows) · brew install python@3.12 (macOS) · your package manager (Linux). The easiest installer for
everything below is uv (one line: see its site), but pip/pipx work
too.
midas-mcp commandThis puts a midas-mcp program on your PATH that any MCP client can launch — one line, no clone:
uv tool install "midas-memory[mcp,local]" # recommended (Windows, macOS, Linux)
# …or: pipx install "midas-memory[mcp,local]"
Where the command lands (you'll need this path for some clients):
| OS | midas-mcp location | Find it with |
|---|---|---|
| Linux / macOS | ~/.local/bin/midas-mcp | which midas-mcp |
| Windows | %USERPROFILE%\.local\bin\midas-mcp.exe | where midas-mcp |
pip install "midas-memory[all]" # SDK + local embeddings + MCP + LangGraph
# smaller: `pip install midas-memory` (core, zero deps) · `"…[local]"` (embeddings) · `"…[mcp]"`
(Want the source / to contribute? git clone https://github.com/vornicx/Midas && cd Midas && pip install -e ".[all,dev]".)
First run downloads the embedding model once (~90 MB,
bge-baseONNX), then works fully offline. No API key, ever.
Verify:
which midas-mcp || where midas-mcp # the server command is installed
python -c "import midas; print('Midas', midas.__version__, 'OK')"
python quickstart.py # tiny end-to-end demo: remember → recall
Midas is a standard MCP server. Every MCP client launches the same command — midas-mcp — and
passes a few environment variables. The only thing that differs between tools is where you put the
config. Use this block everywhere (swap in your real home path):
{
"mcpServers": {
"midas": {
"command": "midas-mcp",
"env": {
"MIDAS_MCP_EMBEDDER": "local",
"MIDAS_MCP_DB": "/home/you/.midas/memory.sqlite3",
"MIDAS_MCP_MAX_RECORDS": "50000",
"MIDAS_MCP_MIN_IMPORTANCE": "2"
}
}
}
}
⚠️ The #1 gotcha: GUI apps don't share your terminal's
PATH, so they may not findmidas-mcp. If a client says "command not found", replace"command": "midas-mcp"with the absolute path fromwhich midas-mcp(macOS/Linux) orwhere midas-mcp(Windows, e.g."C:/Users/you/.local/bin/midas-mcp.exe"— use forward slashes or\\in JSON). On Windows, write the DB path with forward slashes too:C:/Users/you/.midas/memory.sqlite3.
Use the CLI (no file editing) — this is the exact command, verified:
claude mcp add midas -s user \
-e MIDAS_MCP_EMBEDDER=local \
-e MIDAS_MCP_DB="$HOME/.midas/memory.sqlite3" \
-e MIDAS_MCP_MAX_RECORDS=50000 \
-e MIDAS_MCP_MIN_IMPORTANCE=2 \
-- midas-mcp
claude mcp list # → midas: midas-mcp - ✓ Connected
-s user = available in all your projects · -s project = writes a shareable .mcp.json in the
repo · -s local = just you, this project. Remove with claude mcp remove midas -s user.
Edit ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project) and paste the JSON
block above. Then Cursor → Settings → MCP should show midas. Restart Cursor after changing env.
Settings → Developer → Edit Config opens the file (or edit it directly):
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Paste the JSON block, save, and restart Claude Desktop.
Codex uses TOML, not JSON. Either run codex mcp add midas -- midas-mcp, or add this to
~/.codex/config.toml:
[mcp_servers.midas]
command = "midas-mcp"
args = []
env = { MIDAS_MCP_EMBEDDER = "local", MIDAS_MCP_DB = "/home/you/.midas/memory.sqlite3", MIDAS_MCP_MAX_RECORDS = "50000", MIDAS_MCP_MIN_IMPORTANCE = "2" }
Start a session and run /mcp to confirm it's connected.
Edit the config (Cascade → MCP icon → Configure opens it), paste the JSON block, refresh:
| OS | Path |
|---|---|
| macOS / Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
Same pattern: point it at command midas-mcp with those env vars (JSON clients reuse the block above).
On connect, Midas injects a short memory policy into the agent (via the MCP instructions): recall
relevant memory first, then capture durable facts / decisions / preferences / constraints /
corrections as they come up. The agent captures freely; Midas decides what's actually kept — it
scores importance (no LLM), drops trivia below MIDAS_MCP_MIN_IMPORTANCE and skips duplicates, and keeps
memory bounded via MIDAS_MCP_MAX_RECORDS (forgetting low-value items, protecting durable facts).
Restart the client (or run /mcp) after editing config so it picks up the server.
Tools it exposes: remember, capture (policy-gated auto-store), recall (source-traceable),
build_context (budgeted prompt block), maintain (dedup + forgetting, returns a deletion audit),
stats (counts + short/medium/long tiers), forget / forget_all. Env knobs: MIDAS_MCP_DB
(persist to a SQLite file), MIDAS_MCP_EMBEDDER (local or hashing), MIDAS_MCP_MAX_RECORDS,
MIDAS_MCP_MIN_IMPORTANCE.
from midas import Memory, LocalEmbedder, ContentImportance
# Real semantic memory, fully local. (Or just `Memory()` for a zero-setup offline hashing embedder.)
mem = Memory(embedder=LocalEmbedder(), importance_scorer=ContentImportance())
mem.remember("Decision: the primary database is PostgreSQL.", kind="constraint", importance=5)
mem.remember("The launch date moved to September 14.", kind="fact", importance=5)
mem.remember("haha yeah sounds good") # filler — auto-scored low-importance, first to be forgotten
# Budgeted, prompt-ready context — highest-value first, dated, source-traceable:
print(mem.assemble("When do we launch?", token_budget=128))
# Or structured, ranked hits, each traceable to its source:
for hit in mem.recall("which database did we pick?", limit=3):
print(f"{hit.score:.2f} {hit.record.content}")
# Auto-capture: forward a turn; Midas keeps it only if it clears the relevance policy (no LLM).
mem.capture("My deploy key expires on 2027-03-01.", kind="fact") # -> stored
mem.capture("lol ok cool") # -> skipped (below the floor)
A multi-day agent's memory must stay current (no stale beliefs) and bounded (can't grow forever):
from midas.nli import LocalNLI
# Belief revision — a turn that CONTRADICTS an old belief supersedes it (local NLI, not keywords):
mem = Memory(embedder=LocalEmbedder(), supersede=True, supersede_conversational=True, nli=LocalNLI())
mem.forget_decayed(max_records=50_000) # evict lowest value (importance × recency); protects facts
mem.consolidate(similarity_threshold=0.95) # collapse near-duplicate restatements (keeps provenance)
mem.tier(record) # 'short' (≤1d) | 'medium' (≤1w) | 'long'
Forgetting returns the removed ids as a deletion audit trail and never drops the durable tier
(facts/preferences/constraints, high importance). Durable storage: Memory(store=SQLiteStore( "memory.db"), embedder=LocalEmbedder()) — a local file, no native extension.
Back LangGraph's long-term memory with Midas (pip install ".[langgraph]"):
from midas.integrations.langgraph_store import MidasStore
store = MidasStore() # offline by default; pass Memory(embedder=LocalEmbedder(), ...) for semantic
store.put(("user", "123"), "pref", {"text": "prefers dark mode and concise answers"})
hits = store.search(("user", "123"), query="ui preferences")
Midas leads on the reader-independent axes that isolate a memory layer's quality (full methodology + reproduce commands in BENCHMARKS.md):
| baseline (recency window) | Midas | |
|---|---|---|
Retrieval — LongMemEval-s recall@k (evidence buried among distractors, n=40) | 0.03 | 0.95 |
| Retrieval — LoCoMo recall@k (5 conversations, n=50) | 0.02 | 0.85 |
Answer — LongMemEval-s correctness (reader = gpt-4.1-mini, n=40) | 0.05 | 0.82 |
| Ingest cost | — | 0 LLM calls · $0 API · 0 data egress |
We lead with retrieval and cost (deterministic, reader-independent) because end-to-end correctness on
these benchmarks is dominated by the reader LLM, not the memory layer. Head-to-head, same reader:
with gpt-4o, Midas scores 0.84 on LongMemEval-s — matching the LLM-ingest SOTA (Observational
Memory) while doing no LLM at ingest — and on a ~500-session haystack (~4,944 turns) it assembles a
bounded ~480-token context (recall@k 0.78), where keep-every-observation-in-context designs do not fit
by construction. (Same-reader, within-harness comparison — not a leaderboard rank; see BENCHMARKS.md.)
eval/ (dev-only) runs Midas and competitors through LoCoMo / LongMemEval with deterministic recall@k,
cost/latency instrumentation, an optional local-or-hosted LLM judge, and a retention/forgetting measure:
python -m eval.runner --dataset longmemeval --variant s --local --midas-no-rerank --max-questions 15
python -m eval.retention --dataset locomo --max-convs 1 --local --derive-importance
docs/long-horizon-memory.md — the north-star: the 4 C's
(Complete · Clean · Current · Calibrated), why multi-day accuracy is a belief-management problem, and
the honest, measured state of each piece (including the open frontiers).
midas/ # the SDK (importable; zero core dependencies)
memory.py # Memory: remember / capture / recall / build_context · forget_decayed · consolidate · tier
importance.py # ContentImportance — no-LLM per-turn salience · policy.py — MemoryPolicy + auto-memory prompt
nli.py # LocalNLI — local entailment/contradiction (belief revision + abstention)
embeddings.py # Hashing / Local (bge) / OpenAI · DiskCachedEmbedder · LocalReranker
store.py · sqlite_store.py · ann.py # in-memory cosine · persistent SQLite · IVF index
mcp_server.py # the MCP server
eval/ # dev-only benchmark harness (datasets · adapters · metrics · runner · retention)
MIT.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.