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.0.tar.gz (45.2 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.0-py3-none-any.whl (54.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: interactive_brokers_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 45.2 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.0.tar.gz
Algorithm Hash digest
SHA256 0a38c66c154db72d66e3d425335d7ed0728c9506a8c5406976362173e2fcdc9c
MD5 f3ed7f10ed9a90178c93aefd081c01f6
BLAKE2b-256 1b7b67a49ac2315e9aad1ea41313df621c0c6ec6dc193bd7859e59b91d22c330

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for interactive_brokers_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd9cccc6da22f9d54056bfc99e05cbc33113cdd5325dd62c7c6878caf731b711
MD5 4ab6e391ca3ccd8ab522bd3e189cf179
BLAKE2b-256 3c8545200782466fce74d9c9d9bb59f68c15088aef9a3bc855d4dbfe8051b54b

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