Skip to main content

MCP server (read-only)

daimon mcp serve exposes daimon's memory as an MCP tool surface over stdio — for hosts that speak MCP but have no hook system daimon can attach to. It is opt-in (nothing registers it for you), read-only (five tools, no writes), and pure standard library (no extra dependency, same as the rest of daimon).

daimon mcp serve # blocks, serves JSON-RPC on stdio until EOF

Tools​

ToolWhat it doesArguments
daimon_recallSearch daimon's cross-session memory. Rows carry provenance: trust class (verbatim = exact quote, inferred = model conclusion), author, origin project slug, and a status field in plain words when a row is resolved, superseded or contradicted (null for a live row). Searches this project only.query string required: search terms
limit integer default 20
session string: the live session id this pull should be attributed to, if known
all_projects boolean only with DAIMON_MODEL_CROSS_PROJECT: search every project
slug string only with DAIMON_MODEL_CROSS_PROJECT: search one other project by slug
daimon_briefThe latest briefing for this project: what the last session was doing, decisions, open loops, trust-tagged. Strictly project-scoped: no checkpoint here answers 'none', never another project's content.slug string only with DAIMON_MODEL_CROSS_PROJECT: read another project by slug
project string only with DAIMON_MODEL_CROSS_PROJECT: project directory path
daimon_projectsThis project's own entry: slug, age, last topic.-
daimon_statusCapture health for this project: checkpoint freshness, last serialize result, outstanding failures, alarms.project string only with DAIMON_MODEL_CROSS_PROJECT: project directory path
requests_inboxRequests other daimon projects have addressed to this one (the cross-project ask ledger, #694). Deliberate pull, never ambient: daimon_brief does not carry this content. Read-only: opening, answering, or deciding a request is CLI-only (daimon request ...).min_severity critical|high|normal|low: only requests at this severity or a more severe one
project string only with DAIMON_MODEL_CROSS_PROJECT: project directory path

requests_inbox rows carry severity and severity_reason (a normal row has an empty reason), and quarantined or forgotten text in them comes back as a marker or blank. The table above lists the arguments of the tools as the server sends them to a client.

All five carry readOnlyHint. Item-id verbs exist on the CLI, the viewer and the in-process api; the MCP tools take no item id by design (pinned by test). Tool-level failures (bad arguments, missing FTS5) come back as isError results the agent can read; they never kill the server.

daimon_brief renders the same trust tags as the CLI, so a line may also carry the [≈ corroborated ×N] badge — a count of independent sessions that witnessed the claim, on its own axis and never a higher trust class. See trust classes.

With DAIMON_WORLDCHECK on, daimon_brief also runs world evidence on the current project's carried claims and records the result, as daimon brief does. A read by slug never does. See Worldcheck for the cost.

Scoping rules​

The server inherits daimon's cross-project discipline:

  • Reads are project-scoped. The project is resolved from the process working directory, or DAIMON_PROJECT_DIR when set — put one of them in your host's MCP config.
  • The host chooses the scope, never the model. By default every tool answers for this project only. A request that names another project (a slug, all_projects, or a project path outside this project) is refused with a message that names DAIMON_MODEL_CROSS_PROJECT, and daimon_projects lists only this project. Set DAIMON_MODEL_CROSS_PROJECT=1 in the process env or the env file to allow those reads; the tool descriptions then offer the arguments. Under DAIMON_TENANT_SCOPED the setting has no effect. This holds for the MCP tools; an agent with a shell can still run the CLI from another directory.
  • Blocking tool names is not the boundary. A host can see the same server under more than one prefix: mcp__daimon__* when it is registered in the host's MCP config, and mcp__plugin_daimon_daimon__* when it arrives through the Claude Code plugin. A block list of tool names misses every prefix it does not name, so it is incomplete by construction. The data boundary is DAIMON_MODEL_CROSS_PROJECT, and it holds under every name the server answers to. To stay single-project, keep it unset (or set to anything other than 1, true, yes or on) in the server's process env and in daimon's env file.
  • No implicit fallback. A project with no checkpoint gets no checkpoint for this project, never another project's content. With the setting on, the message also points to daimon_projects, and crossing projects stays explicit: pass a slug to daimon_brief or daimon_recall.
  • Kill switch honored. With DAIMON_DISABLE=1 the server exits cleanly without serving, so a disabled daimon never breaks host startup.
  • Usage stays local. Each call writes one mcp:<tool> line to daimon's local usage log (the same daimon stats counters as the CLI). Nothing is transmitted.

Registering with a host​

Every host daimon adapts now registers this server as part of its own install path — nothing to run by hand on any of them. The recall hint (the per-prompt "you worked on this before" line) names the tool instead of the daimon recall "..." shell command wherever a prompt-time recall hook exists; where one does not, the server is still worth registering, because the host's own agent can call the tool directly.

HostMCP registrationRecall hint's tool form
Claude Codesupportedsupported
Kimi Codesupportedsupported
Codexsupportedsupported
Windsurfsupportedunsupported (no prompt-time recall hook)
Gemini CLIsupportedunsupported (no prompt-time recall hook)
  • Claude Code (plugin): the plugin install declares this server in .claude-plugin/plugin.json's mcpServers, so daimon_recall and its siblings are listed the moment the plugin is installed.
  • Claude Code (CLI, without the plugin): claude mcp add daimon -- daimon mcp serve.
  • Codex: daimon hooks install codex writes [mcp_servers.daimon] into ~/.codex/config.toml alongside its hooks.json registration. daimon hooks remove codex takes only that table back.
  • Kimi Code: daimon hooks install kimi merges mcpServers.daimon into ~/.kimi-code/mcp.json (or $KIMI_CODE_HOME/mcp.json) alongside its config.toml hook registration, and its UserPromptSubmit command picks up the tool-form hint automatically once that entry exists.
  • Windsurf: daimon hooks install windsurf prints an mcpServers snippet for ~/.codeium/windsurf/mcp_config.json, the same way it already prints the hooks registration snippet — daimon does not write Cascade's own config files.
  • Gemini CLI: the standalone hook/gemini-hooks.py install lifecycle manager registers mcpServers.daimon in ~/.gemini/settings.json alongside its two hooks, and removes it on uninstall.

Generic stdio MCP config (any other MCP-speaking host):

{
"mcpServers": {
"daimon": {
"command": "daimon",
"args": ["mcp", "serve"],
"env": { "DAIMON_PROJECT_DIR": "/path/to/your/project" }
}
}
}

If your host launches MCP servers from the project directory you can omit DAIMON_PROJECT_DIR — the working directory resolves the same way.

Note: on hosts where daimon's hooks already run, the hook briefing is the richer integration — the MCP server is for reads on demand and for hosts without hooks. Running both is fine; the tools are read-only.