MOEX quotes MCP and a Telegram bot
MOEX1-mcp
An MCP server for MOEX quotes and order books via ISS+ and ISS REST, plus a Telegram bot that picks the right tool itself via OpenAI tool calling
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Uses a paid ALGOPACK subscription and OpenAI and Telegram keys, which are redacted in logs but stored in .env
- Reads only public market data; it does not touch a brokerage account or trades
Install
Manual install
python -m venv .venv && pip install -r requirements.txt && cp .env.example .envInstalls dependencies before filling in the MOEX, Telegram and OpenAI keys.
This is third-party code. Review the repository files before installing.
What it does
A monorepo of two services. A Python MCP server provides 11 market-data tools for MOEX: a security snapshot and order book over the ISS+ WebSocket (STOMP protocol), instrument search, a diagnostic subscription to an arbitrary channel, candles and trade tapes for TQBR shares and RFUD futures, a contract list, and a trading-suspension archive via ISS REST. A Telegram bot on aiogram 3 reads the user's message, picks the right MCP tool via OpenAI tool calling, and calls the server over HTTP with a key in the X-API-Key header; if no tool fits, the bot honestly replies that the request cannot be handled automatically. The ticker is validated to letters and digits before building the STOMP frame, as protection against selector injection. The bot explicitly does not trade or show a broker balance.
Who it is for. For people who want real-time public MOEX market data from Telegram or via MCP, with no brokerage account access.
Good fit when
- You need real-time MOEX quotes, order book or candles for shares and futures
- You want a Telegram bot that figures out what market query the user meant
- You have an ALGOPACK subscription and want MCP access to the ISS+ WebSocket, not just public REST
Not a fit when
- You need brokerage account or trade access: the bot explicitly does not trade or show a balance
- You have no ALGOPACK subscription: the snapshot and order-book WebSocket tools need an ALGOPACK login and password, not just a REST token
- You need the paid Super Candles, FUTOI, HI2 or Mega Alerts sections: in this environment they return HTML instead of JSON and are not implemented in the MCP
Example request
What is Sberbank's current share price, and show me the order book for GAZPLimitations
The repository has no license. The snapshot and order-book tools over the ISS+ WebSocket need an ALGOPACK subscription login and password, not just a REST key. The OpenAI model is set via OPENAI_MODEL with a default value the README explicitly says not to change without the client's request, and there is no automatic fallback to another model on API errors. The paid ALGOPACK REST sections return HTML instead of JSON in the described environment and do not work in the MCP.
How to disable. Run docker compose down or stop the mcp_server and telegram_bot processes, and revoke TELEGRAM_BOT_TOKEN and MCP_API_KEY.
MCP
- Transport
- http
- Authentication
- API key
| Environment variables | |
|---|---|
| MOEX_LOGIN secret | ALGOPACK subscription login for the ISS+ WebSocket |
| MOEX_PASSCODE secret | ALGOPACK subscription password for the ISS+ WebSocket |
| MOEX_ALGOPACK_TOKEN secret | REST APIKEY for ISS REST; a short login:passcode also works |
| TELEGRAM_BOT_TOKEN required, secret | Telegram bot token from BotFather |
| OPENAI_API_KEY required, secret | OpenAI API key for tool calling in the bot |
| MCP_API_KEY required, secret | Shared secret between the bot and the MCP server in the X-API-Key header |
Security check
- Uses a paid ALGOPACK subscription and OpenAI and Telegram keys, which are redacted in logs but stored in .env
- Reads only public market data; it does not touch a brokerage account or trades
README in short
The Russian README gives an architecture diagram from Telegram through OpenAI tool calling to the MCP server and MOEX ISS+, a table of 11 tools with parameters and purpose, an environment-variable table with the source for each, local and Docker run instructions, example user messages with expected behavior, a logging section with secret redaction, and a security section covering ticker validation, a rate limit, and passing tool results to the model as untrusted data.
FAQ
Can the bot show my broker balance?
No, the README states explicitly that the bot does not trade and does not show a broker balance, only MOEX market data.
Is an ALGOPACK REST token enough for all tools?
No, the snapshot and order-book tools go through the ISS+ WebSocket and need MOEX_LOGIN and MOEX_PASSCODE for the ALGOPACK subscription, not just a REST token.
Related
A set of investment research skills for Claude Code and Codex built on four investors' methodologies. It is a research tool, not investment advice
Stripe's official MCP server, plugins and skills: the agent searches the API and docs, reads and changes account data
Alpaca's official MCP server: orders for stocks, ETFs, crypto and options, position management and market data in plain language
inn-check-ru: counterparty risk traffic light
inn-check-ru
An open-source skill that checks a Russian company by tax ID across EGRUL, bailiffs, courts, bankruptcy and sanctions, and returns a dated risk verdict