Skip to main content
Glama
nonnname

T-Invest MCP Server

by nonnname

T-Invest MCP Server

用于从 Claude 和其他 LLM 客户端调用 T-Invest (Tinkoff Investments) API 的 MCP 服务器。

Node.js 版本的 t-invest-mcp-server

工具 (30)

账户管理

工具

参数

描述

get_accounts

经纪账户列表

get_bank_accounts

银行账户列表

get_user_info

用户资料(费率、合格投资者状态)

get_user_tariff

API 限制(每分钟请求数、流)

get_portfolio

accountId*, tickers?

按账户获取投资组合,支持按代码筛选

get_positions

accountId*

账户持仓(资金、证券、期货)

get_withdraw_limits

accountId*

取款限额

get_margin_attributes

accountId*

保证金属性(流动性投资组合、初始保证金)

get_account_values

accountIds*

账户附加指标

pay_in

fromAccountId, toAccountId, amount*, currency?

从银行账户向经纪账户充值

currency_transfer

fromAccountId, toAccountId, amount*, currency?

经纪账户间转账

分析与工具

工具

参数

描述

get_asset_fundamentals

tickers*

基本面指标:P/E、ROE、EBITDA 等(最多 100 个代码)

get_last_prices

tickers*

当前市场价格(最多 100 个代码)

get_candles

ticker, from, to*, interval?

历史 OHLCV K 线(1min, 5min, 15min, hour, day, week, month)

get_dividends

tickers*, from?, to?

分红日历(最多 50 个代码)

get_bond_coupons

tickers*, from?, to?

债券票息支付(最多 50 个代码)

get_consensus_forecasts

tickers*

分析师共识预测(最多 50 个代码)

get_order_book

ticker*, depth?

订单簿(深度 1–50,默认为 10)

get_trading_status

tickers*

代码交易状态(最多 50 个)

get_trading_schedules

exchange?, from, to

交易时间表(默认为 MOEX)

get_tech_analysis

ticker, indicator, from, to, interval?, length?

技术分析:BB, EMA, RSI, MACD, SMA

get_signals

tickers?, from?, to?, direction?, limit?

交易信号

get_max_lots

accountId, ticker, price?

买入/卖出的最大手数

操作历史

工具

参数

描述

get_operations

accountId*, from?, to?, limit?

操作历史:交易、分红、佣金

交易操作

工具

参数

描述

get_orders

accountId*

活动交易订单

post_order

accountId, ticker, direction, quantity, orderType*, price?

下单(买入/卖出)

cancel_order

accountId, orderId

取消交易订单

get_stop_orders

accountId*

活动止损订单

post_stop_order

accountId, ticker, direction, quantity, orderType, stopPrice, limitPrice?, expirationType?, expireDate?

下达止损订单

cancel_stop_order

accountId, stopOrderId

取消止损订单

* — 必填参数,? — 可选参数

工作流程: 代理首先调用 get_accounts,记住 accountId,并在后续请求中使用它。

Related MCP server: IBKR TWS MCP Server

环境变量

变量

必填

描述

APP_T_INVEST_BASE_URL

T-Invest API URL

APP_T_INVEST_TOKEN

API 令牌 (获取地址)

APP_T_INVEST_READONLY

true — 只读模式(禁用交易操作)

生产环境 URL: https://invest-public-api.tinkoff.ru/rest/ 沙盒环境 URL: https://sandbox-invest-public-api.tinkoff.ru/rest/

安全性

