t212-mcp-server

t212-mcp-server

Provides read-only access to Trading 212 accounts, enabling AI assistants to retrieve portfolio positions, account summaries, instrument data, and transaction history.

Category
Visit Server

README

T212 MCP Server

npm version License: MIT

A Model Context Protocol (MCP) server for interacting with the Trading 212 API. Gives AI assistants read-only access to your Trading 212 account โ€” positions, account summary, instruments, order history, dividends, and more.

Features

  • ๐Ÿ“Š Portfolio positions with P/L and wallet impact
  • ๐Ÿ’ฐ Account summary (cash, investments, realized/unrealized P/L)
  • ๐Ÿ” Instrument search (16,000+ stocks, ETFs, and more)
  • ๐Ÿ›๏ธ Exchange schedules and working hours
  • ๐Ÿ“œ Order history, dividend history, and transaction history
  • ๐Ÿ“ CSV export reports
  • ๐Ÿ”’ Read-only โ€” no trading operations
  • ๐Ÿงช Demo mode for paper trading
  • ๐Ÿค– Compatible with Claude, and other MCP clients

Quick Start

Prerequisites

  • Node.js v18 or higher
  • A Trading 212 API key and secret (get yours here)
  • Claude Desktop or another MCP-compatible client

Configuration for Claude Desktop

Add this to your Claude Desktop configuration file:

Option 1: No installation required (recommended)

{
  "mcpServers": {
    "t212-mcp": {
      "command": "npx",
      "args": ["t212-mcp-server"],
      "env": {
        "T212_API_KEY": "your-api-key-id",
        "T212_API_SECRET": "your-api-secret"
      }
    }
  }
}

Option 2: Global installation

npm install -g t212-mcp-server
{
  "mcpServers": {
    "t212-mcp": {
      "command": "t212-mcp-server",
      "env": {
        "T212_API_KEY": "your-api-key-id",
        "T212_API_SECRET": "your-api-secret"
      }
    }
  }
}

Demo Mode

To use paper trading instead of your live account, add T212_ENVIRONMENT:

{
  "env": {
    "T212_API_KEY": "your-demo-api-key-id",
    "T212_API_SECRET": "your-demo-api-secret",
    "T212_ENVIRONMENT": "demo"
  }
}

How to access the Claude Desktop config file

  1. Open Claude Desktop Settings
  2. Go to the Developer tab
  3. Click "Edit Config"
  4. Add your configuration and save
  5. Restart Claude Desktop

For detailed configuration instructions, see the official MCP documentation.

Getting your Trading 212 API Credentials

  1. Log into your Trading 212 account
  2. Navigate to Settings โ†’ API
  3. Generate a new API key
  4. Copy both the API Key ID and the Secret Key (the secret is only shown at creation time)
  5. Use both values in your configuration as T212_API_KEY and T212_API_SECRET

For more details, see the Trading 212 Help Centre.

Available Tools

Tool Description
fetch-open-positions All open positions with current price, P/L, and wallet impact
fetch-position A specific position by ticker
fetch-account-summary Account cash balance, investment value, and P/L
search-instruments Search 16,000+ instruments by name, ticker, or ISIN
fetch-exchanges All exchanges with next open/close times
fetch-order-history Historical filled orders (paginated)
fetch-dividend-history Dividend payments (paginated)
fetch-transaction-history Deposits and withdrawals (paginated)
fetch-exports CSV export reports with download links
fetch-all-pies Investment pies (deprecated by Trading 212)

Environment Variables

Variable Required Description
T212_API_KEY Yes Your Trading 212 API Key ID
T212_API_SECRET Yes Your Trading 212 API Secret
T212_ENVIRONMENT No live (default) or demo for paper trading

Security Notes

  • โš ๏ธ Never commit your API credentials to version control
  • ๐Ÿ”’ Keep your MCP configuration file secure
  • ๐Ÿ”„ Regularly rotate your API keys
  • ๐Ÿ“ This server provides read-only access only

License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

Support

If you encounter any issues or have questions:

  1. Check the issues page
  2. Create a new issue if your problem isn't already reported
  3. Provide as much detail as possible, including error messages and your configuration

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured