Skip to main content
Glama
Kris-Wang05

ibkr-mcp

by Kris-Wang05

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IBKR_PORTNoTWS/IB Gateway API port. Default for paper TWS is '7497'.
IBKR_BACKENDNoBackend to use: 'mock' (default, offline simulator) or 'ib' (live via ib_async).
IBKR_ACCOUNT_IDNoIBKR account ID (e.g., DU123456). Required for live trading.
IBKR_MAX_ORDER_QTYNoMaximum quantity per order. Default: no limit.
IBKR_TRADING_ENABLEDNoSet to 'true' to enable order placement. Defaults to 'false' (read-only).
IBKR_MAX_DAILY_ORDERSNoMaximum number of orders per day. Default: no limit.
IBKR_SYMBOL_WHITELISTNoComma-separated list of allowed symbols. If empty, all symbols allowed.
IBKR_MAX_ORDER_NOTIONALNoMaximum notional value per order. Default: no limit.
IBKR_MAX_POSITION_NOTIONALNoMaximum notional value for resulting position. Default: no limit.
IBKR_SHORT_SELLING_ENABLEDNoSet to 'true' to allow short selling. Default: 'false'.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 confirmation_token. Show the user the risk decision and cost, then call place_order with that token.

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 confirmation_token. The order is re-validated against risk limits at this moment before submission. Tokens are single-use and expire. Returns the resulting order with its fill status.

cancel_orderA

Cancel a working order by its order_id (from get_open_orders).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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