mcpField
C
Currency Exchange Service

Currency Exchange Service

Local
github.com/ankitbelbase17Productivity3Updated 78w ago

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

  1. 01Get current rates between two currencies
  2. 02List supported currency codes and names
  3. 03Communicate over SSE
  4. 04Deploy with Docker

Use cases

  1. 01Check the rate between two currencies
  2. 02Review the currencies supported by the service
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"Currency_Exchange_MCP": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"compose"
]
}
}
}
Run commanddocker run -i --rm compose

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocicompose

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Currency 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

Installation

Using Docker (Recommended)
  1. Clone the repository:
git clone <repository-url>
cd <repository-name>
  1. Create a .env file as instructed in .env.example in 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
  1. Build and start the Docker container:
docker compose up -d
Using Python directly
  1. Clone the repository:
git clone <repository-url>
cd <repository-name>
  1. Create a .env file in the project root:
# Get your API key from https://www.exchangerate-api.com/
EXCHANGE_RATE_API_KEY=your_api_key_here
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 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:

  1. get_exchange_rate(from_currency, to_currency)

    • Returns the current exchange rate between two currencies
    • Example: Get USD to EUR rate
  2. list_supported_currencies()

    • Returns a list of all supported currencies
    • Includes currency codes and names

Development

To modify the service:

  1. Make changes to mcpserver/server.py
  2. Test using the client script
  3. Rebuild the Docker container if using Docker:
docker compose build --no-cache
docker compose up -d

Getting an API Key

  1. Visit https://www.exchangerate-api.com/
  2. Sign up for a free account
  3. Get your API key from the dashboard
  4. Add it to your .env file as shown in the installation steps

Comments

Markdown supported

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.