Guide
Connect your MT5 account to Claude.
Ask about positions, P/L and margin in plain English, and let Claude trade only if you allow it. Nothing has to stay open on your computer.
Run once in your terminal.
claude mcp add --transport http pipwire https://api.pipwire.io/mcp \
--header "Authorization: Bearer YOUR_KEY"Server: https://api.pipwire.io/mcp. Replace YOUR_KEY with a key from the API keys page.
Five minutes, four steps.
- 1
Connect your MT5 account
Sign up and add your broker login. Use the investor password if Claude should only read.
- 2
Create an API key
Choose what AI may do with it: read only, ask before each trade, or trade freely. Read only is the default.
- 3
Add Pipwire to Claude
Paste the setup at the top of this page into Claude Desktop or Claude Code, with your key.
- 4
Ask
"What's my floating P/L?" Claude picks the right tool and answers from your live account.
Then just ask.
Claude picks the right tool for each question and answers from your account's own terminal.
- “What's my floating P/L on XAUUSD right now?”→get_positions
- “List last week's closed trades and total them.”→get_deal_history
- “How much free margin do I have on my live account?”→get_account
- “Pull 200 one-hour candles of EURUSD and describe the trend.”→get_candles
- “Did any of my accounts disconnect today?”→get_account_events
- “Buy 0.10 XAUUSD with a stop 15 dollars below.”→place_order
- “Move my EURUSD stop to break-even.”→modify_position
- “Close half of my gold position.”→close_position
Trading stays in your hands.
Claude can read from the first minute. Trading is off until you turn it on, key by key.
- Read only is the default for every key. Read keys can never trade.
- "Ask before each trade": Claude shows you the order, and it goes out only after you say yes.
- Limit a key to chosen accounts, cap its lots per order and its orders per day.
- A kill switch stops every new order at once. Only a person can switch trading back on.
- Your broker password stays at Pipwire, encrypted. Claude only ever has your API key.
What about ChatGPT?
OpenAI's Codex connects today: pick the Codex tab above. The ChatGPT app and claude.ai add servers through one-click sign-in, which Pipwire is adding next. Until then, use Claude Desktop, Claude Code, Codex or Cursor.
Why not MT5's built-in MCP?
It runs inside your own terminal, so MetaTrader has to stay open on your computer or a VPS. Pipwire runs the terminals for you and adds per-key permissions and a kill switch. See the comparison.
Claude and MT5 questions
- How do I connect MT5 to Claude?
- Connect your MT5 account to Pipwire, create an API key, and add Pipwire's MCP server (https://api.pipwire.io/mcp) to Claude Desktop or Claude Code with that key. Claude can then read your account and, if you allow it, trade.
- Can Claude trade on my MT5 account?
- Only if you allow it. Trading is off for every key until you turn it on. With "Ask before each trade", Claude shows you each order, change or close and sends it only after you say yes.
- Can I connect ChatGPT to MT5?
- OpenAI's Codex connects today, with three lines of config. The ChatGPT app and claude.ai add remote servers through one-click sign-in, which Pipwire is adding; until then, use Claude Desktop, Claude Code, Codex or Cursor.
- Does MetaTrader have to stay open on my computer?
- No. Pipwire runs a MetaTrader 5 terminal for each account in a data centre and keeps it signed in, so Claude reaches your account any time, from any computer.
- Does Claude see my broker password?
- No. Claude only has your Pipwire API key, which you can revoke in one click. Your broker password is stored encrypted and never returned by the API.
- How is this different from MetaTrader 5's built-in MCP server?
- The built-in server runs inside your own terminal, so MetaTrader has to stay open on your computer or a VPS. Pipwire runs the terminals for you, and adds per-key permissions, trade confirmation and a kill switch.
- What does it cost?
- Nothing extra for the MCP server. You pay for the MT5 accounts you connect: $5 a month to read, $10 to trade, billed only for days connected.
Ask Claude about your account today.
The MCP server is included. $5 a month to read, $10 to trade.