mcp-cbr-rates
mcp-cbr-rates is an MCP server that exposes official Bank of Russia (CBR) financial data to AI agents, requiring no API keys. It provides the following tools:
get_rate(char_code, on_date): Retrieve the official CBR exchange rate for a currency (e.g., USD, EUR, CNY) on a specific date or the latest available date.history_rates(char_code, date_from, date_to): Fetch a daily exchange rate time series for a currency over a date range (up to 366 days per call).key_rate(date_from, date_to): Access the CBR key interest rate as a time series for a specified period, defaulting to the most recent 30 days.inflation(year_from, year_to): Get monthly year-over-year CPI inflation data published by CBR, filterable by year range.statistics(): Get a compact macroeconomic snapshot combining the latest key rate, USD/EUR/CNY exchange rates, and the most recent inflation figure — all in a single call.
mcp-cbr-rates
A Model Context Protocol (MCP) server that exposes public Bank of Russia (Центральный банк РФ, CBR) data — currency quotes, key rate, inflation and a compact macro snapshot — to AI agents.
mcp-cbr-rates is part of the atomno family of MCP
servers focused on the Russian fintech ecosystem. It is fully open-source,
requires no API keys, and is built on top of the official public CBR
endpoints.
Features
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) cache: 1 hour for daily quotes, 24 hours for historical series, to be polite to the source.
Async
httpxtransport with automatic retries on 5xx errors.Safe XML parsing via
defusedxml.50+ unit tests with
respx-mocked HTTP, ≥80 % coverage.No secrets, no telemetry, no third-party trackers.
Related MCP server: mcp-fns-check
Quick start
Install from PyPI (recommended)
pipx install atomno-mcp-cbr-rates
atomno-mcp-cbr-rates # starts the MCP server over stdioOr with uv:
uv tool install atomno-mcp-cbr-ratesInstall from source
git clone https://github.com/atomno-mcp/mcp-cbr-rates.git
cd mcp-cbr-rates
pip install -e .
atomno-mcp-cbr-rates # starts the MCP server over stdioUse with Cursor
Add the following to .cursor/mcp.json (or your global ~/.cursor/mcp.json):
{
"mcpServers": {
"cbr-rates": {
"command": "atomno-mcp-cbr-rates"
}
}
}Use with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"cbr-rates": {
"command": "atomno-mcp-cbr-rates"
}
}
}On Windows the config lives at
%APPDATA%\Claude\claude_desktop_config.json; on macOS at
~/Library/Application Support/Claude/claude_desktop_config.json.
Use with Claude Code
claude mcp add cbr-rates -- atomno-mcp-cbr-ratesTools
Name | Inputs | Returns |
|
|
|
|
|
|
|
|
|
|
|
|
| (none) |
|
Examples in plain English:
"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; for longer periods, call
the tool repeatedly.
Configuration
All settings are optional and read from environment variables:
Variable | Default | Description |
|
| HTTP timeout in seconds for CBR calls. |
|
| Cache TTL for daily quotes (seconds). |
|
| Cache TTL for historical series and SOAP responses. |
|
| Standard Python log level. |
Legacy CBR_* names are still accepted for compatibility, but new configs should use MCP_CBR_*.
There are no API keys to configure — all CBR endpoints used here are public.
Development
git clone https://github.com/atomno-mcp/mcp-cbr-rates.git
cd mcp-cbr-rates
python -m venv .venv && source .venv/bin/activate # or .\.venv\Scripts\activate on Windows
pip install -e ".[dev]"
pytest --cov=src/mcp_cbr_ratesLayout:
apps/mcp-cbr-rates/
├── src/mcp_cbr_rates/
│ ├── server.py # FastMCP entry point, tool registration
│ ├── tools.py # high-level async tools with caching
│ ├── client.py # httpx wrapper around CBR XML / SOAP / HTML endpoints
│ ├── schemas.py # Pydantic v2 models for inputs & outputs
│ ├── cache.py # async TTL cache
│ ├── currency_codes.py # static ISO → CBR id map (with dynamic fallback)
│ └── errors.py # typed exception hierarchy
└── tests/ # respx-mocked unit tests + fixturesData 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 of charge.
Disclaimer
This project is not affiliated with the Bank of Russia in any way. It is an unofficial, best-effort wrapper around publicly available data. Use at your own risk; the authors disclaim any responsibility for the freshness, accuracy or applicability of the data delivered through this server.
If CBR's HTML or XML schemas change, individual tools may stop working until this package is updated. Please open an issue if you notice a regression.
License
MIT — see LICENSE.
Available Tools
5 toolsget_rateA
Get the official Bank of Russia exchange rate for a single currency on a given date (or the latest published date if 'on_date' is omitted). Returns nominal, value, per-unit rate and effective quote date.
Inputs: char_code (required), on_date. Returns: A single currency quote at a given date.
history_ratesA
Get the official CBR exchange-rate series for a single currency between two dates inclusive. Range capped at 366 days; for longer windows call repeatedly.
Inputs: date_to (required), char_code (required), date_from (required). Returns: A historical series of quotes for a single currency.
inflationA
Get monthly year-over-year consumer price index (CPI) inflation as published by CBR for the given year range (defaults to the previous and current year).
Inputs: year_to, year_from. Returns: A range of monthly inflation observations.
key_rateA
Get the CBR key-rate (ставка рефинансирования) time series for the requested range. Defaults to the most recent 30 days.
Inputs: date_to, date_from. Returns: Key-rate observations between ``date_from`` and ``date_to`` (inclusive).
statisticsA
Get a compact macro snapshot: latest key rate, USD/EUR/CNY rates, latest YoY inflation, and the period the inflation refers to.
Inputs: no named parameters. Returns: High-level dashboard combining several CBR indicators.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: getting a single rate, a historical series, inflation data, key rate, or a macro snapshot. There is no overlap or ambiguity.
Names use consistent snake_case and are clear, but not all follow verb_noun pattern (e.g., 'history_rates' and 'inflation' are nouns). Minor deviation but predictable.
Five tools appropriately cover the domain of Russian exchange rates and economic statistics without being too few or too many.
The tool set covers core operations: single rate, historical series, inflation, key rate, and a macro snapshot. No obvious gaps for its stated purpose.
Maintenance
Related MCP Connectors
Public Data Ukraine Mcp connects AI agents to real public APIs via MCP. Tools include
Live & historical FX rates and currency conversion for AI agents. No API keys.
Live & historical FX rates and currency conversion for AI agents. No API keys.
Package intelligence MCP for AI agents — 22 tools, 19 ecosystems, AGPL SDK, free.
Related MCP Servers
- AlicenseAqualityDmaintenanceozon-mcp is a knowledge-rich MCP server that turns the entire Ozon seller toolkit into 15 high-leverage tools. AI agents (Claude, Cursor, Cline, Continue, Goose, Zed, …) can search the API in Russian or English, drill into any of 466 methods with a fully-resolved JSON Schema, and execute calls with built-in safety guards. Subscription- aware, automatic pagination over all 4 cursor styles, retry/ba1526MIT
- AlicenseAqualityBmaintenanceMCP server for verifying Russian counterparties (legal entities and individual entrepreneurs) via public Federal Tax Service data: EGRUL/EGRIP, bankruptcy registry (EFRSB), Transparent Business, bailiff service (FSSP), and arbitration courts (KAD).8114 PyPI15MIT
- FlicenseNot gradedqualityCmaintenanceRussian-market marketing & ops MCP toolkit. 7 unified servers for Yandex.Direct, Yandex.Webmaster, Google Search Console (RU), YouTube Data API, VK Wall, Telegram publishing, and Click.ru (Telegram Ads + VK Ads + Yandex.Direct unified). The only complete RU-platform bundle for AI agents.2-
- FlicenseNot gradedqualityDmaintenanceMCP server providing financial data from Moscow Exchange and Bank of Russia, including quotes, bond metrics, interest rates, and portfolio analysis. Enables AI agents to analyze Russian financial markets through natural language.-