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.

コメント

「開発者ツール」の他のコンテンツ