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.2.tar.gz (46.7 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.2-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: interactive_brokers_mcp-0.2.2.tar.gz
  • Upload date:
  • Size: 46.7 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.2.tar.gz
Algorithm Hash digest
SHA256 e873a6e53543f05c1a03deb72211a5310d32c5f0b584f0692939f01e7b7b0a78
MD5 bf8c4a1444ec4113ea4d5a5bdb5d5f24
BLAKE2b-256 1b6656230da302cd6f155df09c059dc71df9201e8764fd635f56f22c0e762095

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for interactive_brokers_mcp-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5db543105cac8bad75d378547bf350cfb6a4250c9c32b87fd7f05d584bdac062
MD5 284cbccefd36d47b5030dac096de031c
BLAKE2b-256 85ed32513d5b3b3139baab81df9cd962aee857a22bafb1833fc4a7c49ec888d2

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