tinvest-mcp
An unofficial local T-Invest MCP server: portfolio analysis, screening and rebalance plans, with orders only after confirmation
Install
git clone https://github.com/plasm-one/tinvest-mcp.git
cd tinvest-mcp
uv sync
cp .env.example .env
cp config.toml.example config.toml
chmod 600 .env
uv run tinvest-mcp-doctorPut a sandbox token in TINVEST_SANDBOX_TOKEN in .env before running doctor.
This is third-party code. Review the repository files before installing.
What it does
The server runs on your machine and gives the agent 35 tools for a brokerage account through the T-Invest API. Reads include the portfolio split by asset class, sector and currency, screeners for bonds, shares and ETFs, return, volatility, drawdown and dividends, quotes and operation history. Rebalance plans include commissions, accrued interest and FIFO tax with the long-term holding exemption, and may advise doing nothing. Orders are off by default: first a draft checked against limits in config.toml, then a fresh-quote recheck and a separate confirmation, limit orders only. The default mode is the sandbox.
Who it is for. For retail investors with a T-Bank brokerage account who want an agent to analyze their portfolio under hard limits.
Good fit when
- You need portfolio structure, concentration and drift from a target allocation
- You need bonds screened by maturity, duration and liquidity
- You need to know whether a rebalance pays off after fees and tax
Not a fit when
- You need vendor support: T-Bank has its own T-Invest MCP
- You want the agent to trade on its own without confirmations
Example request
Review my portfolio: bond share, concentration, and whether a rebalance is worth it nowLimitations
Unofficial beta software, not investment advice. Requires Python 3.12+ and a T-Invest API token: a read-only token is enough for analysis, and the author explicitly forbids tokens with transfer rights. Real trading needs prod mode, the enable_real_trading flag and a separate full-access token. The t-tech-investments SDK sometimes fails to install from its index; the README gives workarounds. Prompt injection and model errors remain risks even with the gates.
How to disable. Run claude mcp remove tinvest or delete the tinvest block from the client config, then revoke the tokens in T-Invest settings.
MCP
- Transport
- stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| TINVEST_SANDBOX_TOKEN secret | Sandbox token for the default mode |
| TINVEST_READONLY_TOKEN secret | Production read-only token for research |
| TINVEST_FULLACCESS_TOKEN secret | Full-access token, needed only for real orders |
Security check
- Works with a real brokerage account and can place orders with real money
- Stores broker access tokens
- A model error or prompt injection could cause an unwanted trade if trading is enabled
README in short
The README opens with a warning that the software is unofficial and handles real money. It explains the idea that the model analyzes while limits live in code, compares itself honestly with the official T-Invest MCP and lists features in three groups: research, planning and execution. Setup is step by step: uv sync, a least-privilege token, .env and config.toml, a tinvest-mcp-doctor check, and connecting Claude Code, Claude Desktop, Cursor and VS Code. Separate documents cover security, configuration and tools.
FAQ
How does it differ from the official T-Invest MCP?
The official one runs on the bank's servers and installs with one command. This one runs locally, keeps the token in .env, lets you set limits and has a sandbox.
Can the agent place an order by itself?
Only if you enable real trading with two settings and add a full-access token. Even then it needs a draft and a separate confirmation.
Related
Stripe's official MCP server, plugins and skills: the agent searches the API and docs, reads and changes account data
The official CCXT MCP server and skills: market data, balances and opt-in trading across crypto exchanges and prediction markets
Skill plugins for analyzing stocks, earnings, options and startups, plus readers for social feeds and market data
Skills and an MCP server for options traders: quotes, technical analysis, Greeks, spreads, scanners and Interactive Brokers portfolio