Trading212 MCP Server

Trading212 MCP Server

mcp-server-trading212•bylukeplausin

An MCP server that connects agentic AI to a Trading212 brokerage account for portfolio analysis, order placement, and pie management.

License: MIT License•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Exposes dynamic resources for portfolio, account info, cash, and instrument metadata via trading212:// URIs.
  • •Offers order management tools including place_order and update_pie.
  • •Provides account data tools to retrieve account info, portfolio holdings, and available cash.
  • •Provides market data tools including fuzzy instrument search and detailed instrument lookup by ticker.

BEST FOR

  • •Letting an AI analyse and critique a Trading212 portfolio.
  • •Having an AI suggest stocks and place orders in practice mode (live order creation is restricted by the Trading212 API).
  • •Allowing an AI to manage or update a Trading212 investment pie.

ABOUT MCP-SERVER-TRADING212

Trading212 MCP Server is cataloged as an MCP server attributed to lukeplausin. An MCP server that connects agentic AI to a Trading212 brokerage account for portfolio analysis, order placement, and pie management. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Trading212 MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server cache Trading212 API results?

Yes; due to Trading212 API rate limits it caches results in memory with a default TTL of 5 minutes, and uses a local Redis server on port 6379 if one is deployed.

Can the server run as a remote HTTP service?

Yes; it has built-in SSE mode to run as an HTTP service that can be located on a different server than the AI client.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 72f039078d77 · 采集于 2026-11-13 12:15:36 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Trading212 MCP Server

⚠️ **Warning**: Putting an AI in charge of your stock broker is inherently risky. Do not use this connector unless you have considered the risks and put appropriate controls in place to manage those risks.

By using this connector you agree to the terms of the MIT license, which includes indemnity from any financial losses resulting from it's use.

You should test the connector using "demo" mode before deploying to your live account.

Use at your own risk

Overview

The purpose of this MCP tool is to allow you to connect agentic AI to your Trading212 brokerage account. This will allow you to perform actions such as the following:

  • Allow an AI to analyse and critique your portfolio
  • Get the AI to suggest some stocks and order them on your behalf (due to a restriction in the Trading212 API, orders can only be created in practice mode currently)
  • Allow the AI to manage/update a Trading212 investment pie on your behalf
  • Allow the AI to create a Trading212 investment pie on your behalf (coming soon)

Due to aggressive API rate limits imposed by the Trading212 API, this tool will attempt to cache API results in-memory (the default TTL is 5 minutes).

If you deploy a local Redis server on port 6379 the tool will use it instead of the in-memory cache.

Security tips

  • If you are hosting the tool server remotely and connecting over the internet, make sure you deploy a reverse proxy with HTTPS, and ideally with Mutual TLS verification.
  • You should avoid saving your Trading212 API key in plaintext. Try using an automated secret manager like keyring or 1password
  • Always test the connector on the demo account before connecting to your real account

Components

Resources

The server exposes some dynamic resources:

  • trading212://equity/portfolio: My Portfolio - All assets within your trading portfolio
  • trading212://equity/account/info - My Account Info - Information about your trading account
  • trading212://equity/account/cash - My Cash - Information about cash available in my trading account
  • trading212://equity/metadata/instruments/all - Traded instrument information - Information about all instruments (warning: returns a lot of data and will probably overflow the context window)
  • trading212://equity/metadata/instruments/list - Returns the list of traded instrument tickers
  • trading212://equity/metadata/instruments/{ticker} - Returns detailed information about a specific ticker

Prompts

There are currently no prompts

Tools

The server offers these tools:

Order management

  • place_order

    • Place an active order via Trading212. Will dynamically select the correct order type based on inputs.
    • Input:
      • ticker (string): The ticker of the stock to order
      • quantity (float): The amount to buy or sell
      • stopPrice (float): The stop price (if appropriate)
      • limitPrice (float): The limit price (if appropriate)
      • validDuration (string): The duration of the order (DAY / GTC)
    • Returns: Data object from the Trading212 API
  • cancel_order (coming soon)

    • Cancel an order via Trading212
    • Input:
      • ticker (string): The ticker of the order
    • Returns: Data object from the Trading212 API
  • create_pie (coming soon)

    • Create a "pie" in Trading212
    • Input:
    • dividendCashAction (str): What to do with dividends
    • endDate (str): When the pie goal ends
    • goal (int): Saving goal for the pie
    • icon (str): What icon to use for the pie
    • instrumentShares (dict[str, float]): Mapping of ticker names to share allocations.
    • name (str): A name for the pie
    • Returns: Data object from the Trading212 API
  • update_pie

    • Update a "pie" in Trading212
    • Input:
    • dividendCashAction (str): What to do with dividends
    • endDate (str): When the pie goal ends
    • goal (int): Saving goal for the pie
    • icon (str): What icon to use for the pie
    • instrumentShares (dict[str, float]): Mapping of ticker names to share allocations.
    • name (str): A name for the pie
    • Returns: Data object from the Trading212 API

