mm-ibkr-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | Host for the streamable-http transport. Default is 127.0.0.1. | 127.0.0.1 |
| MCP_PORT | No | Port for the streamable-http transport. Default is 8001. | 8001 |
| MCP_TRANSPORT | No | MCP transport: 'stdio' (default) or 'streamable-http'. | stdio |
| MCP_AUTH_TOKEN | No | Auth token for the streamable-http transport. | |
| MM_IBKR_DATA_DIR | No | Override the data directory path. | |
| TELEGRAM_CHAT_ID | No | Telegram chat ID, required when MCP_ORDER_APPROVAL_MODE is 'telegram'. | |
| TELEGRAM_BOT_TOKEN | No | Telegram bot token, required when MCP_ORDER_APPROVAL_MODE is 'telegram'. | |
| MM_IBKR_CONFIG_PATH | No | Override the path to config.json. | |
| MM_IBKR_CONTROL_DIR | No | Override the control directory. | |
| MCP_ENABLE_ADMIN_TOOLS | No | Set to 'true' to enable admin tools (compare-and-swap control.json). | |
| MCP_ORDER_APPROVAL_MODE | No | Approval mode: 'telegram' (requires TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID) or 'yolo' (no approval). Default is 'telegram'. | telegram |
| APPROVED_UNUSED_EXPIRY_SECONDS | No | Auto-expiry for approved-but-unused approvals in seconds. Default is 600. | 600 |
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
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| healthA | Check gateway connectivity and basic runtime health. |
| get_trading_statusB | Inspect trading-control state from control.json. |
| get_schedule_statusA | Inspect the configured trading schedule window. |
| resolve_contractA | Resolve a SymbolSpec into a fully qualified IBKR contract. |
| get_quoteB | Get a market-data snapshot for a fully specified instrument. |
| get_historical_barsA | Get historical OHLCV bars for a fully specified instrument. |
| get_account_summaryB | Get balances, buying power, and margin metrics for an account. |
| get_positionsA | List open positions for an account. |
| get_pnlC | Get account P&L with per-symbol breakdown. |
| list_open_ordersA | List currently open orders on the active IBKR connection. |
| get_order_statusB | Get the latest status for a single order id. |
| get_order_set_statusB | Get aggregate status for a list of related order ids. |
| preview_orderA | Preview a single-leg or bracket order without placing it. |
| place_orderA | Place a single-leg or bracket order. Requires a clientOrderId. When MCP_ORDER_APPROVAL_MODE=telegram, an approval_id from ibkr_request_trade_approval is also required. |
| cancel_orderA | Cancel a single open order by order id. |
| cancel_order_setA | Cancel a set of related orders, such as bracket legs. |
| preview_order_basketA | Preview a basket of explicit orders without placing them. |
| create_trade_intentB | Create or return an idempotent basket-style trade intent from explicit orders. This persists the basket and optional previews before submission. |
| request_trade_intent_approvalA | Request a single Telegram approval covering a persisted trade intent. In YOLO mode, the approval is auto-approved immediately. |
| submit_trade_intentA | Submit the planned orders in a persisted trade intent. Requires a trade-intent approval when MCP_ORDER_APPROVAL_MODE=telegram. |
| get_trade_intentA | Fetch the persisted state of a trade intent and its orders. |
| list_trade_intentsB | List recent persisted trade intents with optional status filtering. |
| reconcile_trade_intentB | Refresh a trade intent against current broker order status and positions. |
| cancel_trade_intentA | Cancel all active broker orders associated with a trade intent. |
| get_option_chainC | Discover single-leg option contracts for an underlying and return a bounded list of qualified candidates. |
| get_option_snapshotA | Get quote, volatility, and greeks for a fully specified single-leg option. |
| notifyA | Send an informational notification to the operator via Telegram. No approval required; purely informational. |
| request_trade_approvalA | Send a trade approval request to the operator via Telegram. Returns an approval_id to poll with ibkr_check_approval_status. When MCP_ORDER_APPROVAL_MODE=telegram, this approval_id must be passed to ibkr_place_order. |
| request_environment_changeA | Send a request to the operator via Telegram to switch the IBKR connection between 'live' (real-money) and 'paper' (simulated) environments. Returns an approval_id — poll ibkr_check_approval_status until resolved. Once approved, you MUST use the ibkr_execute_environment_change tool with the approval_id to actually apply the change. Switching environments will automatically engage safety locks (orders disabled, dry-run enabled). |
| execute_environment_changeA | Apply an approved environment change. Provide the approval_id from ibkr_request_environment_change. This applies safety locks to control.json and switches the active connection port in config.json. The connection will automatically reconnect on the next tool call. |
| check_approval_statusB | Poll the status of a pending trade, trade-intent, or execution-unlock approval. Status values: pending | approved | denied | expired | used. |
| assess_order_impactB | Compute portfolio-level impact of a proposed order: concentration change, buying-power usage, margin impact, and max-loss estimate. Provide an OrderPreview from ibkr_preview_order for the best accuracy. |
| get_portfolio_riskB | Compute portfolio-wide risk metrics: margin utilisation, concentration by symbol, unrealised P&L, and an overall risk level. |
| check_position_limitsB | Validate a proposed order against the active agent profile's position limits. Returns passed=true when no violations are found. |
| get_agent_profileA | Load and return the active agent trading profile with its constraints. Use profile_id to fetch a specific profile, or omit to load the default. |
| validate_against_profileB | Check a proposed order against the agent's trading profile constraints. Returns passed=true and an empty violations list when the order is within limits. |
| get_session_activityA | Summarise trading activity for today's session: orders placed, filled, cancelled, and pending — with a list of the most recent orders. |
| get_audit_logA | Query the SQLite audit log. Filter by event_type, symbol, account_id, or date range. Returns up to limit entries (default 50, max 200). |
| emergency_stopA | PANIC BUTTON: cancel ALL open orders, disable order placement in control.json, and send a Telegram alert. Use only in emergency situations. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| pre_trade_checklist | Checklist for safe order preparation with human-in-the-loop approval. |
| option_contract_selection | Workflow for choosing a single-leg option contract. |
| order_review | Checklist for reviewing an order preview before placement. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| resource_status_overview | Combined health, trading status, and schedule status. |
| resource_default_account_summary | Summary for the default managed account. |
| resource_default_account_positions | Positions for the default managed account. |
| resource_open_orders | Current open orders on the active connection. |
TDQS
Scored across 39 tools
Several tool names are duplicated (preview_order, place_order, cancel_order) and approval-related tools overlap (request_trade_intent_approval vs request_trade_approval), making it hard to select the correct operation. Order intent and order status tools also cover similar territory.
Most tools use a clear snake_case verb_noun pattern, but exceptions like health, notify, and emergency_stop break the convention, and similar concepts are named inconsistently (get_option_chain vs get_option_snapshot, request_trade_intent_approval vs request_trade_approval).
At 40 listed tools, the surface is quite large for a trading server, and duplicate entries inflate the count. The breadth is justifiable for IBKR trading operations, but it feels boundary-heavy and would benefit from consolidation.
The set covers the main trading lifecycle (intents, orders, approvals, execution), market data, account positions, risk checks, environment switching, and audit logging. Missing multi-leg option discovery or order modification tools are minor gaps given the basket and cancel/re-submit capabilities.