Trading 212 MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Trading 212 MCP Server show my portfolio value and cash balance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Trading 212 MCP Server
An MCP (Model Context Protocol) server that wraps the Trading 212 Public API v0, enabling AI agents to interact with your Trading 212 brokerage account through natural language.
Features
16 tools across 5 categories:
Category | Tools | Description |
Accounts |
| Cash breakdown, investment metrics, total value |
Instruments |
| Tradable instruments and exchange schedules |
Positions |
| All open positions with P&L and wallet impact |
Orders |
| Full order lifecycle management |
History |
| Historical data with pagination and CSV export |
Related MCP server: eToro MCP Server
Prerequisites
A Trading 212 Invest or Stocks ISA account
API key + secret generated from the Trading 212 app (Settings → API)
Node.js ≥ 18
Setup
# Clone and install
cd trading212-mcp
npm install
# Build
npm run buildConfiguration
Set these environment variables before running:
Variable | Required | Description |
| ✅ | Your Trading 212 API key |
| ✅ | Your Trading 212 API secret |
| ❌ |
|
Usage with Claude Desktop / Gemini CLI
Add to your MCP config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"trading212": {
"command": "node",
"args": ["c:/GenAI/trading212-mcp/dist/index.js"],
"env": {
"T212_API_KEY": "your_api_key",
"T212_API_SECRET": "your_api_secret",
"T212_ENV": "demo"
}
}
}
}Usage with VS Code / Copilot
Add to .vscode/mcp.json:
{
"servers": {
"trading212": {
"command": "node",
"args": ["c:/GenAI/trading212-mcp/dist/index.js"],
"env": {
"T212_API_KEY": "your_api_key",
"T212_API_SECRET": "your_api_secret",
"T212_ENV": "demo"
}
}
}
}Development
# Run in development mode (no build step)
npm run dev⚠️ Important Notes
Default environment is
demo(paper trading) — no real money at riskOrder tools are NOT idempotent — duplicate calls create duplicate orders
Sell convention: use a negative quantity (e.g.
-10.5sells 10.5 shares)All rate limits are enforced per-account by Trading 212's servers
API is currently in beta — see Trading 212 API docs
License
MIT
Available Tools
16 toolscancel_orderCancel Pending OrderADestructiveIdempotent
Cancel an active, unfilled order by its unique ID. Cancellation is not guaranteed if the order is already being filled. A successful response means the cancellation request was accepted. Rate limit: 50 req / 1m.
Inputs: orderId (required).
get_account_summaryGet Account SummaryARead-onlyIdempotent
Retrieve a full breakdown of the Trading 212 account: account ID, primary currency, cash metrics (available to trade, in pies, reserved for orders), investment metrics (current value, total cost, realised and unrealised P&L), and total account value. Rate limit: 1 req / 5s.
Inputs: no named parameters.
get_dividendsGet Dividend HistoryARead-onlyIdempotent
Retrieve paginated history of paid-out dividends. Each entry includes: amount (in account currency), gross amount per share, instrument details, payment date, quantity, and dividend type. Optionally filter by ticker. Rate limit: 6 req / 1m.
Inputs: limit, cursor, ticker.
get_exchangesGet Exchange MetadataARead-onlyIdempotent
Retrieve all accessible exchanges and their working schedules (open/close times, pre-market, after-hours, breaks). Each exchange has an ID that maps to the workingScheduleId on instruments. Data refreshes every 10 minutes. Rate limit: 1 req / 30s.
Inputs: no named parameters.
get_historical_ordersGet Historical OrdersARead-onlyIdempotent
Retrieve paginated history of all past orders (filled, cancelled, expired) with fill details, taxes, realised P&L. Optionally filter by ticker. Uses cursor-based pagination. Rate limit: 6 req / 1m.
Inputs: limit, cursor, ticker.
get_instrumentsGet All Tradable InstrumentsARead-onlyIdempotent
Retrieve the complete list of instruments available for trading on Trading 212. Each instrument includes: ticker (unique ID, e.g. AAPL_US_EQ), name, ISIN, currency, type (STOCK, ETF, etc.), max open quantity, extended-hours support, and working schedule ID. Data refreshes every 10 minutes. Rate limit: 1 req / 50s.
Inputs: no named parameters.
get_open_positionsGet Open PositionsARead-onlyIdempotent
Retrieve all open positions in the Trading 212 account. Each position includes: instrument details (ticker, name, ISIN, currency), quantity held, average price paid, current price, shares in pies, shares available for trading, and wallet impact (current value, total cost, unrealised P&L, FX impact). Optionally filter by a specific ticker. Rate limit: 1 req / 1s.
Inputs: ticker.
get_order_by_idGet Pending Order by IDARead-onlyIdempotent
Retrieve a single pending order by its unique numerical ID. Useful for checking the status of a previously placed order. Rate limit: 1 req / 1s.
Inputs: orderId (required).
get_pending_ordersGet All Pending OrdersARead-onlyIdempotent
Retrieve all currently active (pending) orders — those not yet filled, cancelled, or expired. Each order includes: type (LIMIT, STOP, MARKET, STOP_LIMIT), side (BUY/SELL), ticker, quantity, limit/stop prices, status, time-in-force, and creation date. Rate limit: 1 req / 5s.
Inputs: no named parameters.
get_reportsList Generated ReportsARead-onlyIdempotent
Retrieve a list of all requested CSV reports and their current status (Queued, Processing, Running, Finished, Failed, Canceled). When status is 'Finished', the downloadLink field contains a URL to download the CSV file. Rate limit: 1 req / 1m.
Inputs: no named parameters.
get_transactionsGet Transaction HistoryARead-onlyIdempotent
Retrieve paginated history of account transactions (deposits, withdrawals, fees, transfers). Each entry includes: amount, currency, timestamp, reference ID, and type. Rate limit: 6 req / 1m.
Inputs: time, limit, cursor.
place_limit_orderPlace Limit OrderA
Place a LIMIT order that executes at a specified price or better. Use a POSITIVE quantity to BUY (fills at limitPrice or lower) and a NEGATIVE quantity to SELL (fills at limitPrice or higher). NOT idempotent — duplicate calls create duplicate orders. Rate limit: 1 req / 2s.
Inputs: ticker (required), quantity (required), limitPrice (required), timeValidity.
place_market_orderPlace Market OrderA
Place a MARKET order for immediate execution at the next available price. Use a POSITIVE quantity to BUY and a NEGATIVE quantity to SELL (e.g. -10.5 sells 10.5 shares). WARNING: Market orders may experience price slippage. This endpoint is NOT idempotent — duplicate calls create duplicate orders. Rate limit: 50 req / 1m.
Inputs: ticker (required), quantity (required), extendedHours.
place_stop_limit_orderPlace Stop-Limit OrderA
Place a STOP-LIMIT order: when the Last Traded Price reaches stopPrice a limit order is placed at limitPrice. Protects against slippage. Use POSITIVE quantity to BUY, NEGATIVE to SELL. NOT idempotent. Rate limit: 1 req / 2s.
Inputs: ticker (required), quantity (required), stopPrice (required), limitPrice (required), +1 more.
place_stop_orderPlace Stop OrderA
Place a STOP order that triggers a market order once the stop price is reached (triggered by Last Traded Price). Use a POSITIVE quantity to BUY and a NEGATIVE quantity to SELL (stop-loss). NOT idempotent. Rate limit: 1 req / 2s.
Inputs: ticker (required), quantity (required), stopPrice (required), timeValidity.
request_csv_reportRequest CSV ReportA
Initiate async generation of a CSV report for a date range. Choose which data to include: orders, dividends, transactions, interest. Returns a reportId — use get_reports to poll status and get the download link when finished. Rate limit: 1 req / 30s.
Inputs: timeTo (required), timeFrom (required), includeOrders, includeInterest, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool targets a distinct resource and action. Place order tools are clearly differentiated by order type, and get tools are separated by resource (account, instruments, positions, orders, dividends, transactions, reports). No two tools appear to perform the same function.
All tools follow a consistent verb_noun pattern (get_, place_, cancel_, request_) using lowercase snake_case. The naming is predictable and uniform across the entire set.
16 tools is slightly above the ideal 3-15 range but justified by the scope of a trading API covering account info, instruments, orders, history, dividends, transactions, and reports. Each tool serves a distinct purpose and none feel redundant.
The tool set covers the core lifecycle of trading: viewing account and instruments, managing orders (place/cancel), retrieving positions and historical data, plus reporting. Minor gap: no tool for modifying an existing order, but this can be worked around by cancelling and re-placing.
Maintenance
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Official Intrinio MCP server. US stock prices, options and fundamentals for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for the Trading 212 API. Provides 28 tools for portfolio management, trading, pies, dividends, market data, and analytics.28125 PyPI10MIT
- FlicenseAqualityDmaintenanceA security-hardened MCP server that wraps the eToro public API, enabling AI assistants to trade, access market data, manage portfolios, and interact with social feeds via 34 tools.6-
- AlicenseAqualityBmaintenanceThis MCP server connects AI assistants to a Public.com brokerage account, enabling natural language trading of stocks, options, and crypto, along with portfolio management, quotes, and orders.46363 PyPI67Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for the Trading 212 public API, enabling account, portfolio, order, pie, and history access with read tools always available and trading tools opt-in.131MIT