Mirakash, as tools.For any MCP client.
Every operation in the Mirakash API is also a tool on a Model Context Protocol server, so an AI client can list your agents, read a conversation, search your knowledge or talk to an agent — with the same API key, the same scopes and the same answers as the REST API.
One endpoint.One header.
A workspace admin creates the key in Settings → API keys in the console. Choose read-only to explore; read and write to act.
- Endpoint
https://app.mirakash.com/api/mcp- Transport
- Streamable HTTP.
POSTa JSON-RPC message, get one JSON response back. - Protocol versions
2025-06-18,2025-03-26,2024-11-05— the server answers with the version you ask for when it supports it, otherwise the newest.- Authentication
- The API key, on every request:
Authorization: Bearer mk_live_… - Tool names
- The operation name with
_for.—agents.listisagents_list. - Read-only keys
- Are shown the read tools only.
- Sessions
- None. The server is stateless and keeps no session id.
Copy one block.Keep the key out of the repository.
Claude Code
Reads the key from your shell, so it is never written into a file.
claude mcp add --transport http mirakash https://app.mirakash.com/api/mcp \
--header "Authorization: Bearer $MIRAKASH_API_KEY"VS Code
Prompts for the key once and stores it outside the file.
{
"inputs": [
{ "type": "promptString", "id": "mirakash-key", "description": "Mirakash API key", "password": true }
],
"servers": {
"mirakash": {
"type": "http",
"url": "https://app.mirakash.com/api/mcp",
"headers": { "Authorization": "Bearer ${input:mirakash-key}" }
}
}
}Cursor
Use the global file in your home directory, not a project one that gets committed.
{
"mcpServers": {
"mirakash": {
"url": "https://app.mirakash.com/api/mcp",
"headers": { "Authorization": "Bearer mk_live_…" }
}
}
}Any client, by hand
The whole protocol is a POST. This lists the tools your key can use.
curl -X POST https://app.mirakash.com/api/mcp \
-H "Authorization: Bearer $MIRAKASH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Data twice.Errors to the model.
A result carries the data as JSON text for clients that only read text, and as structuredContent for those that read JSON. Text is the full data, not a summary — some tools put a one-line summary above it.
curl -X POST https://app.mirakash.com/api/mcp \
-H "Authorization: Bearer $MIRAKASH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
"params":{"name":"agents_reply",
"arguments":{"agentId":"AGENT_ID","message":"Do you open on Sundays?"}}}'{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [{ "type": "text", "text": "{\n \"reply\": \"Yes — 10:00 to 16:00 on Sundays.\", … }" }],
"structuredContent": { "reply": "Yes — 10:00 to 16:00 on Sundays.", "escalated": false, … }
}
}When the data is a list rather than an object, structuredContent wraps it as { "result": [ … ] }.
Three kinds of failure.Each where a client expects it.
- A tool fails
- A normal result with
isError: trueand the textcode: message, using the same codes as the REST API —invalid_request,forbidden,not_found,conflict… The model reads it and can try something else. - The request is wrong
- A JSON-RPC error:
-32700the body is not JSON (with HTTP400),-32600not JSON-RPC 2.0,-32601unknown method or tool,-32602tools/callwithout a name. - The key is wrong
- HTTP
401withWWW-Authenticate: Bearer— missing, unknown, revoked or expired. A client takes that as a reason to reconnect with credentials, not as a broken tool.
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"isError": true,
"content": [{ "type": "text", "text": "not_found: No agent with that id in this workspace." }]
}
}Also: a notification (no id) gets 202 with no body, GET gets 405, and resources/list and prompts/list answer with empty lists — the server offers tools only. A batch — an array of messages, which the older protocol versions allow — is answered message by message.
Some tools ring phones.They say so.
Every tool carries MCP annotations: readOnlyHint on the read tools, destructiveHint on the ones that place real calls, send real messages or change what live callers hear, idempotentHint on reads. A client uses them to decide when to ask you before running a tool — set yours to always ask for destructive ones. The API reference lists them all in its Operations with real-world effects table.
Hints are not the lock. The server checks the key's scope on every call, so a read-only key cannot run a write tool however it is asked to. Each change made through the server is recorded in the workspace's audit trail against the key that made it.
Credentials stored in the console — a tool's request headers, a webhook signing secret — come back as [redacted], so they never land in a model's context. Conversation data does include callers' numbers and what they said; treat a model's context that has read it as personal data.