MCP.so
登录

Interactive Brokers API FastMCP Server

@karimQuant

关于 Interactive Brokers API FastMCP Server

Interactive Brokers API Multi-Client Protocol Server

基本信息

分类

开发工具

运行时

python

传输方式

stdio

发布者

karimQuant

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "ibapi-mcp-server": {
      "command": "python",
      "args": [
        "server.py"
      ]
    }
  }
}

工具

1

Retrieve your current portfolio positions and account summary

概览

What is Interactive Brokers API FastMCP Server?

A middleware server that connects to Interactive Brokers Gateway and exposes its functionality through the FastMCP framework, allowing LLMs like Claude to interact with your IB account, retrieve portfolio information, and potentially execute trades.

How to use Interactive Brokers API FastMCP Server?

Install prerequisites (Python 3.11+, IB Gateway running, IB account with API access), then start the server using python server.py (stdio), python server.py sse (SSE), or fastmcp run server.py. For development with a testing environment, use fastmcp dev server.py. Connect client applications like Claude Desktop to the server.

Key features of Interactive Brokers API FastMCP Server

  • Connects to Interactive Brokers Gateway via the official IB API
  • Supports multiple simultaneous client connections through FastMCP
  • Exposes IB functionality as MCP tools and resources
  • Provides connection status monitoring
  • Offers error handling and logging

Use cases of Interactive Brokers API FastMCP Server

  • Query current portfolio positions and account summary using the get_portfolio_tool
  • Enable LLMs to retrieve and analyze IB account data in real time
  • Execute trades (potential use case) via the IB API through LLM interactions
  • Monitor IB Gateway connection status via the ibgateway resource

FAQ from Interactive Brokers API FastMCP Server

What are the prerequisites to run the server?

Python 3.11+, Interactive Brokers Gateway installed and running, and an IB account with API access enabled.

How do I start the server?

Run python server.py for stdio transport, python server.py sse for SSE, or python server.py sse port=9000 for a custom port. Alternatively, use the FastMCP CLI: fastmcp run server.py or fastmcp dev server.py.

What tools does the server provide?

The server provides a get_portfolio_tool to retrieve your current portfolio positions and account summary.

How does the server connect to Interactive Brokers?

It connects to the Interactive Brokers Gateway via the official IB API.

What transport options are supported?

The server supports stdio and SSE (Server-Sent Events) transport. SSE can be used with a custom port if desired.

评论

开发工具 分类下的更多 MCP 服务器