About Interactive Brokers MCP
Interactive Brokers MCP is an MCP server created from an Interactive Brokers Web API application. The README describes running it alongside the Flask and FastAPI apps in Docker.
Key features
- 01Run the MCP server in Docker
- 02Run Flask and FastAPI apps together
Use cases
- 01Test the MCP server with the Web API
- 02Run both web apps alongside the MCP server
MCP support
The FastMCP server is implemented in app2.py and runs on port 3100 in the Docker Compose setup. The README does not specify which trading operations it exposes.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
http://ip_address:3000/sseclaude mcp add --transport sse interactive-brokers http://ip_address:3000/sse{"mcpServers":{"interactive-brokers":{"type":"sse","url":"http://ip_address:3000/sse"}}}Open in Cursor{"servers":{"interactive-brokers":{"type":"sse","url":"http://ip_address:3000/sse"}}}Open in VS Code{"mcpServers":{"interactive-brokers":{"type":"sse","url":"http://ip_address:3000/sse"}}}{"mcpServers":{"interactive-brokers":{"serverUrl":"http://ip_address:3000/sse"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
http://ip_address:3000/sseAuth requiredTools
Details
From the project READMEInteractive Brokers Web API
Video Walkthrough
https://www.youtube.com/watch?v=CRsH9TKveLo
Requirements
- Docker Desktop - https://www.docker.com/products/docker-desktop/
Clone the source code
git clone https://github.com/hackingthemarkets/interactive-brokers-web-api.git
Bring up the container
docker-compose up
Getting a command line prompt
docker exec -it ibkr bash
app2.py
app2.py is the MCP server. It was created by converting the flask app to fastapi app first then add the FastMCP.
added port 3100 in docker-compose.yml for the mcp server.
both flask app and fastapi app can run together for testing and checking.
Setup
Need to update the ID in docker yaml file IBKR_ACCOUNT_ID: "U1234567"
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.