IBKR TWS MCP Server
by Ricaardo
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IB_HOST | No | IB Gateway or TWS host | 127.0.0.1 |
| IB_PORT | No | IB Gateway or TWS port (TWS sim: 7497, TWS live: 7496, Gateway sim: 4002, Gateway live: 4001) | 7497 |
| MCP_HOST | No | Host for HTTP transport | 0.0.0.0 |
| MCP_PORT | No | Port for HTTP transport | 8765 |
| LOG_LEVEL | No | Log level (debug, info, warn, error) | info |
| IB_CLIENT_ID | No | Unique client ID for the connection | 1 |
| IB_READ_ONLY | No | Set to true to prevent trading actions | true |
| IB_ACCOUNT_ID | No | Account ID (auto-detected if left empty) | |
| MCP_TRANSPORT | No | Transport protocol (stdio or http) | stdio |
| IB_REALTIME_DATA | No | Enable real-time market data subscription (requires market data subscription) | false |
| RISK_MAX_ORDER_QTY | No | Maximum order quantity | 1000 |
| RISK_SYMBOL_DENYLIST | No | Comma-separated symbols to block trading | |
| RISK_DAILY_LOSS_LIMIT | No | Daily loss limit | 10000 |
| RISK_SYMBOL_ALLOWLIST | No | Comma-separated symbols to allow only (empty = no restriction) | |
| RISK_MAX_ORDER_NOTIONAL | No | Maximum order notional value | 100000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessSyncing