Permet aux clients IA de lire les données des comptes MetaTrader 4, MetaTrader 5 et cTrader, notamment les soldes, les positions, l'historique des transactions et les cotations.
Aussi connu sous fxsocket-com/FxSocket-MCP, fxsocket-mcp
- Étoiles
- 0
- Outils
- 8
- Téléchargements, 30 jours
- —
- Dernière version
- 1.0.1
- Dernier commit
- 11 nov. 2026
- Licence
- MIT
Qu'est-ce que FxSocket MCP ?
FxSocket est un serveur MCP. Permet aux clients IA de lire les données des comptes MetaTrader 4, MetaTrader 5 et cTrader, notamment les soldes, les positions, l'historique des transactions et les cotations. Il expose 8 outils, comme list_accounts, get_account, get_open_positions.
Résumé généré à partir du README du projet
À propos du MCP server FxSocket
FxSocket fournit une passerelle en lecture seule entre les clients IA et les comptes de trading sur MetaTrader 4, MetaTrader 5 et cTrader. Les développeurs utilisant Claude Desktop, Cursor, VS Code ou Claude Code peuvent connecter leurs agents à des données financières en direct via un serveur stdio local. Le système fonctionne en relayant les messages vers un endpoint distant à l'aide d'une clé API, garantissant une empreinte locale minimale tout en offrant un accès aux informations de marché en temps réel.
Les utilisateurs peuvent interagir avec leurs comptes en utilisant des outils spécifiques tels que list_accounts, get_open_positions et get_trade_history pour analyser leurs performances. Le serveur propose également des données de marché via get_quotes, get_symbol_info et get_price_history. Comme il est strictement limité à la lecture, l'agent peut consulter les soldes, les positions et les spécifications des symboles, mais ne peut exécuter ni modifier aucune transaction. Le service supporte jusqu'à 60 requêtes par minute par utilisateur et nécessite une clé API en lecture seule commençant par le préfixe fxs_ro_ pour un accès sécurisé.
Ce que vous pouvez faire avec
- 1Analyser les performances de tradingDemandez à l'IA d'examiner vos transactions clôturées pour déterminer votre taux de réussite actuel ainsi que vos profits ou pertes.
- 2Surveiller les données de marché en directDemandez des informations en temps réel sur le bid, l'ask et le spread pour une liste spécifique de symboles de devises.
- 3Vérifier l'état du compteDemandez à l'agent de lister tous les comptes disponibles avec leur équité actuelle et leurs soldes totaux.
- 4Rechercher les spécifications des symbolesRécupérez des détails techniques tels que la taille du contrat, les limites de volume et les sessions de trading pour un symbole donné.
Extrait du README du projet. Chaque cas d'utilisation est vérifié par rapport à une citation du document.
Comment installer FxSocket MCP
Formats vérifiés le 10 nov. 2026Ajouter à CursorAjouter à GooseInstaller FxSocket MCP dans Claude Code
$ claude mcp add --env 'FXSOCKET_API_KEY=<YOUR_FXSOCKET_API_KEY>' fxsocket-mcp -- docker run -i --rm docker.io/fxsocket/mcp:1.0.1Installer FxSocket MCP dans Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"fxsocket-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/fxsocket/mcp:1.0.1"
],
"env": {
"FXSOCKET_API_KEY": "<YOUR_FXSOCKET_API_KEY>"
}
}
}
}Installer FxSocket MCP dans VS Code
.vscode/mcp.json
{
"servers": {
"fxsocket-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/fxsocket/mcp:1.0.1"
],
"env": {
"FXSOCKET_API_KEY": "<YOUR_FXSOCKET_API_KEY>"
}
}
}
}Installer FxSocket MCP dans VS Code CLI
$ code --add-mcp '{"name":"fxsocket-mcp","type":"stdio","command":"docker","args":["run","-i","--rm","docker.io/fxsocket/mcp:1.0.1"],"env":{"FXSOCKET_API_KEY":"<YOUR_FXSOCKET_API_KEY>"}}'Installer FxSocket MCP dans Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"fxsocket-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/fxsocket/mcp:1.0.1"
],
"env": {
"FXSOCKET_API_KEY": "<YOUR_FXSOCKET_API_KEY>"
}
}
}
}Installer FxSocket MCP dans Codex
$ codex mcp add fxsocket-mcp --env 'FXSOCKET_API_KEY=<YOUR_FXSOCKET_API_KEY>' -- docker run -i --rm docker.io/fxsocket/mcp:1.0.1Installer FxSocket MCP dans Codex config.toml
~/.codex/config.toml
[mcp_servers.fxsocket-mcp] command = "docker" args = ["run", "-i", "--rm", "docker.io/fxsocket/mcp:1.0.1"] [mcp_servers.fxsocket-mcp.env] FXSOCKET_API_KEY = "<YOUR_FXSOCKET_API_KEY>"
Installer FxSocket MCP dans Gemini CLI
$ gemini mcp add -s user -e 'FXSOCKET_API_KEY=<YOUR_FXSOCKET_API_KEY>' fxsocket-mcp docker -- run -i --rm docker.io/fxsocket/mcp:1.0.1Installer FxSocket MCP dans Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"fxsocket-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/fxsocket/mcp:1.0.1"
],
"env": {
"FXSOCKET_API_KEY": "<YOUR_FXSOCKET_API_KEY>"
}
}
}
}Outils MCP FxSocket 8
Détectés depuis le READMElist_accountsget_accountget_open_positionsget_trade_historysearch_symbolsget_quotesget_symbol_infoget_price_history
| list_accounts | — | |
| get_account | — | |
| get_open_positions | — | |
| get_trade_history | — | |
| search_symbols | — | |
| get_quotes | — | |
| get_symbol_info | — | |
| get_price_history | — |
Configuration
FXSOCKET_API_KEYRequisSecretFxSocket API key. A read-only key (fxs_ro_...) is enough: https://app.fxsocket.com/dashboard/api-key
| Nom | Description | Type |
|---|---|---|
| FXSOCKET_API_KEY | FxSocket API key. A read-only key (fxs_ro_...) is enough: https://app.fxsocket.com/dashboard/api-key | RequisSecret |
Vérifications automatisées
Exécuté le 12 nov. 2026Rapport complet →A passé nos vérifications automatisées. Il ne s'agit pas d'un audit de sécurité : lisez le code et donnez au serveur l'accès le plus restreint dont il a besoin. Fonctionnement des vérifications
- Dépôt source lié et accessibleRéussi
- Licence open source (OSI)Réussi
- Commit ou version publiée au cours de l'année écouléeRéussi
- Nom du package non proche d'un package populaireNon vérifié
- L'endpoint distant utilise HTTPSRéussi
- Les outils destructifs sont étiquetésRéussi
- Aucune instruction cachée destinée au modèleRéussi
- Aucun avis critique dans le package ou ses dépendancesNon vérifié
README
Voir sur GitHubFxSocket MCP
Lets Claude, Cursor, VS Code and other MCP clients read your MetaTrader 4, MetaTrader 5 and cTrader accounts on FxSocket: balances, open positions, closed trades with win rate and P/L, quotes, symbol specifications and price history. It is read-only. It cannot place, modify or close orders.
This image runs FxSocket's MCP server as a local stdio server, for
clients that start their servers themselves (Claude Desktop, Docker's MCP
Toolkit, or anything configured with a command). It relays each message
to https://mcp.fxsocket.com/mcp with your API key. The tools run on
FxSocket, next to the terminals your accounts are connected to, so the
image stays tiny and never needs updating when tools change.
If your client takes a remote server URL plus a header, you can skip the
image: point it at https://mcp.fxsocket.com/mcp with your key in an
X-API-Key header.
1. Get an API key
Create a read-only key (fxs_ro_...) at
app.fxsocket.com/dashboard/api-key.
A named key scoped to some of your accounts limits the agent to exactly
those. A full fxs_live_... key works too, but an agent has no use for one.
2. Add it to your client
Claude Desktop (Settings, Developer, Edit Config, then restart):
{
"mcpServers": {
"fxsocket": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "FXSOCKET_API_KEY", "fxsocket/mcp"],
"env": { "FXSOCKET_API_KEY": "fxs_ro_..." }
}
}
}
Claude Code:
claude mcp add fxsocket -e FXSOCKET_API_KEY=fxs_ro_... -- docker run -i --rm -e FXSOCKET_API_KEY fxsocket/mcp
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"fxsocket": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "FXSOCKET_API_KEY", "fxsocket/mcp"],
"env": { "FXSOCKET_API_KEY": "fxs_ro_..." }
}
}
}
VS Code (.vscode/mcp.json, prompts for the key once):
{
"inputs": [
{ "type": "promptString", "id": "fxsocket-key", "description": "FxSocket API key", "password": true }
],
"servers": {
"fxsocket": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "FXSOCKET_API_KEY", "fxsocket/mcp"],
"env": { "FXSOCKET_API_KEY": "${input:fxsocket-key}" }
}
}
}
-e FXSOCKET_API_KEY without a value passes the variable through from the
client's env, so the key never appears in the process list.
Without Docker: the relay is one file with no dependencies. Download
fxsocket_mcp.py and use python3 (3.10 or newer) as
the command with the file's path as the argument, keeping the same env.
Tools
| Tool | What it answers |
|---|---|
list_accounts |
Every account the key can see, optionally with balance, equity and totals per currency. Call first. |
get_account |
One account in full: summary, broker info and terminal status. |
get_open_positions |
Open positions and pending orders across accounts, with floating P/L and swap. |
get_trade_history |
Closed trades for a period, with wins, losses, win rate, net P/L and a per-symbol breakdown. |
search_symbols |
Find the broker's exact symbol name (EURUSD, EURUSD.sd, EURUSDm...). |
get_quotes |
Live bid/ask and spread for up to 20 symbols. |
get_symbol_info |
Contract specification: digits, contract size, volume limits, swaps, sessions. |
get_price_history |
OHLC candles for a symbol and timeframe. |
Amounts are in each account's deposit currency and are never summed across currencies. Times are broker server time.
Configuration
| Variable | Default | |
|---|---|---|
FXSOCKET_API_KEY |
(required) | Your FxSocket API key. |
FXSOCKET_MCP_URL |
https://mcp.fxsocket.com/mcp |
The server to relay to. Plain http is only allowed to localhost. |
FXSOCKET_MCP_TIMEOUT |
120 |
Seconds to wait for one reply. |
FXSOCKET_MCP_LOG |
info |
error, warning, info or debug. Logs go to stderr. |
FxSocket allows 60 MCP requests a minute per user.
How it works
The client writes newline-delimited JSON-RPC to the container's stdin. The relay POSTs each message to the MCP endpoint over a kept-alive HTTPS connection, adds the API key and the headers the protocol requires, and writes the replies to stdout. It handles both protocol eras:
- 2026-07-28: the protocol version travels in each request's
_meta, and the relay mirrors it into theMCP-Protocol-Version,Mcp-MethodandMcp-Nameheaders (plus anyx-mcp-headertool parameters). - 2025-03-26 to 2025-11-25: the client opens with
initialize, and the relay sends the negotiated version asMCP-Protocol-Versionfrom then on.
If FxSocket rejects the key, the relay still answers initialize and
tools/list from the server's public card
(https://mcp.fxsocket.com/.well-known/mcp/server-card.json), so
directories and inspectors that start it with a placeholder key can see
the tools. Every tool call still needs a valid key and otherwise returns
the rejection.
Requests run concurrently. A notifications/cancelled from the client
closes that request's connection, which is how Streamable HTTP cancels.
HTTP failures (bad key, rate limit, network) come back as JSON-RPC errors
with a sentence saying what to fix, rather than a hung client.
Development
python3 -m unittest discover -s tests
docker build -t fxsocket/mcp:dev .
The tests start the relay as a subprocess against a local stub server, so they cover the real stdio and HTTP paths.
To release, bump __version__ in fxsocket_mcp.py, then push a matching
tag (git tag v1.0.1 && git push --tags). The publish workflow builds
linux/amd64 and linux/arm64 and pushes fxsocket/mcp:<version>,
:<major>.<minor> and :latest, and the dockerhub-overview workflow
copies this README to the Docker Hub page.
License
Questions sur FxSocket MCP
Comment ajouter FxSocket MCP à Claude Code ?
Exécutez claude mcp add --env 'FXSOCKET_API_KEY=<YOUR_FXSOCKET_API_KEY>' fxsocket-mcp -- docker run -i --rm docker.io/fxsocket/mcp:1.0.1 dans votre terminal. Ajoutez --scope user pour le rendre disponible dans tous les projets.
Comment ajouter FxSocket MCP à Cursor ?
Ouvrez ~/.cursor/mcp.json et ajoutez le serveur sous mcpServers, avec la configuration Cursor indiquée dans la section d'installation ci-dessus.
Quels outils FxSocket MCP fournit-il ?
Il expose 8 outils, dont list_accounts, get_account, get_open_positions, get_trade_history, search_symbols.
Ce serveur peut-il placer ou modifier des transactions ?
Non, le serveur est en lecture seule et ne peut pas placer, modifier ou clôturer d'ordres.
À quel type de données de compte puis-je accéder ?
Vous pouvez accéder aux soldes, aux positions ouvertes, aux transactions clôturées avec le taux de réussite et le P/L, aux cotations, aux spécifications des symboles et à l'historique des prix.
Combien de requêtes puis-je effectuer par minute ?
FxSocket autorise jusqu'à 60 requêtes MCP par minute et par utilisateur.