Pipwire MT5
Hosted MCP server for MetaTrader 5: connect any MT5 broker login and your AI reads balances, positions, history, prices and candles, and places, changes and closes orders when you allow it (asking before each trade, or trading freely). Nothing to install.
Hosted MCP Server
npx add-mcp 'https://api.pipwire.io/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
Connect Claude to your MT5 account.
Your AI reads balances, positions, history and prices, and trades when you allow it. Nothing to install: Pipwire runs the terminal.
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 · Streamable HTTP · key in the Authorization header
Set up in three steps.
- 1
Connect MT5
Create a Pipwire account and connect your MT5 login. It runs on its own hosted terminal. - 2
Create a key
Read to look only. Trade to let your AI place orders, asking you before each one or trading freely. - 3
Add it to your AI app
Copy the command or config for your app (above) and put your key in place of YOUR_KEY.
Claude and Claude Code are trademarks of Anthropic, Codex of OpenAI, Cursor of Anysphere and Visual Studio Code of Microsoft; other names belong to their owners. Pipwire is not affiliated with them.
Ask it anything about your MT5 accounts.
Your AI picks the right tool for each question. Answers come from the account's own terminal, in UTC.
- “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
16 tools. 11 read, 5 trade.
Accounts
list_accounts
Every connected MT5 account, with status, balance and equity.
get_account
Live balance, equity, margin, free margin and leverage.
get_account_events
Connections, disconnections and restarts, newest first.
Trades & history
get_positions
Open positions with stops, targets and floating profit.
get_deal_history
Closed deals in a time range, for realised P/L.
get_open_orders
Pending limit, stop and stop-limit orders still waiting.
get_order_history
Filled, rejected and canceled orders in a time range.
Market data
get_price
Latest bid and ask from the account's own terminal.
get_candles
OHLC candles from 1 minute to monthly, up to 1,000 per call.
search_symbols
The broker's symbol names, e.g. XAUUSD+ for gold.
get_symbol
Contract size, lot limits, digits and tick value.
Trading (when you allow it)
place_order
Market, limit, stop and stop-limit orders, with stop loss and take profit.
close_position
Close a position, or only part of it.
modify_position
Move a position's stop loss or take profit.
modify_order
Change a pending order's price, stops or expiry.
cancel_order
Cancel a pending order.
You decide what it can do.
Trading is off for every key until you turn it on. Then your AI can ask before each trade, or trade freely. A Read key never trades.
Always
- Read balances, equity and margin
- See open positions and their P/L
- Pull deal and order history
- Get live prices and candles
- Look up symbols and contract specs
Only if you allow it
- Place market, limit and stop orders
- Move stop losses and take profits
- Close positions, in full or in part
- Change and cancel pending orders
- Ask you before each one, if you choose
MCP questions
Can the AI place or close trades through Pipwire's MCP server?
Yes, when you allow it. Trading is off for every key until you turn it on, on the API keys page. Choose "Ask before each trade" and your AI shows you every order, change and close and sends it only after you say yes; choose "Trade freely" for agents you trust. A Read key never trades.
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 you look after. Pipwire runs the terminals for you: your AI reaches every connected account from anywhere, around the clock, with nothing installed, and the same accounts have a REST and WebSocket API and a trade copier.
Which AI apps work with it?
Any app that supports remote MCP servers with a header: Claude Code, Codex, Cursor, VS Code, Windsurf and Claude Desktop (through the mcp-remote bridge). One-click sign-in for claude.ai and ChatGPT is coming.
What does it cost?
Nothing extra. You pay for the MT5 accounts you connect: $5 per account a month to read, $10 to trade, billed only for days connected.
Can a retry place the same order twice?
No. Send a client_id with an order and the same id on the same account never trades twice within 24 hours. A trade you confirmed carries its own id, so an agent that retries after a timeout gets the first answer back.
Is my API key safe?
The key travels in a header over HTTPS, never in the URL, and you can revoke it in one click. Limit a key to chosen accounts, and give an agent a Read key when it only needs to look.
Is there a limit?
120 calls a minute per key and 120 order actions a minute per account. You can also cap each key's lots per order and new orders per day, and a kill switch stops all new orders at once; only a person can switch trading back on.