Top-down IBKR research: 468 typed screeners tagged by strategy intent, news, account access.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by IBKR Portfolio Builder.
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.
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.
Most ibkr-mcp servers expose individual lookup primitives β
get_quote,get_position,place_order. This one exposes the research workflow: a typed catalog of 468 screeners across 16 categories tagged by strategy intent (value / growth / income / momentum / quality / events / β¦), per-scan applicable instruments, inverse-pair links, and live news/account access β so an LLM can do real top-down portfolio construction (pick sectors / strategies β run scans β cross-reference with news β narrow to candidates) instead of bottoms-up ticker fishing.
I built this because the existing IBKR-MCP servers in the community treat IBKR as a "look-up-one-ticker" data source. That mirrors how most retail brokerage UIs work, but it's not how good portfolio construction actually happens.
A good top-down workflow looks like:
To do that with an LLM, the MCP server needs to expose the research vocabulary, not just the raw API. That's the gap this server fills:
Fundamentals, Price Movement, Dividends, Options & Volatility, Events & Earnings, 52/26/13 Week High-Low, ESG, Bonds, β¦) auto-tagged with 28 strategy intent tags (value, growth, quality, income, momentum_up, momentum_down, analyst, technical, gap, volatility, events, leverage, efficiency, risk_adjusted, β¦). The LLM asks "what value scans exist for US stocks?" and gets a clean, filterable answer instead of trying to guess scan codes from training data.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.STK, ETF, OPT, BOND, etc. The LLM stops sending Refinitiv scans to bond instruments and getting empty results.priceAbove, peRatioBelow, divYieldAbove, growthRateAbove, avgVolumeAbove, marketCapAbove, β¦) grouped by category, with per-instrument applicability notes.It's still an early server. The IBKR API has plenty of restrictions on what a paper account can actually see (notably historical news entitlement). But the catalog and workflow shape are production-ready, and they're the load-bearing piece for an LLM-driven research loop.
/mcp.AUTH_MODE.ghcr.io/gnzsnz/ib-gateway:stable) runs as a sibling service in this compose; paper account in read-only API mode by default.Parity with IBKR's official MCP for the 9 read-only tools (skipping the two write/order-instruction tools β see roadmap), plus the 5 screener/news/catalog tools that are this server's reason for existing.
| Tool | What it does |
|---|---|
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 + strategies via list_meta=true. |
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. |
ib_news_providers | List subscribed IBKR news providers (Briefing.com, Dow Jones, etc.). |
ib_news_for_symbol | Fetch headlines for a US stock across all subscribed providers. Headlines only; surfaces a clear notice field when the account lacks historical-news entitlement. |
ib_news_article | Fetch a single article body by provider_code + article_id. β οΈ may incur a per-article fee (Dow Jones in particular). |
Note on order placement. IBKR's official MCP also exposes
Create Order InstructionandDelete Order Instruction. This server intentionally does not β it runs ib-gateway inREAD_ONLY_API=yesmode so even a misrouted tool call cannot place an order. Order execution belongs in a separate service with its own approval gate. See the roadmap for a possible "staged-only" instruction tool that would write to a local store without ever touching IBKR.
AUTH_MODE selects which mechanisms the server accepts. The default is both.
| Mode | What's accepted | Required env |
|---|---|---|
oauth | OAuth-issued tokens only. Required for Claude.ai custom connectors. | LOGIN_PASSWORD |
bearer | A static Authorization: Bearer <token> only. Skips the OAuth dance β best for CLI clients, Claude Code, your own scripts. | STATIC_BEARER_TOKEN |
both (default) | Either OAuth tokens or the static bearer token. | At least one of LOGIN_PASSWORD or STATIC_BEARER_TOKEN. |
The OAuth endpoints (/authorize, /token, /register, /.well-known/*, /login) are always registered. In bearer mode they're inert β nothing in your README needs to point at them.
Settings β Connectors β Add custom connector β URL: https://YOUR.DOMAIN/mcp β leave OAuth client id/secret blank (Claude.ai uses DCR). When Claude.ai opens the OAuth flow, you'll be prompted for LOGIN_PASSWORD.
By default this pulls the published multi-arch image from GitHub Container Registry: ghcr.io/adwiteeymauriya/ibkr-portfolio-builder-mcp:latest. To build locally instead (e.g. when iterating on the source), run docker compose build ibkr-mcp first.
ib-gateway takes ~60β90 s to finish IBKR login after first start. Tail logs with docker logs -f ibkr-mcp-gateway.
For local-only use (bearer-token clients, no Claude.ai) this is enough β http://localhost:8000/mcp is now serving. Claude.ai custom connectors require an HTTPS URL on the public internet, so a reverse proxy with TLS in front is needed.
Pick one. Both end with a working https://your-host/mcp and a valid cert.
Option 1 β Cloudflare Tunnel (no public IP, no port forwarding). Best if the server runs on a home network or a VM behind NAT. Cloudflare gives you a hostname and TLS for free; the tunnel daemon dials out from the server to Cloudflare's edge.
~/.cloudflared/config.yml:
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ibkr-portfolio-builder)<a href="https://allmcps.com/mcp/ibkr-portfolio-builder"><img src="https://allmcps.com/api/badge/ibkr-portfolio-builder?style=directory" alt="IBKR Portfolio Builder on AllMCPs" /></a>