FxSocket — Claude Code MCP server: features and setup
Lets an AI client inspect MetaTrader 4 and 5 accounts, including balances, trades, quotes and candles. Useful for reviewing account activity without placing orders.
claude mcp add --transport http fxsocket https://mcp.fxsocket.com/mcpWhat FxSocket does
FxSocket connects an MCP client to account data from MetaTrader 4 and 5. Ask for an account overview, current positions and pending orders, closed-trade results, symbol details, live quotes or price candles. Values use the account’s deposit currency, and timestamps follow broker server time.
The server is read-only; it cannot submit, edit or close orders. Requests require an FxSocket API key, and a key limited to selected accounts restricts what the agent can access. Claude Code can connect to the remote HTTP endpoint or run the Docker relay locally. The local option requires Docker.
What it helps with
- check a MetaTrader account balance and status
- review current positions and pending orders
- summarize closed trades for a period
- look up a symbol’s bid, ask and spread
- retrieve candles for a symbol and timeframe
Example prompts for the agent
- Check the balance and status of my MetaTrader account.
- List open positions and pending orders across my accounts.
- Summarize closed trades for this period, grouped by symbol.
How to install FxSocket
1Platform CLI: remote server
claude mcp add --transport http fxsocket https://mcp.fxsocket.com/mcp2Platform CLI
claude mcp add --env FXSOCKET_API_KEY=<FXSOCKET_API_KEY> --transport stdio fxsocket -- docker run -i --rm -e FXSOCKET_API_KEY docker.io/fxsocket/mcp:1.0.1Replace <…> with your own values
1Platform CLI: remote server
codex mcp add fxsocket --url https://mcp.fxsocket.com/mcp2Platform CLI
codex mcp add fxsocket --env FXSOCKET_API_KEY=<FXSOCKET_API_KEY> -- docker run -i --rm -e FXSOCKET_API_KEY docker.io/fxsocket/mcp:1.0.1Replace <…> with your own values
Config file
{
"mcpServers": {
"fxsocket": {
"url": "https://mcp.fxsocket.com/mcp"
}
}
}{
"mcpServers": {
"fxsocket": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"FXSOCKET_API_KEY",
"docker.io/fxsocket/mcp:1.0.1"
],
"env": {
"FXSOCKET_API_KEY": "<FXSOCKET_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"fxsocket": {
"type": "http",
"url": "https://mcp.fxsocket.com/mcp"
}
}
}{
"servers": {
"fxsocket": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"FXSOCKET_API_KEY",
"docker.io/fxsocket/mcp:1.0.1"
],
"env": {
"FXSOCKET_API_KEY": "<FXSOCKET_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http fxsocket https://mcp.fxsocket.com/mcp2Platform CLI
gemini mcp add -e FXSOCKET_API_KEY=<FXSOCKET_API_KEY> fxsocket docker run -i --rm -e FXSOCKET_API_KEY docker.io/fxsocket/mcp:1.0.1Replace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about FxSocket
How do I install FxSocket in Claude Code?
For the remote connection, run claude mcp add --transport http fxsocket https://mcp.fxsocket.com/mcp. An FxSocket API key is required to access account data.
What does FxSocket do?
It gives MCP clients read access to MetaTrader 4 and 5 account information, including positions, closed trades, quotes and price history. It cannot perform trading actions.
Does FxSocket require Docker?
Not when the client connects to the remote HTTP server. Docker is needed for the local stdio relay; a python3 version 3.10 or newer is another local option.