ru-finance
MCP 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.
README
<div align="center">
<img src="ru_finance/icon.png" width="120" alt="ru-finance logo">
ru-finance
MCP-сервер с данными Московской биржи и Банка России плюс доменная аналитика облигаций и портфеля.
</div>
Подключается к Claude (Desktop / Code) и любым MCP-клиентам — локально через stdio или как remote-сервис по HTTP. Даёт котировки, метрики облигаций, ставки ЦБ, ожидания по ставке из G-кривой ОФЗ и готовые отчёты по портфелю.
[!NOTE] Сервер generic и не хранит личных данных — бумаги и портфель передаются параметрами, его можно безопасно хостить и делиться. Он отдаёт числа; интерпретация остаётся за агентом (см. AGENTS.md). Данные с задержкой ~15 мин; это не инвестиционная рекомендация.
Возможности
- MOEX — котировки, история, свечи, дивиденды; запасной доступ к любому из ~252 эндпоинтов ISS.
- Облигации — цена, YTM, дюрация (Маколея и модифицированная), сценарии дохода при сдвиге ставки, реальная доходность.
- Банк России — ключевая ставка, RUONIA (+ срочная кривая), MIACR, курсы валют, драгметаллы, ЗВР.
- Ожидания по ставке — сигналы из G-кривой ОФЗ (наклон, спреды, форварды, метка
cuts/hikes/flat) и точная NSS-модель MOEX для доходности на любом сроке. - Портфель — снимок (стоимость, P&L, распределение, дюрация, денежный поток), what-if по ставке, календарь выплат, лидеры/аутсайдеры.
Всего 22 инструмента — полный справочник в docs/TOOLS.md.
Быстрый старт
Требуется Python 3.11+ и сетевой доступ к iss.moex.com и cbr.ru.
git clone https://github.com/diekinari/ru-finance-mcp.git
cd ru-finance-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
python -m ru_finance.mcp_server # запуск (stdio)
Подключение из Claude
# Claude Code — локально
claude mcp add ru-finance -- /путь/.venv/bin/python -m ru_finance.mcp_server
Claude Desktop — добавьте в claude_desktop_config.json:
{
"mcpServers": {
"ru-finance": {
"command": "/путь/.venv/bin/python",
"args": ["-m", "ru_finance.mcp_server"]
}
}
}
Remote-режим (HTTP)
Чтобы подключаться по URL (например, за nginx с TLS):
MCP_TRANSPORT=streamable-http MCP_HOST=127.0.0.1 MCP_PORT=8000 \
python -m ru_finance.mcp_server
# эндпоинт: http://127.0.0.1:8000/mcp
claude mcp add --transport http ru-finance https://<домен>/mcp
[!IMPORTANT] Хост должен иметь сетевой доступ к
iss.moex.comиcbr.ru. Публичный URL стоит защитить токеном авторизации. Полный гайд по деплою (systemd + nginx + TLS + токен) — готовится вdocs/DEPLOY.md.
Документация
| Файл | Назначение |
|---|---|
| docs/TOOLS.md | Полный справочник инструментов: входы, выходы, примеры |
| AGENTS.md | Как ИИ-ассистенту правильно пользоваться сервером |
Как устроено
| Слой | Назначение |
|---|---|
moex (aioboy) |
транспорт и парсинг ISS Московской биржи |
cbrapi |
данные веб-сервисов Банка России |
ru_finance/ |
доменный слой: резолв бумаг, нормализация, облигационная математика, G-кривая, отчёты по портфелю |
| FastMCP | публикация инструментов по stdio / streamable-http |
[!WARNING] Образовательный инструмент. Данные бесплатные, с задержкой, возможны пропуски и ошибки. Не является индивидуальной инвестиционной рекомендацией — решения принимаете вы.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.