T-Invest MCP Server
T-Invest MCP Server
用于从 Claude 和其他 LLM 客户端调用 T-Invest (Tinkoff Investments) API 的 MCP 服务器。
Node.js 版本的 t-invest-mcp-server。
工具 (30)
账户管理
工具 | 参数 | 描述 |
| — | 经纪账户列表 |
| — | 银行账户列表 |
| — | 用户资料(费率、合格投资者状态) |
| — | API 限制(每分钟请求数、流) |
|
| 按账户获取投资组合,支持按代码筛选 |
|
| 账户持仓(资金、证券、期货) |
|
| 取款限额 |
|
| 保证金属性(流动性投资组合、初始保证金) |
|
| 账户附加指标 |
|
| 从银行账户向经纪账户充值 |
|
| 经纪账户间转账 |
分析与工具
工具 | 参数 | 描述 |
|
| 基本面指标:P/E、ROE、EBITDA 等(最多 100 个代码) |
|
| 当前市场价格(最多 100 个代码) |
|
| 历史 OHLCV K 线(1min, 5min, 15min, hour, day, week, month) |
|
| 分红日历(最多 50 个代码) |
|
| 债券票息支付(最多 50 个代码) |
|
| 分析师共识预测(最多 50 个代码) |
|
| 订单簿(深度 1–50,默认为 10) |
|
| 代码交易状态(最多 50 个) |
|
| 交易时间表(默认为 MOEX) |
|
| 技术分析:BB, EMA, RSI, MACD, SMA |
|
| 交易信号 |
|
| 买入/卖出的最大手数 |
操作历史
工具 | 参数 | 描述 |
|
| 操作历史:交易、分红、佣金 |
交易操作
工具 | 参数 | 描述 |
|
| 活动交易订单 |
|
| 下单(买入/卖出) |
|
| 取消交易订单 |
|
| 活动止损订单 |
|
| 下达止损订单 |
|
| 取消止损订单 |
* — 必填参数,? — 可选参数
工作流程: 代理首先调用
get_accounts,记住accountId,并在后续请求中使用它。
Related MCP server: IBKR TWS MCP Server
环境变量
变量 | 必填 | 描述 |
| 是 | T-Invest API URL |
| 是 | API 令牌 (获取地址) |
| 否 |
|
生产环境 URL: https://invest-public-api.tinkoff.ru/rest/
沙盒环境 URL: https://sandbox-invest-public-api.tinkoff.ru/rest/
安全性
服务器通过 API 处理真实资金。以下规则可显著降低风险:
默认使用
APP_T_INVEST_READONLY=true。 在此模式下,仅注册只读工具,而可能动用资金的 6 个操作(post_order,cancel_order,post_stop_order,cancel_stop_order,pay_in,currency_transfer)对 LLM 完全不可用。这足以进行分析、报告和投资组合监控。仅在明确知情的情况下取消
READONLY。 LLM 调用的任何交易操作都是不可逆的。交易确认已委托给 MCP 客户端(Claude Desktop 会在调用工具前询问您)——但这只是最后一道防线,而非第一道。如果您今天不打算通过助手进行交易,请不要赋予它该权限。在 developer.tbank.ru 上创建一个具有最小权限的独立令牌。 如果不需要交易,请使用只读令牌。不要为了“以防万一”而使用具有完全权限的主令牌。
仅将令牌存储在环境变量或密钥管理器中。 如果文件会进入云备份/git/共享机器,请勿直接将其复制到
claude_desktop_config.json中。在 macOS 上,配置中的令牌对您的用户的所有进程可见。仅对
APP_T_INVEST_BASE_URL使用 HTTPS URL。 服务器将拒绝以http://启动——这是刻意设计的。切勿提交
.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-serverDocker
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
Maintenance
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
- AlicenseBqualityAmaintenanceEnables 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.14550209MIT
- FlicenseNot gradedqualityDmaintenanceEnables 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
- AlicenseAqualityDmaintenanceEnables 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.232MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage Trading212 brokerage accounts, including portfolio analysis, order placement (demo mode), and investment pie management.5MIT
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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