Skip to main content
Glama
code-rabi

Interactive Brokers MCP Server

by code-rabi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IB_USERNAMENoYour Interactive Brokers username (required when IB_HEADLESS_MODE is true)
IB_HEADLESS_MODENoEnable headless mode for automated environments or when you prefer not to use a browser for authenticationfalse
IB_PASSWORD_AUTHNoYour Interactive Brokers password (required when IB_HEADLESS_MODE is true)

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription
authenticateC

Authenticate with Interactive Brokers. Usage: { "confirm": true }.

get_account_infoC

Get account information and balances. Usage: { "confirm": true }.

get_positionsC

Get current positions. Usage: {} or { "accountId": "<id>" }.

get_market_dataB

Get real-time market data. Usage: { "symbol": "AAPL" } or { "symbol": "AAPL", "exchange": "NASDAQ" }.

place_orderB

Place a trading order. Examples:

  • Market buy: { "accountId":"abc","symbol":"AAPL","action":"BUY","orderType":"MKT","quantity":1 }

  • Limit sell: { "accountId":"abc","symbol":"AAPL","action":"SELL","orderType":"LMT","quantity":1,"price":185.5 }

  • Stop sell: { "accountId":"abc","symbol":"AAPL","action":"SELL","orderType":"STP","quantity":1,"stopPrice":180 }

  • Suppress confirmations: { "accountId":"abc","symbol":"AAPL","action":"BUY","orderType":"MKT","quantity":1,"suppressConfirmations":true }

get_order_statusC

Get the status of a specific order. Usage: { "orderId": "12345" }.

get_live_ordersA

Get all live/open orders for monitoring and validation. Usage: {} for all accounts or { "accountId": "<id>" } for a specific account. This is the recommended way to validate that market orders were executed successfully after placing them.

confirm_orderB

Manually confirm an order that requires confirmation. Usage: { "replyId": "742a95a7-55f6-4d67-861b-2fd3e2b61e3c", "messageIds": ["o10151", "o10153"] }.

get_alertsC

Get all trading alerts for an account. Usage: { "accountId": "<id>" }.

create_alertC

Create a new trading alert. Usage: { "accountId": "<id>", "alertRequest": { "alertName": "Price Alert", "conditions": [{ "conidex": "265598", "type": "price", "operator": ">", "triggerMethod": "last", "value": "150" }] } }.

activate_alertC

Activate a previously created alert. Usage: { "accountId": "<id>", "alertId": "<alertId>" }.

delete_alertC

Delete an alert. Usage: { "accountId": "<id>", "alertId": "<alertId>" }.

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/code-rabi/interactive-brokers-mcp'

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