paulaigue/t212-mcp
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.
T212 MCP Server
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:
- Open Claude Desktop Settings
- Go to the Developer tab
- Click "Edit Config"
- Add your configuration and save
- Restart Claude Desktop
For detailed configuration instructions, see the official MCP documentation.
Getting your Trading212 API Key
- Log into your Trading212 account
- Navigate to Settings → API
- Generate a new API key
- Copy the key and use it in your configuration
Available Tools
The server provides the following functionality:
fetchOpenPositions
: Get all open positions in your portfoliofetchPosition
: Get details for a specific position by tickerfetchAllPies
: Retrieve all your investment piesfetchAccountCash
: Get your account's cash informationfetchAccountMetadata
: 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:
- Check the issues page
- Create a new issue if your problem isn't already reported
- Provide as much detail as possible, including error messages and your configuration