Interactive Brokers MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Interactive Brokers MCP Server Show my current portfolio positions and account summary."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ibkr-mcp
MCP server for Interactive Brokers Gateway — 7 tools for market data and account access via Claude.
Tools
Tool | Description |
| Historical OHLCV bars for any contract |
| Current portfolio positions and P&L |
| Account summary (balances, margin, NAV) |
| Contract lookup and details |
| Option chain pricing |
| Real-time quote snapshot |
| IBKR Gateway connection diagnostics |
Related MCP server: IBKR TWS MCP Server
Install
pip install interactive-brokers-mcpPrerequisites
IB Gateway or TWS running
API access enabled in Gateway/TWS settings
Host/port/client ID matching your environment variables
Environment Variables
Variable | Default | Description |
|
| Gateway hostname |
|
| Gateway port |
|
| API client ID |
|
| Connection timeout (seconds) |
|
| Read-only mode |
| Comma-separated account whitelist | |
| Optional cache directory override |
The package auto-loads .env from the package directory and parent.
Usage
Claude Code
claude mcp add ibkr-mcp -- ibkr-mcpOr in ~/.claude.json:
{
"mcpServers": {
"ibkr-mcp": {
"type": "stdio",
"command": "ibkr-mcp"
}
}
}Standalone
ibkr-mcp # via installed entry point
python -m ibkr.server # via moduleLicense
PolyForm Noncommercial 1.0.0
Available Tools
6 toolsget_ibkr_accountC
Fetch IBKR account summary metrics.
Inputs: account_id. Returns: object
get_ibkr_contractC
Fetch contract details or option chain metadata from IBKR.
Inputs: symbol (required), sec_type, info_type, exchange, +1 more. Returns: object
get_ibkr_market_dataC
Fetch historical price series from IBKR Gateway.
Inputs: symbols (required), instrument_type (required), start_date, end_date, +2 more. Returns: object
get_ibkr_option_pricesC
Snapshot bid/ask/greeks for multiple option strikes.
Inputs: symbol (required), expiry (required), strikes (required), right. Returns: object
get_ibkr_positionsB
Fetch current IBKR positions and optionally account-level PnL.
Inputs: include_pnl, account_id. Returns: object
get_ibkr_snapshotC
Snapshot latest price for any security.
Inputs: symbol (required), sec_type, exchange, currency. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have distinct purposes targeting different IBKR data types (account, contract, market data, options, positions, snapshot), but 'get_ibkr_market_data' and 'get_ibkr_snapshot' could cause confusion as both fetch price data with unclear boundaries between historical series and latest snapshots.
All tools follow a perfect 'get_ibkr_' prefix pattern with descriptive snake_case suffixes, creating a highly predictable and readable naming convention throughout the set.
Six tools is well-scoped for an Interactive Brokers data server, providing focused coverage of key financial data categories without being overwhelming or insufficient for the domain.
The toolset covers read operations well but lacks obvious trading or order management capabilities (create/update/delete orders) that would be expected for a full IBKR trading interface, creating notable gaps despite good data retrieval coverage.
Maintenance
Related MCP Connectors
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Agentic brokerage access to a US brokerage account: quotes, orders, positions, cash and documents.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Read-only access to your MetaTrader 4 and 5 accounts for AI agents: balances, open positions, trade history with win rate, live quotes, symbol specs and candles. It cannot place, modify or close orders.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with Interactive Brokers trading accounts to retrieve market data, check positions, and place trades. Includes pre-configured IB Gateway and handles OAuth authentication automatically.14161 npm228MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLM clients to interact with Interactive Brokers Trader Workstation for automated trading workflows. Supports market data retrieval, portfolio management, and order execution through the TWS API.5-
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Interactive Brokers via the TWS API or IB Gateway to manage accounts, retrieve market data, and execute trades. It supports features like real-time market data, historical data queries, and order management for stocks and options.4-
- AlicenseNot gradedqualityBmaintenanceEnables read-only access to Interactive Brokers data including contracts, market data, news, fundamentals, and portfolio/account information for LLM workflows and autonomous agents.19BSD 3-Clause