Skip to main content
Glama
XBTFX

XBTFX MCP Trading Server

by XBTFX

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
XBTFX_API_KEYYesYour API key from console.xbtfx.com

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_auth_statusA

Check API key status — returns login, margin mode (hedging/netting), permissions, and tier. Call this once at session start.

get_accountB

Get account balance, equity, margin, free margin, unrealized P&L, and leverage

get_positionsA

List open positions with ticket, symbol, side, volume, entry/current price, SL/TP, and P&L. Optionally filter by symbol.

get_ordersA

List pending limit/stop orders with ticket, symbol, type, volume, and trigger price

get_historyA

Get trade deal history. Use EITHER a preset period OR a from/to date range, not both. Custom ranges limited to 90 days. Costs 2 weight.

get_symbolsA

List all 400+ tradeable symbols with bid/ask. Warning: large response, costs 2 weight. Prefer get_symbol for a single instrument.

get_symbolA

Get detailed spec for one symbol — digits, contract size, volume min/max/step, spread, margin rate, swap rates, trading sessions, and live bid/ask. Call before trading to validate volume.

get_quoteA

Get the current live bid/ask price for one or more symbols. Returns prices from the Continuum feed. Use this to check prices before trading or to monitor price levels.

tradeA

Open a new position (market order). Call get_symbol first to check volume_min/max/step. Confirm with user before executing.

close_positionA

Close an open position by ticket. Omit volume for full close, or specify volume for partial close.

modify_positionA

Update SL and/or TP on an open position. Pass 0 to remove SL or TP. At least one of sl or tp is required.

close_byA

Close two opposing positions against each other (saves spread on smaller side). Hedging accounts only — check get_auth_status first. Returns 400 on netting accounts.

reverse_positionA

Close a position and immediately open the opposite side with same volume. Two-step composite — if the re-open fails (207), the position is already closed. Costs 2 weight.

close_allA

Close ALL open positions on the account. Destructive bulk operation — confirm with user first. Costs 10 weight.

close_symbolA

Close all positions for a specific symbol. Destructive — confirm with user first. Costs 10 weight.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/XBTFX/xbtfx-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server