Interactive Brokers 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., "@Interactive Brokers MCP ServerShow my current portfolio positions and account summary."
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
MCP server for Interactive Brokers Gateway — 7 tools for market data and account access via Claude.
Tools
Tool | Description |
| Historical OHLCV bars for any contract |
| Current portfolio positions and P&L |
| Account summary (balances, margin, NAV) |
| Contract lookup and details |
| Option chain pricing |
| Real-time quote snapshot |
| IBKR Gateway connection diagnostics |
Related MCP server: IBKR TWS MCP Server
Install
pip install interactive-brokers-mcpPrerequisites
IB Gateway or TWS running
API access enabled in Gateway/TWS settings
Host/port/client ID matching your environment variables
Environment Variables
Variable | Default | Description |
|
| Gateway hostname |
|
| Gateway port |
|
| API client ID |
|
| Connection timeout (seconds) |
|
| Read-only mode |
| Comma-separated account whitelist | |
| Optional cache directory override |
The package auto-loads .env from the package directory and parent.
Usage
Claude Code
claude mcp add ibkr-mcp -- ibkr-mcpOr in ~/.claude.json:
{
"mcpServers": {
"ibkr-mcp": {
"type": "stdio",
"command": "ibkr-mcp"
}
}
}Standalone
ibkr-mcp # via installed entry point
python -m ibkr.server # via moduleLicense
PolyForm Noncommercial 1.0.0
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
- AlicenseBqualityAmaintenanceEnables AI assistants to interact with Interactive Brokers trading accounts to retrieve market data, check positions, and place trades. Includes pre-configured IB Gateway and handles OAuth authentication automatically.14518212MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLM clients to interact with Interactive Brokers Trader Workstation for automated trading workflows. Supports market data retrieval, portfolio management, and order execution through the TWS API.5
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Interactive Brokers via the TWS API or IB Gateway to manage accounts, retrieve market data, and execute trades. It supports features like real-time market data, historical data queries, and order management for stocks and options.4
- AlicenseNot gradedqualityBmaintenanceEnables read-only access to Interactive Brokers data including contracts, market data, news, fundamentals, and portfolio/account information for LLM workflows and autonomous agents.17BSD 3-Clause
Related MCP Connectors
US/HK markets — 163 tools: quotes, options, orders, fundamentals, screener, IPO, alerts, DCA & grid
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Real-time market data, screeners, technical analysis & backtesting for stocks, crypto and forex.
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/henrysouchien/ibkr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server