
IB_MCP
by rcontesti·★ 124·Score 41
An MCP server that provides Interactive Brokers Web API access through Model Context Protocol for trading operations.
Overview
The IB_MCP project bridges the Interactive Brokers Web API with the Model Context Protocol, enabling AI systems to interact with trading platforms. It uses a Docker-based setup with Client Portal Gateway for authentication and provides HTTP-based MCP communication. While currently limited by the beta status of IB's Web API, it offers a standalone solution without requiring TWS or IB Gateway desktop applications. The project is actively maintained with clear documentation on both implementation limitations and future development plans.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose IB_MCP when you need cloud-compatible IB integration without running TWS desktop software, and when you prefer standard HTTPS over TCP/IP protocols.
When NOT to choose this
Don't choose this for high-frequency trading or when you need access to all advanced TWS features that aren't yet available in the Web API.
Comparable tools
Installation
IB_MCP Installation
Docker Setup
- Clone the repository:
git clone https://github.com/rcontesti/IB_MCP.git
cd IB_MCP
cp .env.example .env- Build and run the containers:
docker compose up --build -d- Authenticate with your IB account by accessing
https://{GATEWAY_BASE_URL}:{GATEWAY_PORT}
VS Code Configuration
Add to your settings.json:
{
"mcp": {
"servers": {
"ib-web": {
"type": "http",
"url": "http://localhost:5002/mcp/"
}
}
}
}Alternatively, create .vscode/mcp.json:
{
"servers": {
"ib-mcp-server": {
"type": "http",
"url": "http://localhost:5002/mcp/"
}
}
}FAQ
- What is the difference between this Web API MCP and TWS API MCP?
- This implementation uses IB's Web API which is standalone and doesn't require TWS/Gateway software, making it more suitable for cloud deployments. However, TWS API offers faster performance and more trading features but requires desktop software to run.
- How is authentication handled with this MCP server?
- The project uses the retail authentication process managed by the Client Portal Gateway, a Java program that routes local web requests with proper authentication. Users need to log in through a browser on the same machine where the gateway is running.
Compare IB_MCP with
Last updated · Auto-generated from public README + GitHub signals.