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.4.tar.gz (61.8 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.4-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: interactive_brokers_mcp-0.2.4.tar.gz
  • Upload date:
  • Size: 61.8 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.4.tar.gz
Algorithm Hash digest
SHA256 5cf509c2705c1cae1a62b0d48a8db98b12626287615708a881d3d1d71c302859
MD5 3113f0a3fbdd262638682c5dba43eb1b
BLAKE2b-256 a93a4216e22238c4f568bedf118687200dab691b835f4417c2bb41cf46f65392

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for interactive_brokers_mcp-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3c5d44b90617c450678f20acdd05d30e8f690f461cfe6399a9e12c41f77332d4
MD5 d5a76133ae080b1d357956bfcfc57c93
BLAKE2b-256 47935ce7661f6e451d569b70530b49ab99c3d3aeb410de000353da1932ddd94d

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