Skip to main content

Python 3.12+ Experimental status

Dependabot Updates pytest

Frankfurter MCP

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 need to access the Frankfurter API as tools for language model agents exposed over the Model Context Protocol (MCP), Frankfurter MCP is what you need.

Project status

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
June 9, 2025 active Added containerisation, support for self-signed, proxies.
June 8, 2025 active Added dynamic composition.
June 7, 2025 active Added tools to cover all the functionalities of the Frankfurter API.
June 7, 2025 active Project started.

Installation

The directory where you clone this repository will be referred to as the working directory or WD hereinafter.

Install uv. To install the project with its essential dependencies in a virtual environment, run the following in the WD. To install all non-essential dependencies (which are required for developing and testing), add the --all-extras flag to the following command.

uv sync

Environment variables

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.

The following environment variables can be specified, prefixed with FASTMCP_SERVER_: HOST, PORT, DEBUG and LOG_LEVEL. See key 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 so that

Variable [Default value] and description
HTTPX_TIMEOUT [5.0] The time for the underlying HTTP client to wait, in seconds, for a response.
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.
MCP_SERVER_TRANSPORT [streamable-http] The acceptable options are stdio, sse or streamable-http. Given the use-case of running this MCP server as a remotely accessible endpoint, there is no real reason to choose stdio.
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.

Usage (with pip)

Add this package from PyPI using pip in a virtual environment (possibly managed by conda or pyenv) and then start the server by running the following.

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

Usage (self-hosted server using uv)

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

If you want to run it without uv, assuming that the appropriate virtual environment has been created in the .venv within the WD, you can start the server calling the following.

./.venv/bin/python -m frankfurtermcp.server

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. To exit the server, use the Ctrl+C key combination.

Usage (self-hosted server using Docker)

There are two Dockerfiles provided in this repository.

  • pypi.dockerfile for using the version of frankfurtermcp on PyPI.
  • local.dockerfile for using the latest version, which can contain your edits to the code if you do make edits.

Using the version available on PyPI

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.

docker build -f pypi.dockerfile -t frankfurtermcp-pypi .
docker create -p 8000:8000/tcp --name frankfurtermcp-pypi-container frankfurtermcp-pypi
docker start frankfurtermcp-pypi-container

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.

Using the local version

Before containerising the local version, you must build the project distribution wheel file and ensure that only one such wheel file exists. To do so, run the following in WD.

rm -fR dist
uv build

Once the distribution has been built, to build the Docker image, create the container and start it, run the following in WD. Choose shorter names for the image and container if you prefer.

docker build -f local.dockerfile -t frankfurtermcp-local .
docker create -p 8000:8000/tcp --name frankfurtermcp-local-container frankfurtermcp-local
docker start frankfurtermcp-local-container

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.

Usage (dynamic mounting with FastMCP)

To see how to use the MCP server by mounting it dynamically with FastMCP, check the file src/frankfurtermcp/composition.py.

Contributing

Install pre-commit for Git and ruff. Then enable pre-commit by running the following in the WD.

pre-commit install

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Testing

To run the provided test cases, execute the following. Add the flag --capture=tee-sys to the command to display further console output.

Note that for the tests to succeed, the environment variable MCP_SERVER_TRANSPORT must be set to either sse or streamable-http, or not set at all, in which case it will default to streamable-http.

uv run --group test pytest tests/

License

MIT.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

frankfurtermcp-0.1.8.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

frankfurtermcp-0.1.8-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file frankfurtermcp-0.1.8.tar.gz.

File metadata

  • Download URL: frankfurtermcp-0.1.8.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for frankfurtermcp-0.1.8.tar.gz
Algorithm Hash digest
SHA256 70397530998726f81ab734d765519b8e1be27ffe757903ff290de656349216a2
MD5 1ba393fba3bdfbeea221702fa6eaaab1
BLAKE2b-256 2f45e141f9c95dd5171fcba33000918b24e44ed466151495f59f7342971f99a8

See more details on using hashes here.

File details

Details for the file frankfurtermcp-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for frankfurtermcp-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b57812cd3a2857890ced6acd2c72a09dde0fe58f449b55d673824cb66a4650c4
MD5 ff97af4aec0d2fa052b482f89f2baa9a
BLAKE2b-256 2f3c7623d8597038f0c077f7d301823ace1fc9062074a15d3e9ba1eb8c9c80cd

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0.post1

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5.post0

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.8 This release

2 files

0.1.6

2 files

0.1.5

2 files

0.1.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page