Skip to main content
Glama

Interactive Brokers MCP Server

by atilcan

IB MCP Server (Local, IB Gateway Only)

Tools:

  • get_stock_quote → price, volume

  • get_option_quote → bid, ask, last

Requirements: Python 3.10+, IB Gateway running, API enabled, port 4001, localhost allowed.

Setup:

python -m venv .venv . .venv\Scripts\Activate.ps1 pip install -r requirements.txt

Environment (defaults):

$env:IB_HOST = "127.0.0.1" $env:IB_PORT = "4001" $env:IB_CLIENT_ID = "19" $env:IB_MARKET_DATA_TYPE = "1" # 1=real-time

Run:

python -m ib_mcp.server

Cursor MCP config example:

{ "mcpServers": { "ib-mcp": { "command": "C:\\Users\\atilc\\OneDrive\\ibkrserver\\.venv\\Scripts\\python.exe", "args": ["-m", "ib_mcp.server"], "cwd": "C:\\Users\\atilc\\OneDrive\\ibkrserver", "env": { "IB_HOST": "127.0.0.1", "IB_PORT": "4001", "IB_CLIENT_ID": "19", "IB_MARKET_DATA_TYPE": "1" } } } }

If IB Gateway is closed or not logged in, the tools will fail to fetch data—open and log in, then retry.

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables real-time stock and options market data retrieval from Interactive Brokers through IB Gateway. Provides stock quotes with price and volume information, plus options quotes with bid, ask, and last price data.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/atilcan/ib-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server