IBKR MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IBKR_HOST | No | TWS/Gateway host. | 127.0.0.1 |
| IBKR_MODE | No | Connection preset. Valid values: tws_paper (port 7497, default), tws_live (port 7496), gateway_paper (port 4002), gateway_live (port 4001). Overrides IBKR_PORT. | |
| IBKR_PORT | No | TWS/Gateway port. Overridden by IBKR_MODE. | 7497 |
| IBKR_TIMEOUT | No | Connection timeout in seconds. | 30 |
| IBKR_READONLY | No | Disable trading. | false |
| MCP_TRANSPORT | No | Transport type. | stdio |
| IBKR_CLIENT_ID | No | Starting client ID. | 1 |
| IBKR_CLIENT_ID_AUTO_RETRY | No | Auto-retry with a different client ID on conflict. | true |
| IBKR_CLIENT_ID_MAX_ATTEMPTS | No | Max attempts to find an available client ID. | 5 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connection_statusB | Check IBKR connection status. |
| reconnectB | Reconnect to IBKR. |
| get_account_summaryA | Get account summary including balances, buying power, and margin. |
| get_positionsA | Get all current positions with P&L. |
| analyze_portfolio_allocationB | Analyze portfolio allocation by asset class, symbol, and currency. |
| get_realtime_priceC | Get real-time price for a symbol. |
| get_historical_dataC | Get historical price data with pagination. |
| search_symbolsC | Search for tradable instruments matching a pattern. |
| place_orderA | Place a trading order (market, limit, or stop). Approval-required by default: without confirm=True (and unless IBKR_MCP_AUTONOMOUS_EXECUTION=true), this stages the order and returns a PENDING_APPROVAL preview instead of transmitting it. Re-call with confirm=True to actually submit it to IBKR. |
| place_bracket_orderB | Place a bracket order (entry + take profit + stop loss). Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| cancel_orderC | Cancel an open order. |
| get_open_ordersB | Get all open orders. |
| get_option_chainC | Get option chain with Greeks for a symbol. |
| analyze_option_spreadC | Analyze option spread strategies (bull_call, bear_put, straddle, etc.). |
| get_futures_chainC | Get all available futures contracts for an underlying. |
| detect_rollover_neededC | Check if futures contract rollover is needed. |
| scan_marketC | Run a market scanner (TOP_PERC_GAIN, MOST_ACTIVE, etc.). |
| place_twap_orderC | Place a TWAP (Time-Weighted Average Price) algorithmic order. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| place_vwap_orderB | Place a VWAP (Volume-Weighted Average Price) algorithmic order. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| place_arrival_price_orderB | Place an Arrival Price algorithmic order. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| place_adaptive_orderB | Place an IB Adaptive algorithmic order. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| calculate_position_sizeC | Calculate optimal position size based on risk parameters. |
| check_risk_limitsB | Check current portfolio against risk limits. |
| calculate_varC | Calculate Value at Risk for the portfolio. |
| calculate_rebalancing_ordersC | Calculate trades needed to rebalance portfolio to target allocations. |
| execute_rebalancingB | Execute rebalancing trades from a rebalancing plan. Approval-required by default; re-call with confirm=True to transmit the full batch of rebalancing orders, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. The batch is always all-preview or all-execute -- never a partial mix. |
| get_newsC | Get news bulletins for a symbol. |
| get_order_bookC | Get Level 2 order book data (market depth). |
| calculate_slippageC | Calculate execution slippage for an order. |
| place_trailing_stopB | Place a trailing stop order. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| place_one_cancels_allB | Place One-Cancels-All (OCA) order group. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| place_algo_orderB | Place an algorithmic order using IBKR's algo strategies. Approval-required by default; re-call with confirm=True to transmit, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. |
| get_contract_by_conidC | Get contract details by contract ID. |
| create_custom_scannerC | Create custom scanner with specific criteria. |
| scan_options_volumeC | Scan for unusual options activity. |
| set_stop_loss_ordersA | Automatically set stop loss orders for all positions. Approval-required by default; re-call with confirm=True to transmit the full batch of trailing stops, or set IBKR_MCP_AUTONOMOUS_EXECUTION=true to skip approval. The batch is always all-preview or all-execute -- never a partial mix. |
| circuit_breaker_statusB | Get circuit breaker status including trip state, daily P&L, and utilization. |
| circuit_breaker_resetB | Reset the circuit breaker after it has been tripped. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 38 tools
Most tools have clearly distinct resource+action purposes (data retrieval vs. order placement vs. risk analysis vs. scanning). Minor overlap exists: place_algo_order could be confused with place_twap_order/place_vwap_order/place_arrival_price_order/place_adaptive_order (all algorithmic orders), and set_stop_loss_orders overlaps conceptually with place_trailing_stop. Descriptions help disambiguate but the boundary between generic and specific algo order tools is slightly muddy.
Strong verb_noun snake_case pattern throughout (get_*, place_*, calculate_*, scan_*, analyze_*). A few deviations exist: noun-only status tools (connection_status, circuit_breaker_status) and inverted phrasing (detect_rollover_needed) break the otherwise predictable convention. Still highly readable overall.
38 tools is heavy for any single server. While the domain is broad (market data, orders, algos, risk, scanners, circuit breaker), many order-placement variants (twap, vwap, arrival_price, adaptive, generic algo) could be consolidated into a single parameterized tool, inflating the surface unnecessarily.
Coverage is very thorough: market data, option/futures chains, multiple order types, risk/VaR, rebalancing, scanners, news, order book, and circuit-breaker management are all present. Minor gaps: no explicit order-modify/replace tool, and no trade/execution history retrieval beyond slippage calculation.