KT

kyurish/trading212-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

10 stars 4 forks 품질 80 트렌드 26MIT

MCP server for Trading 212 - portfolio analytics, order management, pies, dividends. Works with Claude, ChatGPT, Cursor, Windsurf.

개요

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 , and any client that supports the Model Context Protocol (MCP). - covering the full Trading 212 API, plus 4 analytics tools that combine multiple API calls into actionable insights - - reads T212's rate limit headers, auto-waits, and retries on 429 (up to 3 times). No rate limit errors leak to your AI - - install from PyPI, add your API key, done.

README

원문 README의 일부입니다. 원문 보기.

Trading 212 MCP Server

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=demo to test with virtual money first

What can it do?

Category Tools Examples
Analytics Portfolio summary, performance, dividends, activity “Show me my portfolio P&L”
Trading Market, limit, stop, stop-limit orders “Buy 5 shares of AAPL”
Portfolio Positions, cash balance, account info “What’s my cash balance?”
Pies Create, update, duplicate, delete pies “Show my pie allocations”
Market Data Instrument search, exchange schedules “Search for Tesla”
History Past orders, dividends, transactions, CSV exports “Show my dividend history”

Analytics tools

These combine multiple API calls into single high-level responses:

  • fetch_portfolio_summary - Complete snapshot: total value, P&L, cash, top holdings, allocation
  • fetch_portfolio_performance - Per-position returns with dividends, best/worst performers
  • fetch_dividend_summary - Income analysis grouped by ticker and month
  • fetch_recent_activity - Combined timeline of trades and transactions

Quick start

Install

uvx trading212-mcp-server

Or via pip:

pip install trading212-mcp-server

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.

GitHub에서 전체 README 보기

설치

uvx trading212-mcp-server
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "trading212": { "command": "uvx", "args": ["trading212-mcp-server"], "env": { "TRADING212_API_KEY": "<your-api-key>", "TRADING212_API_SECRET": "<your-api-secret>", "ENVIRONMENT": "live" } } } }