
Trading212 Mcp Server
io.github.KyuRishPublished by GitHub account KyuRishv0.1.1Updated Oct 24, 2026
MCP server for Trading 212 API - portfolio, orders, pies, dividends, and analytics
Overview
Connects an AI assistant to a Trading 212 brokerage account to review portfolios, place orders, manage pies and analyze dividends.
- What you can do
- Read account data: account info, cash balance, open positions and single-position lookups
- Place and manage orders: market, limit, stop and stop-limit orders, list and cancel pending orders
- Manage investment pies: list, inspect, create, update, duplicate and delete pies
- Look up market data: search tradeable instruments and exchanges
- Review history: past orders, paid dividends, transactions and CSV export requests
- Run composite analytics: portfolio summary, per-position performance, dividend summary and recent activity
- When to use it
- Useful when you want to ask questions about a Trading 212 portfolio in natural language, check balances and performance, review dividend income, or place and manage orders and pies without opening the app.
- Requirements
- Runs locally as a Python package (PyPI, launched with uvx or pip). Needs a Trading 212 API key and secret from Settings > API (Beta), supplied as TRADING212_API_KEY and TRADING212_API_SECRET, plus ENVIRONMENT set to live or demo. Network access to the Trading 212 API is required.
Installation
In SourceWeft
- Open Trading212 Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Trading 212 MCP Server
[PyPI] [Downloads] [License: MIT] [Glama] [Python] [MCP] [Tools]
Connect your AI assistant to your Trading 212 brokerage account. Ask questions about your portfolio, place trades, manage pies, and analyze dividends - all through natural language.
Works with Claude Desktop, Claude Code, ChatGPT, Gemini, Cursor, Windsurf, and any client that supports the Model Context Protocol (MCP).
Why this server?
- 32 tools covering the full Trading 212 API, plus 4 analytics tools that combine multiple API calls into actionable insights
- Smart rate limiting - reads T212's rate limit headers, auto-waits, and retries on 429 (up to 3 times). No rate limit errors leak to your AI
- Zero config - install from PyPI, add your API key, done. No Docker, no database, no Redis
- Typed responses - every tool returns structured Pydantic models, not raw JSON
- Paper trading - set
ENVIRONMENT=demoto test with virtual money first
What can it do?
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
Quick start
Install
Or via pip:
Get your API credentials
From the Trading 212 app: Settings > API (Beta). You need both the API Key and Secret - the server uses Basic Auth.
Connect to Claude Desktop
Add to claude_desktop_config.json (Windows: %APPDATA%\Claude\, Mac: ~/Library/Application Support/Claude/):
Connect to Claude Code
Then set the environment variables in your shell or .env file.
Other clients (Cursor, Windsurf, ChatGPT, etc.)
Same command and env vars - configure per your client's MCP docs. Set ENVIRONMENT to demo for paper trading.
From source
claude_desktop_config.json for source installs
All 32 tools
Analytics (composite)
Account
Trading
Pies
Market Data
History
Compatibility
Tested with these MCP clients:
Author
Built by Rishabh Dogra.
Support
If this server saves you time, a coffee would mean a lot.
License
MIT
Source: README.md at commit 850da6b
Tools
0Version history
1- v0.1.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts