PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP Serverscode-executioninteractive-brokers-mcp
返回「code-execution」

interactive-brokers-mcp

modelscope·@code-rabi/interactive-brokers-mcp

code-execution0下载LocalModelScope

简介

暂无描述。

MCP Server 详情

来自 ModelScope 索引

Interactive Brokers MCP Server

<div align="center"> <img src="https://www.interactivebrokers.com/images/web/logos/ib-logo-text-black.svg" alt="Interactive Brokers" width="300"> </div>

DISCLAIMER: This is an unofficial, community-developed MCP server and is NOT affiliated with or endorsed by Interactive Brokers. This software is in Alpha state and may not work perfectly.

A Model Context Protocol (MCP) server that provides integration with Interactive Brokers' trading platform. This server allows AI assistants to interact with your IB account to retrieve market data, check positions, and place trades.

<a href="https://glama.ai/mcp/servers/@code-rabi/interactive-brokers-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@code-rabi/interactive-brokers-mcp/badge" alt="Interactive Brokers Server MCP server" /> </a>

Security Notice

Showcase of Interactive Brokers MCP

Features

  • Interactive Brokers API Integration: Full trading capabilities including account management, position tracking, real-time market data, and order management (market, limit, and stop orders)
  • Flex Query Support: Execute Flex Queries to retrieve account statements, trade confirmations, and historical data. Queries are automatically remembered for easy reuse
  • Flexible Authentication: Choose between browser-based OAuth authentication or headless mode with credentials for automated environments
  • Simple Setup: Run directly with npx - no Docker or additional installations required. Includes pre-configured IB Gateway and Java runtime for all platforms

Security Notice

IMPORTANT WARNINGS:

  • Financial Risk: Trading involves substantial risk of loss. Always test with paper trading first.
  • Security: This software handles sensitive financial data. Only run locally, never on public servers.
  • No Warranty: This unofficial software comes with no warranties. Use at your own risk.
  • Not Financial Advice: This tool is for automation only, not financial advice.

Prerequisites

No additional installations required! This package includes:

  • Pre-configured IB Gateway for all platforms (Linux, macOS, Windows)
  • Java Runtime Environment (JRE) for IB Gateway
  • All necessary dependencies

You only need:

  • Interactive Brokers account (paper or live trading)
  • Node.js 18+ (for running the MCP server)

Quick Start

Add this MCP server to your Cursor/Claude configuration:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"]
    }
  }
}

When you first use the server, a web browser window will automatically open for the Interactive Brokers OAuth authentication flow. Log in with your IB credentials to authorize the connection.

Headless Mode Configuration

For automated environments or when you prefer not to use a browser for authentication, you can enable headless mode by configuring it in your MCP server configuration:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"],
      "env": {
        "IB_HEADLESS_MODE": "true",
        "IB_USERNAME": "your_ib_username",
        "IB_PASSWORD_AUTH": "your_ib_password"
      }
    }
  }
}

In headless mode, the server will automatically authenticate using your credentials without opening a browser window. This is useful for:

  • Automated trading systems
  • Server environments without a display
  • CI/CD pipelines
  • Situations where browser interaction is not desired

Important: Even in headless mode, Interactive Brokers may still require two-factor authentication (2FA). When 2FA is triggered, the headless authentication will wait for you to complete the 2FA process through your configured method (mobile app, SMS, etc.) before proceeding.

To enable paper trading, add "IB_PAPER_TRADING": "true" to your environment variables:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"],
      "env": {
        "IB_HEADLESS_MODE": "true",
        "IB_USERNAME": "your_ib_username",
        "IB_PASSWORD_AUTH": "your_ib_password",
        "IB_PAPER_TRADING": "true"
      }
    }
  }
}

Security Note: Store credentials securely and never commit them to version control. Consider using environment variable files or secure credential management systems.

Flex Query Configuration (Optional)

To use Flex Queries for retrieving account statements and historical data, you need to configure your Flex Web Service Token:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"],
      "env": {
        "IB_FLEX_TOKEN": "your_flex_token_here"
      }
    }
  }
}

How to Get Your Flex Token:

  1. Log in to Interactive Brokers Account Management
  2. Go to Settings Account Settings
  3. Navigate to Reporting Flex Web Service
  4. Generate or retrieve your Flex Web Service Token

For detailed instructions on enabling Flex Web Service, see the IB Flex Web Service Guide.

Creating Flex Queries:

  1. Go to Reports Flex Queries in Account Management
  2. Create or customize your query template
  3. Click the info icon next to your query to find its Query ID

For a complete guide on creating and customizing Flex Queries, see the IB Flex Queries Guide.

Note: When you execute a Flex Query for the first time, the MCP server automatically saves it with its name from the API. Future executions can reference the query by either its ID or its saved name.

Flex Query Features:

  • Automatic Memory: When you execute a Flex Query, it's automatically sa…

相关 MCP Servers(来自「code-execution」)

Doris模型控制面板服务

后端服务,实现了模型控制面板协议,可连接到 Apache Doris 数据库,允许用户执行 SQL 查询、管理元数据,并且有可能利用大语言模型(LLMs)完成自然语言到 SQL 的转换等任务。

@apache/doris-mcp-server

SEE文件系统MCP服务器

实现模型上下文协议(MCP)的 Node.js 服务器,用于文件系统操作,允许人工智能系统在指定的允许路径内读取、写入、编辑文件和管理目录。

@dinh-ai-system-exe-com-vn/file-system-mcp-see

twilio-labs

暂无描述。

@twilio-labs/mcp

dave-wind

暂无描述。

@dave-wind/mysql-mcp-server

sdiehl

暂无描述。

@sdiehl/sympy-mcp

go-playground-mcp

暂无描述。

@samber/go-playground-mcp

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/code-rabi-interactive-brokers-mcp/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

When you first use the server, a web browser window will automatically open for the Interactive Brokers OAuth authentication flow. Log in with your IB credentials to authorize the connection. ## Headless Mode Configuration For automated environments or when you prefer not to use a browser for authentication, you can enable headless mode by configuring it in your MCP server configuration:

基本信息

分类
金融 / code-execution
运行方式
No
许可证
MIT License
详情文件
code-rabi-interactive-brokers-mcp.md