mcp-based currency exchange rate retrieval with ecb data
Exposes the Frankfurter API (European Central Bank currency data) as MCP tools via FastMCP framework, enabling LLM agents to fetch current and historical exchange rates through a standardized Model Context Protocol interface. Implements async tool registration with readOnlyHint and openWorldHint annotations, allowing Claude Desktop, VS Code, and HTTP-based clients to invoke currency operations without direct API knowledge.
Unique: Implements a dedicated MCP server wrapping Frankfurter API with dual-layer caching (TTL cache for recent rates, LRU cache for historical data) and multi-transport support (stdio for desktop, SSE/streamable-http for cloud), rather than requiring agents to call REST APIs directly or use generic HTTP tools
vs alternatives: Provides tighter integration with Claude and MCP-aware tools than generic REST API wrappers, with built-in caching to reduce API calls and latency compared to direct Frankfurter API consumption
latest exchange rate fetching with 15-minute ttl caching
Implements get_latest_exchange_rates tool that queries Frankfurter API for current exchange rates and caches results for 15 minutes using a TTL (time-to-live) cache strategy. Accepts base currency and target currencies as parameters, returning structured JSON with rates, timestamp, and metadata. Cache is transparent to the caller and automatically expires stale data.
Unique: Uses FastMCP's async tool registration with explicit TTL caching layer (not relying on HTTP cache headers), allowing predictable cache behavior independent of Frankfurter API's cache directives. Cache is managed in-process with automatic expiration, reducing redundant API calls for high-frequency agent interactions.
vs alternatives: More efficient than calling Frankfurter API directly on every agent step (reduces latency and API load), but simpler than implementing a distributed cache like Redis since it targets single-server deployments (Claude Desktop, local VS Code)
currency conversion with latest rates
Implements convert_currency_latest tool that performs real-time currency conversion by fetching current exchange rates and applying them to a specified amount. Accepts amount, source currency, and target currency as parameters. Internally calls get_latest_exchange_rates and applies the rate to compute the converted amount, returning both the result and the rate used.
Unique: Wraps the Frankfurter API's conversion endpoint as an MCP tool, abstracting away HTTP details and providing a simple amount-in/amount-out interface. Internally reuses the cached get_latest_exchange_rates call, so multiple conversions in the same 15-minute window share the same cached rate fetch.
vs alternatives: Simpler for LLM agents than calling REST APIs directly or implementing conversion logic manually; caching ensures consistent rates across multiple conversions in a single agent session
historical exchange rate retrieval with lru caching
Implements get_historical_exchange_rates tool that fetches exchange rates for a specific date or date range from the Frankfurter API. Uses an LRU (Least Recently Used) cache with 1024-item capacity to cache historical queries, enabling efficient repeated lookups of the same historical periods without redundant API calls. Accepts base currency, target currencies, and date/date range parameters.
Unique: Implements LRU caching specifically for historical queries (separate from TTL cache for latest rates), recognizing that historical data is immutable and benefits from long-term caching. 1024-item capacity balances memory usage against typical agent workflows that may query 10-50 distinct historical periods.
vs alternatives: More efficient than calling Frankfurter API repeatedly for the same historical dates; LRU strategy is appropriate for historical data (unlike TTL, which assumes data freshness matters) and avoids unbounded memory growth
currency conversion with historical rates
Implements convert_currency_specific_date tool that performs currency conversion using historical exchange rates for a specified date. Accepts amount, source currency, target currency, and date parameters. Internally calls get_historical_exchange_rates and applies the rate from that date, returning the converted amount and the historical rate used. Results are cached using the same LRU strategy as get_historical_exchange_rates.
Unique: Provides point-in-time currency conversion by combining historical rate retrieval with conversion logic, enabling agents to reason about past financial transactions. LRU caching ensures that repeated conversions on the same date reuse cached rate data without API calls.
vs alternatives: Enables historical financial analysis in agents without requiring manual rate lookups or external databases; caching makes repeated historical conversions efficient
supported currency enumeration
Implements get_supported_currencies tool that returns a list of all ISO 4217 currency codes supported by the Frankfurter API. This is a lightweight, read-only operation that queries the Frankfurter API's /currencies endpoint and returns a structured list of currency codes and names. No caching is applied since the supported currency set changes infrequently.
Unique: Exposes Frankfurter API's currency enumeration as a discoverable MCP tool, allowing agents to dynamically discover supported currencies without hardcoding a list. No caching is applied, reflecting the assumption that currency support changes rarely and the endpoint is lightweight.
vs alternatives: More maintainable than hardcoding currency lists in agent code; allows agents to adapt if Frankfurter API adds/removes currencies without code changes
dual-layer caching with ttl and lru strategies
Implements a hybrid caching architecture that uses TTL (time-to-live) caching for recent exchange rates (15-minute expiry) and LRU (least-recently-used) caching for historical queries (1024-item capacity). This design recognizes that recent rates need freshness guarantees while historical data is immutable and benefits from long-term caching. Caching is transparent to tool callers and automatically managed by the FrankfurterMCP class.
Unique: Implements a two-tier caching strategy tailored to currency data semantics: TTL for mutable recent rates (which change daily) and LRU for immutable historical rates (which never change). This is more sophisticated than a single cache strategy and avoids the complexity of external cache systems.
vs alternatives: More efficient than no caching (reduces API calls and latency) and simpler than Redis-based caching for single-server deployments; TTL+LRU strategy is semantically appropriate for currency data vs generic caching approaches
multi-transport mcp server deployment
Implements FrankfurterMCP as a FastMCP-based server that supports multiple transport protocols: stdio (for local desktop integrations like Claude Desktop and VS Code) and HTTP-based transports (SSE and streamable-http for cloud and browser-based clients). Transport selection is configured at deployment time, allowing the same server code to run in different environments without modification.
Unique: Leverages FastMCP framework's transport abstraction to support stdio (local) and HTTP (remote) transports from the same codebase, enabling flexible deployment across desktop, cloud, and browser environments without code duplication. Transport is configured via environment or deployment configuration, not code.
vs alternatives: More flexible than single-transport MCP servers; allows the same currency tool logic to serve both local (Claude Desktop) and remote (cloud) clients without reimplementation
+1 more capabilities