# π IBKR MCP Server - Quick Start
## What You Get
A complete Model Context Protocol (MCP) server that lets Claude interact with your Interactive Brokers account for:
β
Account monitoring
β
Real-time market data
β
Historical price charts
β
Trade execution
β
Position management
β
Order tracking
## π Files Included
```
ibkr-mcp-server/
βββ server.py # Main MCP server
βββ requirements.txt # Python dependencies
βββ start_server.bat # Windows startup script
βββ test_installation.py # Installation checker
βββ README.md # Full documentation
βββ WINDOWS_SETUP.md # Step-by-step Windows guide
βββ TROUBLESHOOTING.md # Problem solving guide
βββ examples.py # Usage examples
βββ claude_desktop_config.example.json # Config template
βββ LICENSE # MIT License
βββ .gitignore # Git ignore rules
```
## β‘ 5-Minute Setup
### 1οΈβ£ Install Python
- Download from: https://python.org
- β
Check "Add Python to PATH"
### 2οΈβ£ Install Dependencies
```bash
cd ibkr-mcp-server
pip install -r requirements.txt
```
### 3οΈβ£ Setup TWS/Gateway
- Download from: https://www.interactivebrokers.com/en/trading/tws.php
- Enable API: File β Global Configuration β API β Settings
- β
Enable ActiveX and Socket Clients
- Port: **7497** (paper trading)
### 4οΈβ£ Configure Claude Desktop
File location: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"ibkr": {
"command": "python",
"args": ["C:\\Users\\YourName\\ibkr-mcp-server\\server.py"]
}
}
}
```
### 5οΈβ£ Test It!
1. Start TWS/Gateway
2. Restart Claude Desktop
3. Ask Claude: "Connect to my IBKR paper trading account"
4. Then: "What's my account balance?"
## π Documentation Guide
- **New to this?** β Read `WINDOWS_SETUP.md`
- **Want all features?** β Read `README.md`
- **Having issues?** β Read `TROUBLESHOOTING.md`
- **See examples?** β Run `python examples.py`
## π§ Available Tools
Once connected, ask Claude to:
### π Market Data
- "What's the current price of AAPL?"
- "Show me Tesla's price over the last week"
- "Get the option chain for SPY"
### πΌ Account Info
- "What's my account balance?"
- "Show me all my positions"
- "What are my open orders?"
### π Trading (Use with caution!)
- "Buy 10 shares of Microsoft at market"
- "Sell 5 shares of Apple at $180 limit"
- "Cancel order 12345"
## β οΈ Important Safety Notes
1. **Always test with paper trading first** (port 7497)
2. Paper trading uses simulated money - it's safe to experiment
3. Live trading uses real money (port 7496) - be very careful
4. Review all orders before confirming
5. Start with small quantities
## π Need Help?
**Problem**: Python not found
**Fix**: Reinstall Python, check "Add to PATH"
**Problem**: Can't connect to IBKR
**Fix**:
1. Start TWS/Gateway
2. Enable API in settings
3. Use port 7497 for paper trading
**Problem**: Claude doesn't see tools
**Fix**:
1. Check config file path is correct
2. Use `\\` (double backslash) in Windows paths
3. Restart Claude Desktop
**For more help**: See `TROUBLESHOOTING.md` (24 common issues solved!)
## π― Next Steps
1. β
Test with paper trading extensively
2. β
Learn the available commands
3. β
Understand market data and orders
4. β
Set up risk controls if needed
5. β οΈ Only move to live trading when confident
## π Support Resources
- **IBKR API**: https://interactivebrokers.github.io/
- **ib_insync**: https://ib-insync.readthedocs.io/
- **MCP**: https://modelcontextprotocol.io/
- **IBKR Support**: https://www.interactivebrokers.com/en/support/
---
**Ready to start?** Open `WINDOWS_SETUP.md` for detailed step-by-step instructions!
**Happy Trading!** π (Remember: Paper trading first!)