# š 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!)