IBKR MCP TWS setup

Updated: 2026-10-05 22:11 CEST

canary mcp is a local IBKR MCP bridge for TWS. Claude Desktop, Claude Code, Cursor, Zed, Continue or another stdio MCP host talks to canary mcp, and canary reads account and market data from the Trader Workstation (TWS) API socket on the same machine.

Next to the bridge, the binary carries a daily brief, an advisory 19-rule rulebook and protection proposals, the desk functions an individual trader tends to want. Risk policy and statement reconciliation run in the terminal. Market data follows your IBKR subscriptions and is real-time where they cover it.

The same binary also works with IB Gateway. Choose TWS when Trader Workstation is already open for charting, manual supervision or daily trading context.

How Canary differs from simple Python IBKR bridges

Many IBKR MCP search results are small wrappers around a few TWS API calls. canary covers more ground.

TWS connection model

Claude / Cursor / Zed / other MCP host
  -> canary mcp
  -> local canary daemon
  -> Trader Workstation API socket
  -> Interactive Brokers account and market data

canary finds the standard local API ports on its own, TWS paper and live ports included. If auto-discovery does not suit your workstation, pin the host, port, client ID, account and TLS settings in local config.

Install

Claude Desktop users can install the MCP Bundle:

open https://github.com/osauer/canary/releases/latest/download/canary.mcpb

Shell, Cursor, Continue, Zed and generic MCP hosts can install the binary:

curl -fsSL https://raw.githubusercontent.com/osauer/canary/main/install.sh | sh
canary status
canary setup claude-desktop

Generic MCP config:

{
  "mcpServers": {
    "canary": {
      "command": "/ABSOLUTE/PATH/TO/canary",
      "args": ["mcp"]
    }
  }
}

The command must be an absolute path because MCP hosts usually do not expand ~ or read your interactive shell's PATH.

TWS prerequisites

In Trader Workstation, enable API socket access:

The published canary mcp server needs no TWS order-entry permissions, because it has no order-entry tools.

What to ask through MCP

TWS or IB Gateway?

Use TWS when the desktop platform is already part of your workflow, and IB Gateway when you want a lighter, headless API process. The canary mcp tools are the same in both cases. Only the local IBKR process behind the API socket changes.