ibkr-mcp
Interactive Brokers MCP Server for AI-powered trading assistance.
A Model Context Protocol (MCP) server that connects AI assistants to Interactive Brokers, enabling intelligent portfolio management, options analysis, and risk monitoring.
Features
- Account Management: Real-time account summary, portfolio positions, and P&L tracking
- Options Analysis: Option chain fetching, Greeks calculation, and strategy scanning
- Risk Monitoring: Portfolio risk evaluation with configurable limits and alerts
- Trading Strategies: Built-in support for covered calls, iron condors, PMCC, vertical spreads
- News Integration: Historical news retrieval for market research
- Playbook Actions: Automated adjustment suggestions based on risk rules
Installation
pip install ibkr-mcp
Prerequisites
- Python 3.12+
- Interactive Brokers TWS or IB Gateway running
- Valid IBKR account credentials
Configuration
Set environment variables or create a .env file:
# IBKR Connection
IBKR_HOST=127.0.0.1
IBKR_PORT=4001 # TWS: 7497, IB Gateway: 4001
IBKR_CLIENT_ID=0
IBKR_ACCOUNT=U1234567 # MUST: specific account ID
# Optional: Data directories
IBKR_MCP_MARKET_DATA_TYPE=LIVE # LIVE, FROZEN
Usage
As MCP Server
Add to your Claude Desktop or other MCP-compatible client configuration:
{
"mcpServers": {
"ibkr-mcp": {
"command": "uvx",
"args": [
"ibkr-mcp"
],
"env": {
"IBKR_ACCOUNT": "U12345678"
}
}
}
}
Available Tools & Resources
| Tools & Resources | Description |
|---|---|
account_summary |
Retrieve account summary for specific account |
get_portfolio |
Get portfolio positions with P&L |
Support
For issues and feature requests, please contact the maintainers.
License
Proprietary - All rights reserved.
Metadata
Release files for ibkr-mcp 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ibkr_mcp-0.2.5-cp313-cp313-macosx_11_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 11.0+ ARM64 | Details for ibkr_mcp-0.2.5-cp313-cp313-macosx_11_0_arm64.whl |
Release files / ibkr_mcp-0.2.5-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | ibkr_mcp-0.2.5-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4c573fabf04b3c10ae424078d1770d90ba43fd11d8bae7220e22e43bb6a271a1
|
|
BLAKE2b-256 checksum How to use checksums |
45e8778471d42d783f6187a25128a8c49ab63f510c422a503c5b664d397dbbca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Security for ibkr-mcp 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.