# FxSocket

Lets an AI client inspect MetaTrader 4 and 5 accounts, including balances, trades, quotes and candles. Useful for reviewing account activity without placing orders.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: fxsocket-com
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/fxsocket-com/FxSocket-MCP
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/fxsocket

## What it 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.

## Requirements
- Needs: Docker
- Remote server: `https://mcp.fxsocket.com/mcp`
- Environment variables: `FXSOCKET_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http fxsocket https://mcp.fxsocket.com/mcp
```

2. **Platform CLI**
```bash
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.1
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add fxsocket --url https://mcp.fxsocket.com/mcp
```

2. **Platform CLI**
```bash
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.1
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "fxsocket": {
            "url": "https://mcp.fxsocket.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "fxsocket": {
            "type": "http",
            "url": "https://mcp.fxsocket.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http fxsocket https://mcp.fxsocket.com/mcp
```

2. **Platform CLI**
```bash
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.1
```
Replace <…> with your own values

## When to use it
- 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
- 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.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 397855
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 34011
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89674
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81191
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74577
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 90077

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
