ibkr-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IBKR_PORT | No | TWS/IB Gateway API port. Default for paper TWS is '7497'. | |
| IBKR_BACKEND | No | Backend to use: 'mock' (default, offline simulator) or 'ib' (live via ib_async). | |
| IBKR_ACCOUNT_ID | No | IBKR account ID (e.g., DU123456). Required for live trading. | |
| IBKR_MAX_ORDER_QTY | No | Maximum quantity per order. Default: no limit. | |
| IBKR_TRADING_ENABLED | No | Set to 'true' to enable order placement. Defaults to 'false' (read-only). | |
| IBKR_MAX_DAILY_ORDERS | No | Maximum number of orders per day. Default: no limit. | |
| IBKR_SYMBOL_WHITELIST | No | Comma-separated list of allowed symbols. If empty, all symbols allowed. | |
| IBKR_MAX_ORDER_NOTIONAL | No | Maximum notional value per order. Default: no limit. | |
| IBKR_MAX_POSITION_NOTIONAL | No | Maximum notional value for resulting position. Default: no limit. | |
| IBKR_SHORT_SELLING_ENABLED | No | Set to 'true' to allow short selling. Default: 'false'. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_statusA | Return server status: backend (mock/ib), connection, whether trading is enabled, the account id, and the active risk limits. Call this first to understand what the account can and cannot do. |
| get_account_summaryA | Return account net liquidation, cash, buying power and P&L. |
| get_positionsA | Return all open positions with quantity, average cost, market price, market value and unrealized P&L. |
| get_quoteB | Return a current bid/ask/last/mid snapshot for a stock symbol (e.g. AAPL). |
| get_open_ordersA | Return working (unfilled) orders currently resting at the venue. |
| get_tradesA | Return the executions/fills for this session (the trade blotter). |
| preview_orderA | STEP 1 of 2 for trading. Validate a proposed order against the risk limits
WITHOUT sending it. Returns the live quote, estimated notional, the risk
decision (approved + reasons), and -- only if approved AND trading is enabled
-- a one-time action: BUY or SELL. order_type: MKT or LMT (limit_price required for LMT). |
| place_orderA | STEP 2 of 2 for trading. Submit the order previously approved by
preview_order, identified by its |
| cancel_orderA | Cancel a working order by its order_id (from get_open_orders). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kris-Wang05/ibkr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server