T-Bank Invest MCP server in C#
TInvestMcp
A console C# MCP server for T-Bank Invest: accounts, portfolio, dividends, operations and broker reports, read-only
- 0 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent gets withdrawal limits, margin indicators and broker reports for a real account
- The token is read-only but grants access to accounts, portfolio and the full operation history
Install
- Works in
- Services
Manual install
cd TInvestMcp && dotnet publish -c Release -o publishPublishes a self-contained exe at TInvestMcp/publish/TInvestMcp.exe for Windows.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent gets withdrawal limits, margin indicators and broker reports for a real account
- The token is read-only but grants access to accounts, portfolio and the full operation history
This is third-party code. Review the repository files before installing.
What it does
A .NET 10 and C# 14 server uses the official Tinkoff.InvestApi gRPC client and provides 10 tools: accounts, portfolio with a currency filter, positions across shares, currency, futures and options, withdrawal limits, margin metrics, instrument search by ticker, dividends per instrument, paginated operation history with a cursor, and separately generating and fetching a broker report for a period. The tool list is cached at startup, account_id is cached for 3 seconds to avoid hitting the API on every call, and one gRPC channel is reused for the whole process. The token is passed via TINVEST_TOKEN or a file through TINVEST_TOKEN_FILE, to avoid storing it in plain text in the Cursor config. For Cursor on Windows the README recommends publishing a self-contained exe instead of running from source.
Who it is for. For T-Bank investors on Windows and Cursor who want fast, API-efficient access to their portfolio and broker reports.
Good fit when
- You need returns for a specific ticker over a period: the server finds the FIGI and filters operations itself
- You need a ready broker report for a period instead of manually parsing operations
- You work in Cursor on Windows and want to run the server as a standalone exe without blocking rebuilds
Not a fit when
- You need a cross-platform build with no Windows: the instructions and RuntimeIdentifier target win-x64
- You need market data, candles, order book or technical analysis: the server does not provide them
- You need to place trades: the server only reads data, there are no trading operations
Example request
Calculate returns for the SBER ticker this year and generate a broker report from the start of the yearMCP
- Transport
- stdio
- Authentication
- key is optional
Environment variables
TINVEST_TOKENsecret- A read-only T-Invest API token, one of two ways to pass it
TINVEST_TOKEN_FILE- Path to a file holding the token on one line, an alternative to the TINVEST_TOKEN variable
Limitations
The exe publishing instructions target win-x64, though .NET can build for other platforms manually. The broker report via GenerateBrokerReport and GetBrokerReport does not include dividends, coupons or deposit/withdrawal operations; a separate tool covers those. The repository is large due to the .NET build infrastructure.
How to disable. Remove the tinvest entry from your MCP config in Cursor and delete the TINVEST_TOKEN or the TINVEST_TOKEN_FILE.
FAQ
How do I pass the token securely without storing it in the Cursor config?
Set TINVEST_TOKEN as a system environment variable, or TINVEST_TOKEN_FILE pointing to a file with the token, without putting env in the MCP config itself.
What does the broker report cover, and what does it miss?
The report via GenerateBrokerReport and GetBrokerReport covers trades for a period but excludes dividends, coupons and deposit/withdrawal operations, which tinvest_get_operations provides instead.
Discussion
No questions or reviews yet.
Related
All T-Bank toolsT-Invest MCP server with account-id lock
Tinkoff Invest MCP Server
A T-Invest MCP server: portfolio, operations and market data, with a mandatory single-account lock and a sandbox mode
T-Bank Invest MCP server, read-only
T-Bank Invest MCP Server (read-only)
An MCP server for a T-Bank Invest portfolio with no trading rights: positions, operations, market data, and technical and fundamental analytics
An unofficial local T-Invest MCP server: portfolio analysis, screening and rebalance plans, with orders only after confirmation
A Kotlin MCP server for the T-Invest API: market data, orders and stop orders, and a sandbox with virtual money
Autonomous trading MCP for T-Bank Invest
Tinkoff Trader MCP
An MCP server for T-Bank Invest with market analysis, backtesting five strategies, risk management and order placement, with live trading off by default
Tinkoff wealth MCP analyst
tinkoff-wealth-mcp
A personal read-only MCP server for a T-Investments portfolio: combined net worth, concentration risk, a coupon calendar, progress toward a financial goal
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| T-Bank Invest MCP server in C# (this card) | no | key is optional | 0 | |
| T-Bank Invest MCP server, read-only | no | API key | 3 | read-only, no trading |
| T-Bank Invest MCP server in Go | no | API key | 1 | accounts and portfolio |
| T-Invest MCP server with account-id lock | no | API key | 0 | portfolio for a single account |
README in short
The README describes the .NET 10 requirement and a read-only token, building and publishing a self-contained exe for Cursor on Windows, two ways to pass the token securely, a table of 10 tools, typical Cursor usage patterns like looking up an instrument before querying operations, tips for efficient requests like limit=1000 for pagination, and a section on optimizations like the account_id cache and a reused gRPC channel.