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 ibkr-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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interactive_brokers_mcp-0.1.0.tar.gz.
File metadata
- Download URL: interactive_brokers_mcp-0.1.0.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04f1bba981a6540fa0d60618ff6bcee7810feef493fb03ddccc68dbd8032a745
|
|
| MD5 |
3be4ef53ae958798fd3db73db90df8bd
|
|
| BLAKE2b-256 |
613cd7035a611d4daa6abeaf50f75717ed16236d679f90ea130dd1f6102cb43f
|
File details
Details for the file interactive_brokers_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: interactive_brokers_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d682d8a7b54d6ddbab4f01b89af975a43660ea46d03b45bcaa9320218b669d4
|
|
| MD5 |
c8c49087f09ad9e10bc14ce30707bee9
|
|
| BLAKE2b-256 |
c8951729e5a8abc2d9dc2b3d1ea8a984adeb704f554f88f0596df632ba19aebe
|