IB Gateway MCP server

Updated: 2026-08-10 08:25 CEST

canary mcp is an IB Gateway MCP server for anyone who wants a local, headless bridge between Interactive Brokers data and an AI assistant. It uses the same local socket API that IB Gateway opens to ordinary TWS API clients and presents the read-only data as MCP tools.

A Gateway session gives Canary the same data as TWS. That covers account and position authority, entitled market inputs, the daily brief and the advisory rulebook, with risk policy and reconciliation in the terminal.

Use this setup for Claude Desktop, Claude Code, Cursor, Zed, Continue and other MCP hosts when IB Gateway is the process you keep running for account and market-data access.

Gateway prerequisites

canary probes the standard Gateway and TWS ports by default. If you use a custom port, write a local config file that pins only the fields you need.

Install

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

Claude Desktop users can install the MCP Bundle from the latest release:

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

Other MCP hosts can launch:

{
  "mcpServers": {
    "canary": {
      "command": "/Users/you/.local/bin/canary",
      "args": ["mcp"]
    }
  }
}

What Gateway-backed MCP tools can read

See Working with agents for example questions and the MCP tools reference for the exact schema.

Why local Gateway matters

Account and market questions should not need a hosted middle layer between you and your brokerage data. canary keeps the broker connection local and shares one daemon between shell and MCP clients. It offers no order-entry tools.