fxapi Exchange Rates MCP Server

Live and historical FX rates for AI agents: latest rates, conversion, time series, fluctuation and period averages for 190+ currencies, crypto and metals.

Hosted MCP Server

npx add-mcp 'https://api.fxapi.com/mcp'

Installs into Claude Code, Codex, Cursor and more

Documentation

Skip to content

Exchange rates for AI agents

Exchange rate MCP server

fxapi runs a hosted Model Context Protocol (MCP) server at https://api.fxapi.com/mcp. Claude, Cursor, VS Code and any other MCP client can call the exchange rate API as native tools – no SDK and no glue code.

Endpoint Hosted

Transport HTTP

Tools 11

Auth Key or sign-in

Get a free API key MCP documentation

Claude Code

claude mcp add --transport http fxapi \
  https://api.fxapi.com/mcp \
  --header "apikey: YOUR_API_KEY"
{
  "mcpServers": {
    "fxapi": {
      "url": "https://api.fxapi.com/mcp",
      "headers": { "apikey": "YOUR_API_KEY" }
    }
  }
}

Why give your AI agent an exchange rate API?

Language models don’t know today’s exchange rates – and they shouldn’t make them up. With the fxapi MCP server, an assistant can fetch the current EUR/USD rate, convert an invoice amount at the rate of its date or pull a month of historical data, and show you exactly where the number came from.

Connect in seconds

Claude Code

claude mcp add --transport http fxapi https://api.fxapi.com/mcp --header "apikey: YOUR_API_KEY"

Claude Desktop, Cursor, VS Code and other MCP clients

Add the server to your client’s MCP configuration. File locations and key names vary by client (VS Code, for example, uses a servers key in .vscode/mcp.json), so check your client’s documentation for remote HTTP servers with custom headers:

{
  "mcpServers": {
    "fxapi": {
      "url": "https://api.fxapi.com/mcp",
      "headers": { "apikey": "YOUR_API_KEY" }
    }
  }
}

Replace YOUR_API_KEY with your key from the fxapi dashboard.

Sign in instead of an API key

MCP clients that support sign-in (OAuth), such as Claude’s custom connectors, can sign in instead of sending a key. In Claude, open Settings → Connectors → Add custom connector and enter https://api.fxapi.com/mcp. The client opens a sign-in page on app.fxapi.com: sign in or sign up, and approve the connection (as the team’s owner or an admin). The client then holds a key of your team that lasts an hour and renews itself; its tool calls count against your plan like any other request. You can disconnect it at any time under API keys → Connected apps in the dashboard. For your own code, use an API key.

Available tools

The tools map one-to-one to the REST endpoints:

ToolEndpointWhat it does
getLatest/v1/latestLatest exchange rates
getHistorical/v1/historicalRates for a past date
getConvert/v1/convertConvert an amount
getRate/v1/rateThe rate of one currency pair, now or at a past date or moment
getMatrix/v1/matrixCross rates between 2 to 25 currencies in one table
getRange/v1/rangeTime series
getOhlc/v1/ohlcHourly or daily OHLC candles (open, high, low, close)
getFluctuation/v1/fluctuationChange between two dates
getAverage/v1/averagePeriod averages
getCurrencies/v1/currenciesSupported currencies
getStatus/v1/statusYour remaining quota

Plan restrictions are the same as for the REST API: getConvert requires the Basic plan or higher, and getRange and getOhlc require Professional or higher.

Example prompts

  • “What’s the current exchange rate from EUR to USD, GBP and CHF?”
  • “Convert 4,250 CHF to EUR at the rate of 30 June 2026.”
  • “Show me how the Japanese yen moved against the dollar over the last 30 days.”
  • “Give me the monthly average EUR/USD rates for Q1 2026 as a table.”

Prefer to build it yourself?

Use the OpenAPI 3.1 specification to generate tools for your own agent framework, or read the machine-readable docs at /docs/llms.txt.

Read the full walkthrough in exchange rates for AI agents and the MCP documentation.

All of this is part of the fxapi foreign exchange rates API – one key, one response format and 190+ currencies across every endpoint.

