t212-mcp

paulaigue/t212-mcp

3.2

If you are the rightful owner of t212-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The T212 MCP Server is a Model Context Protocol server designed to facilitate interaction with Trading212's API, providing a standardized interface for AI models to access account information and perform trading operations.

Tools
5
Resources
0
Prompts
0

T212 MCP Server

npm version License: MIT

A Model Context Protocol (MCP) server for interacting with Trading212's API. This server provides a standardized interface for AI models to access Trading212 account information and perform trading operations.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI models to interact with external tools and services. It provides a secure and controlled environment where AI can access specific functionalities while maintaining proper boundaries and security measures.

See documentation here: https://modelcontextprotocol.io

Features

  • 📊 Portfolio position retrieval (read-only)
  • 🥧 Pies (automated investment portfolios) management (read-only)
  • 💰 Account cash and metadata retrieval
  • 🔒 Secure API key authentication
  • 🤖 Compatible with Claude and other MCP clients

Quick Start

Prerequisites

  • Node.js (v16 or higher)
  • A Trading212 API key (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-trading212-api-key"
      }
    }
  }
}

Option 2: Global installation

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

How to access the 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 Trading212 API Key

  1. Log into your Trading212 account
  2. Navigate to Settings → API
  3. Generate a new API key
  4. Copy the key and use it in your configuration

Available Tools

The server provides the following functionality:

  • fetchOpenPositions: Get all open positions in your portfolio
  • fetchPosition: Get details for a specific position by ticker
  • fetchAllPies: Retrieve all your investment pies
  • fetchAccountCash: Get your account's cash information
  • fetchAccountMetadata: Get your account's metadata

After configuring, restart Claude Desktop and you should see the T212 tools available.

Security Notes

  • ⚠️ Never commit your Trading212 API key to version control
  • 🔒 Keep your MCP configuration file secure
  • 🔄 Regularly rotate your API keys
  • 📝 This server currently provides read-only access to your Trading212 account

License

This project is licensed under the MIT License - see the 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