IBKR MCP setup
Figures on this page are as of 2026-09. Fees, limits and margin tiers change — check the venue's own docs before acting on a number.
Interactive Brokers offers a hosted MCP connector — no local gateway, no socket, no desktop application that has to stay logged in. That removes the constraint which makes every other IBKR integration awkward, and it makes IBKR the odd one out among the venues here: the official option is a service you authorise rather than software you run.
⚠️ IBKR returns HTTP 403 to automated retrieval on every page we tried, so the details below come from search summaries of IBKR’s own material rather than from pages we read directly. Treat them as directionally reliable and confirm on IBKR’s site before relying on any specific claim.
The hosted connector
Endpoint: https://api.ibkr.com/v1/api/mcp-public
Two ways in:
- Certified marketplaces — ChatGPT, Claude and Grok list an Interactive Brokers connector directly. Gemini is described as coming soon.
- Custom connector — any MCP-capable client (Claude Code, Cursor and others) can add the URL under “add MCP server” or “custom connector”.
The authorisation model is the interesting part:
- You log in on IBKR’s own screen. Credentials never reach the AI platform.
- You authorise a single account per authorisation.
- Revoke at Client Portal → Settings → Manage Third-Party Consents.
- Not available in IN or JP.
Access covers positions and cash balances, margin availability, realised and unrealised P&L, historical transactions, option chains, risk exposures, multi-currency balances, linked accounts and portfolio structures.
[third-party] integration reports describe roughly 34 tools, including draft
order instructions, and state that it never places orders autonomously —
every order requires your approval. We could not confirm that from IBKR
directly, so do not rely on it as a boundary. If it holds, IBKR has shipped
exactly the propose-don’t-execute pattern argued for in
why MCP needs an approval layer — as
the default, from the broker.
Those reports also mention OAuth 2.1 with PKCE and dynamic client registration,
and note IBKR’s WAF requires a User-Agent header on OAuth discovery — a likely
culprit if a client fails silently at that step. One directory lists the endpoint
without the -public suffix, which contradicts IBKR’s own pages; prefer
-public.
The community servers, and why they are harder
Every community IBKR MCP server inherits the constraint the hosted connector avoids: the TWS API is a socket to a running, logged-in desktop application, and the Client Portal Web API needs its own local gateway with daily re-authentication that IBKR does not support automating. See IBKR TWS API setup.
That said, one of them is the most interesting safety design in this whole cluster.
Read-only by construction
0xmichalis/ibkr-flex-mcp is built on the Flex Web Service — a
token-authenticated reporting API that cannot place, modify or cancel orders.
Its README states it plainly:
“Read-only by construction… There is no trading code in this server, so there is no trading surface to misconfigure. Compromise of the token exposes statement reads only — not your ability to trade.”
And on why it exists:
“Most IBKR MCP servers wrap the TWS socket or Client Portal API: they need a live, logged-in gateway and ship order-placement tools (often enabled by default). For an autonomous LLM agent that is a real-money footgun.”
That is the distinction this entire cluster turns on: safety by construction versus safety by configuration. A read-only flag can be flipped, forgotten, or wrong. An API that has no order endpoint cannot be misconfigured into having one.
Setup needs IBKR_FLEX_TOKEN and IBKR_FLEX_QUERY_ID, obtained by enabling the
Flex Web Service in Client Portal settings and creating an Activity Flex Query.
The query itself defines what the tools can see, which is a second natural
scoping layer.
Other community options
code-rabi/interactive-brokers-mcp and rcontesti/IB_MCP are Client Portal
Gateway–based with full trading, the latter running a tickler service to keep
sessions alive. Hellek1/ib-mcp is read-only over the TWS socket.
mdasif/ibkr-mcp has the richest guardrails of the trading-capable ones —
IB_READ_ONLY=true, max quantity, max notional, daily loss limit and symbol
allow/deny lists.
The control that is always available
Whatever you run, IBKR’s own Read-Only API setting still applies to anything using TWS or IB Gateway. It blocks all API trading, is available from TWS 950, and is enabled by default.
It is also the most common cause of “my orders are being rejected” on TWS. If reads work and only orders fail, check Global Configuration → API → Settings before debugging anything else — details in IBKR TWS API setup.
Worth appreciating: IBKR is the only venue in this cluster where doing nothing leaves you unable to trade. Everywhere else a freshly created key is armed the moment it exists.
Which to choose
- You want portfolio analysis with minimal setup → the hosted connector. No gateway, no daily login, credentials stay with IBKR.
- You want a guarantee rather than a setting →
0xmichalis/ibkr-flex-mcp. Read-only because the underlying API has no write path. - You need live market data or order placement locally → a TWS-based community server, and budget for keeping TWS running and logged in.
- You are automating anything unattended → re-read the daily re-authentication constraint before you design around it. It is not something a wrapper can abstract away.
FAQ
Does Interactive Brokers have an official MCP server?
Yes — a hosted connector at https://api.ibkr.com/v1/api/mcp-public, with
certified listings in ChatGPT, Claude and Grok. Unlike the community servers it
requires no local gateway: you authorise a single account through IBKR’s own
login screen, and your credentials are not passed to the AI platform.
Can the IBKR connector place trades?
Third-party integration reports say it drafts order instructions but never places orders autonomously, with every order requiring your approval. We were unable to confirm that from IBKR’s own pages, which block automated retrieval, so treat it as likely rather than guaranteed and check IBKR’s documentation before depending on it.
Do I still need TWS running?
Not for the hosted connector, which is the main practical advantage. Community servers built on the TWS API or the Client Portal Gateway do require a running, logged-in application, and the Client Portal path additionally requires daily re-authentication that IBKR does not support automating.
What is the safest IBKR MCP option?
0xmichalis/ibkr-flex-mcp, if read-only suits you. It is built on the Flex Web
Service, which cannot place, modify or cancel orders, so it is read-only by
construction rather than by configuration — there is no setting to get wrong and
no trading code to misconfigure.