t-invest-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@t-invest-mcp покажи мои дивиденды за последний месяц"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
t-invest-mcp
Твой портфель Т-Инвестиций — в диалоге с AI.
MCP-сервер, который подключает Claude (Claude Code, Claude Desktop — и любой другой MCP-клиент) к T-Invest API. Смотри портфель, анализируй бумаги, считай выплаты и ребалансировку — обычными фразами, на русском.

Это не торговый робот и не «сигналы». Решения всегда принимаешь ты — сервер лишь даёт модели безопасный доступ к данным твоего брокерского счёта.
Почему это безопасно
Read-only по умолчанию. Торговые операции даже не регистрируются, пока ты их явно не включишь. Достаточно токена «только чтение».
Сделки — только с твоего подтверждения. Если включишь торговлю, перед каждой заявкой сервер показывает диалог «Купить N лотов X?» — без явного «да» заявка не уйдёт, какими бы настройками ни пользовался агент.
Песочница. Любую идею можно обкатать на виртуальном счёте с реальными котировками.
Токен живёт только в переменной окружения — не в коде, не в конфиге, не в логах. Для продакшена держи его в системном keychain, а не в shell-профиле — рецепт в docs/secure-token.md.
Related MCP server: tinkoff-wealth-mcp
Быстрый старт (5 минут)
Нужен Node.js ≥ 22 и аккаунт Т-Инвестиций.
Токен. В настройках Т-Инвестиций выпусти токен «только чтение». «Подтверждение сделок кодом» должно быть выключено. Токен показывается один раз; живёт 3 месяца с последнего использования.
Подключение к Claude Code — одной командой, установка не нужна (пакет
t-invest-mcpподтянется из npm):claude mcp add t-invest \ -e TINKOFF_API_TOKEN=<ваш-токен> \ -- npx -y t-invest-mcpДля Claude Desktop тот же блок добавляется в Settings → Developer → Edit Config. Этот JSON подходит и любому другому MCP-клиенту (Cursor, VS Code, Windsurf и др.) — меняется только место, куда его вписать:
{ "mcpServers": { "t-invest": { "command": "npx", "args": ["-y", "t-invest-mcp"], "env": { "TINKOFF_API_TOKEN": "<ваш-токен>" } } } }git clone https://github.com/human-turn/t-invest-mcp && cd t-invest-mcp npm install && npm run build # далее в командах выше вместо "npx -y t-invest-mcp" → "node /path/to/t-invest-mcp/dist/index.js"В такой минимальной конфигурации сервер строго read-only: смотреть и анализировать можно всё, торговать — нельзя (торговые операции даже не регистрируются). Остальные возможности включаются переменными в
env— каждая выключена по умолчанию:Переменная
Что включает
TINKOFF_SANDBOX=trueПесочница: виртуальный счёт на реальных котировках — безопасная обкатка (нужен отдельный sandbox-токен)
TINKOFF_ALLOW_TRADING=trueТорговля: выставление/отмена заявок, каждая сделка — с вашего подтверждения (нужен full-access токен)
TINKOFF_OUTPUT_DIR=<путь>Куда складывать файловые выгрузки (по умолчанию — папка проекта)
TINKOFF_CONFIRM=offОтключить диалог подтверждения сделок — только для песочницы
Проверка: спроси «покажи мои счета и портфель».
Готовое из коробки: ритуалы

