Skip to main content
Glama
MrRolie

mm-ibkr-mcp

by MrRolie

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_HOSTNoHost for the streamable-http transport. Default is 127.0.0.1.127.0.0.1
MCP_PORTNoPort for the streamable-http transport. Default is 8001.8001
MCP_TRANSPORTNoMCP transport: 'stdio' (default) or 'streamable-http'.stdio
MCP_AUTH_TOKENNoAuth token for the streamable-http transport.
MM_IBKR_DATA_DIRNoOverride the data directory path.
TELEGRAM_CHAT_IDNoTelegram chat ID, required when MCP_ORDER_APPROVAL_MODE is 'telegram'.
TELEGRAM_BOT_TOKENNoTelegram bot token, required when MCP_ORDER_APPROVAL_MODE is 'telegram'.
MM_IBKR_CONFIG_PATHNoOverride the path to config.json.
MM_IBKR_CONTROL_DIRNoOverride the control directory.
MCP_ENABLE_ADMIN_TOOLSNoSet to 'true' to enable admin tools (compare-and-swap control.json).
MCP_ORDER_APPROVAL_MODENoApproval mode: 'telegram' (requires TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID) or 'yolo' (no approval). Default is 'telegram'.telegram
APPROVED_UNUSED_EXPIRY_SECONDSNoAuto-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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription
pre_trade_checklistChecklist for safe order preparation with human-in-the-loop approval.
option_contract_selectionWorkflow for choosing a single-leg option contract.
order_reviewChecklist for reviewing an order preview before placement.

Resources

Contextual data attached and managed by the client

NameDescription
resource_status_overviewCombined health, trading status, and schedule status.
resource_default_account_summarySummary for the default managed account.
resource_default_account_positionsPositions for the default managed account.
resource_open_ordersCurrent open orders on the active connection.

TDQS

B3.2/5.0

Scored across 39 tools

Disambiguation2/5

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.

Naming Consistency3/5

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).

Tool Count3/5

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.

Completeness4/5

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.

Maintenance

ActivitySlowing
ResponsivenessNo issues