pilpat/nbp-currency-mcp
3.2
If you are the rightful owner of nbp-currency-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The NBP Currency Exchange MCP Server provides natural language access to Polish National Bank (NBP) currency exchange rates, offering buy and sell rates for 13 major currencies from Table C.
Tools
4
Resources
0
Prompts
0
NBP Currency Exchange MCP Server
Natural language access to Polish National Bank (NBP) currency exchange rates. Get buy and sell rates for 13 major currencies from Table C with simple queries.
Features
- =ã Natural Language Queries - Ask in plain English: "What's the USD rate?"
- =± Buy & Sell Rates - Complete Table C data from NBP
- =Å Historical Data - Access rates from any date since 2002
- ¡ Smart Caching - 5-minute cache for optimal performance
- < 13 Major Currencies - USD, EUR, GBP, CHF, AUD, CAD, DKK, NOK, SEK, XDR, CZK, HUF, JPY
Quick Start
# Run the server
fastmcp run nbp_currency_server.py
# Install to Claude Desktop
fastmcp install claude-desktop nbp_currency_server.py --server-name "NBP Currency"
# HTTP server mode
fastmcp run nbp_currency_server.py --transport http --port 8000
Example Queries
# Basic rate queries
"USD rate"
"EUR exchange rate"
"What's the GBP rate?"
# Specific rate types
"USD buy rate"
"EUR sell price"
# Historical queries
"USD rate yesterday"
"EUR rate 2024-09-25"
# All currencies
"all currencies"
"show all exchange rates"
Available Tools
get_currency_rate_tool(currency, rate_type, date)- Get specific currency ratesquery_exchange_rates(query)- Natural language currency querieslist_available_currencies()- List all supported currenciesget_all_current_rates()- Complete current Table C
Available Resources
currencies://available- List of supported currenciesrates://current- Current exchange rates tablehelp://queries- Query examples and syntaxapi://documentation- NBP API documentationsetup://installation- Installation guide
Supported Currencies
| Code | Currency |
|---|---|
| USD | US Dollar |
| EUR | Euro |
| GBP | British Pound |
| CHF | Swiss Franc |
| AUD | Australian Dollar |
| CAD | Canadian Dollar |
| DKK | Danish Krone |
| NOK | Norwegian Krone |
| SEK | Swedish Krona |
| XDR | Special Drawing Rights |
| CZK | Czech Koruna |
| HUF | Hungarian Forint |
| JPY | Japanese Yen |
Output Format
All responses include:
currency_name- Full currency namecurrency_code- 3-letter ISO codetable_effective_date- Publication datebuy_rate- Bank buying rate (bid)sell_rate- Bank selling rate (ask)
Data Source
This server uses the official NBP Web API which provides:
- Real-time exchange rates
- Historical data since January 2, 2002
- Official rates used in Poland
- No authentication required
- Daily updates (working days)
Deployment
FastMCP Cloud
fastmcp deploy nbp_currency_server.py --name "NBP Currency Rates"
Local Development
# Install dependencies
uv add fastmcp httpx pydantic python-dateutil
# Run locally
fastmcp run nbp_currency_server.py --transport http --port 8000
Requirements
- Python 3.12+
- Internet connection for NBP API access
- No API keys required
Technical Details
- Framework: FastMCP 2.0
- HTTP Client: httpx (async)
- Validation: Pydantic models
- Caching: 5-minute TTL using FastMCP Context
- Date Parsing: python-dateutil
Error Handling
- Weekend/holiday data: NBP doesn't publish on non-working days
- Invalid currencies: Clear error messages with supported list
- Network issues: Automatic retry and graceful degradation
- Cache failures: Fallback to direct API calls
License
MIT License - see the official NBP API terms for data usage.