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.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| interactive_brokers_mcp-0.2.10.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| interactive_brokers_mcp-0.2.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / interactive_brokers_mcp-0.2.10.tar.gz
| Download URL | interactive_brokers_mcp-0.2.10.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d422e52655cfe28a9d8633f4df734167617bf79f4619404f71dd31c91f91156e
|
|
BLAKE2b-256 checksum How to use checksums |
212af31e821b0916d3913a9ee783adb58a7fd8fc969fa6fc5af8855b92c30f88
|
| 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.10-py3-none-any.whl
| Download URL | interactive_brokers_mcp-0.2.10-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c214b53c9fb4b0175bf259012ff2f14d57fc6e46ccfac3285c33aa5dec9c139
|
|
BLAKE2b-256 checksum How to use checksums |
11be2a8c7523b3802c38607213137e5b1349b7b268a8b1c9c8b4ec5f78c656eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.2
|