IB Gateway MCP server

Updated: 2026-07-18 21:05 CEST

canary mcp is an IB Gateway MCP server for users who want a local, headless Interactive Brokers data bridge for AI assistants. It uses the same local socket API that IB Gateway exposes for ordinary TWS API clients, then presents the read-only data surface as MCP tools.

The Gateway session feeds the same typed surfaces as TWS: entitled real-time or delayed market data, the regime dashboard, portfolio stress checks, and the advisory rulebook, with risk policy and reconciliation available 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 your setup uses a custom port, write a local config file and pin 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

Brokerage data should not need a hosted middle layer just to answer account and market questions. canary keeps the broker connection local, shares one daemon between shell and MCP clients, and does not expose order-entry tools.