MCP Catalogs
HomeIB_MCP screenshot

IB_MCP

by rcontesti·124·Score 41

An MCP server that provides Interactive Brokers Web API access through Model Context Protocol for trading operations.

financedeveloper-toolsai-llm
25
Forks
4
Open issues
7 mo ago
Last commit
2d ago
Indexed

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:

you:Building AI-powered trading assistants that can execute trades through IBKR
you:Portfolio monitoring systems using MCP tools to retrieve account information
you:Automated trading strategies with risk management integrated through MCP
you:What is the difference between this Web API MCP and TWS API MCP?
you:How is authentication handled with this MCP server?

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

ib-tws-mcpinteractive-brokers-pythonibkr-api

Installation

IB_MCP Installation

Docker Setup

  1. Clone the repository:
git clone https://github.com/rcontesti/IB_MCP.git
cd IB_MCP
cp .env.example .env
  1. Build and run the containers:
docker compose up --build -d
  1. 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.