Skip to main content
Glama
Ricaardo

IBKR TWS MCP Server

by Ricaardo

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IB_HOSTNoIB Gateway or TWS host127.0.0.1
IB_PORTNoIB Gateway or TWS port (TWS sim: 7497, TWS live: 7496, Gateway sim: 4002, Gateway live: 4001)7497
MCP_HOSTNoHost for HTTP transport0.0.0.0
MCP_PORTNoPort for HTTP transport8765
LOG_LEVELNoLog level (debug, info, warn, error)info
IB_CLIENT_IDNoUnique client ID for the connection1
IB_READ_ONLYNoSet to true to prevent trading actionstrue
IB_ACCOUNT_IDNoAccount ID (auto-detected if left empty)
MCP_TRANSPORTNoTransport protocol (stdio or http)stdio
IB_REALTIME_DATANoEnable real-time market data subscription (requires market data subscription)false
RISK_MAX_ORDER_QTYNoMaximum order quantity1000
RISK_SYMBOL_DENYLISTNoComma-separated symbols to block trading
RISK_DAILY_LOSS_LIMITNoDaily loss limit10000
RISK_SYMBOL_ALLOWLISTNoComma-separated symbols to allow only (empty = no restriction)
RISK_MAX_ORDER_NOTIONALNoMaximum order notional value100000

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/Ricaardo/ibkr-tws-mcp'

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