Skip to main content

ibkr-mcp

MCP server for Interactive Brokers Gateway — 7 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
get_ibkr_status IBKR Gateway connection diagnostics

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

PolyForm Noncommercial 1.0.0

Metadata

Release files for interactive-brokers-mcp 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for interactive-brokers-mcp 0.2.6
File Size Uploaded
interactive_brokers_mcp-0.2.6.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for interactive-brokers-mcp 0.2.6
File Interpreter ABI Platform
interactive_brokers_mcp-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / interactive_brokers_mcp-0.2.6.tar.gz

Download URL interactive_brokers_mcp-0.2.6.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5e8070c46b3891d11a7602109b65c1f7095548cba1100e2491b3ff060e1289a7
BLAKE2b-256 checksum
How to use checksums
326b3b60434689a5f71d328a225ef3e82381bc72610475ace0b4f173c872cbba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / interactive_brokers_mcp-0.2.6-py3-none-any.whl

Download URL interactive_brokers_mcp-0.2.6-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb9385fde3e36597e6e674c79f345adf54abf4202fc770d5ccdea1d4cfade24e
BLAKE2b-256 checksum
How to use checksums
afd28f9b40da70a11289b1d5c150062f10d2d9bcb9eeb672e2b54bb53ac35568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release history Release notifications | RSS feed

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page