Analyze an Interactive Brokers portfolio with AI

Updated: 2026-05-28 07:07 CEST

ibkr lets an AI assistant analyze an Interactive Brokers portfolio from live local account and market data. Claude Desktop, Claude Code, Cursor, Zed, Continue, or another MCP host calls ibkr mcp; ibkr reads IB Gateway or TWS; the assistant receives structured responses for portfolio review, exposure mapping, options diagnostics, market-regime checks, and next-review workflows.

This page is for searches such as "analyze Interactive Brokers portfolio with AI", "AI assistant for IBKR portfolio analysis", "Claude IBKR positions options analysis", and "natural language TWS API portfolio analysis".

Portfolio questions it handles

The assistant does not need screenshots or copied tables. It can call MCP tools and receive JSON for account, positions, quotes, calendars, option chains, history, scanners, breadth, gamma, and risk-regime context. The current bundled MCP surface is read-side only, which makes it suitable for analysis, review, and plan sizing without exposing order-entry tools.

Why this is better than copy-paste analysis

Manual portfolio analysis usually means pasting account balances, positions, and option chains into a chat. That is slow, stale, and easy to redact incorrectly. ibkr mcp keeps the broker connection local and returns only the data requested for the current question.

The host still receives account-sensitive data when you ask it to analyze your account. Use a host and model policy you trust. The ibkr side of the broker connection stays local, and the current public MCP surface is limited to analysis and sizing.

Example assistant flow

User:

How does my IBKR portfolio look today? Call out option delta and any stale prices.

Likely MCP calls:

ibkr_account
ibkr_positions
ibkr_watch
ibkr_regime

Expected answer shape:

For a fuller semi-professional portfolio-review workflow, use the prompt in examples/ibkr_portfolio_analysis_prompt.md.

For the Claude-specific workflow, including a sanitized sample review and a shorter paste-ready prompt, see Portfolio review with Claude and IBKR.

Install

curl -fsSL https://raw.githubusercontent.com/osauer/ibkr/main/install.sh | sh
ibkr status

Claude Desktop users can use the MCPB:

https://github.com/osauer/ibkr/releases/latest/download/ibkr.mcpb

For other MCP hosts:

{
  "mcpServers": {
    "ibkr": {
      "command": "/ABSOLUTE/PATH/TO/ibkr",
      "args": ["mcp"]
    }
  }
}

Controlled execution boundary

The bundled CLI and MCP server do not expose order placement, order modification, or order cancellation. The sizing tool performs math against net liquidation value; it does not submit an order ticket.

References