A Model Context Protocol (MCP) server that provides currency conversion functionality using the ExchangeRate-API.
- Convert amounts between different currencies using real-time exchange rates
- Support for about 161 currencies currently
- Error handling for invalid currency codes, API errors, and network issues
- Python 3.12+
uvpackage manager- ExchangeRate-API key (free tier available)
-
Clone this repository
-
Install dependencies:
uv sync
-
Copy the
.env.examplefile into your.env:cp .env.example .env -
Replace
your_api_keyin the.envwith your actual API key.You can get your free API key from ExchangeRate-API
Copy and paste this in the claude_desktop_config.json file:
{
"mcpServers": {
"exchange-rate-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/exchange-rate-mcp",
"run",
"main.py"
]
}
}
}Once configured, you can use the convert_currency tool in Claude to convert between currencies:
convert_currency(100, "USD", "EUR")- Convert 100 USD to EURconvert_currency(50, "GBP", "JPY")- Convert 50 GBP to JPY
- "uv: command not found": Make sure
uvis installed and the full path is specified in the configuration - "Invalid API key": Check that your
.envfile contains a valid ExchangeRate-API key