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.
pip install --upgrade miriel
MIRIEL_API_KEY=<your-api-key> miriel-mcp connect
# one command wires up Claude, Cursor, ChatGPT and Copilot on this machinemiriel-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.
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 insteadYour 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:
curl -s -X POST "$MIRIEL_API/api/v2/mcp/default" \
-H "x-access-token: $MIRIEL_API_KEY"| Client | How |
|---|---|
| Claude Code | claude mcp add --transport http miriel <url> --scope user |
| Claude Desktop / claude.ai | Settings → Connectors → Add custom connector → paste the URL |
| ChatGPT | Settings → Apps & Connectors → Create app → paste the URL |
| Cursor | One-click deeplink, or add it to ~/.cursor/mcp.json |
| VS Code / GitHub Copilot | code --add-mcp '{"name":"miriel","type":"http","url":"<url>"}' |
| Copilot coding agent | Repo Settings → Copilot → Coding agent → MCP configuration |
| Codex CLI | codex mcp add miriel --url <url> |
| Gemini CLI | gemini mcp add --transport http miriel <url> |
| LM Studio | One-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 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.
| Tool | What it does |
|---|---|
| miriel_learn(value, project?) | Store text — notes, decisions, summaries, source material — into your memory. |
| miriel_learn_file | Store 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_resources | Enumerate every document in a project, paged, without content — the audit tool when an agent must not miss anything. |
| miriel_read_resource | Read one document in full, chunk by chunk in reading order, with page / slide / frame markers and a cursor. |
| miriel_download_resource | Get 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_history | Shared 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_read | Create 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.
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.
/api/v2/mcp/list servers/api/v2/mcp/create a server/api/v2/mcp/from-query/<query_id>create a server from a stored query/api/v2/mcp/<server_id>update (also GET, DELETE)/api/v2/mcp/<server_id>/queriesadd tools (GET lists them)/api/v2/mcp/<server_id>/deployhost the endpoint (/undeploy revokes it)/api/v2/mcp/<server_id>/connectper-client setup recipes/api/v2/mcp/<server_id>/downloadrunnable local stdio package/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.