sharplygroup_xtb-mcp-server

sharplygroup_xtb-mcp-server

0

The XTBApiServer is an MCP server designed to interface with XTB trading accounts using the Model Context Protocol. It provides a wide range of operations for account management, market data retrieval, and trading activities, catering to both demo and live account users.

XTBApiServer

This MCP server exposes the XTB API, allowing interactions with XTB trading accounts via the Model Context Protocol.

Prerequisites

  • Node.js (version 16 or higher)
  • npm
  • An XTB trading account

Installation

  1. Clone the repository
  2. Navigate to the project directory
  3. Install dependencies

Configuration

Create a .env file with your XTB API credentials to configure the server.

Running the Server

  1. Build the TypeScript code
  2. Run the server

Connecting with an MCP Client

You can connect to the server using any MCP client, such as MCP Inspector.

Available Tools

  • Account Operations: Functions to retrieve account data.
  • Calculation Operations: Calculate commissions, margins, and profit.
  • Market Data Operations: Access market event calendars, chart info, trading hours.
  • News Operations: Fetch news from the trading server.
  • Server Operations: Retrieve server time and API version.
  • Symbol Operations: Access symbol details.
  • Trade Operations: Manage user trades and transactions.
  • Command Execution: Execute server commands.

Prompts

  • getAccountDataPrompt: Fetch current account data.
  • getSymbolInfoPrompt: Get symbol information.