Не хочешь придумывать запросы — в сервер зашиты готовые рецепты. В Claude Code они
появляются как slash-команды /t-invest:<имя>:
Ритуал | Что делает |
| Дайджест недели: что выросло/упало и почему, события впереди; если указать сумму пополнения — план докупок |
| Итоги месяца: честная доходность (XIRR с учётом пополнений), выплаты, комиссии + календарь выплат |
| Обзор портфеля + проверка, не пора ли ребалансировать |
И отдельные команды под конкретные задачи:
Команда | Что делает |
| Полный обзор: структура, концентрация, риски |
| Купоны и дивиденды на N месяцев вперёд, средняя выплата в месяц |
| Подбор облигаций: доходность с НКД, фильтр оферт, лесенка |
| Дрейф от целевых долей + план сделок в лотах (без исполнения) |
| Пришла зарплата: куда докупить, чтобы приблизиться к целям |
| Разбор бумаги: фундаментал, прогнозы, выплаты, динамика |
| Налоги за год + кандидаты на льготу долгосрочного владения |
| Скрининг дивидендных акций MOEX |
| Составные части ритуалов — можно вызывать отдельно |
| Что-то не работает? Соберёт репорт с диагностикой для разработчиков (без токена и личных данных) |
Все команды анализируют и предлагают — ни одна не совершает сделок сама.
Нашли проблему? /t-invest:feedback
Команда сама собирает репорт для разработчиков: диагностику сервера
(get_server_info — версия, режимы, окружение), шаги воспроизведения и точные
тексты ошибок из диалога. Перед сохранением покажет вам текст и спросит,
маскировать ли номера счетов и суммы — токен не попадает в репорт никогда.
Результат ложится в feedback/FEEDBACK-<дата>-<тема>.md; дальше по желанию —
GitHub issue в один шаг или отправьте файл сами.
Своя стратегия
Главное свойство сервера: он не навязывает методологию. Команды выше — это бонус, а не рамки. Под капотом — 20+ инструментов-кирпичиков (портфель, операции, котировки, купоны, фундаментал, прогнозы…), из которых модель собирает ответ на любой твой вопрос:
Просто спрашивай. «Какая у меня доля валютных активов?», «сравни мои нефтяные бумаги по P/E», «что будет с купонами, если продам половину ОФЗ?» — без всяких команд.
Опиши свои правила текстом. Положи свою стратегию в
CLAUDE.mdпроекта («не больше 10% на эмитента», «дивиденды реинвестирую в облигации», «новые позиции — только после разбора отчётности») — и агент будет учитывать её в каждом ответе.Целевые доли — если нужны. Файл
portfolio-target.jsonв корне проекта включает ребалансировку и план докупок. Минимум — только доли классов;byTickerи финансовые цели (goals) — опциональные надстройки. Эталон: MCP-ресурсt-invest://portfolio-target/example.{ "targets": { "shares": 55, "bonds": 30, "etf": 10, "cash": 5 } }Данные — в свои руки. Каждый инструмент умеет выгружать результат в файл (
outputPath, CSV/JSON) — сырые данные не съедают контекст диалога, а попадают на диск для pandas/Excel/чего угодно.get_operationsпри этом выкачивает всю историю операций,get_candles— годы свечей, аdownload_history_archiveзабирает минутки целыми годами (1 запрос = 1 год; доступные годы покажетget_history_archive_years). Дальше — любая своя аналитика: бэктесты, графики, отчёты.
Торговля (опционально, по умолчанию выключена)
Если хочешь не только анализировать, но и исполнять — включи явно:
TINKOFF_ALLOW_TRADING=true # регистрирует place_order / cancel_orderПонадобится full-access токен. Защита трёхслойная:
Подтверждение в самом сервере (включено по умолчанию): перед заявкой — диалог человеку через MCP elicitation; клиенты без поддержки elicitation получают отказ. Отключение —
TINKOFF_CONFIRM=off(рекомендуется только для песочницы).Ask-правила Claude Code (клиентский слой, срабатывает ещё до вызова):
{ "permissions": { "allow": ["mcp__t-invest"], "ask": ["mcp__t-invest__place_order", "mcp__t-invest__cancel_order"] } }Приоритет deny → ask → allow гарантирует промпт в любом режиме, включая
bypassPermissions. MCP tool annotations (destructiveHint) — лишь подсказки, Claude Code их не учитывает.Песочница для обкатки:
TINKOFF_API_TOKEN=<sandbox-токен> TINKOFF_SANDBOX=true TINKOFF_ALLOW_TRADING=trueСчета/портфель/заявки уходят в песочницу (виртуальные деньги, реальные котировки), появляются
sandbox_*инструменты. Попроси агента: «открой sandbox-счёт, положи миллион и собери модельный портфель 60/40».
Справочник
Переменные окружения
Переменная | Значение | Описание |
| обязательна | Токен T-Invest API (read-only достаточно для базового режима) |
|
| Песочница: счета/портфель/заявки идут в sandbox, регистрируются |
|
| Регистрирует |
|
| Отключает встроенное elicitation-подтверждение сделок (по умолчанию включено) |
| путь | Корень для файловых выгрузок |
Tools
Read-only (всегда):
Tool | Описание |
| Список брокерских счетов |
| Портфель: суммы по классам активов, доходность, позиции с тикерами |
| Операции (сделки, дивиденды, купоны, комиссии); с |
| Поиск инструмента по тикеру/ISIN/FIGI/названию |
| Карточка инструмента (лот, валюта, биржа, assetUid; для облигаций — номинал, погашение, НКД) |
| Последние цены (батч), с признаком единицы котировки |
| Свечи OHLCV (1min…month); с |
| Стакан заявок |
| Дивиденды: история и анонсы |
| Купонный календарь облигации |
| НКД облигации |
| События облигации: купоны, оферты, погашение |
| Фундаментал: P/E, EV/EBITDA, ROE, долги, дивдоходность и др. |
| Консенсус-прогнозы и таргеты аналитиков |
| Расписание торгов на неделю |
| Активные заявки |
| Годовые архивы минутных свечей (1 запрос = 1 год) → единый CSV |
| Какие годы архивов доступны по инструменту (и их размер) |
| Обезличенные сделки за торговый день → CSV |
| Диагностика сервера: версия, режимы, окружение (для фидбэка) |
Торговые (TINKOFF_ALLOW_TRADING=true): place_order, cancel_order.
Песочница (TINKOFF_SANDBOX=true): sandbox_open_account, sandbox_pay_in, sandbox_close_account.
Выгрузка в файл — детали
Каждый read-tool принимает outputPath (путь относительно TINKOFF_OUTPUT_DIR)
и outputFormat (json/csv). Сервер пишет результат на диск, в диалог
возвращает summary (savedTo, records, bytes, sample). Запись возможна
строго внутри корня выгрузок; прогресс долгих выгрузок виден в клиенте.
portfolio-target.json — полный формат
{
"targets": { "shares": 55, "bonds": 30, "etf": 10, "cash": 5 },
"byTicker": { "SBER": 10 },
"goals": [
{ "name": "FIRE", "targetAmount": 30000000, "targetDate": "2035-01-01",
"monthlyContribution": 100000, "expectedAnnualReturnPct": 8 }
]
}Классы targets суммируются к 100; фонды денежного рынка (LQDT и т.п.) допустимо
относить к cash. goals — массив, целей может быть несколько; нужен только
командам прогресса (fire_progress, ритуал monthly).
Построен на официальном SDK @tinkoff/invest-js (gRPC).
Disclaimer
Не является индивидуальной инвестиционной рекомендацией. Все торговые решения вы
принимаете самостоятельно. В боевом режиме place_order оперирует реальными
деньгами — используйте TINKOFF_ALLOW_TRADING=true осознанно и держите
подтверждение сделок включённым.
License
Apache 2.0
Available Tools
20 toolsdownload_history_archiveDownload Minute-Candle History ArchiveAIdempotent
Bulk-download MINUTE candles for whole years via the REST archive endpoint (1 HTTP request = 1 year) and merge them into a single CSV file in the output root. Far cheaper than get_candles for long minute history. Columns: instrumentUid;timeUtc;open;close;high;low;volume. Archives are rebuilt nightly (no current day). Years with no data are skipped and listed in the summary. Takes the instrument UID only. Check available years first with get_history_archive_years.
Inputs: yearFrom (required), instrumentId (required), yearTo, outputPath.
download_trades_archiveDownload Anonymized Trades ArchiveAIdempotent
Download the anonymized trades archive for one trading day (history-md service) into a CSV file in the output root. Comma-separated, the file carries its own header: TRADE_TS,TICKER_CC,DIRECTION,PRICE,QUANTITY,TRADE_SOURCE,INSTRUMENT_UID. 404 means no archive for that date (weekend/holiday or not yet built — archives are rebuilt nightly).
Inputs: date (required), instrumentId (required), outputPath.
find_instrumentFind InstrumentARead-onlyIdempotent
Search instruments by ticker, ISIN, FIGI or name. Returns UIDs required by other tools.
Inputs: query (required), outputPath, outputFormat.
get_accountsGet AccountsARead-onlyIdempotent
List all brokerage accounts of the token owner (id, name, type, status). Start here: accountId is required by portfolio/operations/orders tools.
Inputs: outputPath, outputFormat.
get_accrued_interestsGet Accrued InterestsARead-onlyIdempotent
Accrued interest (НКД) history for a bond. Default period: last 30 days.
Inputs: instrumentId (required), to, from, outputPath, +1 more.
get_active_ordersGet Active OrdersARead-onlyIdempotent
Active (not yet executed) orders for an account, enriched with ticker/name.
Inputs: accountId (required), outputPath, outputFormat.
get_asset_fundamentalsGet Asset FundamentalsARead-onlyIdempotent
Fundamental indicators for assets: market cap, P/E, P/B, EV/EBITDA, ROE/ROA/ROIC, margins, debt ratios, dividend yield, 52-week range. Takes assetUid (NOT instrument UID) — get it from get_instrument. Indicators not applicable to the asset (e.g. EV/EBITDA for banks) are null.
Inputs: assetUids (required), outputPath, outputFormat.
get_bond_couponsGet Bond CouponsARead-onlyIdempotent
Coupon schedule for a bond. Default period: -1 year to +1 year.
Inputs: instrumentId (required), to, from, outputPath, +1 more.
get_bond_eventsGet Bond EventsARead-onlyIdempotent
Bond lifecycle events: coupons, calls/offers, maturity, conversion. Key tool for tracking offer (оферта) and repayment dates.
Inputs: instrumentId (required), type, outputPath, outputFormat.
get_candlesGet CandlesARead-onlyIdempotent
OHLCV candles for an instrument. Default: daily candles for the last year. Inline mode returns at most 1500 most recent candles (truncated flag). With outputPath the server fetches the WHOLE range, splitting it into chunks within API limits (day candles up to 6 years per request, 1min up to 1 day), and writes everything to the file. priceUnit: bonds are quoted in % of nominal, futures in points.
Inputs: instrumentId (required), to, from, interval, +2 more.
get_dividendsGet DividendsARead-onlyIdempotent
Dividend history and announcements for a share. Default period: -1 year to +1 year.
Inputs: instrumentId (required), to, from, outputPath, +1 more.
get_forecastsGet Analyst ForecastsBRead-onlyIdempotent
Analyst consensus and per-company price targets/recommendations for an instrument. csv output writes the targets array.
Inputs: instrumentId (required), outputPath, outputFormat.
get_history_archive_yearsList Available History Archive YearsARead-onlyIdempotent
Which yearly minute-candle archives exist for an instrument (year + size). Use before download_history_archive to avoid guessing the range.
Inputs: instrumentId (required).
get_instrumentGet Instrument DetailsARead-onlyIdempotent
Instrument card by UID: ticker, ISIN, currency, lot size, exchange, trading status, country of risk, assetUid (needed for get_asset_fundamentals). For bonds also returns a bond block: nominal, maturity, coupon frequency, accrued interest — bond market prices are quoted in % of this nominal.
Inputs: instrumentId (required), outputPath, outputFormat.
get_last_pricesGet Last PricesARead-onlyIdempotent
Last known prices for a batch of instruments. Response order mirrors the request; unknown UIDs come back with found:false. priceUnit flags the quote unit: bonds are quoted in % of nominal (see get_instrument bond.nominal), futures in points.
Inputs: instrumentIds (required), outputPath, outputFormat.
get_operationsGet OperationsARead-onlyIdempotent
Executed account operations (trades, dividends, coupons, taxes, fees) with cursor pagination. Default period: last 365 days. With outputPath the server fetches ALL pages from the start of the period (the cursor arg is ignored in file mode) and writes the full history to the file.
Inputs: accountId (required), to, from, limit, +4 more.
get_order_bookGet Order BookARead-onlyIdempotent
Order book (bids/asks) for an instrument, with last/close price and trading limits. priceUnit flags the quote unit: bonds are quoted in % of nominal (see get_instrument bond.nominal), futures in points.
Inputs: instrumentId (required), depth, outputPath, outputFormat.
get_portfolioGet PortfolioARead-onlyIdempotent
Portfolio summary in RUB: totals by asset class, expected yield, and all positions enriched with ticker/name (quantity, average and current price, accrued interest for bonds). csv output writes the positions array.
Inputs: accountId (required), outputPath, outputFormat.
get_server_infoGet Server InfoARead-onlyIdempotent
Server diagnostics for support/feedback reports: version, runtime, mode flags (sandbox/trading/confirmation), output root, selected archive host. No broker API calls, never includes the token.
Inputs: no named parameters.
get_trading_schedulesGet Trading SchedulesARead-onlyIdempotent
Exchange trading schedules for the next 7 days (trading days, session start/end in MSK).
Inputs: exchange, outputPath, outputFormat.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool has a clearly distinct purpose, covering different aspects of investment data: searching, retrieving details, historical data, dividends, bonds, orders, portfolio, etc. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern (e.g., 'get_', 'find_', 'download_'), making it easy for an agent to predict naming for related operations.
With 20 tools, the server covers a comprehensive range of investment-related data retrieval without being bloated. Each tool serves a specific need, and the count feels appropriate for the domain.
The server excels at data retrieval but lacks tools for placing, modifying, or cancelling orders. While this may be intentional (read-only focus), it creates a significant gap for a complete investment workflow.
Maintenance
Related MCP Connectors
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
Ask your AI about your own accounts, debts, budgets and goals. OAuth sign-in, read-only by default.
Connect your portfolio to Claude, ChatGPT, or Codex to analyze it and make smarter investments.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables interaction with the T-Invest (Tinkoff Investments) API to manage investment portfolios, access market analytics, and retrieve technical analysis data. It supports executing trading operations, including placing and canceling market or stop orders, with optional confirmation workflows.25MIT
- FlicenseBqualityCmaintenanceEnables personal AI-driven portfolio analysis and management for Tinkoff Investments through natural language chat, providing risk assessment, goal tracking, and market-aware recommendations in read-only mode.191-
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to research a T-Invest brokerage account, screen instruments, analyze portfolio yield and risk, build rebalance plans, and optionally preview or submit gated limit orders.1-
- AlicenseAqualityCmaintenanceEnables secure, read-only access to Trading 212 account data and controlled two-step market order execution and order cancellation through natural language interfaces.11MIT