Skip to main content

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

Project description

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

interactive_brokers_mcp-0.2.3.tar.gz (59.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

interactive_brokers_mcp-0.2.3-py3-none-any.whl (70.8 kB view details)

Uploaded Python 3

File details

Details for the file interactive_brokers_mcp-0.2.3.tar.gz.

File metadata

  • Download URL: interactive_brokers_mcp-0.2.3.tar.gz
  • Upload date:
  • Size: 59.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for interactive_brokers_mcp-0.2.3.tar.gz
Algorithm Hash digest
SHA256 ec9158c7d5f90bae570799c5976406e12e344e707bd7f1daf68208b334ab8699
MD5 57d34530fbdb08fa75de231ed9b0e06a
BLAKE2b-256 9ea10341d7f84bca682913cdc3e573439781401ac0ac8a9954f85ef4cbd30b3d

See more details on using hashes here.

File details

Details for the file interactive_brokers_mcp-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for interactive_brokers_mcp-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c92256655849017c24013a04a2c5fa28f35476347809b21dc872018e6aa58326
MD5 476251e9c26a6f33b28574c46196382e
BLAKE2b-256 17400d64f00acb32ac51ae9d056a924654a0bf75f967e32f18d8ff4f282300db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page