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.
| Server | URL | Gives an agent |
|---|---|---|
Operator (midium) | http://127.0.0.1:9100/v1/code/mcp | Midium's Reader and Browser sub-agents, running on your local models |
Vaults (midium-vaults) | http://127.0.0.1:9100/v1/vault/mcp | Search, read and (if allowed) edit the vaults you've opened to external agents |
| Docs & Analytics | http://127.0.0.1:9100/mcp | Midium'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 addcommand 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.
| Tool | Arguments | What it does |
|---|---|---|
set_workspace | path | Binds the project root (an absolute path). Call it first; the other tools refuse until it's set. |
commission | agent, 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_agent | agent, message, index (optional) | Sends a sub-agent more instructions; returns its new answer. |
accept_agent_result | agent, 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.
| Tool | What it does |
|---|---|
list_vaults | The vaults this agent may use, with their vault_ids. |
vault_search | Search one vault by meaning (query, optional limit, path_prefix). |
vault_list_files | List files (optional path_prefix, limit up to 500). |
vault_read_file | Read a file as text; documents (PDF, Word, …) are extracted. Pages with offset / limit (up to 80,000 characters). |
vault_links | A note's out-links and backlinks (depth 1–3). |
vault_filter | Find notes by tag or frontmatter property_key / property_value. |
vault_find_symbol | Where a function, class or type is defined in a code vault. |
vault_find_references | Where an identifier is used. |
vault_repo_map | An outline of the code: whole vault, a folder, or one file. |
vault_call_graph | Who calls a function and what it calls (direction: callers, callees, both). |
vault_code_path | The shortest call chain from one function to another. |
vault_recordings | Meeting 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_recording | A recording's transcript, with speakers and [hh:mm:ss] times, from start for minutes (up to 30). |
vault_recording_audio | Fetches a recording's audio file to this Mac and returns its path. |
vault_write_file | Create or replace a file (up to 1 MiB). Needs writer access. |
vault_edit_file | Replace one exact snippet (old_string must match once). Needs writer access. |
vault_delete_file | Delete 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.
| Tool | Needs a key | What it does |
|---|---|---|
list_docs | No | List the documentation files. |
read_doc | No | Read one documentation file. |
list_library_models | Yes | Models in the library (downloadable). |
list_workbench_models | Yes | Your models. |
get_usage_summary | Yes | Requests, tokens and speed over a period. |
get_today_snapshot | Yes | Today's usage by model. |
get_models_usage | Yes | Models ranked by usage over a period. |
get_performance_stats | Yes | Response-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.
