Labsco
MCP SERVER

IBKR MCP

by code-rabi

Check an Interactive Brokers account, pull real-time quotes and option chains, place orders and set price alerts from your client.

Trading Execution & BrokerageVerified
Summary
Positions, quotes, option chains and order placement in one session — with the confirmation steps kept visible.

The order path is modelled the way IB actually behaves rather than as a single fire-and-forget call: some orders come back needing confirmation with reply and message ids, and get_live_orders exists precisely because a returned order id is not proof of a fill. Given that it places real trades against a real account, the sensible order of operations is paper trading first with IB_PAPER_TRADING=true, and reading positions and orders back after every write.

What it is

A community server for the Interactive Brokers trading platform. The npm package ships a preconfigured IB Gateway and a Java runtime, so authentication, market data and order routing all run locally against your own account.

What you get
  • authenticate opens the Interactive Brokers login flow, and get_account_info returns account details and balances
  • get_positions returns current positions for one account or all of them
  • get_market_data returns real-time data for a symbol, optionally on a named exchange
  • get_option_chain returns expirations and strikes for an underlying, and resolve_option_conid turns a symbol, expiry, strike and right into the specific contract id
  • place_order handles market, limit and stop orders with quantity, price, stop price and time in force, for stocks and for resolved option contracts
  • confirm_order answers the confirmation prompts IB raises on certain orders, using the reply and message ids it returned
  • get_order_status reads one order by id, and get_live_orders lists the open orders — the recommended check that a market order actually filled
  • Alerts as first-class objects: create_alert with conditions on a contract, price operator, trigger method and value, then activate_alert, get_alerts and delete_alert
Requirements

An Interactive Brokers account — paper or live — and Node.js 18+; nothing else to install, since IB Gateway and the Java runtime come with the package. It runs as npx -y interactive-brokers-mcp. By default a browser window opens for the IB login. Headless environments set IB_HEADLESS_MODE=true with IB_USERNAME and IB_PASSWORD_AUTH; two-factor may still be requested, and headless authentication waits up to 60 seconds for you to approve it before returning AUTHENTICATION_PENDING. IB_PAPER_TRADING=true points the session at a paper account. The author states this is unofficial, not affiliated with Interactive Brokers, in alpha, and meant to run locally rather than on a public server.

Setup effort

One command plus a key — npx -y interactive-brokers-mcp, then supply credentials