Midas — Claude Code MCP server: what it does, how to install
A local memory layer that keeps track of past coding sessions without sending turns to an LLM. It prevents agents from performing destructive actions based on outdated context.
claude mcp add --env MIDAS_MCP_DB=<MIDAS_MCP_DB> --env MIDAS_MCP_EMBEDDER=<MIDAS_MCP_EMBEDDER> --env MIDAS_MCP_MAX_RECORDS=<MIDAS_MCP_MAX_RECORDS> --env MIDAS_MCP_MIN_IMPORTANCE=<MIDAS_MCP_MIN_IMPORTANCE> --transport stdio midas -- uvx midas-memory-mcpWhat Midas does
Midas stores developer decisions and project constraints in a local SQLite database. When recording incoming messages, it skips LLM summarization passes entirely. Data stays on your machine with zero token costs per turn. Lookups return the raw conversational turn instead of an AI-generated rewrite.
The server handles belief changes by overriding stale facts with new ones instead of stacking redundant entries. It exposes tools like memory_state for active project constraints and memory_diff to inspect what shifted across sessions. An internal provenance guard rejects unconfirmed destructive operations. Because retrieval relies on top-k search rather than conversational aggregation, it cannot synthesize entire multi-session dialog histories. Running the Python package requires Python 3.11 or newer.
What it helps with
- persist agent decisions across separate coding sessions
- block dangerous tool executions that rely on obsolete premises
- inspect recent belief updates using
memory_diff - share a unified SQLite memory file between Claude Code and Cursor
Example prompts for the agent
- Check
memory_diffto see what project constraints changed since our last session. - Inspect
memory_stateto review active architecture guidelines before writing code. - Verify in local memory whether running the database migration was explicitly confirmed.
How to install Midas
Platform CLI
claude mcp add --env MIDAS_MCP_DB=<MIDAS_MCP_DB> --env MIDAS_MCP_EMBEDDER=<MIDAS_MCP_EMBEDDER> --env MIDAS_MCP_MAX_RECORDS=<MIDAS_MCP_MAX_RECORDS> --env MIDAS_MCP_MIN_IMPORTANCE=<MIDAS_MCP_MIN_IMPORTANCE> --transport stdio midas -- uvx midas-memory-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from midas-memory-mcp <command>
Platform CLI
codex mcp add midas --env MIDAS_MCP_DB=<MIDAS_MCP_DB> --env MIDAS_MCP_EMBEDDER=<MIDAS_MCP_EMBEDDER> --env MIDAS_MCP_MAX_RECORDS=<MIDAS_MCP_MAX_RECORDS> --env MIDAS_MCP_MIN_IMPORTANCE=<MIDAS_MCP_MIN_IMPORTANCE> -- uvx midas-memory-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from midas-memory-mcp <command>
Config file
{
"mcpServers": {
"midas": {
"command": "uvx",
"args": [
"midas-memory-mcp"
],
"env": {
"MIDAS_MCP_DB": "<MIDAS_MCP_DB>",
"MIDAS_MCP_EMBEDDER": "<MIDAS_MCP_EMBEDDER>",
"MIDAS_MCP_MAX_RECORDS": "<MIDAS_MCP_MAX_RECORDS>",
"MIDAS_MCP_MIN_IMPORTANCE": "<MIDAS_MCP_MIN_IMPORTANCE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from midas-memory-mcp <command>
Config file
{
"servers": {
"midas": {
"type": "stdio",
"command": "uvx",
"args": [
"midas-memory-mcp"
],
"env": {
"MIDAS_MCP_DB": "<MIDAS_MCP_DB>",
"MIDAS_MCP_EMBEDDER": "<MIDAS_MCP_EMBEDDER>",
"MIDAS_MCP_MAX_RECORDS": "<MIDAS_MCP_MAX_RECORDS>",
"MIDAS_MCP_MIN_IMPORTANCE": "<MIDAS_MCP_MIN_IMPORTANCE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from midas-memory-mcp <command>
Platform CLI
gemini mcp add -e MIDAS_MCP_DB=<MIDAS_MCP_DB> -e MIDAS_MCP_EMBEDDER=<MIDAS_MCP_EMBEDDER> -e MIDAS_MCP_MAX_RECORDS=<MIDAS_MCP_MAX_RECORDS> -e MIDAS_MCP_MIN_IMPORTANCE=<MIDAS_MCP_MIN_IMPORTANCE> midas uvx midas-memory-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from midas-memory-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Midas
How do I install Midas in Claude Code?
Run claude mcp add midas -- uvx midas-memory-mcp. If you need custom database paths or importance thresholds, specify them with the --env flags during registration.
How does Midas avoid charging fees per message?
Ingestion runs without calling language models. Messages are saved and indexed locally without external API queries.
Can Midas summarize an entire multi-session history?
No, top-k retrieval cannot aggregate whole multi-turn conversations. It fetches exact source turns and active beliefs instead.