Miriel Docs

MCP

Miriel hosts Model Context Protocol servers for you, so any MCP-capable assistant — Claude, ChatGPT, Cursor, GitHub Copilot, Codex, Gemini CLI, LM Studio, your own agents — can learn into and query your Miriel memory. There is nothing to run locally.

Connect in one command

bash
pip install --upgrade miriel
MIRIEL_API_KEY=<your-api-key> miriel-mcp connect

# one command wires up Claude, Cursor, ChatGPT and Copilot on this machine

miriel-mcp connect finds (or creates) your Miriel Context Manager server, detects the MCP clients installed on the machine and configures each one — running the client's own CLI where it has one (claude mcp add, codex mcp add, code --add-mcp, gemini mcp add) and editing its config file where it does not (Cursor, LM Studio). Re-running is a no-op for anything already connected; every file it touches is backed up first.

bash
miriel-mcp connect --dry-run          # show the changes, write nothing
miriel-mcp connect --client cursor    # just one client
miriel-mcp connect --url <hosted-url> # skip the API lookup
miriel-mcp status                     # what's installed, what's connected
miriel-mcp show --client codex        # print copy-paste instructions instead

Connect a client by hand

Your server's URL looks like https://api.miriel.ai/api/v2/mcp/protocol/<endpoint-slug>. Find it (and one-click deeplinks) behind Connect on the MCP servers page in the workspace, or create the server with one call:

bash
curl -s -X POST "$MIRIEL_API/api/v2/mcp/default" \
  -H "x-access-token: $MIRIEL_API_KEY"
ClientHow
Claude Codeclaude mcp add --transport http miriel <url> --scope user
Claude Desktop / claude.aiSettings → Connectors → Add custom connector → paste the URL
ChatGPTSettings → Apps & Connectors → Create app → paste the URL
CursorOne-click deeplink, or add it to ~/.cursor/mcp.json
VS Code / GitHub Copilotcode --add-mcp '{"name":"miriel","type":"http","url":"<url>"}'
Copilot coding agentRepo Settings → Copilot → Coding agent → MCP configuration
Codex CLIcodex mcp add miriel --url <url>
Gemini CLIgemini mcp add --transport http miriel <url>
LM StudioOne-click deeplink, or ~/.lmstudio/mcp.json
Anything else{"mcpServers": {"miriel": {"type": "http", "url": "<url>"}}}

The endpoint speaks Streamable HTTP (JSON-RPC over POST) and the legacy SSE transport, protocol versions 2024-11-05 and 2025-03-26.

The URL is the credential
Hosted MCP endpoints take no auth header — the unguessable slug in the URL authorizes the caller. Share it like a password, and undeploy the server to revoke it.

Tools the assistant gets

The Context Manager exposes these tools. Servers created before a tool existed pick it up the next time miriel-mcp connect (or POST /api/v2/mcp/default) runs.

ToolWhat it does
miriel_learn(value, project?)Store text — notes, decisions, summaries, source material — into your memory.
miriel_learn_fileStore a file (PDF, spreadsheet, screenshot…) from base64 bytes and a filename; returns its resource_id. Up to 25 MB.
miriel_query(query, project?, num_results?)Retrieve relevant context with source attribution.
miriel_capabilities()Look up what the Miriel platform can do, from its own documentation. Answers "how do I connect Google Drive?", where miriel_query answers "what is in my account?".
miriel_list_resourcesEnumerate every document in a project, paged, without content — the audit tool when an agent must not miss anything.
miriel_read_resourceRead one document in full, chunk by chunk in reading order, with page / slide / frame markers and a cursor.
miriel_download_resourceGet the original file behind a document: a short-lived download URL, or inline byte ranges.
miriel_record_belief · miriel_query_beliefs · miriel_retract_belief · miriel_belief_historyShared claims and preferences that can be corrected later — a later correction supersedes the earlier claim instead of sitting beside it.
miriel_sheet_ops · miriel_sheet_readCreate and edit shared spreadsheets that people see live in a workspace session.

Usage guidance for the assistant — when to learn, when to query — is returned in the MCP initialize response, which most clients fold into the model's system prompt. It is also served at GET /api/v2/mcp/default/instructions.

Custom servers

Beyond the Context Manager, any stored query can become an MCP tool — a "weekly-metrics" server whose tools run your saved queries with arguments, for example.

GET/api/v2/mcp/list servers
POST/api/v2/mcp/create a server
POST/api/v2/mcp/from-query/<query_id>create a server from a stored query
PATCH/api/v2/mcp/<server_id>update (also GET, DELETE)
POST/api/v2/mcp/<server_id>/queriesadd tools (GET lists them)
POST/api/v2/mcp/<server_id>/deployhost the endpoint (/undeploy revokes it)
GET/api/v2/mcp/<server_id>/connectper-client setup recipes
POST/api/v2/mcp/<server_id>/downloadrunnable local stdio package
GET/api/v2/mcp/<server_id>/analyticsusage (also /invocations, /stats)

Downloaded packages run locally over stdio and call the API with your key — useful when a client cannot reach hosted URLs.

MCP — Miriel Docs