Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MIDAS_MCP_DBNoPath to the SQLite database file. Use ':memory:' for ephemeral.~/.midas/memory.sqlite3
MIDAS_MCP_ANNNoSet to '1' to enable sub-linear IVF for large stores.
MIDAS_MCP_KEYNoEncryption key for SQLCipher at-rest encryption. Requires 'midas-memory[encrypted]' extra.
MIDAS_MCP_NLINoSet to '1' to enable NLI-gated revision.
MIDAS_MCP_TTLNoPer-kind retention in days. E.g., 'chat=30,note=90'.
MIDAS_MCP_TOKENNoBearer token for HTTP endpoint authentication.
MIDAS_MCP_PINNEDNoPin standing directives or important memory items.
MIDAS_MCP_EMBEDDERNoEmbedding model backend: 'local' (default), 'hashing', 'multilingual', or any fastembed model ID.
MIDAS_MCP_NAMESPACENoMemory namespace. Set to 'auto' for per-project scoping based on current working directory.
MIDAS_MCP_SUPERSEDENoEnable evolution of memory via contradiction detection. Set to '1' or similar.
MIDAS_MCP_MAX_RECORDSNoMaximum number of records to keep in memory.
MIDAS_MCP_AUTO_MAINTAINNoIdle-time upkeep interval. E.g., '5' for 5 minutes.
MIDAS_MCP_MIN_IMPORTANCENoMinimum importance score for memory entries to be retained.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
rememberA

Store a memory for later recall.

content: text to remember (a fact, decision, preference, or conversation turn). kind: note | chat | fact | preference | constraint | mission. importance: 1-5 (higher is weighted up in recall and protected from forgetting). 0 = auto-derive from content (no LLM) — concrete facts score higher than chit-chat. session: conversation/thread id used to group related memories. provenance: planning | action | observation | user_confirmation. Use user_confirmation only when the user explicitly confirmed the content; external actions may rely only on that provenance. actor: agent/process that produced the memory (default: MIDAS_MCP_ACTOR). namespace: scope tag (e.g. a project or user id); defaults to MIDAS_MCP_NAMESPACE.

captureA

Offer a turn to memory; Midas decides whether to keep it (no LLM).

Forward anything that might be durable — a fact, decision, preference, constraint, or correction. Midas scores its importance and keeps it only if it clears the relevance policy and isn't a duplicate, so you can capture freely without polluting memory. Returns whether it was stored and why (so you learn the bar). This is the workhorse for hands-off, automatic remembering. kind: note | chat | fact | preference | constraint | mission. provenance: planning | action | observation | user_confirmation.

remember_codeA

Capture a CODE memory tagged by category + project, for the coding-agent views. code_kind: one of architecture_decision | dependency_choice | convention | bug_fixed | recurring_failure | forbidden_action | command_worked | command_failed. Use forbidden_action for rules the agent must not violate (they gate check_forbidden_action); afterwards project_state shows the live state by category. No LLM. Set provenance="user_confirmation" only when the user explicitly confirmed it.

recallA

Retrieve relevant memories with deterministic, source-traceable evidence.

Returns exact stored text plus provenance/source/timestamps and, by default, score components (relevance, importance_norm, recency). No LLM rewrites or rationales are generated. Set hybrid=true to fuse BM25 lexical matching with semantic recall — useful when the query is an exact identifier (an error code, a function name) rather than a paraphrase. as_of: ISO date (YYYY-MM-DD) for a HISTORICAL query — "what did memory say on that date": later records are excluded and revised beliefs resolve to the version valid then.

inspect_memoryA

Inspect one stored memory by id without search, mutation, or embedding exposure.

build_contextA

Assemble a budgeted, prompt-ready context block for a query.

Highest-value memories first, with same-session neighbours pulled in, trimmed to token_budget. Drop the returned string straight into an LLM prompt. It uses lean memory lines by default; call recall or inspect_memory when you need full provenance/source evidence. Each line is dated and the header anchors today's date so the reader can resolve relative time. Standing user directives ("from now on…", "always…") are pinned in regardless of query relevance.

memory_stateA

The CURRENT durable state of a project/scope: the live (non-superseded) decisions, constraints, facts, and preferences, newest first. Use this to ONBOARD into a project or before planning — when a broad 'what's the current state?' has no single matching turn, so recall under-retrieves. Not a similarity search and no LLM. kinds: optional comma list (constraint,fact,preference,mission) to narrow; empty = all durable kinds.

memory_diffA

What CHANGED in memory in the last hours: beliefs newly added, and beliefs revised (old -> new). The 'what's new since our last session' view for resuming long-horizon work without re-reading everything. Deterministic, no LLM.

resumeA

START OF SESSION: everything needed to pick up where the last session left off, in ONE call — pinned standing directives, live forbidden rules, what changed in the last hours (default: a week), the current durable state, open commitments, and unresolved memory conflicts. context is prompt-ready and token-budgeted; use it silently, then work. Complements build_context (which needs a query): resume is the query-less session start. Deterministic, no LLM.

