MCP server for Trading 212 API integration
Reason this release was yanked:
Use newer version, marking this depricated.
Project description
Trading 212 MCP Server
mcp-name: io.github.kyurish/trading212-mcp-server
MCP server for the Trading 212 API. Works with any LLM client that supports MCP - Claude, ChatGPT, Gemini, Cursor, Windsurf, and more.
What can it do?
28 tools covering the full Trading 212 API, plus 4 analytics tools that combine multiple API calls into actionable insights:
| Category | Tools |
|---|---|
| Analytics | Portfolio summary, performance report, dividend analysis, recent activity |
| Trading | Market, limit, stop, and stop-limit orders |
| Portfolio | Positions, pies, cash balance |
| Market Data | Instrument search, exchange schedules |
| History | Past orders, dividends, transactions, CSV exports |
Analytics tools
These combine multiple API calls into single high-level responses:
fetch_portfolio_summary- Complete snapshot: total value, P&L, cash, top holdings, allocationfetch_portfolio_performance- Per-position returns with dividends, best/worst performersfetch_dividend_summary- Income analysis grouped by ticker and monthfetch_recent_activity- Combined timeline of trades and transactions
Installation
Quick start (recommended)
uvx trading212-mcp-server
pip
pip install trading212-mcp-server
From source
git clone https://github.com/KyuRish/trading212-mcp-server.git
cd trading212-mcp-server
uv sync
Authentication
Get your API Key and Secret from the Trading 212 app: Settings > API (Beta).
Both are required - the server uses Basic Auth (base64 key:secret).
Connect to your LLM
Claude Desktop
Add to claude_desktop_config.json (Windows %APPDATA%\Claude\ / Mac ~/Library/Application Support/Claude/):
{
"mcpServers": {
"trading212": {
"command": "uvx",
"args": ["trading212-mcp-server"],
"env": {
"TRADING212_API_KEY": "<your-api-key>",
"TRADING212_API_SECRET": "<your-api-secret>",
"ENVIRONMENT": "live"
}
}
}
}
Claude Code
claude mcp add trading212 -- uvx trading212-mcp-server
Then set the environment variables in your shell or .env file.
Other clients (Cursor, Windsurf, etc.)
Same command and env vars - configure per your client's MCP docs.
Set ENVIRONMENT to demo for paper trading.
From source
If running from a cloned repo instead of PyPI:
{
"mcpServers": {
"trading212": {
"command": "uv",
"args": ["run", "--directory", "<path-to-repo>", "-m", "trading212_mcp_server.server"],
"env": {
"TRADING212_API_KEY": "<your-api-key>",
"TRADING212_API_SECRET": "<your-api-secret>",
"ENVIRONMENT": "live"
}
}
}
}
All tools
Analytics (composite)
| Tool | Description |
|---|---|
fetch_portfolio_summary |
Complete portfolio snapshot with P&L and allocations |
fetch_portfolio_performance |
Per-position returns, dividends, best/worst performers |
fetch_dividend_summary |
Dividend income by ticker and month |
fetch_recent_activity |
Combined timeline of trades and transactions |
Account
| Tool | Description |
|---|---|
fetch_account_info |
Account metadata (currency, ID) |
fetch_account_cash |
Cash balance, invested value, P&L |
fetch_all_open_positions |
All portfolio positions |
search_specific_position_by_ticker |
Single position by ticker |
Trading
| Tool | Description |
|---|---|
place_market_order |
Buy/sell at current price |
place_limit_order |
Buy/sell at specified price or better |
place_stop_order |
Trigger order at stop price |
place_stop_limit_order |
Stop trigger with limit execution |
fetch_all_orders |
List pending orders |
fetch_order |
Get specific order by ID |
cancel_order |
Cancel a pending order |
Pies
| Tool | Description |
|---|---|
fetch_pies |
List all pies |
fetch_a_pie |
Pie details by ID |
create_pie |
Create a new pie |
update_pie |
Update pie settings |
duplicate_pie |
Clone a pie |
delete_pie |
Remove a pie |
Market Data
| Tool | Description |
|---|---|
search_instrument |
Search by ticker or name |
search_exchange |
Search exchanges |
History
| Tool | Description |
|---|---|
fetch_historical_order_data |
Past orders with pagination |
fetch_paid_out_dividends |
Dividend history |
fetch_transaction_list |
Deposits/withdrawals |
fetch_exports_list |
List CSV exports |
request_csv_export |
Request new CSV export |
Development
git clone https://github.com/KyuRish/trading212-mcp-server.git
cd trading212-mcp-server
cp .env.example .env # fill in your API keys
uv sync
uv run -m trading212_mcp_server.server
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trading212_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: trading212_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 35.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7391187e404c2e57c6e898101be8bdc292e52e46c6ec0e602a2fcfe9182efda8
|
|
| MD5 |
cee1ccdbc03c4b493ec2ad2f9cc86f9b
|
|
| BLAKE2b-256 |
378a35ebb1012b35cf95251f6f2b125492d7740f3714aad9b8b7f8f8d2e8c596
|
Provenance
The following attestation bundles were made for trading212_mcp_server-0.1.0.tar.gz:
Publisher:
publish.yml on KyuRish/trading212-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trading212_mcp_server-0.1.0.tar.gz -
Subject digest:
7391187e404c2e57c6e898101be8bdc292e52e46c6ec0e602a2fcfe9182efda8 - Sigstore transparency entry: 1004337540
- Sigstore integration time:
-
Permalink:
KyuRish/trading212-mcp-server@cc4f2adfa4d80b288d297faae099653026313595 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KyuRish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc4f2adfa4d80b288d297faae099653026313595 -
Trigger Event:
release
-
Statement type:
File details
Details for the file trading212_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trading212_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1038ad514055e07adf78ec6a29ead2c17ee8f32dd88c781e90aa3aed7ecf3203
|
|
| MD5 |
847aa29479569d3272ae615c61bedb11
|
|
| BLAKE2b-256 |
9b9fe5e7253d776a096af882cef521e5681102fbafb74b462e73fac5d522e244
|
Provenance
The following attestation bundles were made for trading212_mcp_server-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on KyuRish/trading212-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trading212_mcp_server-0.1.0-py3-none-any.whl -
Subject digest:
1038ad514055e07adf78ec6a29ead2c17ee8f32dd88c781e90aa3aed7ecf3203 - Sigstore transparency entry: 1004337542
- Sigstore integration time:
-
Permalink:
KyuRish/trading212-mcp-server@cc4f2adfa4d80b288d297faae099653026313595 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KyuRish
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cc4f2adfa4d80b288d297faae099653026313595 -
Trigger Event:
release
-
Statement type: