The System One EventUtahGo To Event Page →

Docs

Set up Midium, use every part of it, run it for your team, and build on it.

MCP servers

Midium's three Model Context Protocol servers — Operator (sub-agents for your editor), Vaults (your knowledge vaults) and Docs & Analytics — and how to connect them.

For developers

Midium runs three Model Context Protocol servers that other AI tools can connect to. All three use the Streamable HTTP transport on the engine at http://127.0.0.1:9100, and take your key as Authorization: Bearer <key>. Midium must stay open while an agent uses them.

ServerURLGives an agent
Operator (midium)http://127.0.0.1:9100/v1/code/mcpMidium's Reader and Browser sub-agents, running on your local models
Vaults (midium-vaults)http://127.0.0.1:9100/v1/vault/mcpSearch, read and (if allowed) edit the vaults you've opened to external agents
Docs & Analyticshttp://127.0.0.1:9100/mcpMidium's documentation, your models and usage data

Connect in one click#

On the Code page, switch to Sub-Agents. Connect your agents lists Cursor, Claude Code, Codex, Hermes Agent, OpenClaw and OpenBot, plus Any other MCP client:

  • Cursor — Add to Cursor opens Cursor, which asks you to confirm.
  • Claude Code — Add to Claude Code writes the config; start a new Claude Code session.
  • Codex — Add to Codex writes the config; restart Codex.
  • Any other MCP client — Copy URL, or Manual config for JSON, a claude mcp add command and Codex TOML.

These add the Operator server. For your vaults, open Vaults and click Connect to Agent: it has the same one-click setup, adding midium-vaults. Hermes Agent, OpenClaw and OpenBot connect differently — Midium becomes their model provider — see Connectors.

Connect by hand#

Most clients read an mcpServers block. Claude Code also needs "type": "http":

{
  "mcpServers": {
    "midium": {
      "type": "http",
      "url": "http://127.0.0.1:9100/v1/code/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    },
    "midium-vaults": {
      "type": "http",
      "url": "http://127.0.0.1:9100/v1/vault/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

A client that can't send headers can put the key in the URL instead: …/mcp?api_key=<key>.

Operator server#

/v1/code/mcp lets an editor's agent hand work to Midium's sub-agents. They run on your local models and return only their final answer, so the editor's context stays small. Your editor makes the code changes itself. Available on every plan, Free included.

ToolArgumentsWhat it does
set_workspacepathBinds the project root (an absolute path). Call it first; the other tools refuse until it's set.
commissionagent, objective, checklist (optional)Runs a sub-agent. reader reads and searches the project, the web, and the vaults you've opened to external agents — read-only. browser drives Midium's built-in browser. (researcher is accepted as another name for reader.) Returns its final answer as summary.
instruct_agentagent, message, index (optional)Sends a sub-agent more instructions; returns its new answer.
accept_agent_resultagent, index (both optional)Accepts the sub-agent's result. Returns only {status, agent, index} — the report came with commission.

You pick the model each sub-agent runs on, and watch their activity, on Code → Sub-Agents. See Code.

Vaults server#

/v1/vault/mcp gives an agent your knowledge vaults — only the ones you've opened to it. On a vault's page, turn on External agents; with it off, the vault is hidden from every external agent. Only a vault admin can change it. See Vaults.

Call list_vaults first, then pass its vault_id to every other tool.

ToolWhat it does
list_vaultsThe vaults this agent may use, with their vault_ids.
vault_searchSearch one vault by meaning (query, optional limit, path_prefix).
vault_list_filesList files (optional path_prefix, limit up to 500).
vault_read_fileRead a file as text; documents (PDF, Word, …) are extracted. Pages with offset / limit (up to 80,000 characters).
vault_linksA note's out-links and backlinks (depth 1–3).
vault_filterFind notes by tag or frontmatter property_key / property_value.
vault_find_symbolWhere a function, class or type is defined in a code vault.
vault_find_referencesWhere an identifier is used.
vault_repo_mapAn outline of the code: whole vault, a folder, or one file.
vault_call_graphWho calls a function and what it calls (direction: callers, callees, both).
vault_code_pathThe shortest call chain from one function to another.
vault_recordingsMeeting and call recordings in a vault (or every vault you can use, when vault_id is empty), plus this Mac's Recordings if you've opened them to agents.
vault_read_recordingA recording's transcript, with speakers and [hh:mm:ss] times, from start for minutes (up to 30).
vault_recording_audioFetches a recording's audio file to this Mac and returns its path.
vault_write_fileCreate or replace a file (up to 1 MiB). Needs writer access.
vault_edit_fileReplace one exact snippet (old_string must match once). Needs writer access.
vault_delete_fileDelete a file. Needs writer access.

The tools work on vault files only, never on the agent's own working directory. On a team member's Mac, vault requests go to the Hub, and nothing is available while it can't be reached.

Docs & Analytics server#

/mcp gives an agent read access to Midium's documentation and to your models and usage. /mcp/sse is the same server, kept for older configs.

ToolNeeds a keyWhat it does
list_docsNoList the documentation files.
read_docNoRead one documentation file.
list_library_modelsYesModels in the library (downloadable).
list_workbench_modelsYesYour models.
get_usage_summaryYesRequests, tokens and speed over a period.
get_today_snapshotYesToday's usage by model.
get_models_usageYesModels ranked by usage over a period.
get_performance_statsYesResponse-time and time-to-first-token percentiles.

Without a key it serves the documentation only.

Errors#

The Operator and Vaults servers accept only this Mac's own key: a missing or unknown key gets 401. On a Hub, team members' keys are refused with 403 (Only available on the Hub machine itself.) — members reach vaults through the Vaults server on their own Mac. Tool failures come back as MCP tool errors with a message, for example a write without writer access. See Errors & limits.

Something here wrong or out of date? Tell us.