MCP overview
GetRatesAPI runs a hosted Model Context Protocol (MCP) server that exposes rate data and a few extra capabilities (conversion, asset listings, usage) to MCP-capable clients.
Transport
- Streamable HTTP, single path
/mcp. - SDK:
github.com/modelcontextprotocol/go-sdkv1.8.0. - Binary:
cmd/mcp.
Auth
Identical API-key scheme to REST:
Authorization: ApiKey <key>. There is no separate MCP-only credential,
and no OAuth — this is an explicit, documented deviation scoped to
pre-production.
Tools
| Tool | Billable | Description |
|---|---|---|
get_rate | yes | Read a stored direct currency rate |
convert_currency | yes | Convert an exact decimal amount using a stored direct rate |
list_fiat_currencies | no | List fiat assets in stored current rates |
list_crypto_assets | no | List crypto assets in stored current rates |
get_usage | no | Read your account’s current request-unit usage |
convert_currency, list_fiat_currencies, and list_crypto_assets are
the only place these three capabilities exist in the product today —
there is no equivalent REST endpoint for any of them. See
REST API overview for why.
Error model
Tool-call domain errors differ from REST’s HTTP-status model: they are
returned as CallToolResult{IsError: true} with the same
{code, message, request_id} fields (plus limit/remaining/reset_at
for quota_exceeded) inside the structured content — not an HTTP
status code. Auth failures (missing/invalid API key) remain ordinary HTTP
401, before any MCP tool call is attempted.
Getting started
See Hosted MCP setup to run the MCP server locally, then pick a tool page above for its exact input/output schema and examples.