IBKR

v1.0.0Finance & Fintechstable

Interactive Brokers MCP Server for Claude Desktop/Code

ibkrmcpai-integration
Share:
59
Stars
0
Downloads
0
Weekly
0/5

What is IBKR?

IBKR is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to interactive brokers mcp server for claude desktop/code

Interactive Brokers MCP Server for Claude Desktop/Code

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Interactive Brokers MCP Server for Claude Desktop/Code

Use Cases

Manage Interactive Brokers account through Claude Desktop.
Execute trades and monitor portfolio via MCP.
Access trading data and account information.
seriallazer

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 29, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx ibkr

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use IBKR

The IBKR MCP Server connects Claude Desktop and Claude Code to your Interactive Brokers account, exposing portfolio and trading capabilities through natural language. Built with Python and FastAPI, it runs a local REST server that bridges the MCP protocol to the IBKR API so you can query positions, account data, and market information directly from your AI assistant without switching between tools.

Prerequisites

  • Python 3.9 or higher installed on your system
  • An active Interactive Brokers account with API access enabled
  • IBKR TWS (Trader Workstation) or IB Gateway running locally
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Git to clone the repository
1

Clone the repository

Clone the IBKR MCP Server repository from GitHub to your local machine.

git clone https://github.com/seriallazer/ibkr-mcp-server.git
cd ibkr-mcp-server
2

Create and activate a virtual environment

Isolate the Python dependencies in a virtual environment to avoid conflicts with other projects.

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
3

Install dependencies

Install all required Python packages listed in requirements.txt.

pip install -r requirements.txt
4

Configure IBKR credentials

Create a .env file in the project root with your Interactive Brokers API credentials. Ensure IB TWS or IB Gateway is running and has API connections enabled on the default port (7497 for TWS paper, 7496 for TWS live).

cp .env.example .env
# Edit .env and add your IBKR API credentials
5

Start the MCP server

Launch the FastAPI-based server with uvicorn. It will be available at http://localhost:8000 and expose the API docs at /docs.

uvicorn app.main:app --reload
6

Configure Claude Desktop

Add the server to your Claude Desktop configuration file so the MCP client can connect to the running server.

IBKR Examples

Client configuration

Add this to your claude_desktop_config.json to connect Claude Desktop to the running IBKR MCP server. The server must already be running locally via uvicorn.

{
  "mcpServers": {
    "ibkr": {
      "command": "python",
      "args": ["-m", "uvicorn", "app.main:app"],
      "cwd": "/path/to/ibkr-mcp-server",
      "env": {
        "VIRTUAL_ENV": "/path/to/ibkr-mcp-server/venv"
      }
    }
  }
}

Prompts to try

Once connected, use these prompts in Claude to interact with your Interactive Brokers account.

- "Show me my current portfolio positions and their market values"
- "What is my account balance and available margin?"
- "List my open orders and their statuses"
- "What are my recent trades from the past week?"

Troubleshooting IBKR

Server fails to connect to Interactive Brokers

Ensure IB TWS or IB Gateway is running and that API connections are enabled in the settings (Edit > Global Configuration > API > Settings). Check that the port in your .env matches the TWS API port (7497 for paper trading, 7496 for live).

Import errors or missing modules when starting the server

Ensure you have activated the virtual environment before running uvicorn. Run `source venv/bin/activate` (Linux/macOS) or `venv\Scripts\activate` (Windows), then retry.

Claude Desktop cannot reach the MCP server

Verify the uvicorn server is running by visiting http://localhost:8000/docs in your browser. Make sure the cwd and virtual environment paths in your config match your actual installation directory.

Frequently Asked Questions about IBKR

What is IBKR?

IBKR is a Model Context Protocol (MCP) server that interactive brokers mcp server for claude desktop/code It connects AI assistants to external tools and data sources through a standardized interface.

How do I install IBKR?

Follow the installation instructions on the IBKR GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with IBKR?

IBKR works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is IBKR free to use?

Yes, IBKR is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "ibkr": { "command": "npx", "args": ["-y", "ibkr"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use IBKR?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides