Skip to main content
Glama
henrysouchien

Interactive Brokers MCP Server

ibkr-mcp

MCP server for Interactive Brokers Gateway — 6 tools for market data and account access via Claude.

Tools

Tool

Description

get_ibkr_market_data

Historical OHLCV bars for any contract

get_ibkr_positions

Current portfolio positions and P&L

get_ibkr_account

Account summary (balances, margin, NAV)

get_ibkr_contract

Contract lookup and details

get_ibkr_option_prices

Option chain pricing

get_ibkr_snapshot

Real-time quote snapshot

Related MCP server: IBKR TWS MCP Server

Install

pip install interactive-brokers-mcp

Prerequisites

  • 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

IBKR_GATEWAY_HOST

127.0.0.1

Gateway hostname

IBKR_GATEWAY_PORT

7496

Gateway port

IBKR_CLIENT_ID

1

API client ID

IBKR_TIMEOUT

10

Connection timeout (seconds)

IBKR_READONLY

false

Read-only mode

IBKR_AUTHORIZED_ACCOUNTS

Comma-separated account whitelist

IBKR_CACHE_DIR

Optional cache directory override

The package auto-loads .env from the package directory and parent.

Usage

Claude Code

claude mcp add ibkr-mcp -- ibkr-mcp

Or in ~/.claude.json:

{
  "mcpServers": {
    "ibkr-mcp": {
      "type": "stdio",
      "command": "ibkr-mcp"
    }
  }
}

Standalone

ibkr-mcp          # via installed entry point
python -m ibkr.server   # via module

License

MIT

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Enables 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.
    Last updated
    14
    269
    202
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables 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.
    Last updated
    3
  • F
    license
    -
    quality
    D
    maintenance
    Enables 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.
    Last updated
    4
  • A
    license
    -
    quality
    B
    maintenance
    Enables read-only access to Interactive Brokers data including contracts, market data, news, fundamentals, and portfolio/account information for LLM workflows and autonomous agents.
    Last updated
    16
    BSD 3-Clause

View all related MCP servers

Related MCP Connectors

  • US/HK markets — 151 tools: quotes, options, orders, fundamentals, screener, IPO, alerts & DCA

  • Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.

  • Real-time news with bias scoring, live market data, and AI-powered options pricing

View all MCP Connectors

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

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