Interactive Brokers MCP

by dickhfchan

637 downloads
Not rated
GitHub

About

This interative brokers MCP allows adding and deleting orders, getting the latest quotes...

Details

Author
dickhfchan
Downloads
637
Categories
Other, API

- Docker-based deployment with Docker Desktop
- FastMCP server (FastAPI + MCP) on port 3100
- Requires IBKR account ID in configuration
- Co‑exists with the original Flask app for testing
- Video walkthrough available on YouTube

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Interactive Brokers MCP
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, then run docker-compose up to bring up the container. After it starts, use docker exec -it ibkr bash to get a command-line prompt. The MCP server runs on port 3100 and requires setting the IBKR_ACCOUNT_ID environment variable in the docker-compose.yml file.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "interactive brokers mcp": {
            "ibkr": {
                "command": "ibkr",
                "type": "sse",
                "url": "http://ip_address:3000/sse",
                "headers": {
                    "X-API-Key": "your-secure-api-key-here"
                }
            }
        }
    }
}

McpServers

{
    "ibkr": {
        "command": "ibkr",
        "type": "sse",
        "url": "http://ip_address:3000/sse",
        "headers": {
            "X-API-Key": "your-secure-api-key-here"
        }
    }
}

Interactive Brokers Web API

Video Walkthrough

https://www.youtube.com/watch?v=CRsH9TKveLo

Requirements

  • Docker Desktop - https://www.docker.com/products/docker-desktop/

Clone the source code

git clone https://github.com/hackingthemarkets/interactive-brokers-web-api.git

Bring up the container

docker-compose up

Getting a command line prompt

docker exec -it ibkr bash

app2.py

app2.py is the MCP server. It was created by converting the flask app to fastapi app first then add the FastMCP.

added port 3100 in docker-compose.yml for the mcp server.

both flask app and fastapi app can run together for testing and checking.

Setup

Need to update the ID in docker yaml file IBKR_ACCOUNT_ID: "U1234567"
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.