memory_conflictsA

Live beliefs that CONTRADICT each other with neither superseding the other — the multi-agent failure mode where two clients wrote opposite facts into the shared memory and both stayed live. Returns ranked candidate pairs (NLI-scored when the local NLI model is enabled, else a same-slot heuristic: numbers disagree / one side negates). Midas never resolves these silently: verify with the user, then forget the wrong one or capture the corrected value (which supersedes). No LLM.

open_loopsA

Unresolved commitments — work someone said WOULD be done and never closed — oldest (most overdue) first. Continuity is not only facts: check this when resuming so promised work isn't silently dropped. Record one with remember_commitment; close it with close_loop.

remember_commitmentA

Record a commitment (an OPEN LOOP): work you or the user said WILL be done — a promised fix, a follow-up, a migration to finish. It stays visible in open_loops/resume until closed with close_loop, so promises survive across sessions. due: optional free-text deadline.

close_loopA

Close an open commitment: records the resolution and supersedes the open loop with it, so open_loops stops returning it while the promise -> resolution history stays auditable. Get loop_id from open_loops (the record id).

project_stateA

The current code-state of a project for a coding agent, grouped by code_kind (architecture_decision, bug_fixed, convention, forbidden_action, dependency_choice, ...). Live (non-superseded) memories only — call this to ONBOARD into a project, or to see what is decided and what is forbidden before acting. Deterministic, no LLM. Capture code memories with the SDK's midas.coding.remember_* helpers (they tag code_kind + project).

check_forbidden_actionA

Before a code action, check it against the project's live forbidden_action rules. Two tiers, by confidence (deterministic, no LLM; superseded/retired rules ignored):

  • forbidden (HIGH confidence, lexical match) → do NOT do it; refuse and cite rules.

  • possibly_forbidden (ADVISORY, semantic/paraphrase match) → ASK the user before proceeding; the semantic signal is noisy (~31% false positives, eval.forbidden_eval), so it warns, not blocks. Separate from the provenance/currency gate (check_memory_use).

audit_useA

The compliance audit artifact for a memory-justified use: the guard decision + the full provenance and belief-revision history of every supporting memory + an attributability score (fraction of evidence with both a source and an actor). Hand this to an auditor to prove WHY an action is or isn't justified. Source-traceable, deterministic, no LLM.

memory_policyA

Return the exact MCP-injected memory policy text and guard parameters.

check_memory_useA

Decide whether recalled memory may justify the intended use.

intended_use: planning | answer | external_action | destructive_action. External/destructive actions require user_confirmation provenance; otherwise ask the user first.

forgetA

Delete a single memory by id (ids come from recall). Supersession chains through the deleted record are relinked, so belief-revision history stays walkable.

forget_matchingA

Topic-level erasure ("forget what you know about X") with a reviewable audit.

Matches memories at relevance >= min_relevance. By default this is a DRY RUN: it returns what would be deleted so you (or the user) can review; call again with dry_run=false to delete. Deletion bypasses durability protections — an explicit erasure request outranks retention — and returns the full list of removed memories as the audit trail.

forget_allA

Clear all stored memories (fresh start).

maintainA

Run a no-LLM memory-maintenance pass and return the deletion audit.

Bounds storage and keeps recall clean without sending anything to an LLM — the enterprise retention / "right to be forgotten" lever, with a full audit of exactly what was removed:

  • consolidate_threshold: if > 0, dedup near-duplicate restatements at this cosine (e.g. 0.95).

  • max_records: if > 0, forget the lowest-value tail until at most this many remain.

  • min_value: if > 0, forget every (non-durable, unprotected) memory scoring below this value.

  • ttl: age-based retention, "kind=days" comma list (e.g. "chat=30,note=90"); empty uses the server's MIDAS_MCP_TTL. User-confirmed/standing records and supersession chains never expire. Durable memories (facts/preferences/constraints, high importance) and supersession chains are never dropped. Returns counts and the ids removed (auditable).

statsA

Memory stats: total count, breakdown by kind, namespace, and the temporal-tier distribution.

tiers: short (<= 1 day) / medium (<= 1 week) / long (older) — the short/medium/multi-day horizons. Pass namespace to scope the counts to one project/agent scope.

Prompts

Interactive templates invoked by user choice

NameDescription
memory_sessionA drop-in prompt that switches an agent into Midas auto-memory mode for a session. Clients that don't surface server `instructions` automatically can pin this as a system prompt.
distillDrive a no-Midas-LLM distillation pass: YOUR model turns the recent conversation into compact, self-contained memories. This is the architecturally-honest version of the frontier's LLM-at-ingest memory (Mem0/Letta/ LIGHT): the gains in those systems come from distilling raw turns into high-signal facts — but they pay a separate LLM per session. Here the model you're ALREADY running does it, and Midas stays no-LLM and $0. A distilled fact ("X's deploy target is staging, as of 2026-06") retrieves far better than the conversational fragment it came from.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vornicx/Midas'

If you have feedback or need assistance with the MCP directory API, please join our Discord server