← Back to Interactive Brokers MCP Server

Install Interactive Brokers MCP Server

Pick your client, copy the command, done.

1

Add it to Claude Code

claude mcp add ibkr-mcp -- ibkr-mcp

Environment Variables

Set these before running Interactive Brokers MCP Server.

VariableDescriptionRequired
IBKR_GATEWAY_HOSTGateway hostnameNo
IBKR_GATEWAY_PORTGateway portNo
IBKR_CLIENT_IDAPI client IDNo
IBKR_TIMEOUTConnection timeout in secondsNo
IBKR_READONLYRead-only modeNo
IBKR_AUTHORIZED_ACCOUNTSComma-separated account whitelistNo
IBKR_CACHE_DIROptional cache directory overrideNo

Available Tools (6)

Once configured, Interactive Brokers MCP Server gives your AI agent access to:

get_ibkr_market_dataRetrieves historical OHLCV bars for any contract.
symbolexchangesec_typedurationbar_size
get_ibkr_positionsRetrieves current portfolio positions and P&L.
get_ibkr_accountRetrieves account summary including balances, margin, and NAV.
account_id
get_ibkr_contractPerforms contract lookup and returns details.
symbolsec_type
get_ibkr_option_pricesRetrieves option chain pricing.
symbolexpiry
get_ibkr_snapshotRetrieves a real-time quote snapshot for a contract.
symbolexchange

Try It Out

After setup, try these prompts with your AI agent:

What is my current portfolio balance and total P&L?
Get the historical OHLCV data for AAPL for the last 30 days.
Look up the contract details for TSLA.
Show me the current real-time quote for SPY.
What are the current option prices for NVDA expiring next month?
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed
Conare · memory for coding agents

Keep this setup from going cold

Save the docs, env vars, and workflow around Interactive Brokers MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup$npx conare@latest