FxSocket MCP
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FXSOCKET_API_KEY | Yes | Your FxSocket API key. Required. | |
| FXSOCKET_MCP_LOG | No | Log level: error, warning, info or debug. Logs go to stderr. | info |
| FXSOCKET_MCP_URL | No | The server to relay to. Plain http is only allowed to localhost. | https://mcp.fxsocket.com/mcp |
| FXSOCKET_MCP_TIMEOUT | No | Seconds to wait for one reply. | 120 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
FxSocket gives read-only access to the MetaTrader 4, MetaTrader 5 and cTrader trading accounts linked to this API key: balances, open positions, closed trades, quotes, symbol specifications and price history. It cannot place, modify or close orders.
Start with list_accounts to get account ids. Symbol names are broker-specific (EURUSD at one broker, EURUSD.sd or EURUSDm at another), so look them up with search_symbols before asking for quotes or candles. Money is in each account's deposit currency: never add amounts across currencies, use the totals_by_currency the tools return. Times and date filters are in the broker's server time, not UTC.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_accountsA | Every MT4, MT5 and cTrader account linked to this API key: id, nickname, platform, broker server, login and connection status (connected / connecting / disconnected / error). Call this first: the other tools take its account_id values. Set include_balances to also read each account's live balance, equity and floating profit from its terminal, plus totals per currency; that reads at most 50 accounts, and one that cannot be read gets a balance_error instead of failing the call. For one account's margin, leverage and settings, use get_account instead. |
| get_accountA | One account in full, read live from its terminal: financials (balance, equity, margin, free margin, margin level, leverage, currency), account settings (margin mode, stop-out level, whether trading is allowed) and terminal health (broker connection, login state, and in health.account.authError the broker's reason when it refused the login, e.g. Invalid account for a wrong password). Takes one account_id from list_accounts; if part of the read fails, the rest is still returned and the failure is listed under errors. For balance and equity across several accounts at once, use list_accounts with include_balances; for positions, use get_open_positions. |
| get_open_positionsA | Open positions and pending orders on one or more accounts, newest first, with per-account counts, floating profit and swap, and totals per currency. Lists at most 300 orders across all accounts; counts and totals always cover everything. Narrow it with symbol (EURUSD also matches EURUSD.sd) and kind (position or pending); omit account_ids to read every account. Only what is open now: for closed trades, win rate or realised profit, use get_trade_history. |
| get_trade_historyA | Closed positions (one row per round trip) on one or more accounts, with per-account stats: trade count, wins, losses, win rate, net profit after commission and swap, best and worst trade, and a per-symbol breakdown. Defaults to the last 7 days; the window can be up to 366 days. Lists at most 300 trades across all accounts, newest first; the stats always cover the whole window. Each trade has its open and close price and time and the stop-loss and take-profit it closed with (sl, tp; 0 = not set, and always 0 on cTrader). For positions that are still open, use get_open_positions. |
| search_symbolsA | Find the exact symbol names an account's broker uses, by case-insensitive substring. Brokers spell instruments differently (EURUSD, EURUSD.sd, EURUSDm, XAUUSD.r), so look a name up here before calling get_quotes, get_symbol_info or get_price_history. Returns up to limit names (default 100) with how many matched and whether the list was cut; names only, one symbol's contract details come from get_symbol_info. |
| get_quotesA | Latest bid, ask and spread for up to 20 symbols, read live from this account's terminal, so prices are the broker's own. A symbol the broker does not know is listed under errors while the others still return; if none resolve, the call fails. The current price only: for past prices use get_price_history, for contract size, swaps or sessions use get_symbol_info. |
| get_symbol_infoA | Contract specification for one symbol at this account's broker, read live from its terminal: digits, contract size, tick size and value, minimum/maximum/step volume, stops level, current spread, swap rates, commissions and trading sessions. symbol must be the broker's exact name, so look it up with search_symbols first; an unknown symbol fails the call with the terminal's reason. For just the live bid and ask of several symbols, get_quotes is lighter. |
| get_price_historyA | OHLC candles for one symbol from this account's broker. Returns the most recent |
| get_journalA | The journal of one cTrader account, newest first: when it signed in at cTrader, became ready to trade, lost and regained its connection, and when its access was refreshed or refused; and every order, change and close the bridge carried out, with the request, the outcome (retcode, order, deal, position, or the error), the time it took, the caller's clientOrderId and User-Agent. Use it to answer why an account stopped trading or who sent a trade. The bridge keeps it in memory, at most 7 days and 1000 entries, and a bridge restart starts it afresh, so for the full record of closed trades use get_trade_history. cTrader accounts only. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool targets a distinct resource and verb, and the descriptions explicitly hand off between siblings (get_quotes for current price vs get_price_history for past bars; get_open_positions vs get_trade_history for closed trades). The search_symbols vs get_symbol_info and list_accounts vs get_account pairs are cleanly separated by name-only versus full-record semantics.
Uniform snake_case verb_noun pattern throughout (search_*, get_*, list_*), with the verb choice matching intent: search for lookup, list for collections, get for single-record reads. No deviations or mixed conventions.
Nine tools is well within the sweet spot, and each maps to a distinct step in the workflow: discover symbols, inspect contracts, fetch prices, enumerate accounts, drill into one account, and review open/closed/journal history. No filler tools and no bloated surface.
The read-only monitoring surface is thorough, covering symbol discovery, contract specs, quotes, candles, account financials, open orders, closed-trade stats and a cTrader journal, with sensible overrides like include_balances. Gaps exist on the action side (no order placement, modification or close) and journal retention is in-memory only, but those read as intentional scope limits rather than dead ends.