
code-rabi/interactive-brokers-mcp 是从 https://github.com/code-rabi/interactive-brokers-mcp. 导入的 MCP 候选服务器
概览
code-rabi/interactive-brokers-mcp 是从 https://github.com/code-rabi/interactive-brokers-mcp. 导入的 MCP 候选服务器
概述(AI 翻译)
免责声明:这是一个非官方的社区开发MCP服务器 且不与互动经纪人有关联或背书。本书 软件处于Alpha状态,可能无法完美运行。
一个提供交互式集成的模型上下文协议(MCP)服务器 经纪商交易平台。该服务器允许AI助手与 您的IB账户用于获取市场数据、检查仓位和下单。
🔒 安全通知
特色
- 交互式经纪商API集成:具备完整交易功能,包括账户管理、仓位跟踪、实时市场数据和订单管理(市价单、限价单和止损单)
- Flex查询支持:执行Flex查询以获取账户对账单、交易确认和历史数据。查询会自动被记住,便于重复使用。
- 灵活认证:在自动化环境中选择基于浏览器的OAuth认证或带凭证的无头模式,包括全自动TOTP 2FA覆盖。详见TOTP 2FA战略文档,了解详细配置和重要风险警告。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Interactive Brokers MCP Server
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.
🔒 Security Notice
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, including fully automated TOTP 2FA override. See TOTP 2FA Strategy Document for detailed configuration and important risk warnings.
- 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 for mainstream platforms. This package includes:
- Pre-configured IB Gateway for all platforms (Linux, macOS, Windows)
- Java Runtime Environment (JRE) for macOS, Windows, and standard Linux builds
- Automatic first-run musl JRE download for Alpine-based containers (e.g.
node:lts-alpine, supergateway) - 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"]
}
}
}
安装
npx -y interactive-brokers-mcp配置
{
"mcpServers": {
"interactive-brokers": {
"command": "npx",
"args": ["-y", "interactive-brokers-mcp"]
}
}
}