by anirbanbasu
Retrieve up‑to‑date and historical currency exchange rates, perform conversions, and list supported currencies through a Model Context Protocol (MCP) server backed by the Frankfurter API.
Frankfurter MCP exposes the functionality of the Frankfurter API as MCP tools, enabling language‑model agents and other MCP clients to query supported currencies, get latest or historical exchange rates, and perform currency conversions directly from the server.
uv sync --no-dev, pip install frankfurtermcp, or Docker)..env file (e.g., FAST_MCP_HOST, FAST_MCP_PORT, FRANKFURTER_API_URL).uv run frankfurtermcp # default stdio transport
# or for HTTP transports
MCP_SERVER_TRANSPORT=streamable-http uv run frankfurtermcp
stdio, sse, or streamable‑http).get_supported_currencies, get_latest_exchange_rates, convert_currency_latest, get_historical_exchange_rates, convert_currency_specific_date).stdio, Server‑Sent Events (sse), and Streamable HTTP.Q: Do I need an API key?
A: No. The public Frankfurter API is free and does not require authentication. If you self‑host the API, set FRANKFURTER_API_URL accordingly.
Q: Which Python version is required? A: Python 3.12 or newer.
Q: How do I change the server port?
A: Set FAST_MCP_PORT (or FAST_MCP_HOST) in the .env file or export it before starting the server.
Q: Can I run the server behind a proxy with a self‑signed certificate?
A: Yes. Adjust HTTPX_TIMEOUT, HTTPX_VERIFY_SSL, SSL_CERT_FILE, and SSL_CERT_DIR as needed.
Q: What transports are supported for client connections?
A: stdio (default), sse (Server‑Sent Events), and streamable‑http (newer HTTP streaming).
Frankfurter is a useful API for latest currency exchange rates, historical data, or time series published by sources such as the European Central Bank. Should you have to access the Frankfurter API as tools for language model agents exposed over the Model Context Protocol (MCP), Frankfurter MCP is what you need.
If your objective is to use the tools available on this MCP server, please refer to the usage > client sub-section below.
The directory where you clone this repository will be referred to as the working directory or WD hereinafter.
Install just to manage project tasks.
Install uv. To install the project with its minimal dependencies in a virtual environment, run the just install in the WD. To install all non-essential dependencies (which are required for developing and testing), run just install-all instead.
Following is a list of environment variables that can be used to configure the application. A template of environment variables is provided in the file .env.template. Note that the default values listed in the table below are not always the same as those in the .env.template file.
The following environment variables can be specified, prefixed with FASTMCP_: HOST, PORT, DEBUG and LOG_LEVEL. See global configuration options for FastMCP. Note that on_duplicate_ prefixed options specified as environment variables will be ignored.
The underlying HTTP client also respects some environment variables, as documented in the HTTPX library. In addition, SSL_CERT_FILE and SSL_CERT_DIR can be configured to use self-signed certificates of hosted API endpoint or intermediate HTTP(S) proxy server(s).
Frankfurter MCP will cache calls to the Frankfurter API to improve performance. The cache happens with two different strategies. For API calls whose responses do not change for certain parameters, e.g., historical rate lookup, a least recently used (LRU) cache is used. For API calls whose responses do change, e.g., latest rate lookup, a time-to-live (TTL) cache is used with a default time-to-live set to 15 minutes. The cache parameters can be adjusted using the environment variables, see below.
| Variable | [Default value] and description |
|---|---|
LOG_LEVEL |
[INFO] The level for logging. Changing this level also affects the log output of other dependent libraries that may use the same environment variable. See valid values at Python logging documentation. |
HTTPX_TIMEOUT |
[5.0] The time for the underlying HTTP client to wait, in seconds, for a response from the Frankfurter API. |
HTTPX_VERIFY_SSL |
[True] This variable can be set to False to turn off SSL certificate verification, if, for instance, you are using a proxy server with a self-signed certificate. However, setting this to False is advised against: instead, use the SSL_CERT_FILE and SSL_CERT_DIR variables to properly configure self-signed certificates. |
FAST_MCP_HOST |
[localhost] This variable specifies which host the MCP server must bind to unless the server transport (see below) is set to stdio. |
FAST_MCP_PORT |
[8000] This variable specifies which port the MCP server must listen on unless the server transport (see below) is set to stdio. |
MCP_SERVER_TRANSPORT |
[stdio] The acceptable options are stdio, sse or streamable-http. However, in the .env.template, the default value is set to stdio. |
MCP_SERVER_INCLUDE_METADATA_IN_RESPONSE |
[True] This specifies if additional metadata will be included with the MCP response from each tool call. The additional metadata, for example, will include the API URL of the Frankfurter server, amongst others, that is used to obtain the responses. |
FRANKFURTER_API_URL |
[https://api.frankfurter.dev/v1] If you are self-hosting the Frankfurter API, you should change this to the API endpoint address of your deployment. |
LRU_CACHE_MAX_SIZE |
[1024] The maximum size of the least recently used (LRU) cache for API calls. |
TTL_CACHE_MAX_SIZE |
[256] The maximum size of the time-to-live (TTL) cache for API calls. |
TTL_CACHE_TTL_SECONDS |
[900] The time limit, in seconds, of the time-to-live (TTL) cache for API calls. |
The following sub-sections illustrate how to run the Frankfurter MCP as a server and how to access it from MCP clients.
While running the server, you have the choice to use stdio transport or HTTP options (sse or the newer streamable-http).
Using default settings and MCP_SERVER_TRANSPORT set to sse or streamable-http, the MCP endpoint will be available over HTTP at http://localhost:8000/sse for the Server Sent Events (SSE) transport, or http://localhost:8000/mcp for the streamable HTTP transport.
If you want to run Frankfurter MCP with stdio transport and the default parameters, execute the commands below without using the .env.template file.
uvOptional: Copy the .env.template file to a .env file in the WD, to modify the aforementioned environment variables, if you want to use anything other than the default settings. Or, on your shell, you can export the environment variables that you wish to modify.
Run the following in the WD to start the MCP server.
uv run frankfurtermcp
pip from PyPI packageAdd this package from PyPI using pip in a virtual environment (possibly managed by uv, pyenv or conda) and then start the server by running the following.
Optional: Add a .env file with the contents of the .env.template file if you wish to modify the default values of the aforementioned environment variables. Or, on your shell, you can export the environment variables that you wish to modify.
pip install frankfurtermcp
python -m frankfurtermcp.server
There are two Dockerfiles provided in this repository.
local.dockerfile for containerising the Frankfurter MCP server.smithery.dockerfile for deploying to Smithery AI, which you do not have to use.To build the image, create the container and start it, run the following in WD. Choose shorter names for the image and container if you prefer.
If you change the port to anything other than 8000 in .env.template, do remember to change the port number references in the following command. Instead of passing all the environment variables using the --env-file option, you can also pass individual environment variables using the -e option.
docker build -t frankfurtermcp -f local.dockerfile .
docker run -it --rm -p 8000:8000/tcp --env-file .env.template --expose 8000 frankfurtermcp
Upon successful build and container start, the MCP server will be available over HTTP at http://localhost:8000/sse for the Server Sent Events (SSE) transport, or http://localhost:8000/mcp for the streamable HTTP transport.
The currently available cloud hosted options are as follows.
This sub-section explains ways for a client to connect and test the FrankfurterMCP server.
The MCP Inspector is an official Model Context Protocol tool that can be used by developers to test and debug MCP servers. This is the most comprehensive way to explore the MCP server.
To use it, you must have Node.js installed. The best way to install and manage node as well as packages such as the MCP Inspector is to use the Node Version Manager (or, nvm). Once you have nvm installed, you can install and use the latest Long Term Release version of node by executing the following.
nvm install --lts
nvm use --lts
Following that (install and) run the MCP Inspector by executing the following in the WD.
npx @modelcontextprotocol/inspector uv run frankfurtermcp
This will create a local URL at port 6274 with an authentication token, which you can copy and browse to on your browser. Once on the MCP Inspector UI, press Connect to connect to the MCP server. Thereafter, you can explore the tools available on the server.
The server entry to run with stdio transport that you can use with systems such as Claude Desktop, Visual Studio Code, and so on is as follows.
{
"command": "uv",
"args": [
"run",
"frankfurtermcp"
]
}
Instead of having frankfurtermcp as the last item in the list of args, you may need to specify the full path to the script, e.g., WD/.venv/bin/frankfurtermcp. Likewise, instead of using uv, you could also have the following JSON configuration with the path properly substituted for python3.12, for instance such as WD/.venv/bin/python3.12.
{
"command": "python3.12",
"args": [
"-m",
"frankfurtermcp.server"
]
}
FrankfurterMCP has the following MCP features.
The following table lists the names of the tools as exposed by the FrankfurterMCP server. The descriptions shown here are for documentation purposes, which may differ from the actual descriptions exposed over the model context protocol.
| Name | Description |
|---|---|
get_supported_currencies |
Get a list of currencies supported by the Frankfurter API. |
get_latest_exchange_rates |
Get latest exchange rates in specific currencies for a given base currency. |
convert_currency_latest |
Convert an amount from one currency to another using the latest exchange rates. |
get_historical_exchange_rates |
Get historical exchange rates for a specific date or date range in specific currencies for a given base currency. |
convert_currency_specific_date |
Convert an amount from one currency to another using the exchange rates for a specific date. |
The required and optional arguments for each tool are not listed in the following table for brevity but are available to the MCP client over the protocol.
Install prek. Then enable prek by running the following in the WD.
prek install
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
To run the provided test cases, execute the following. Add the flag --capture=tee-sys to the command to display further console output.
uv run --group test pytest tests/
Invoke just test-coverage to run all the tests and generate a coverage report as follows. If all tests are run, the generated coverage report may look like the one below.
Name Stmts Miss Cover Missing
--------------------------------------------------------------
src/frankfurtermcp/__init__.py 22 0 100%
src/frankfurtermcp/common.py 5 0 100%
src/frankfurtermcp/mixin.py 47 0 100%
src/frankfurtermcp/model.py 18 0 100%
src/frankfurtermcp/server.py 117 0 100%
--------------------------------------------------------------
TOTAL 209 0 100%
Test coverage complete.
MIT.
Following is a table of some updates regarding the project status. Note that these do not correspond to specific commits or milestones.
| Date | Status | Notes or observations |
|---|---|---|
| November 26, 2025 | active | Using the new ToolResult to package response metadata. |
| November 21, 2025 | active | New tooling using prek (instead of pre-commit), ty (instead of mypy) and just. |
| September 6, 2025 | active | Code refactoring and cleanup. |
| June 27, 2025 | active | Successful remote deployments on Glama.AI and Smithery.AI. |
| June 9, 2025 | active | Added containerisation, support for self-signed proxies. |
| June 7, 2025 | active | Project started. Added tools to cover all the functionalities of the Frankfurter API. |
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by stripe
Provides SDKs and tools to integrate Stripe's billing and API services with large language models, agent frameworks, and token‑metering for AI‑powered products and businesses.
by goat-sdk
Enables AI agents to send and receive payments, purchase goods and services, execute investment strategies, tokenize assets, and obtain financial insights by leveraging blockchains, stablecoins, and wallets.
by financial-datasets
Provides access to income statements, balance sheets, cash flow statements, stock prices, market news, and cryptocurrency data through MCP tools for AI assistants.
by alpacahq
Enables large language models to trade stocks and options, retrieve real‑time and historical market data, and manage portfolios using plain English commands through a local or remote MCP server.
by stefanoamorelli
Provides an MCP server that connects AI models to SEC EDGAR filings, enabling real‑time retrieval of company filings, financial statements, and insider‑trading data with exact XBRL precision and verifiable filing references.
by ariadng
Enables AI LLMs to execute trades on the MetaTrader 5 platform through the Model Context Protocol.
by XeroAPI
Provides a bridge between the Model Context Protocol and Xero's API, enabling standardized access to Xero accounting and business features.
by kukapay
Provides a comprehensive set of cryptocurrency technical analysis indicators and ready‑to‑use trading strategies through an MCP interface, enabling AI agents and applications to generate buy, hold, or sell signals.
by kukapay
Integrates the Freqtrade cryptocurrency trading bot with MCP, exposing its REST API as tools for AI agents to perform automated trading operations.