服务器通过 API 处理真实资金。以下规则可显著降低风险:

  1. 默认使用 APP_T_INVEST_READONLY=true 在此模式下,仅注册只读工具,而可能动用资金的 6 个操作(post_order, cancel_order, post_stop_order, cancel_stop_order, pay_in, currency_transfer)对 LLM 完全不可用。这足以进行分析、报告和投资组合监控。

  2. 仅在明确知情的情况下取消 READONLY LLM 调用的任何交易操作都是不可逆的。交易确认已委托给 MCP 客户端(Claude Desktop 会在调用工具前询问您)——但这只是最后一道防线,而非第一道。如果您今天不打算通过助手进行交易,请不要赋予它该权限。

  3. developer.tbank.ru 上创建一个具有最小权限的独立令牌。 如果不需要交易,请使用只读令牌。不要为了“以防万一”而使用具有完全权限的主令牌。

  4. 仅将令牌存储在环境变量或密钥管理器中。 如果文件会进入云备份/git/共享机器,请勿直接将其复制到 claude_desktop_config.json 中。在 macOS 上,配置中的令牌对您的用户的所有进程可见。

  5. 仅对 APP_T_INVEST_BASE_URL 使用 HTTPS URL。 服务器将拒绝以 http:// 启动——这是刻意设计的。

  6. 切勿提交 .env 文件,也不要将令牌粘贴到 issue/PR/聊天中。请检查 .gitignore 是否涵盖了 .env*.log

服务器本身不会记录令牌,也不会将其包含在 MCP 响应中,但通过环境、配置或 shell 历史记录造成的任何泄露均由用户自行承担。

Claude Desktop 配置

配置文件:~/Library/Application Support/Claude/claude_desktop_config.json

通过 npx

{
  "mcpServers": {
    "t-invest": {
      "command": "npx",
      "args": ["t-invest-mcp-server"],
      "env": {
        "APP_T_INVEST_BASE_URL": "https://invest-public-api.tinkoff.ru/rest/",
        "APP_T_INVEST_TOKEN": "your_token",
        "APP_T_INVEST_READONLY": "true"
      }
    }
  }
}

仅在您明确希望允许 LLM 下单和转账时,才移除 APP_T_INVEST_READONLY(或将其设置为 false)。

通过 Docker

{
  "mcpServers": {
    "t-invest": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "APP_T_INVEST_BASE_URL=https://invest-public-api.tinkoff.ru/rest/",
        "-e", "APP_T_INVEST_TOKEN=your_token",
        "-e", "APP_T_INVEST_READONLY=true",
        "t-invest-mcp-server"
      ]
    }
  }
}

运行

npx

APP_T_INVEST_BASE_URL=https://invest-public-api.tinkoff.ru/rest/ \
APP_T_INVEST_TOKEN=your_token \
npx t-invest-mcp-server

Docker

docker build -t t-invest-mcp-server .

docker run -i --rm \
  -e APP_T_INVEST_BASE_URL=https://invest-public-api.tinkoff.ru/rest/ \
  -e APP_T_INVEST_TOKEN=your_token \
  t-invest-mcp-server

从源码运行

npm install
npm run build
npm start

免责声明

本项目是一个非官方工具,与 T-Bank (Tinkoff) 无关。服务器通过 T-Invest 公共 API 与金融数据和交易操作进行交互。用户需对自己的行为承担全部责任。证券交易所交易涉及资金损失风险。

许可证

MIT

Install Server
A
license - permissive license
A
quality
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (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
    B
    quality
    A
    maintenance
    Enables AI assistants to interact with Interactive Brokers trading accounts to retrieve market data, check positions, and place trades. Includes pre-configured IB Gateway and handles OAuth authentication automatically.
    14
    550
    209
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables LLM clients to interact with Interactive Brokers Trader Workstation for automated trading workflows. Supports market data retrieval, portfolio management, and order execution through the TWS API.
    5
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to interact with Trading 212 investment accounts for portfolio tracking, account management, and real-time order execution. It supports managing investment pies, analyzing historical data, and monitoring market performance across multiple instrument types.
    23
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to manage Trading212 brokerage accounts, including portfolio analysis, order placement (demo mode), and investment pie management.
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect AI agents to bank accounts, transactions, balances, and investments.

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

  • US/HK markets — 163 tools: quotes, options, orders, fundamentals, screener, IPO, alerts, DCA & grid

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/nonnname/t-invest-mcp-server'

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