Give your AI assistant a supervised window into your Interactive Brokers account — balances, positions, live quotes and orders.
Community-built local MCP server that bridges Interactive Brokers to AI assistants: account balances, positions, real-time quotes, order placement and Flex Queries. Exposed over MCP by the ibkr mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
Community-built local MCP server that bridges Interactive Brokers to AI assistants: account balances, positions, real-time quotes, order placement and Flex Queries.
Everything the assistant can do here goes through one of these:
get_account_info — Return account identity, balances and summary figures for the connected IB accountget_positions — List current holdings together with quantity and profit-and-loss detailget_market_data — Fetch real-time market data for one or more symbolsplace_order — Submit a market, limit or stop order. Absent from the tool list when read-only mode is enabledget_order_status — Check the execution state of a previously submitted orderget_live_orders — Enumerate all live and open orders currently working in the accountget_flex_query — Execute an IB Flex Query and return the resulting statement; the query is auto-saved for later reuselist_flex_queries — Show every Flex Query the server has remembered from earlier runsforget_flex_query — Remove a saved Flex Query from the server's memoryInstallation goes through your MCP client rather than a global install: point it at interactive-brokers-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
You will need 8 environment variables: IB_PAPER_TRADING, IB_READ_ONLY_MODE, IB_HEADLESS_MODE, IB_USERNAME, IB_PASSWORD_AUTH, IB_FLEX_TOKEN, IB_TOTP_SECRET, IB_FORCE_STANDALONE_GATEWAY. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Node.js 18+ and an Interactive Brokers account (paper or live). The bundled IB Gateway and JRE cover mainstream platforms; Alpine-based containers download a musl JRE on first run.
Among the payments and commerce options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. IBKR's toolset — get_account_info, get_positions, get_market_data and 6 more — is a fair guide to whether it matches your workflow. It is maintained by code-rabi; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against IBKR's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
Ask for a plain-language rundown of holdings, concentration and unrealised P&L instead of exporting a CSV and pivoting it by hand.
Run a saved Flex Query and have the assistant summarise realised gains, commissions or a month of fills without you touching Account Management.
Point the server at a paper account and let an agent practise order construction and status polling where mistakes cost nothing.
Have an assistant enumerate working orders and flag anything stale or unexpectedly unfilled during a session.
| Tool | What it does |
|---|---|
| get_account_info | Return account identity, balances and summary figures for the connected IB account. |
| get_positions | List current holdings together with quantity and profit-and-loss detail. |
| get_market_data | Fetch real-time market data for one or more symbols. |
| place_order | Submit a market, limit or stop order. Absent from the tool list when read-only mode is enabled. |
| get_order_status | Check the execution state of a previously submitted order. |
| get_live_orders | Enumerate all live and open orders currently working in the account. |
| get_flex_query | Execute an IB Flex Query and return the resulting statement; the query is auto-saved for later reuse. |
| list_flex_queries | Show every Flex Query the server has remembered from earlier runs. |
| forget_flex_query | Remove a saved Flex Query from the server's memory. |
{
"mcpServers": {
"interactive-brokers": {
"command": "npx",
"args": ["-y", "interactive-brokers-mcp"],
"env": {
"IB_PAPER_TRADING": "true",
"IB_READ_ONLY_MODE": "true"
}
}
}
}Node.js 18+ and an Interactive Brokers account (paper or live). The bundled IB Gateway and JRE cover mainstream platforms; Alpine-based containers download a musl JRE on first run.
| Variable | Description | Required |
|---|---|---|
| IB_PAPER_TRADING | Route the session to your Interactive Brokers paper account instead of the live one. Set this first.e.g. true | Optional |
| IB_READ_ONLY_MODE | Disables order placement so the server can only read account, position and market data.e.g. true | Optional |
| IB_HEADLESS_MODE | Authenticate with stored credentials instead of opening a browser window for the OAuth flow.e.g. true | Optional |
| IB_USERNAME | Interactive Brokers username, required only when headless mode is enabled.e.g. your_ib_username | Optional |
| IB_PASSWORD_AUTH | Interactive Brokers password used by headless authentication. Keep it out of version control.e.g. your_ib_password | Optional |
| IB_FLEX_TOKEN | Flex Web Service token generated in IB Account Management; needed for the Flex Query tools.e.g. 123456789012345678901234 | Optional |
| IB_TOTP_SECRET | TOTP seed used by the automated two-factor override strategy. Review the project's 2FA risk notes before enabling. | Optional |
| IB_FORCE_STANDALONE_GATEWAY | Skip discovery of unrelated local gateways and always use the bundled one.e.g. true | Optional |
Payments infrastructure meets AI — customers, invoices, subscriptions and current API docs from Stripe's server.
Build for Shopify with current APIs — the official Dev MCP server for schema-accurate storefront and admin code.
Invoices, payments and disputes through PayPal's official server — commerce operations by conversation.
Turn software procurement research into a conversation — search, compare, and evaluate Marketplace listings.
Airwallex docs, API references and a live sandbox, wired straight into your coding agent.
A full federal and state 1040 calculation pipeline exposed as MCP tools.