
Other Tools
v0.1.2
active
socketrade-mcp
io.github.socketrade/socketrade-mcp
MetaTrader 5 trading over one API: positions, history, prices, orders. No terminal per account.
Documentation
Socketrade MCP server
An MCP server for the Socketrade MT5 API. It lets Claude, Cursor or any MCP client read accounts, positions and history, and place or close market orders, with one API key.
No dependencies. Node 18 or newer.
Install
npm install -g socketrade-mcp
Or run it without installing:
SOCKETRADE_API_KEY=sk_live_... npx socketrade-mcp
Configure
Claude Desktop (claude_desktop_config.json) or Cursor (mcp.json):
{
"mcpServers": {
"socketrade": {
"command": "npx",
"args": ["-y", "socketrade-mcp"],
"env": {
"SOCKETRADE_API_KEY": "sk_live_..."
}
}
}
}
Environment variables:
| Name | Required | Default |
|---|---|---|
SOCKETRADE_API_KEY | yes | — |
SOCKETRADE_BASE_URL | no | https://api.socketrade.com |
Tools
| Tool | What it does |
|---|---|
socketrade_usage | Seats bought and used |
list_accounts | Connected MT5 accounts, status and balance |
account_status | Session state for one account — wait for ready |
get_positions | Open positions with tickets, prices and profit |
get_history | Closed deals, last 30 days by default |
place_order | Market buy or sell, with optional SL/TP and comment |
close_position | Close by ticket, whole or partial |
Market orders only. Pending orders are not part of the API contract yet.
Safety
- Demo first. Orders are real for the account you connect.
- A timeout is not a failure. After a timeout, call
get_positionsbefore retrying; a blind retry can open a second position. - One seat, one account. The key can only touch accounts under its own client.
- The server never logs the key. It is read from the environment at startup.
Example prompts
- "What is the balance and equity on my Deriv demo?"
- "List my open positions and the profit on each."
- "Close the EURUSD position and confirm it is gone."
- "Show me the last ten closed deals."
Licence
MIT.
The two-line version, without an MCP client
curl -s https://api.socketrade.com/v2/accounts -H "X-API-Key: $SOCKETRADE_API_KEY"
curl -s -X POST https://api.socketrade.com/v2/ACCOUNT_ID/OrderSend \
-H "X-API-Key: $SOCKETRADE_API_KEY" -H "Content-Type: application/json" \
-d '{"symbol":"EURUSD","volume":0.01,"type":"buy"}'
A Postman collection sits beside this README for the same calls by hand.
What it connects to
Any MT5 account on a broker with a web terminal, or on a broker served by a hosted terminal. Start on a demo: a demo seat is free and needs no card.
Tests
node test.mjs
NPM
socketrade-mcpInstall Command
npm install socketrade-mcp