Skip to content

Configuration

VariableRequiredDescription
XBTFX_API_KEYYesYour API key from console.xbtfx.com

The API key binds to a single MT5 login. The MCP server uses the same authentication as the REST API.

No install needed — runs the latest version directly:

Terminal window
npx @xbtfx/mcp-trading
Terminal window
npm install -g @xbtfx/mcp-trading
xbtfx-mcp
Terminal window
git clone https://github.com/XBTFX/xbtfx-mcp-server.git
cd xbtfx-mcp-server
npm install && npm run build
XBTFX_API_KEY=your_key node dist/index.js

Each AI client has its own way of registering MCP servers:

Terminal window
claude mcp add xbtfx-trading -e XBTFX_API_KEY=xbtfx_live_your_key_here -- npx @xbtfx/mcp-trading

Add to claude_desktop_config.json:

{
"mcpServers": {
"xbtfx-trading": {
"command": "npx",
"args": ["@xbtfx/mcp-trading"],
"env": {
"XBTFX_API_KEY": "xbtfx_live_your_key_here"
}
}
}
}

Add to .cursor/mcp.json:

{
"mcpServers": {
"xbtfx-trading": {
"command": "npx",
"args": ["@xbtfx/mcp-trading"],
"env": {
"XBTFX_API_KEY": "xbtfx_live_your_key_here"
}
}
}
}
Terminal window
codex mcp add xbtfx-trading -- npx @xbtfx/mcp-trading

Set the API key in your environment before running:

Terminal window
export XBTFX_API_KEY="xbtfx_live_your_key_here"

The MCP server connects to:

https://interface.xbtfx.com

This is hardcoded and cannot be changed. All requests go through Cloudflare and use the same rate limits as direct REST API access (600 weight per minute per API key).

  • Node.js 18 or later
  • A valid XBTFX API key with trade,read permissions