ibkr-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ibkr-mcp-serverWhat are my current positions?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ibkr-mcp-server
MCP server for Interactive Brokers — expose your portfolio data, market quotes, trading, and analysis to any MCP-compatible AI client.
Built for international/EU investors. Supports UCITS/PRIIPs-aware analysis, multi-currency portfolios, and Estonian/EU tax context.
Features
12 Tools
Tool | Type | Description |
| read | Current positions with P&L |
| read | NAV, buying power, margin |
| read | Quick net asset value check |
| read | List pending orders |
| read | Real-time quote for any symbol |
| read | OHLCV bars (configurable period/size) |
| read | Find IBKR contracts by symbol/name |
| read | Full analysis with weights and concentration warnings |
| read | Flag positions exceeding a weight threshold |
| read | Calculate sell/buy plan for target allocation |
| write | Place a limit order (safety-gated) |
| write | Cancel an open order (safety-gated) |
All read tools are annotated with readOnlyHint=True. Write tools are annotated with destructiveHint=True and require SAFETY_PAPER_ONLY=false.
4 Resources
URI | Description |
| Live positions list |
| Account summary |
| Open orders |
| Full portfolio analysis |
4 Prompts
Prompt | Description |
| Analyze portfolio for risks and opportunities |
| Create a rebalance plan toward target allocation |
| Check concentration risk and exposure |
| Analyze tax implications (EU/Estonian context) |
Related MCP server: ib-async-mcp
Prerequisites
IB Gateway running (via Docker or standalone)
Python 3.12+ with uv
IBKR account with API access enabled
IB Gateway via Docker
docker run -d \
--name ib-gateway \
-p 4003:4003 \
-p 5900:5900 \
-e TWS_USERID=your_username \
-e TWS_PASSWORD=your_password \
-e TRADING_MODE=live \
-e TWS_PORT=4003 \
ghcr.io/gnzsnz/ib-gateway:stableApprove the 2FA prompt on IBKR Mobile after starting.
Install
git clone https://github.com/deividi86/ibkr-mcp-server.git
cd ibkr-mcp-server
cp .env.example .env
# Edit .env with your gateway host/port
uv syncConfigure in Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"ibkr": {
"command": "uv",
"args": ["run", "--directory", "/path/to/ibkr-mcp-server", "ibkr-mcp"]
}
}
}Configure in Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ibkr": {
"command": "uv",
"args": ["run", "--directory", "/path/to/ibkr-mcp-server", "ibkr-mcp"]
}
}
}Usage
Once configured, ask your AI client things like:
"What are my current positions?"
"Analyze my portfolio risk"
"Create a rebalance plan toward 70% VWCE, 20% AGGG, 10% IBC1"
"Get a quote for VWCE"
"Search for Vanguard UCITS ETFs"
Safety
Trading is disabled by default. The SAFETY_PAPER_ONLY=true environment variable blocks place_order and cancel_order. All read-only tools work regardless.
To enable live trading:
SAFETY_PAPER_ONLY=falseEven with trading enabled, only limit orders are supported — no market orders.
Environment Variables
Variable | Default | Description |
|
| IB Gateway host |
|
| IB Gateway port |
| (empty) | Account ID (optional, uses first managed account) |
|
| Block trading tools when true |
Development
uv sync --dev
uv run pytest -vLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that enables interaction with Interactive Brokers TWS/Gateway via natural language for portfolio management and market data retrieval. It provides tools for account summaries, historical data, and a secure two-step confirmation process for placing and canceling orders.Last updated6MIT
- AlicenseBqualityCmaintenanceMCP server for Interactive Brokers API, enabling account management, trading, market data, options, scanners, and news via natural language.Last updated333MIT
- Alicense-qualityDmaintenanceMCP server for Interactive Brokers TWS API that enables AI assistants to retrieve portfolio, account information, and real-time market prices.Last updated23Apache 2.0
- AlicenseAqualityFmaintenanceMCP server for Interactive Brokers API integration, enabling account management, trading, market data, and short selling analysis through Claude.Last updated835MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Hosted MCP for stocks, options, Greeks, brokers, order previews, alerts, and workflows.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dapdevsoftware/ibkr-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server