Account data

  • get_account_info

    • Get the account ID and currency
    • Returns: Data about the account
  • get_portfolio

    • Get the list of equities currently held in the account
    • Returns: Portfolio data
  • get_account_cash

    • Get the currently available cash in the account
    • Returns: Data about balance

Market data

  • get_all_instruments

    • Get the list of all instruments in the account (warning: returns a lot of data)
    • Returns: Full data about all equities
  • get_instrument_list

    • Get the list of tickers available in the account
    • Returns: Full list of stock tickers available in this account
  • get_instrument

    • Get full information about a single traded instrument, by ticker
    • Input:
      • ticker (string): The ticker of interest
    • Returns: Full information about the traded instrument
  • search_instruments

    • Search all instruments by name, using a partial fuzzy search term
    • Input:
      • search_term (string): The term to search by (usually a company name)
      • threshold (int): Minimum fuzzy search score to appear in results 0-100, default: 70
      • limit (int): Maximum number of results to return, default: 15
    • Returns: Full information about matching instruments

Usage with Claude Desktop

uv

# Add the server to your claude_desktop_config.json.
# NOTE: To trade in your real account you will need to change --environment to "live"
"mcpServers": {
  "trading212": {
    "command": "uv",
    "args": [
      "--directory",
      "parent_of_servers_repo/servers/src/mcp_server_trading212",
      "run",
      "--api-key",
      "<KEEP_THIS_A_SECRET>",
      "--environment",
      "demo",
      "mcp-server-trading212"
    ]
  }
}

Docker

# Add the server to your claude_desktop_config.json
"mcpServers": {
  "trading212": {
    "command": "docker",
    "args": [
      "run",
      "todo"
    ]
  }
}

SSE Mode

This tool has SSE (server side events) mode built in to it. This allows you to run the tool as an HTTP service, which can optionally be located on a different server to the AI client. This is useful for debugging and might be helpful if you want to keep your API key away from your AI environment.

Use with Claude desktop in SSE mode

# On Tool server:
uv --directory path/to/project run --api-key '<KEEP_THIS_SECRET>' --environment "demo" mcp-server-trading212 --host 127.0.0.1 --port 6677 --sse
// Claude Desktop file
"mcpServers": {
  "trading212": {
    "command": "uvx",
    "args": [
      "mcp-proxy",
      "http://127.0.0.1:6677/sse",
    ],
    "env": {
        "API_ACCESS_TOKEN": "my-token"
    }
  }
}

Use with Google Gemini CLI

Requirements:

  1. Node.js version 20 or higher. You can download it from (here)[https://nodejs.org/en/download].
  2. gemini-cli. You can find more information on how to install (here)[https://github.com/google-gemini/gemini-cli].

It maybe necessary to run gemini-cli in the terminal of the project folder.

gemini mcp config setup

The settings file is by default located in ~/.gemini/settings.json

{
  "theme": "Default",
  "selectedAuthType": "oauth-personal",
  "mcpServers": {
    "trading212": {
      "command": "uv", // Path to your uv executable
      "args": [
        "run",                     // uv subcommand
        "--directory",             // uv argument to set working directory
        "absolute/path/to/project/mcp-server-trading212", // Your abosulte path project root
        "mcp-server-trading212"    // The Python module name
      ],
      "env": {
        "TRADING212_API_KEY": "your-trading212-api-key", // Your actual API Key
        "TRADING212_ENVIRONMENT": "demo" // Or "live" if you're using a live account
      }
    }
  }
}

Note: Use which uv to find the correct path to uv executable.

If you are connecting to your tool server over an untrusted network (e.g. the internet) then you should host the tool server behind a reverse proxy that implements HTTPS encryption. Mutual TLS would be a good idea as well. Caddy can do all that for you.

Building

Docker:

docker build -t mcp/trading212 .

Test with MCP inspector

uv add "mcp[cli]"
mcp dev src/mcp_server_sqlite/server.py:wrapper  

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

By using this connector you agree to the terms of the MIT license, which includes indemnity from any financial losses resulting from it's use.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Trading212 MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-trading212)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics