SuperAPI AI Directory

trading212-mcp-server

Trading 212 API integration: portfolio management, market, limit and stop orders, pies, dividends, market data and analytics.

Open website

About this tool

Trading 212 MCP Server is an open-source project designed to connect AI assistants with Trading 212 brokerage accounts through the Model Context Protocol (MCP). Users can ask about portfolio status, place trades, manage Pies, and analyze dividends in natural language.

Main Capabilities

The server provides 32 tools covering the complete Trading 212 API, plus 4 additional analysis tools that combine multiple API calls into a single high-level response:

  • fetch_portfolio_summary: A complete snapshot, including total value, profit and loss, cash, major holdings, and asset allocation.
  • fetch_portfolio_performance: The return for each holding (including dividends), as well as the best- and worst-performing holdings.
  • fetch_dividend_summary: Income analysis grouped by ticker and month.
  • fetch_recent_activity: A combined timeline of trades and transactions.

How to Use

  1. Get API credentials: In the Trading 212 app, go to Settings > API (Beta). An API Key and Secret are required; the server uses Basic Auth.
  2. Install: Install from PyPI; no Docker, database, or Redis is required.
  3. Configure the client:
    • Claude Desktop: Add the configuration in claude_desktop_config.json (Windows path: %APPDATA%\Claude, Mac path: ~/Library/Application Support/Claude/).
    • Claude Code: Set environment variables in the shell or in a .env file.
    • Other clients (Cursor, Windsurf, ChatGPT, etc.): Use the same command and environment variables, and configure according to each client's MCP documentation.
  4. Paper trading: Set ENVIRONMENT=demo to test with virtual funds.

Suitable Scenarios

Suitable for users who want to manage a Trading 212 portfolio, place trades, analyze dividends, and monitor market activity in natural language. It supports integration with multiple AI clients, making it convenient to operate directly within existing workflows.

Limitations

  • A Trading 212 account and API credentials are required.
  • Rate limits: The server reads rate limit headers, automatically waits, and retries up to 3 times on 429, but in extreme cases it may still be subject to API limits.
  • The MCP clients that have been tested with this server include Claude Desktop, Claude Code, ChatGPT, Gemini, Cursor, Windsurf, and others, but compatibility with other clients should be checked against their respective documentation.
  • The project was built by Rishabh Dogra; for specific feature details and updates, please refer to the GitHub repository.