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. Read-only tools cover your account and positions, the daily brief, the rulebook, a check that your limits add up, the Action Queue, Edge, FX and lending reports, borrowing and short-interest research and the quality of each source.

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 your local Interactive Brokers API session, with no hosted broker layer.
Workflow tools Read-only tools for health, account, positions, option strategies, technical evidence, broker reporting, FX and lending reports, borrowing and short-interest research, Edge, the brief, rules, a policy check, proposals, opportunities, settings, readiness and order history.
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 engine. Canary's daemon evaluates account, statement, market, calendar, event, breadth, gamma, regime, stress, rulebook, proposal and opportunity inputs. MCP keeps to a smaller set of current and retrospective reads that matter for decisions, so not every sensor needs a tool of its own.

Everything runs through your own TWS or IB Gateway session. Coverage follows your IBKR subscriptions, market hours and the health of upstream sources. Inputs that are unavailable, stale, delayed or held stay labelled as such.

Account

Inspect portfolio state

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

Brief

Read what needs deciding

Review market and session context, source health, the daily brief and the combined Action Queue.

Edge

Review broker-confirmed history

Inspect stock and ETF decisions that have enough samples, against fixed market context. Broker-reported option evidence, realised and dated open, is kept separate.

Rules

Inspect ranked findings

Read the verdict on all 19 rules, with each unknown or degraded input kept in view. A policy check reads the limits themselves against each other and the account.

Action Queue

Review candidates

Read protection and option-exercise candidates. The tools grant no preview or execution authority.

Technical

Analyse named symbols

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

Reporting

Separate the currency effect

Read statement-backed performance, the FX contribution for each period and the net fees your lent shares earned. Missing days stay marked, and lending fees stay out of P&L.

Research · v3.17

Screen borrowing and short interest

Compare dated borrowing fees, price and liquidity, and screen FINRA’s twice-monthly short-interest report. Borrowing fees are a cost to borrowers, not a lender’s yield.

Lifecycle

Read observed order state

Inspect open and past orders in the local journal. Nothing here places, changes or cancels an order.

What it does not expose.

The MCP server offers read-only tools and nothing else. It has no resources, settings writes, previews or execution tools. Each release also publishes a separate, clearly marked canary-trading binary for constrained, opt-in order management in the CLI and app. MCP stays read-only.

Install for Claude Desktop or shell.

Claude Desktop takes the MCPB. For Cursor, Continue, Zed, the terminal or any other local MCP host, use the shell install.

Download MCPB for Claude Desktop

Open the .mcpb file with Claude Desktop, drag it into the app or install it from its settings. You need 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, give the absolute path to the binary. exec does not expand ~.

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

Example questions.

The MCP tool descriptions are written to route requests like these to the right tool.

Useful setup pages.

Start with Claude Desktop if that is where you will ask your questions. The other pages cover TWS, IB Gateway, safety and portfolio review in more depth.

IBKR MCP

IBKR MCP server

A short overview of IBKR MCP, with exact setup notes.

TWS

IBKR MCP TWS setup

Use Trader Workstation as the local Interactive Brokers API process.

Safety

Read-only MCP server

The local MCP tools expose account and market data, not trading authority.

Why local?

Brokerage data is sensitive. canary keeps the broker connection on the machine that already runs IB Gateway or TWS, and gives the AI host a narrow, local, read-only interface.

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, compiled without tools to place, modify or cancel orders. 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.