MCPSERV.CLUB
MCP-Mirror

XTB API MCP Server

MCP Server

Connect your XTB trading account via Model Context Protocol

Stale(65)
0stars
0views
Updated Mar 28, 2025

About

A Node.js MCP server that exposes the XTB API through @sharplygroup/xtb-api-js, enabling clients to perform account queries, market data retrieval, and trading operations via a standardized protocol.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The Sharplygroup Xtb MCP Server bridges the XTB trading platform with AI assistants through the Model Context Protocol. By wrapping the official library, it exposes a rich set of trading and market‑data tools as first‑class MCP resources. Developers can now query account balances, calculate commissions, fetch real‑time tick data, and execute trades directly from an AI assistant such as Claude or any MCP‑compliant client. This eliminates the need to write custom API wrappers and allows conversational agents to reason about market conditions, portfolio health, or trade execution in a single context.

At its core, the server offers three broad categories of functionality: account and trade management, market data retrieval, and auxiliary utilities. Account tools like and provide immediate insight into leverage, available margin, and risk exposure. Trade tools (, , etc.) let an assistant place orders, query status, or back‑test a strategy by pulling historical trade data. Market tools such as , , and supply live quotes, historical candles, and economic event schedules—all of which can be fed into a model’s context for real‑time decision making.

A standout feature is the real‑time tick streaming capability. By invoking with a timestamp, the server returns only price updates that have occurred since that point. This lightweight diff approach keeps bandwidth low while keeping the assistant in sync with market movements—a crucial advantage for latency‑sensitive trading strategies. Additionally, built‑in calculation helpers (, , ) relieve developers from manually implementing XTB’s pricing formulas, ensuring consistency and reducing bugs.

In practice, this MCP server is ideal for building AI‑driven trading dashboards, automated portfolio managers, or educational bots that explain market dynamics. For example, a financial advisor bot could ask the assistant to “show me all trades that closed in the last week” and receive a structured list, or an algorithmic trader could request “calculate expected margin for buying 1 lot of EUR/USD” before submitting an order. The server’s tight integration with MCP means that these interactions can be performed within the same conversational context, allowing for seamless back‑and‑forth between human intent and automated execution.

Overall, the Sharplygroup Xtb MCP Server provides a robust, protocol‑native gateway to XTB’s trading ecosystem. It empowers developers to embed sophisticated market analytics and execution capabilities directly into AI workflows, reducing friction, improving reliability, and enabling new forms of intelligent trading applications.