Frequently asked questions

What is an MCP server?

The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools and data sources. The fxapi MCP server exposes the exchange rate API as tools, so an assistant can look up rates itself instead of guessing them.

Do I need an API key?

Either an API key or a sign-in. Send your fxapi key in the apikey header – a free key works – or use a client that supports MCP sign-in (OAuth), such as Claude’s custom connectors, and approve the connection on app.fxapi.com. Tool calls count against your plan’s quota like normal API requests.

Which MCP clients are supported?

Any client that supports remote MCP servers over streamable HTTP, including Claude Code, Claude Desktop, Cursor and VS Code. Clients that support MCP sign-in, such as Claude’s custom connectors, can sign in instead of sending a key.

What happens if a tool call fails?

The tool result contains the same machine-readable error message and status the REST API would return (for example 422 for a bad date or 429 for an exhausted quota), so the agent can correct the request or tell the user.

On this page

Keep exploring

Related pages

Use cases

Exchange rate API for AI agents and LLMs

Connect Claude and other agents to live exchange rates via the fxapi MCP server or function calling.

Read more → Features

Real-time exchange rate API

Live rates for 190+ currencies from /v1/latest, refreshed every 60 seconds on Professional and Enterprise.

Read more → Features

Currency converter API

Convert any amount at today's or a historical rate in one call.

Read more → Features

Historical exchange rates API

End-of-day rates for any date since 1999 for 190+ currencies – on every plan.

Read more → Features

Free exchange rate API

300 free requests per month, latest and historical rates, no credit card.

Read more → Guides

Exchange rate API in Python: a complete integration guide

requests, async httpx, pandas time series, Decimal conversion, caching and error handling in Python.

Read more →

Free plan · no credit card

Get your free exchange rate API key

300 requests a month, latest and historical rates, fluctuation and averages – free forever. Upgrade when you need faster updates or more requests.

Sign up for free Read the documentation

{"@context":"https://schema.org","@graph":[{"@id":"https://fxapi.com/#organization","@type":"Organization","address":{"@type":"PostalAddress","addressCountry":"AT","addressLocality":"Untersiebenbrunn","postalCode":"2284","streetAddress":"Getreidegasse 22"},"brand":{"@type":"Brand","logo":"https://fxapi.com/img/logo-fxapi.png","name":"fxapi","url":"https://fxapi.com/"},"email":"office@everapi.com","logo":{"@type":"ImageObject","height":512,"url":"https://fxapi.com/img/logo-fxapi.png","width":512},"name":"Everapi GmbH","sameAs":["https://twitter.com/everapi","https://github.com/everapihq"],"url":"https://fxapi.com/"},{"@id":"https://fxapi.com/#website","@type":"WebSite","inLanguage":"en","name":"fxapi.com","publisher":{"@id":"https://fxapi.com/#organization"},"url":"https://fxapi.com/"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://fxapi.com/","name":"fxapi","position":1},{"@type":"ListItem","item":"https://fxapi.com/mcp/","name":"MCP server","position":2}]},{"@type":"FAQPage","mainEntity":[{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools and data sources. The fxapi MCP server exposes the exchange rate API as tools, so an assistant can look up rates itself instead of guessing them."},"name":"What is an MCP server?"},{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"Either an API key or a sign-in. Send your fxapi key in the apikey header – a free key works – or use a client that supports MCP sign-in (OAuth), such as Claude’s custom connectors, and approve the connection on app.fxapi.com. Tool calls count against your plan’s quota like normal API requests."},"name":"Do I need an API key?"},{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"Any client that supports remote MCP servers over streamable HTTP, including Claude Code, Claude Desktop, Cursor and VS Code. Clients that support MCP sign-in, such as Claude’s custom connectors, can sign in instead of sending a key."},"name":"Which MCP clients are supported?"},{"@type":"Question","acceptedAnswer":{"@type":"Answer","text":"The tool result contains the same machine-readable error message and status the REST API would return (for example 422 for a bad date or 429 for an exhausted quota), so the agent can correct the request or tell the user."},"name":"What happens if a tool call fails?"}]}]}