Skip to main content
Glama
mark-liu

ibkr-mcp

by mark-liu

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IB_HOSTNoGateway host127.0.0.1
IB_PORTNoGateway port (4001=live, 4002=paper)4001
IB_CACHE_TTLNoContract cache TTL in seconds3600
IB_CLIENT_IDNoAPI client ID (must be unique per connection)10
IB_MARKET_DATA_TYPENo1=live, 2=frozen, 3=delayed, 4=frozen-delayed3
IB_RECONNECT_INTERVALNoSeconds between reconnect attempts30

Capabilities

Features and capabilities supported by this server

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
ibkr_quoteA

Get current price quotes for one or more symbols.

ibkr_historical_barsB

Get OHLCV historical bars for a symbol.

ibkr_fx_rateA

Get live FX rate for a currency pair.

ibkr_positionsA

Get all portfolio positions with P&L, market value, and weight %.

Returns positions sorted by absolute market value (largest first).

ibkr_account_summaryA

Get account summary: net liquidation, cash, margin, buying power, P&L.

Returns key account metrics grouped by currency.

ibkr_option_chainA

Get available option expirations and strikes for a symbol.

Returns the chain structure (what expirations and strikes exist), not Greeks for individual contracts. Use ibkr_quote with specific option symbols for Greeks.

ibkr_contract_searchA

Search for contracts by name or symbol using IB's fuzzy matching.

ibkr_connection_statusA

Check IB Gateway connection health and configuration.

Returns connection state, managed accounts, market data type, market hours status, and cache statistics.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
resource_positionsCurrent portfolio positions as context.
resource_account_summaryAccount summary as context.

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/mark-liu/ibkr-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server