Get the FREE Ultimate OpenClaw Setup Guide →

t-invest

MCP server from prikotov/t-invest-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio prikotov-t-invest-mcp-server docker run -i --rm -e APP_T_INVEST_BASE_URL -e APP_T_INVEST_TOKEN -e APP_T_INVEST_ACCOUNT_ID prikotov/t-invest-mcp-server:latest bin/server \
  --env APP_T_INVEST_TOKEN="<YOUR_TOKEN>" \
  --env APP_T_INVEST_BASE_URL="<API ENDPOINT>" \
  --env APP_T_INVEST_ACCOUNT_ID="<YOUR_ACCOUNT_ID>"

How to use

This MCP server implements a Symfony-based console application that exposes an MCP (Model Context Protocol) server for the T-Invest API. It provides tools to interact with the T-Invest REST API, including getting a list of accounts, retrieving a client portfolio (with optional ticker filtering), and obtaining fundamental metrics for specified assets. The server is designed to run inside Docker (via the prikotov/t-invest-mcp-server image) or locally via PHP tooling. To use it, configure the required environment variables (BASE URL of the T-Invest API, your access token, and the account ID you want to connect to) in the container invocation, then start the server. Once running, you can call the available tools (get_accounts, get_portfolio, get_asset_fundamentals) through the MCP interface to fetch data programmatically or interactively. The server can be launched as a Docker container using the provided mcpServers configuration, or run locally with PHP commands such as bin/server or php bin/console app:mcp-server. You can also exercise the client tooling via the MCP client to verify available instruments and methods (console, podman, or docker modes).

How to install

Prerequisites:

  • Docker or Podman installed
  • PHP 8.3+ and Composer (for local/source-based runs)
  • Git to clone the repository (if you are building from source)

Installation and setup steps (Docker-based):

  1. Ensure Docker is running on your host.
  2. Pull and run the MCP server container using the configuration from the README:
# As defined in the README, the server runs with required environment variables:
docker run -i --rm \
  -e APP_T_INVEST_BASE_URL=<API ENDPOINT> \
  -e APP_T_INVEST_TOKEN=<YOUR_TOKEN> \
  -e APP_T_INVEST_ACCOUNT_ID=<YOUR_ACCOUNT_ID> \
  prikotov/t-invest-mcp-server:latest bin/server
  1. Replace the placeholders with your actual API endpoint, token, and account ID. You can also integrate this into a docker-compose or podman-compose setup as described in the repository.

For local development (source-based, non-Docker):

  1. clone the repository and install dependencies
git clone <repository-url> t-invest-mcp-server
cd t-invest-mcp-server
composer install
  1. Run the server locally
bin/server

Or via Symfony console directly:

php bin/console app:mcp-server
  1. Verify available tools from the client:
podman-compose run --rm t-invest-mcp-server bin/console app:mcp-client --via=console

Additional notes

Notes and tips:

  • The Docker image prikotov/t-invest-mcp-server:latest expects three environment variables: APP_T_INVEST_BASE_URL (the T-Invest API endpoint), APP_T_INVEST_TOKEN (your access token), and APP_T_INVEST_ACCOUNT_ID (the account to connect to).
  • Supported API endpoints include the production REST API at https://invest-public-api.tinkoff.ru/rest/ and the sandbox at https://sandbox-invest-public-api.tinkoff.ru/rest/.
  • Ensure you follow token acquisition steps described in the project documentation to obtain APP_T_INVEST_TOKEN.
  • The server is built with PHP 8.3+ and Symfony; local development requires Composer to install dependencies.
  • The provided mcpServers configuration maps the logical server-name t-invest to the Docker invocation; you can adapt this to YAML/JSON configurations in your environment if needed.
  • If you modify code, you can run tests and static analysis via the included Makefile targets (make tests, make psalm, etc.).

Related MCP Servers

Sponsor this space

Reach thousands of developers