Agentic IBKR workflows

ibkr canary for portfolio analysis and trading research

Connect Interactive Brokers (IBKR) Gateway or TWS to Claude Desktop first, with Claude Code, Cursor, Zed, and other local MCP hosts supported from the same binary. Ask real portfolio and market questions without copying tables out of TWS.

The bundled MCP surface is read-side only: agents can analyze, monitor, and size plans without receiving order-entry tools.

For Claude Desktop, use the MCPB install page, restart Claude, and keep IB Gateway or TWS running locally. The shell and Claude Code paths are there when you want one shared binary.

ibkr is analysis software, not financial advice — nothing it shows or says is a recommendation to buy or sell any security.

Terminal screenshot of ibkr regime showing volatility, credit, funding, FX, gamma, and breadth indicators
Local by default Connects to IB Gateway or TWS on your machine. No hosted broker custody layer.
Agent-ready Runs as a stdio MCP server for Claude Desktop, Claude Code, Cursor, Zed, and other MCP hosts.
Review depth Portfolio review, options diagnostics, scanners, scheduled stress checks, gamma, breadth, and regime context in one tool.
Go binary One installable CLI with a local daemon and a clean-room Go TWS protocol library.

Install for Claude Desktop first.

Most Mac users should start with the Claude Desktop MCPB. It bundles the local MCP server, keeps the broker session on your machine, and avoids hand-editing MCP config files.

Prerequisites: IB Gateway 10.37+ or TWS running locally, plus an IBKR Pro account with TWS API access. IBKR Lite does not include TWS API access.

Claude Desktop Install

The Claude Desktop path explains what the MCPB bundles, what still needs to be running locally, and the exact Mac install and restart steps.

# Claude Code plugin
/plugin marketplace add osauer/ibkr
/plugin install ibkr@ibkr
# restart Claude Code or run /reload-plugins after install/update

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

# then ask:
# "How does my IBKR account look today?"

Market, account, and option context.

Terminal screenshots are generated from synthetic fixture data, so the public page shows the real CLI shape without exposing account holdings or balances.

ibkr regime terminal output

Risk regime

One dashboard for volatility, credit, funding, FX carry, dealer gamma, and S&P 500 breadth.

synthetic ibkr canary terminal output

Stress monitor

Scheduled lifecycle, readiness, source-health, and stress checks from account, exposure, regime, and data-quality gates.

ibkr chain SPY terminal output

Option chains

Expiry lists, ATM implied volatility, and expected moves from the local IBKR market-data session.

sanitized ibkr positions by underlying terminal output

Positions and exposure

Underlying grouping, option legs, marks, Greek coverage, and portfolio-level exposure with sensitive values redacted here.

Ask portfolio and market questions in plain language.

The MCP descriptions are written for agent routing, so assistants can pick the right tool without you naming commands.

One local tool, three ways to use it.

MCP server

For AI assistants

ibkr mcp exposes account, quote, calendar, chain, scanner, sizing, breadth, gamma, regime, and stress-monitoring tools to MCP clients for analysis and scheduled-review workflows.

Terminal CLI

For fast checks

Run commands such as ibkr status, ibkr positions, ibkr canary, ibkr calendar, ibkr chain SPY, and ibkr regime. Every data command supports JSON; the CLI is useful, but the Claude/MCP path is the main path.

Go library

For custom systems

github.com/osauer/ibkr/pkg/ibkr speaks the TWS protocol directly with no Python bridge and no IBKR jars.

Experimental remote Canary app.

The paired Canary PWA can now run through a beta HTTPS relay when you want phone access away from the LAN. The app and broker session still live on your Mac; the relay is transport-only and currently maintainer-assisted for early users.

Canary mobile app monitor screen

Mobile monitor

Market regime, portfolio canary, protection, alerts, positions, and settings in the paired PWA.

Canary app wide viewport

Remote beta

Start ibkr app --remote, pair the phone, and keep TWS or IB Gateway running on the Mac.

Security

TLS-protected transport

The phone uses HTTPS and the Mac connector uses WSS, so network intermediaries cannot read the traffic. Pairing and session authorization remain local to the app.

Guide

Canary remote app beta

Short setup notes, relay caveats, pairing flow, screenshots, and the current beta security model.

IBKR MCP FAQ.

What is the IBKR MCP server?

ibkr mcp is a local Model Context Protocol server for Interactive Brokers account and market-data workflows.

Can it place orders?

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

Does it use TWS or IB Gateway?

Yes. It connects to a local TWS or IB Gateway API session and auto-discovers the standard paper and live ports.

How does Claude Desktop connect?

Install the latest MCPB release asset, open it with Claude Desktop, and restart Claude while IB Gateway or TWS is running.

Useful setup pages.

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

Claude Desktop

Claude Desktop Install

Mac prerequisites, MCPB download, Claude Desktop install steps, and first-run checks.

IBKR MCP

IBKR MCP server

The compact overview of the local MCP server, supported hosts, and read-only boundary.

TWS

IBKR MCP TWS setup

Use Trader Workstation as the local API session behind Claude and other MCP clients.

IB Gateway

IB Gateway MCP server

Use the lighter local Gateway process as the account and market-data source.