Interactive Brokers API FastMCP Server
@karimQuant
About Interactive Brokers API FastMCP Server
Interactive Brokers API Multi-Client Protocol Server
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"ibapi-mcp-server": {
"command": "python",
"args": [
"server.py"
]
}
}
}Tools
1Retrieve your current portfolio positions and account summary
Overview
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.
More Developer Tools MCP servers
Huoshan Test
volcengineMCP Framework
QuantGeekDevThe Typescript MCP Framework
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
mcp-excalidraw
yctimlinMCP server and Claude Code skill for Excalidraw — programmatic canvas toolkit to create, edit, and export diagrams via AI agents with real-time canvas sync.
Grafana MCP server
grafanaMCP server for Grafana
Comments