IBKR Portfolio Builder MCP Server

Top-down IBKR research: 468 typed screeners tagged by strategy intent, news, account access.

Local serverstdioPython

What is the IBKR Portfolio Builder MCP server?

IBKR Portfolio Builder MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Top-down IBKR research: 468 typed screeners tagged by strategy intent, news, account access.

What you get

A remote MCP server for top-down portfolio construction with Interactive Brokers. Built to be used as a Claude.ai custom connector, Claude Code MCP, or any HTTP MCP client.

  • Inverse pair links — — every HIGH_X ↔ LOW_X and X_ASC ↔ X_DESC pair is precomputed, so the LLM can flip polarity ("what's the opposite of LOW_PE_RATIO?") without guessing
  • Per-scan instrument map — — the catalog knows which scan applies to STK, ETF, OPT, BOND, etc. The LLM stops sending Refinitiv scans to bond instruments and getting empty results
  • Filter catalog — — separate typed map of the numeric filters (priceAbove, peRatioBelow, divYieldAbove, growthRateAbove, avgVolumeAbove, marketCapAbove, …) grouped by category, with per-instrument applicability notes
  • News + screeners in one tool surface — — same connector, same auth, same conversation. The LLM can intersect a scan result with recent headlines or upcoming earnings without context-switching
  • Two auth modes — — full OAuth 2.1 (DCR + PKCE + well-knowns) for Claude.ai custom connectors, plus a static bearer token for everything else. Same server, same tools

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

What the assistant can call

Once IBKR Portfolio Builder is connected, these are the calls the assistant has available:

  • ib_account_summary — NetLiquidation / BuyingPower / TotalCashValue / AvailableFunds / UnrealizedPnL for the connected paper or live account
  • ib_positions — Open positions across managed accounts, with quantity / avg cost / mark-to-market / unrealized PnL
  • ib_open_orders — Currently working orders with status, filled / remaining quantity, average fill price
  • ib_trades — Recent executed fills (days_back window, IBKR caps history ~7 days)
  • ib_price_snapshot — Current bid / ask / last / high / low / volume for a US stock. Surfaces IBKR market-data restriction messages clearly
  • ib_price_history — OHLCV bars for any duration / bar size (1 day, 1 hour, 5 mins, ...). Always works regardless of market-data subscription
  • ib_search_contracts — Fuzzy-search IBKR's contract database by name / partial ticker
  • ib_contract_details — Full contract metadata — long_name, industry, category, subcategory, trading hours, valid exchanges. The hook for sector-aware top-down screening.
  • ib_scan_catalog — The typed scan catalog. Filter by category, strategy, instrument, free-text query; optionally return the full list of available categories +
  • ib_filter_catalog — Filter parameter codes grouped by category (price, volume, market_cap, fundamentals, technical, options), with an instrument applicability note
  • ib_screener_codes — Substring search over the raw scan-parameters.xml codes (legacy / fallback). Useful for newer vendor codes not yet in the curated catalog
  • ib_screener — Run an IBKR scan — pass scan_code, instrument, location, optional price / volume filters. Returns rank + ticker + exchange

Configuration and credentials

You will need 3 environment variables: STATIC_BEARER_TOKEN, PUBLIC_BASE_URL, TUNNEL_ID. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch IBKR Portfolio Builder.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the ibkr portfolio builder mcp server does with a few real requests.

Choosing this one

Plenty of AI and media services servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. IBKR Portfolio Builder's toolset — ib_account_summary, ib_positions, ib_open_orders and 11 more — is a fair guide to whether it matches your workflow. It is maintained by adwiteeymauriya; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
ib_account_summaryNetLiquidation / BuyingPower / TotalCashValue / AvailableFunds / UnrealizedPnL for the connected paper or live account.
ib_positionsOpen positions across managed accounts, with quantity / avg cost / mark-to-market / unrealized PnL.
ib_open_ordersCurrently working orders with status, filled / remaining quantity, average fill price.
ib_tradesRecent executed fills (days_back window, IBKR caps history ~7 days).
ib_price_snapshotCurrent bid / ask / last / high / low / volume for a US stock. Surfaces IBKR market-data restriction messages clearly.
ib_price_historyOHLCV bars for any duration / bar size (1 day, 1 hour, 5 mins, ...). Always works regardless of market-data subscription.
ib_search_contractsFuzzy-search IBKR's contract database by name / partial ticker.
ib_contract_detailsFull contract metadata — long_name, industry, category, subcategory, trading hours, valid exchanges. **The hook for sector-aware top-down screening.**
ib_scan_catalogThe typed scan catalog. Filter by category, strategy, instrument, free-text query; optionally return the full list of available categories + strategies via list_meta=true.
ib_filter_catalogFilter parameter codes grouped by category (price, volume, market_cap, fundamentals, technical, options), with an instrument applicability note.
ib_screener_codesSubstring search over the raw scan-parameters.xml codes (legacy / fallback). Useful for newer vendor codes not yet in the curated catalog.
ib_screenerRun an IBKR scan — pass scan_code, instrument, location, optional price / volume filters. Returns rank + ticker + exchange.
ib_news_providersList subscribed IBKR news providers (Briefing.com, Dow Jones, etc.).
ib_news_for_symbolFetch headlines for a US stock across all subscribed providers. Headlines only; surfaces a clear notice field when the account lacks historical-news entitlement.

Configuration

VariableDescriptionRequired
STATIC_BEARER_TOKENCredential the server authenticates with.Yes
PUBLIC_BASE_URLEndpoint or connection string the server talks to.Yes
TUNNEL_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use IBKR Portfolio Builder to ib account summary.
  • Use IBKR Portfolio Builder to ib positions.
  • Use IBKR Portfolio Builder to ib open orders.

Frequently asked questions

It connects IBKR Portfolio Builder to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (ib_account_summary, ib_positions, ib_open_orders, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with IBKR Portfolio Builder directly.