mivia

mivia / docs / mcp

MCP

The same api, the same key, spoken as MCP tools. Endpoint:

codetext
POST https://api.mivia.app/mcp

Stateless streamable-http JSON-RPC: no session id, no SSE stream. An MCP call is a call that arrived through a different envelope; it bills the key's tenant exactly like a REST call.

Client config

Claude, Cursor, and any client that takes static headers:

codejson
{
  "mcpServers": {
    "mivia": {
      "url": "https://api.mivia.app/mcp",
      "headers": { "Authorization": "Bearer mivia_..." }
    }
  }
}

Protocol methods

  • initialize - version handshake and server card
  • tools/list - the tool table below, with full input schemas
  • tools/call - one billed call
  • ping - answers an empty result

Smoke test from a shell:

codebash
curl -X POST https://api.mivia.app/mcp \
  -H 'Authorization: Bearer mivia_...' \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Tools

toolwhat it doesrequired fieldsoptional fields
mivia_small_json_extractExtract a structured JSON record from one free-text input: a ticket, a log line, a message.textdump
mivia_small_json_structureStructure a multi-line dump into grouped JSON sections: stack traces grouped, diffs kept atomic.text, schemanone
mivia_small_json_selectRank the candidates given in the input text, zero-shot.text, candidatesnone
mivia_small_json_gradeGrade the input's severity on a fixed four-tier scale.textanchors
mivia_small_json_guardJudge a proposed tool call; returns CALL, CLARIFY, or ABSTAIN.requesttools

Every tool forwards its fields to the model verbatim, so the field tables under REST api describe each field in full.

Refusals

A business refusal never breaks the protocol. A refused call answers HTTP 200 with isError: true inside the result and one of rate limited, balance empty; top up at /billing, or model unavailable as the text. The retry and top-up rules live on the errors page.