IBKR / Interactive Brokers MCP server

A local Interactive Brokers MCP server for trading research

Connect IB Gateway or TWS to Claude Desktop, Claude Code, Cursor, Zed, and other MCP hosts. Review account authority, positions, broker-reporting status, retrospective Edge evidence, the daily brief, rulebook, Action Queue, and source quality through read-only tools.

canary mcp
{
  "mcpServers": {
    "canary": {
      "command": "/ABSOLUTE/PATH/TO/canary",
      "args": ["mcp"]
    }
  }
}
Summary
Local stdio MCP Runs beside your AI host and talks to your local daemon over a Unix socket.
IB Gateway or TWS Uses Interactive Brokers' local API session; no hosted broker layer.
Workflow tools Read-only tools for health, account, positions, option strategies, technical evidence, broker-reporting status, the retrospective Edge review, the brief, rules, proposals, opportunities, settings, readiness, and order-lifecycle reads.
Controlled boundary The MCP server has no resources, settings writes, order previews, or execution tools.

What an assistant can do with it.

The MCP server is one adapter over a larger local desk. Canary's daemon evaluates account, statement, market, calendar, event, breadth, gamma, regime, stress, rulebook, proposal, and opportunity inputs. The reduced MCP surface exposes decision-relevant current and retrospective reads without publishing every sensor as a separate tool.

Everything flows through your own TWS or IB Gateway session. Coverage follows your IBKR subscriptions, market hours, and upstream source health; unavailable, stale, delayed, and held inputs remain explicit.

Account

Inspect portfolio state

Read net liquidation, cash, margin, buying power, positions, P&L, option legs, Greek coverage, and per-underlying exposure.

Desk brief

Read the current decision surface

Review market/session context, source health, the morning brief, and the converged Action Queue.

Edge

Review broker-confirmed history

Inspect adequately sampled stock and ETF decisions with fixed market context, plus separate broker-reported realized and dated open option evidence.

Rules

Inspect ranked findings

Read the 14-rule desk verdict and preserve every unknown or degraded input.

Action Queue

Review candidates

Read protection and option-exercise candidates without receiving preview or execution authority.

Technical

Analyze named symbols

Request daily trend, relative strength, ATR, and liquidity evidence for explicitly named stocks or ETFs.

Lifecycle

Read observed order state

Inspect open and historical local journal state without placing, changing, or cancelling an order.

What it does not expose.

The boundary is simple: the MCP server has read-only tools and no resources, settings writes, previews, or execution tools. Each release also publishes a separate, clearly marked canary-trading binary for constrained opt-in CLI and app order management; MCP remains read-only.

Install for Claude Desktop or shell.

Use the MCPB for Claude Desktop. Use the shell install for Cursor, Continue, Zed, terminal workflows, or other local MCP hosts.

Download MCPB for Claude Desktop

Open the .mcpb file with Claude Desktop, drag it into Claude Desktop, or install it from Claude Desktop settings. Requires IB Gateway 10.37+ or TWS running locally and an IBKR Pro account with TWS API access.

install
# Shell, Cursor, Continue, Zed, generic MCP hosts
curl -fsSL https://raw.githubusercontent.com/osauer/canary/main/install.sh | sh
canary setup claude-desktop

Generic MCP config.

For Cursor, Continue, Zed, or another local MCP host, use an absolute path to the binary. ~ is not expanded by exec.

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

Example questions.

These are the kinds of user requests the MCP descriptions are written to route correctly.

Useful setup pages.

Start with Claude Desktop if that is where you plan to ask questions. The other pages cover TWS, Gateway, safety, and deeper portfolio-review context.

TWS

IBKR MCP TWS setup

Use Trader Workstation as the local Interactive Brokers API process.

Safety

Read-only MCP server

The local MCP surface exposes account and market data, not trading authority.

Why local?

Brokerage data is sensitive. canary keeps the broker connection on the machine already running IB Gateway or TWS and exposes a narrow local read-side interface to the AI host.

FAQ.

Is Canary an Interactive Brokers MCP server?

Yes. canary mcp runs locally as a stdio MCP server and reads account and market data from Interactive Brokers through IB Gateway or TWS.

Which MCP clients can use it?

Claude Desktop, Claude Code, Cursor, Zed, Continue, and other local stdio MCP hosts can launch it.

Does it expose trading tools?

Not in the standard downloads: the MCP bundle and the plain canary tarballs are read-only builds with no place, modify, or cancel order tools compiled in. Each release also publishes a clearly marked canary-trading tarball for users who explicitly opt into order management. It ships with warnings and layered safeguards.