Frankfurter Forex MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add frankfurter-forex -- uv run python -m frankfurter_forex_mcp.server
README.md

Currency rates, conversion, and exchange-rate history using the Frankfurter API

Frankfurter Forex MCP

MCP server in Python for currency rates, conversion, and exchange-rate history using the Frankfurter API.

Features

  • base_quote: latest rates from a base currency to one or many targets
  • convert_currency: converts an amount between two currencies
  • exchange_history: returns the time series for a currency pair in a date range
  • Structured error payloads with error_code, tool, and trace_id
  • Retry with exponential backoff for transient upstream failures

Tech stack

  • Python 3.11+
  • MCP Python SDK (mcp)
  • httpx async client
  • Pydantic v2
  • pytest, pytest-asyncio, ruff

Project structure

src/frankfurter_forex_mcp/
  client/frankfurter.py
  models/schemas.py
  tools/
    base_quote.py
    convert_currency.py
    exchange_history.py
  server.py
tests/

Setup

  1. Install dependencies:
uv sync --all-extras
  1. Copy environment file:
cp .env.example .env

Run MCP server (stdio)

uv run python -m frankfurter_forex_mcp.server

Use with MCP Inspector on localhost

The easiest way to expose this server in the local Inspector is using:

uv run mcp dev src/frankfurter_forex_mcp/server.py

This command starts the local Inspector bridge and shows a localhost URL in the terminal.

For a manual Inspector stdio connection flow, see `.docs/mcp-inspector-guide.md`.

Advanced MCP practices implemented

  • Strict request validation with Pydantic before external calls
  • Strict external payload validation before response serialization
  • Stable JSON error contracts for machine clients
  • stdio-safe runtime behavior (no stdout logging side effects)
  • CI pipeline for linting, testing, and package smoke checks

Run quality checks

uv run ruff check .
uv run pytest

CI

GitHub Actions workflow is available at .github/workflows/ci.yaml.

Tools (3)

base_quoteRetrieves latest rates from a base currency to one or many targets.
convert_currencyConverts an amount between two currencies.
exchange_historyReturns the time series for a currency pair in a date range.

Configuration

claude_desktop_config.json
{"mcpServers": {"frankfurter-forex": {"command": "uv", "args": ["run", "python", "-m", "frankfurter_forex_mcp.server"]}}}

Try it

What is the current exchange rate from USD to EUR?
Convert 500 GBP to JPY using the latest rates.
Show me the exchange rate history for USD to CAD for the month of January 2024.
What are the latest rates for 100 EUR against USD, GBP, and JPY?

Frequently Asked Questions

What are the key features of Frankfurter Forex?

Retrieve latest currency rates from a base currency. Convert specific amounts between two currencies. Access historical time-series data for currency pairs. Strict request and response validation using Pydantic. Built-in retry logic with exponential backoff.

What can I use Frankfurter Forex for?

Financial analysts tracking currency fluctuations over time. Developers needing real-time currency conversion in AI workflows. Travelers planning budgets based on current exchange rates. Automated reporting tools requiring accurate historical forex data.

How do I install Frankfurter Forex?

Install Frankfurter Forex by running: uv sync --all-extras

What MCP clients work with Frankfurter Forex?

Frankfurter Forex works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Frankfurter Forex docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare