IBKR / Interactive Brokers MCP server

IBKR / Interactive Brokers MCP server for agentic trading research

Connect IB Gateway or TWS to Claude Desktop, Claude Code, Cursor, Zed, and other MCP hosts. Use account, positions, quotes, official calendars, option chains, scanners, breadth, gamma, and risk-regime data for portfolio analysis and trading-research workflows.

ibkr mcp
{
  "mcpServers": {
    "ibkr": {
      "command": "/ABSOLUTE/PATH/TO/ibkr",
      "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 Account, positions, quotes, calendars, options, scans, sizing, breadth, gamma, and regime.
Controlled boundary The bundled CLI and MCP server analyze and size plans, but do not expose place, modify, or cancel order tools.

What an assistant can do with it.

Ask in plain language. The assistant chooses the right MCP tool for portfolio review, market context, risk checks, and trade-plan sizing.

Account

Inspect portfolio state

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

Markets

Pull quotes, calendars, and chains

Ask for stock or ETF quotes, official open/holiday context, daily bars, option expiries, expected moves, and strike grids from the local IBKR session.

Discovery

Run scanners

Use configured or ad-hoc IBKR market scanners for movers, losers, unusual volume, gaps, high IV rank, and option volume.

Risk

Size trade plans

Calculate fixed-fractional share sizing against live NLV, with optional target, R-multiple, and breakeven win-rate math.

Regime

Read market context

Combine volatility, credit, funding, FX carry, dealer gamma, and S&P 500 breadth into a compact risk-regime view.

Resources

Subscribe to quote updates

MCP clients can read and subscribe to stock/ETF quote resources through ibkr://quote/{symbol}.

What it does not expose.

The boundary is simple: account and market data are available; order entry is not part of the bundled CLI or MCP server.

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/ibkr/main/install.sh | sh
ibkr 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": {
    "ibkr": {
      "command": "/Users/you/.local/bin/ibkr",
      "args": ["mcp"]
    }
  }
}

Example questions.

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

Choose the setup page that matches your search.

These pages target the common ways users look for an Interactive Brokers MCP server.

TWS

TWS MCP server

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. ibkr 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 ibkr an Interactive Brokers MCP server?

Yes. ibkr 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?

No. The bundled MCP server exposes account and market-data tools, but no place, modify, or cancel order tools.