{"_id":"@abaddon83/trading212-mcp","name":"@abaddon83/trading212-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@abaddon83/trading212-mcp","version":"1.0.0","description":"MCP server for the Trading 212 Public API (v0) — accounts, instruments, orders, positions, history and pies","type":"module","repository":{"type":"git","url":"git+https://github.com/abaddon/trading212MCP.git"},"homepage":"https://github.com/abaddon/trading212MCP#readme","bugs":{"url":"https://github.com/abaddon/trading212MCP/issues"},"keywords":["mcp","model-context-protocol","trading212","trading","stocks","claude"],"publishConfig":{"access":"public"},"bin":{"trading212-mcp":"src/index.js"},"scripts":{"start":"node src/index.js"},"engines":{"node":">=18"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.12.0","zod":"^3.24.2"},"_id":"@abaddon83/trading212-mcp@1.0.0","gitHead":"290a62ee578a59211d4514c33b6d3f4e1b5e8b6b","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ionmxWgDgtUbOcgioA3NbVwHQCE51EbFDcHam9+3tmVxYVDL6uEtLdqBTO1quIb132OEshAP57JnOA/p4MCaIQ==","shasum":"34eb0a2eb18ccf9437b96c8d2da2d665dfba6a3a","tarball":"https://registry.npmjs.org/@abaddon83/trading212-mcp/-/trading212-mcp-1.0.0.tgz","fileCount":4,"unpackedSize":95811,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCGACtOPtUDghaFTCAvEOMryG7L1n8S1qVXf+/xncucmQIgEGfjncX92Xv4I6axu7mJELRgopA1AEYoQvUST2eISnE="}]},"_npmUser":{"name":"abaddon83","email":"abaddon83@gmail.com"},"directories":{},"maintainers":[{"name":"abaddon83","email":"abaddon83@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trading212-mcp_1.0.0_1783665559533_0.7208947370780479"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-10T06:39:19.439Z","1.0.0":"2026-07-10T06:39:19.696Z","modified":"2026-07-10T06:39:19.845Z"},"maintainers":[{"name":"abaddon83","email":"abaddon83@gmail.com"}],"description":"MCP server for the Trading 212 Public API (v0) — accounts, instruments, orders, positions, history and pies","homepage":"https://github.com/abaddon/trading212MCP#readme","keywords":["mcp","model-context-protocol","trading212","trading","stocks","claude"],"repository":{"type":"git","url":"git+https://github.com/abaddon/trading212MCP.git"},"bugs":{"url":"https://github.com/abaddon/trading212MCP/issues"},"license":"MIT","readme":"# Trading 212 MCP Server\n\nAn [MCP](https://modelcontextprotocol.io) server that exposes the complete [Trading 212 Public API (v0)](https://docs.trading212.com/api) as tools for Claude Code (and any other MCP client). Every REST endpoint in the official OpenAPI specification (see [`docs/api.json`](docs/api.json)) is covered: account summary, instruments, orders, positions, historical events and pies.\n\n> ⚠️ The Trading 212 API works only for **Invest** and **Stocks ISA** accounts. Orders execute only in the primary account currency. To **sell**, pass a **negative quantity** (e.g. `-10.5`).\n\n## Requirements\n\n- Node.js ≥ 18\n- A Trading 212 API key + secret ([how to generate one](https://helpcentre.trading212.com/hc/en-us/articles/14584770928157))\n\n## Installation in Claude Code\n\nThe server is published on npm as [`@abaddon83/trading212-mcp`](https://www.npmjs.com/package/@abaddon83/trading212-mcp), so no clone or install is needed — register it once (starts against the **demo** environment — safe default):\n\n```bash\nclaude mcp add --scope user trading212 \\\n  -e TRADING212_API_KEY=your_api_key \\\n  -e TRADING212_API_SECRET=your_api_secret \\\n  -e TRADING212_ENVIRONMENT=demo \\\n  -- npx -y @abaddon83/trading212-mcp\n```\n\nSwitch `TRADING212_ENVIRONMENT` to `live` for real-money trading once you have tested against the paper-trading environment.\n\nAlternatively, add it to a project's `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"trading212\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@abaddon83/trading212-mcp\"],\n      \"env\": {\n        \"TRADING212_API_KEY\": \"your_api_key\",\n        \"TRADING212_API_SECRET\": \"your_api_secret\",\n        \"TRADING212_ENVIRONMENT\": \"demo\"\n      }\n    }\n  }\n}\n```\n\nVerify with `claude mcp list` or by asking Claude: *\"What's my Trading 212 account summary?\"*\n\n## Configuration\n\n| Variable | Required | Description |\n|---|---|---|\n| `TRADING212_API_KEY` | yes | Your API key |\n| `TRADING212_API_SECRET` | yes | Your API secret |\n| `TRADING212_ENVIRONMENT` | no | `demo` (default, paper trading) or `live` (real money) |\n\nAuthentication uses HTTP Basic auth (`API_KEY:API_SECRET`, Base64-encoded) on every request, as required by the API.\n\n## Tools\n\n### Accounts\n| Tool | Endpoint | Rate limit |\n|---|---|---|\n| `get_account_summary` | `GET /api/v0/equity/account/summary` | 1 / 5s |\n\n### Instruments\n| Tool | Endpoint | Rate limit |\n|---|---|---|\n| `get_exchanges` | `GET /api/v0/equity/metadata/exchanges` | 1 / 30s |\n| `get_instruments` | `GET /api/v0/equity/metadata/instruments` | 1 / 50s |\n\n`get_instruments` accepts an optional `search` parameter, applied client-side, because the full instrument list contains thousands of entries.\n\n### Orders\n| Tool | Endpoint | Rate limit |\n|---|---|---|\n| `get_pending_orders` | `GET /api/v0/equity/orders` | 1 / 5s |\n| `get_order_by_id` | `GET /api/v0/equity/orders/{id}` | 1 / 1s |\n| `place_limit_order` | `POST /api/v0/equity/orders/limit` | 1 / 2s |\n| `place_market_order` | `POST /api/v0/equity/orders/market` | 50 / 1m |\n| `place_stop_order` | `POST /api/v0/equity/orders/stop` | 1 / 2s |\n| `place_stop_limit_order` | `POST /api/v0/equity/orders/stop_limit` | 1 / 2s |\n| `cancel_order` | `DELETE /api/v0/equity/orders/{id}` | 50 / 1m |\n\n### Positions\n| Tool | Endpoint | Rate limit |\n|---|---|---|\n| `get_positions` | `GET /api/v0/equity/positions` | 1 / 1s |\n\n### Historical events\n| Tool | Endpoint | Rate limit |\n|---|---|---|\n| `get_order_history` | `GET /api/v0/equity/history/orders` | 6 / 1m |\n| `get_dividends` | `GET /api/v0/equity/history/dividends` | 6 / 1m |\n| `get_transactions` | `GET /api/v0/equity/history/transactions` | 6 / 1m |\n| `get_report_exports` | `GET /api/v0/equity/history/exports` | 1 / 1m |\n| `request_report_export` | `POST /api/v0/equity/history/exports` | 1 / 30s |\n\nList endpoints use cursor-based pagination: pass `cursor` and `limit` (default 20, max 50) and follow the `nextPagePath` field in the response until it is `null`.\n\n### Pies (deprecated upstream, still operational)\n| Tool | Endpoint | Rate limit |\n|---|---|---|\n| `get_pies` | `GET /api/v0/equity/pies` | 1 / 30s |\n| `get_pie` | `GET /api/v0/equity/pies/{id}` | 1 / 5s |\n| `create_pie` | `POST /api/v0/equity/pies` | 1 / 5s |\n| `update_pie` | `POST /api/v0/equity/pies/{id}` | 1 / 5s |\n| `duplicate_pie` | `POST /api/v0/equity/pies/{id}/duplicate` | 1 / 5s |\n| `delete_pie` | `DELETE /api/v0/equity/pies/{id}` | 1 / 5s |\n\n## Rate limiting\n\nLimits are enforced per account by Trading 212. On HTTP 429 the tools return an error that includes the reset time from the `x-ratelimit-reset` header.\n","readmeFilename":"README.md","_rev":"1-541cbeabbfdedd9563efa7ad50bcf256"}