About Currency Exchange Service
Currency Exchange Service is a Python-based service for checking current rates between supported currencies and listing those currencies. It uses SSE communication and supports Docker deployment.
Key features
- 01Get current rates between two currencies
- 02List supported currency codes and names
- 03Communicate over SSE
- 04Deploy with Docker
Use cases
- 01Check the rate between two currencies
- 02Review the currencies supported by the service
- 03Deploy the exchange service with Docker
MCP support
The MCP server exposes tools to retrieve an exchange rate and list supported currencies. It communicates over SSE.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMECurrency Exchange Service
A currency exchange service that provides real-time exchange rates and lists supported currencies.
Features
- Get current exchange rates between any two supported currencies
- List all supported currencies
- Docker support for easy deployment
- SSE (Server-Sent Events) based communication
Prerequisites
- Python 3.11 or higher
- Docker (optional, for containerized deployment)
- Git
- Exchange Rate API key (get it from https://www.exchangerate-api.com/)
Installation
Using Docker (Recommended)
- Clone the repository:
git clone <repository-url>
cd <repository-name>
- Create a
.envfile as instructed in.env.examplein the project root:
# Get your API key from https://www.exchangerate-api.com/
- `EXCHANGE_RATE_API_KEY`: Your Exchange Rate API key
- `GROQ_API_KEY`: Your GROQ API key
- Build and start the Docker container:
docker compose up -d
Using Python directly
- Clone the repository:
git clone <repository-url>
cd <repository-name>
- Create a
.envfile in the project root:
# Get your API key from https://www.exchangerate-api.com/
EXCHANGE_RATE_API_KEY=your_api_key_here
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r mcpserver/requirements.txt
Usage
Using the Python Client
Run the client script to interact with the service:
python mcpserver/client-sse.py
This will:
- List all available tools
- Show an example exchange rate (INR to USD)
- Display a list of supported currencies
API Documentation
The service provides two main tools:
-
get_exchange_rate(from_currency, to_currency)- Returns the current exchange rate between two currencies
- Example: Get USD to EUR rate
-
list_supported_currencies()- Returns a list of all supported currencies
- Includes currency codes and names
Development
To modify the service:
- Make changes to
mcpserver/server.py - Test using the client script
- Rebuild the Docker container if using Docker:
docker compose build --no-cache
docker compose up -d
Getting an API Key
- Visit https://www.exchangerate-api.com/
- Sign up for a free account
- Get your API key from the dashboard
- Add it to your
.envfile as shown in the installation steps
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.