Skip to main content
Glama
IBKR MCP Server

IBKR MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IBKR_HOSTNoTWS/Gateway host.127.0.0.1
IBKR_MODENoConnection preset. Valid values: tws_paper (port 7497, default), tws_live (port 7496), gateway_paper (port 4002), gateway_live (port 4001). Overrides IBKR_PORT.
IBKR_PORTNoTWS/Gateway port. Overridden by IBKR_MODE.7497
IBKR_TIMEOUTNoConnection timeout in seconds.30
IBKR_READONLYNoDisable trading.false
MCP_TRANSPORTNoTransport type.stdio
IBKR_CLIENT_IDNoStarting client ID.1
IBKR_CLIENT_ID_AUTO_RETRYNoAuto-retry with a different client ID on conflict.true
IBKR_CLIENT_ID_MAX_ATTEMPTSNoMax 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

CapabilityDetails
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

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.9/5.0

Scored across 38 tools

Disambiguation4/5

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.

Naming Consistency4/5

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.

Tool Count2/5

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.

Completeness4/5

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.

Maintenance

ActivityNo data
ResponsivenessOutdated data