mcp-cbr-rates is a Model Context Protocol (MCP) server that exposes public data from the Central Bank of Russia (Центральный банк РФ, CBR), including currency quotes, the key rate, inflation, and a compact macro snapshot, for use by AI agents. The project is part of the atomno series of MCP servers, focused on the Russian fintech ecosystem. It is fully open source, requires no API key, and is built on the CBR's official public endpoints.
Purpose The project is aimed at AI agent scenarios that need public financial data from the Russian central bank, such as querying the official exchange rate for a given day, retrieving historical exchange rate trends for a period, reading the latest key rate and inflation data, or getting a comprehensive macro statistics snapshot in one go. The data endpoints are all read-only and free.
Main capabilities It provides five high-quality MCP tools, each with a strict Pydantic schema: get_rate, history_rates, key_rate, inflation, statistics. Built-in TTL (Time-To-Live) caching: daily quotes are cached for 1 hour, historical series for 24 hours, treating the data source politely. Uses async httpx transport, with automatic retry on 5xx errors. Secure XML parsing via defusedxml. The project includes more than 50 unit tests, using respx to mock HTTP, with coverage of no less than 80%. No keys, telemetry, or third-party trackers.
Usage It can be installed from PyPI (recommended), or from source. It supports use with clients such as Cursor, Claude Desktop, and Claude Code. For Cursor, configuration must be added in .cursor/mcp.json (or globally in ~/.cursor/mcp.json); for Claude Desktop, it must be added to claude_desktop_config.json, with the Windows configuration located at %APPDATA%\Claude\claude_desktop_config.json, and macOS at ~/Library/Application Support/Claude/claude_desktop_config.json. The following are example usages given in the materials (in plain English descriptions):- "What was the official EUR rate on April 25, 2024?" Tool: get_rate(char_code="EUR", on_date="2024-04-25").
- "Plot the daily USD-RUB rate over the last 90 days." Tool: history_rates(char_code="USD", date_from=..., date_to=...).
- "Give me the latest key rate, USD/EUR/CNY, and inflation in one go." Tool: statistics(). The history_rates window is capped at 366 days; longer periods require repeated calls to the tool. All settings are optional and read from environment variables; for compatibility, the legacy CBR_* names are still accepted, but new configurations should use MCP_CBR_*. No API key configuration is required, and the CBR endpoints used are all public.
Data sources https://www.cbr.ru/scripts/XML_daily.asp — daily currency quotes. https://www.cbr.ru/scripts/XML_dynamic.asp — historical currency series. https://www.cbr.ru/scripts/XML_valFull.asp — currency code lookup. https://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx — SOAP service for the CBR key rate. https://www.cbr.ru/hd_base/infl/ — monthly year-over-year inflation table. All endpoints are read-only and free.
Use cases Suitable for AI agent development and integration scenarios that need access to the Russian central bank's public data in the form of standardized tools, including exchange rate queries, historical trend analysis, key rate and inflation reading, and macro statistics snapshot retrieval.
Limitations This project is not affiliated in any way with the Central Bank of Russia and is an unofficial, best-effort wrapper for public data. Use at your own risk; the author assumes no responsibility for the freshness, accuracy, or suitability of the data delivered through this server. If the CBR's HTML or XML schemas change, some tools may stop working until this package is updated; if regressions are found, an issue should be filed. The license is MIT, see LICENSE for details.