Skip to main content
Glama
atomno-mcp

mcp-cbr-rates

by atomno-mcp

mcp-cbr-rates

ロシア中央銀行(Центральный банк РФ, CBR)の公開データ(為替レート、政策金利、インフレ率、およびコンパクトなマクロ統計スナップショット)をAIエージェントに提供するModel Context Protocol (MCP) サーバー。

License: MIT GitHub release Tests Coverage Python MCP

mcp-cbr-rates は、ロシアのフィンテックエコシステムに焦点を当てた atomno ファミリーのMCPサーバーの一部です。完全にオープンソースであり、APIキーは不要で、CBRの公式公開エンドポイントに基づいて構築されています。


特徴

  • 厳格なPydanticスキーマを備えた5つの高品質なMCPツール: get_rate, history_rates, key_rate, inflation, statistics

  • 内蔵TTL(Time-To-Live)キャッシュ: ソースへの負荷を考慮し、日次レートは1時間、過去の時系列データは24時間キャッシュします。

  • 5xxエラー時の自動リトライ機能を備えた非同期 httpx トランスポート。

  • defusedxml による安全なXML解析。

  • respx でモックされたHTTPテストを含む50以上のユニットテスト、80%以上のカバレッジ。

  • シークレット、テレメトリ、サードパーティのトラッカーは一切なし。


Related MCP server: ozon-mcp

クイックスタート

ソースからインストール

git clone https://github.com/atomno-labs/mcp-cbr-rates.git
cd mcp-cbr-rates
pip install -e .
mcp-cbr-rates  # starts the MCP server over stdio

Cursorでの使用

.cursor/mcp.json(またはグローバルな ~/.cursor/mcp.json)に以下を追加します:

{
  "mcpServers": {
    "cbr-rates": {
      "command": "mcp-cbr-rates"
    }
  }
}

Claude Desktopでの使用

claude_desktop_config.json に追加します:

{
  "mcpServers": {
    "cbr-rates": {
      "command": "mcp-cbr-rates"
    }
  }
}

Windowsの場合、設定ファイルは %APPDATA%\Claude\claude_desktop_config.json にあり、macOSの場合は ~/Library/Application Support/Claude/claude_desktop_config.json にあります。

Claude Codeでの使用

claude mcp add cbr-rates -- mcp-cbr-rates

ツール

名前

入力

戻り値

get_rate

char_code: str, on_date?: date

CurrencyRate — 指定日(または最新)の単一レート

history_rates

char_code: str, date_from: date, date_to: date

HistoryRates — 日次レートの時系列データ

key_rate

date_from?: date, date_to?: date

KeyRateHistory — CBR政策金利の時系列データ

inflation

year_from?: int, year_to?: int

InflationData — 月次の前年同月比CPI(パーセント)

statistics

(なし)

MacroSnapshot — 統合ダッシュボード:政策金利 + USD/EUR/CNY + インフレ率

平易な英語での例:

"2024年4月25日の公式EURレートはいくらでしたか?" ツール: get_rate(char_code="EUR", on_date="2024-04-25")

"過去90日間のUSD-RUBの日次レートをプロットして。" ツール: history_rates(char_code="USD", date_from=..., date_to=...)

"最新の政策金利、USD/EUR/CNY、インフレ率を一度に教えて。" ツール: statistics()

history_rates の期間は最大366日に制限されています。それ以上の期間が必要な場合は、ツールを繰り返し呼び出してください。


設定

すべての設定はオプションであり、環境変数から読み込まれます:

変数

デフォルト

説明

CBR_HTTP_TIMEOUT

15

CBR呼び出しのHTTPタイムアウト(秒)。

CBR_CACHE_DAILY_TTL

3600

日次レートのキャッシュTTL(秒)。

CBR_CACHE_HISTORY_TTL

86400

過去の時系列データおよびSOAPレスポンスのキャッシュTTL(秒)。

CBR_LOG_LEVEL

INFO

標準的なPythonログレベル。

設定すべきAPIキーはありません。ここで使用されるすべてのCBRエンドポイントは公開されています。


開発

git clone https://github.com/atomno-labs/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_rates

レイアウト:

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 + fixtures

データソース

  • https://www.cbr.ru/scripts/XML_daily.asp — 日次為替レート。

  • https://www.cbr.ru/scripts/XML_dynamic.asp — 過去の為替時系列データ。

  • https://www.cbr.ru/scripts/XML_valFull.asp — 通貨コード検索。

  • https://www.cbr.ru/DailyInfoWebServ/DailyInfo.asmx — CBR政策金利用SOAPサービス。

  • https://www.cbr.ru/hd_base/infl/ — 月次前年同月比インフレ率テーブル。

すべてのエンドポイントは読み取り専用で無料です。


免責事項

このプロジェクトは、ロシア中央銀行とは一切関係ありません。公開されているデータを最大限の努力でラップした非公式なものです。自己責任でご利用ください。作成者は、本サーバーを通じて提供されるデータの鮮度、正確性、または適用性について一切の責任を負いません。

CBRのHTMLまたはXMLスキーマが変更された場合、このパッケージが更新されるまで個々のツールが動作しなくなる可能性があります。回帰を確認した場合は、Issueを作成してください。


ライセンス

MIT — LICENSE を参照してください。

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
1wRelease cycle
9Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    ozon-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/ba
    15
    16
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    MCP 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).
    8
    15
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Russian-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.
    1

View all related MCP servers

Related MCP Connectors

  • Live & historical FX rates for AI agents, from European Central Bank data. 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.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/atomno-mcp/mcp-cbr-rates'

If you have feedback or need assistance with the MCP directory API, please join our Discord server