Skip to main content
Glama
code-rabi

Interactive Brokers MCP Server

by code-rabi

MCP-сервер Interactive Brokers

ОТКАЗ ОТ ОТВЕТСТВЕННОСТИ: Это неофициальный MCP-сервер, разработанный сообществом, и он НЕ связан с Interactive Brokers и не поддерживается ими. Это программное обеспечение находится в альфа-версии и может работать с ошибками.

Сервер протокола контекста модели (MCP), обеспечивающий интеграцию с торговой платформой Interactive Brokers. Этот сервер позволяет ИИ-ассистентам взаимодействовать с вашим счетом IB для получения рыночных данных, проверки позиций и размещения торговых ордеров.

🔒 Уведомление о безопасности

Демонстрация Interactive Brokers MCP

Related MCP server: Interactive Brokers MCP Server

Функции

  • Интеграция с API Interactive Brokers: Полные торговые возможности, включая управление счетом, отслеживание позиций, рыночные данные в реальном времени и управление ордерами (рыночные, лимитные и стоп-ордера)

  • Поддержка Flex Query: Выполнение Flex-запросов для получения выписок по счету, подтверждений сделок и исторических данных. Запросы автоматически сохраняются для удобного повторного использования

  • Гибкая аутентификация: Выбор между OAuth-аутентификацией через браузер или безголовым (headless) режимом с использованием учетных данных для автоматизированных сред

  • Простая настройка: Запуск напрямую через npx — не требуется Docker или дополнительные установки. Включает предварительно настроенный IB Gateway и среду выполнения Java для всех платформ

Уведомление о безопасности

ВАЖНЫЕ ПРЕДУПРЕЖДЕНИЯ:

  • Финансовый риск: Торговля сопряжена с существенным риском убытков. Всегда сначала тестируйте на демо-счете (paper trading).

  • Безопасность: Это программное обеспечение обрабатывает конфиденциальные финансовые данные. Запускайте его только локально, никогда не используйте на публичных серверах.

  • Без гарантий: Это неофициальное программное обеспечение предоставляется без каких-либо гарантий. Используйте на свой страх и риск.

  • Не является финансовой консультацией: Этот инструмент предназначен только для автоматизации, а не для финансовых советов.

Предварительные требования

Дополнительная установка не требуется! Этот пакет включает:

  • Предварительно настроенный IB Gateway для всех платформ (Linux, macOS, Windows)

  • Среду выполнения Java (JRE) для IB Gateway, включая сборку musl-libc для контейнеров на базе Alpine (например, node:lts-alpine, supergateway)

  • Все необходимые зависимости

Вам понадобятся только:

  • Счет в Interactive Brokers (демо или реальный)

  • Node.js 18+ (для запуска MCP-сервера)

Быстрый старт

Добавьте этот MCP-сервер в конфигурацию Cursor/Claude:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"]
    }
  }
}

При первом использовании сервера автоматически откроется окно веб-браузера для процесса OAuth-аутентификации Interactive Brokers. Войдите в систему, используя свои учетные данные IB, чтобы авторизовать подключение.

Настройка безголового (headless) режима

Для автоматизированных сред или если вы предпочитаете не использовать браузер для аутентификации, вы можете включить безголовый режим, настроив его в конфигурации MCP-сервера:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"],
      "env": {
        "IB_HEADLESS_MODE": "true",
        "IB_USERNAME": "your_ib_username",
        "IB_PASSWORD_AUTH": "your_ib_password"
      }
    }
  }
}

В безголовом режиме сервер будет автоматически проходить аутентификацию с использованием ваших учетных данных без открытия окна браузера. Это полезно для:

  • Автоматизированных торговых систем

  • Серверных сред без графического интерфейса

  • CI/CD конвейеров

  • Ситуаций, когда взаимодействие с браузером нежелательно

Важно: Даже в безголовом режиме Interactive Brokers может потребовать двухфакторную аутентификацию (2FA). Когда срабатывает 2FA, безголовая аутентификация будет ждать, пока вы завершите процесс 2FA через настроенный вами метод (мобильное приложение, SMS и т. д.), прежде чем продолжить.

Чтобы включить демо-торговлю (paper trading), добавьте "IB_PAPER_TRADING": "true" в переменные окружения:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"],
      "env": {
        "IB_HEADLESS_MODE": "true",
        "IB_USERNAME": "your_ib_username",
        "IB_PASSWORD_AUTH": "your_ib_password",
        "IB_PAPER_TRADING": "true"
      }
    }
  }
}

Примечание по безопасности: Храните учетные данные в безопасности и никогда не добавляйте их в систему контроля версий. Рассмотрите возможность использования файлов переменных окружения или систем безопасного управления учетными данными.

Настройка Flex Query (опционально)

Чтобы использовать Flex-запросы для получения выписок по счету и исторических данных, вам необходимо настроить токен Flex Web Service:

{
  "mcpServers": {
    "interactive-brokers": {
      "command": "npx",
      "args": ["-y", "interactive-brokers-mcp"],
      "env": {
        "IB_FLEX_TOKEN": "your_flex_token_here"
      }
    }
  }
}

Как получить токен Flex:

  1. Войдите в Управление счетом Interactive Brokers

  2. Перейдите в Settings (Настройки) → Account Settings (Настройки счета)

  3. Перейдите в Reporting (Отчетность) → Flex Web Service

  4. Создайте или получите свой токен Flex Web Service

Подробные инструкции по включению Flex Web Service см. в руководстве IB Flex Web Service.

Создание Flex-запросов:

  1. Перейдите в Reports (Отчеты) → Flex Queries (Flex-запросы) в управлении счетом

  2. Создайте или настройте шаблон запроса

  3. Нажмите на значок информации рядом с вашим запросом, чтобы найти его Query ID

Полное руководство по созданию и настройке Flex-запросов см. в руководстве IB Flex Queries.

Примечание: При первом выполнении Flex-запроса MCP-сервер автоматически сохраняет его под именем из API. В будущем к запросу можно обращаться как по его ID, так и по сохраненному имени.

Функции Flex Query:

  • Автоматическая память: При выполнении Flex-запроса он автоматически сохраняется для будущего использования

  • Удобное повторное использование: Ранее использованные запросы запоминаются — не нужно постоянно копировать ID запросов

  • Понятные имена: При первом выполнении запроса можно дополнительно указать понятное имя

  • Удаление запросов: Удаляйте ненужные запросы с помощью инструмента forget_flex_query

Переменные конфигурации

Функция

Переменная окружения

Аргумент командной строки

Имя пользователя

IB_USERNAME

--ib-username

Пароль

IB_PASSWORD_AUTH

--ib-password-auth

Безголовый режим

IB_HEADLESS_MODE

--ib-headless-mode

Демо-торговля

IB_PAPER_TRADING

--ib-paper-trading

Тайм-аут аутентификации

IB_AUTH_TIMEOUT

--ib-auth-timeout

Токен Flex

IB_FLEX_TOKEN

N/A

Режим только для чтения

IB_READ_ONLY_MODE

--ib-read-only-mode

Доступные инструменты MCP

Торговля и управление счетом

Инструмент

Описание

get_account_info

Получение информации о счете и балансах

get_positions

Получение текущих позиций и P&L

get_market_data

Рыночные данные в реальном времени для символов

place_order

Размещение рыночных, лимитных или стоп-ордеров (только если отключен режим только для чтения)

get_order_status

Проверка статуса исполнения ордера

get_live_orders

Получение всех активных/открытых ордеров для мониторинга

Flex-запросы (требуется IB_FLEX_TOKEN)

Инструмент

Описание

get_flex_query

Выполнение Flex-запроса и получение выписок (автосохранение для повторного использования)

list_flex_queries

Список всех ранее использованных Flex-запросов

forget_flex_query

Удаление сохраненного Flex-запроса из памяти

Устранение неполадок

Проблемы с аутентификацией:

  • Используйте веб-интерфейс, который открывается автоматически

  • Завершите любую требуемую двухфакторную аутентификацию

  • Попробуйте режим демо-торговли, если реальная торговля не работает

Поддержка

  • Этот сервер: Откройте issue в этом репозитории.

Лицензия

Лицензия MIT — подробности см. в файле LICENSE.

Спасибо нашим участникам

Огромное спасибо всем, кто внес свой вклад в улучшение этого проекта.

Available Tools

14 tools
activate_alertA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
alertIdYes
accountIdYes

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears the full burden of behavioral disclosure. It only states 'activate' and gives a usage example. It does not describe side effects, authentication needs, idempotency, or what happens if the alert is already active. The lack of detail limits transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: one sentence and a code block. It is front-loaded with the purpose. Every part earns its place; the code block helps agent understand the exact structure expected, which is useful despite schema repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two string parameters and no output schema, the description is minimally adequate. It states the action and gives a usage example, which covers basic usage. However, it omits details like response format, error conditions, and prerequisites (e.g., alert must exist). Given the lack of annotations, it feels slightly incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no descriptions for parameters, and the schema description coverage is 0%. The description only provides a usage example with placeholders (`<id>`, `<alertId>`) but adds no semantic meaning about what these IDs represent or their format. This adds minimal value beyond the parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Activate a previously created alert.' It uses a specific verb ('activate') and resource ('alert'). The sibling tools (create_alert, delete_alert, get_alerts) are distinct, so the agent can differentiate this tool for activation only.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly mentions that the alert must be 'previously created,' providing context for when to use the tool. It includes a usage example with the required JSON structure. However, it does not specify when not to use it (e.g., if the alert is already active) or mention alternatives, but the sibling names fill some gaps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

authenticateA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
confirmYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behaviors. It only states 'Authenticate' and gives a usage example, omitting what happens upon success (e.g., session token), error states, or side effects. This is insufficient for understanding the tool's full impact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two short sentences. No extraneous information is included. Every element (action, target, usage example) serves a clear purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, no output schema), the description provides the essential action and parameter usage. However, it lacks details on return values or post-authentication state, which would be helpful for an authentication tool. It is minimally adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so partially by providing a usage example (`{"confirm": true}`) that clarifies the parameter's purpose as a confirmation flag. However, it does not explain why confirmation is required or what it safeguards against.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's action ('Authenticate') and target ('Interactive Brokers'). This is a specific verb+resource combination that distinguishes it from sibling tools like 'activate_alert' or 'place_order'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for initial authentication but provides no explicit guidance on when to use versus alternatives (e.g., re-authentication). No exclusion conditions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

confirm_orderB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
replyIdYes
messageIdsYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description only says 'manually confirm' without explaining side effects, required permissions, or what happens upon success/failure. The example only shows parameter structure, not behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise, two sentences. No unnecessary words. Could be slightly improved by separating example from usage context, but still efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks critical context: no output schema, no prerequisites, no error handling details. Given the tool modifies state (confirms order), description should be more comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%. Description provides an example mapping replyId and messageIds but does not explain their meanings or constraints beyond the schema definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb 'confirm' and resource 'order', specifying that it is for orders requiring manual confirmation. Distinguishes from sibling tools like place_order, get_order_status, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage when an order needs confirmation, but does not explicitly state when to use or avoid this tool. No mention of alternatives or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_alertC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountIdYes
alertRequestYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavior. It only says 'Create a new trading alert' with an example, but does not mention side effects (e.g., duplicate handling, permissions, or any irreversible changes). The description is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short sentence with an illustrative code block. It is front-loaded and concise, though the example is lengthy. It could be slightly more structured, but it is effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is present, and the description does not mention return values, error conditions, or behavior with optional fields. Given the nested object complexity, more context is needed for complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate. The usage example partially explains parameters (e.g., accountId, alertRequest with conditions), but many fields in the schema (e.g., alertMessage, expireTime) are not described. The example provides a concrete pattern but lacks full semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Create a new trading alert.' The usage example provides concrete context, making the action unmistakable. However, it does not differentiate from sibling tools like activate_alert or delete_alert, though those are distinct actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives (e.g., modify_alert or activate_alert). There is no mention of prerequisites, constraints, or when not to use it. A user must infer from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_alertC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
alertIdYes
accountIdYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It only states 'Delete an alert', implying a destructive action, but omits details on side effects, permissions, or reversibility.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two short sentences. It is front-loaded with the action and followed by a usage example. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 required params, no output schema), the description is insufficient. It lacks parameter semantics, usage guidelines, and behavioral details, leaving the agent with minimal decision support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, and the description only repeats the structure without explaining the purpose or acceptable values of accountId and alertId.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Delete an alert' with a verb and resource. It distinguishes from sibling tools like create_alert and activate_alert. However, it lacks context on scope or irreversibility.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., deactivating an alert). The description only provides a usage example but no situational advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_account_infoB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
confirmYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as whether confirmation is required for safety, side effects, or permissions needed. The example implies a confirmation step but does not explain its implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, concise and front-loaded with the purpose. However, it could be slightly expanded without losing conciseness to include more context or usage hints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema and annotations, the description is too brief. It does not specify what account information or balances are returned, prerequisites, or any other details necessary for an agent to use the tool confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for parameters, so the burden falls on the description. The description shows the usage format with `confirm: true`, adding minimal meaning beyond the schema's const requirement. It does not explain why confirm is needed or any constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Get account information and balances', which is a specific verb and resource. This clearly distinguishes it from sibling tools like get_positions and get_order_status, which focus on different aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a usage example but gives no guidance on when to use this tool versus alternatives. With many sibling tools, this omission makes it difficult for an AI agent to select the correct tool without additional context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_alertsC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountIdYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states that alerts are retrieved, with no mention of side effects, authentication requirements, rate limits, or behavior details. For a read operation, this is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short and front-loaded with the purpose. The usage example is clearly formatted. However, it could include more context without being overly verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description lacks completeness. It doesn't describe return values, error conditions, or pagination. For a simple parameter tool, some additional context is expected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, and the description only gives a usage example for accountId without explaining what it represents, its format, or constraints. This adds minimal meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('trading alerts'), clearly stating what the tool does and distinguishing it from sibling tools like create_alert or delete_alert.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a usage example but offers no guidance on when to use this tool versus alternatives like get_account_info or get_live_orders. No when-not-to-use context is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
accountIdNo

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must cover behavioral traits. It implies read-only but does not explicitly state safety, authentication needs, or rate limits. Lacks disclosure of side effects or limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with a usage example, no wasted words. Front-loaded with the primary purpose and immediately usable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description does not describe the return format. It covers the core functionality well but omits details on response structure and edge cases. Acceptable for a simple list tool but incomplete for richer context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates by explaining the optional 'accountId' parameter and its effect (all accounts vs. specific). Adds clear meaning beyond the schema's type-only specification.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'get' and the resource 'live/open orders' with a defined purpose 'for monitoring and validation.' It distinguishes from 'get_order_status' by focusing on live orders, though not explicitly differentiating from all siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides concrete usage examples and a specific recommendation for validating market orders after placement. Does not explicitly state when not to use or list alternatives, but the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_market_dataA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYes
exchangeNo

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It mentions 'real-time' but lacks details on rate limits, data freshness, or error handling. Behavioral transparency is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with purpose followed by examples. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter tool with no output schema, the description covers the essential purpose and usage. Could add return format or error information, but sufficient for basic understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description must compensate. It shows usage examples but adds no additional semantics beyond parameter names and types. No format or constraints explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves real-time market data, with the verb 'Get' and specific resource. It is distinct from sibling tools like place_order or get_account_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage examples showing required and optional parameters. It implies when to use the tool but does not specify when not to use or mention alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_option_chainA

Get option expirations and strikes for an underlying symbol. Usage: { "symbol": "AAPL" } or { "symbol": "AAPL", "exchange": "SMART" }.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYes
exchangeNo

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It does not disclose behavioral traits such as whether the tool is read-only, data freshness, rate limits, or what exactly is returned beyond 'expirations and strikes'. This is a significant gap for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence plus a concise code block. Purpose is front-loaded in the first sentence. Every part is essential and no extra verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with 2 parameters and no output schema, the description is minimally adequate. It specifies the core functionality and gives examples, but does not fully describe the return structure (e.g., whether it returns separate lists for calls/puts) or edge cases. Could be more complete given no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds value by providing example values ('AAPL', 'SMART') which help clarify parameter usage. However, it does not explain what 'symbol' or 'exchange' mean beyond their names, and lacks details on expected formats or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the verb 'Get' and the resource 'option expirations and strikes for an underlying symbol'. It distinguishes from sibling tools like get_market_data and get_positions, which serve different purposes. Usage examples further clarify the tool's scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit usage examples with common parameters, showing how to invoke the tool (e.g., with symbol alone or with exchange). However, no when-not-to-use or alternative tool suggestions are given, though sibling tools like resolve_option_conid exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_order_statusA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
orderIdYes

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description only states the basic functionality. It does not disclose potential behaviors such as required permissions, rate limits, or that it is a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, consisting of a single sentence and an example. It is front-loaded and wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description fails to explain the return format or any additional context about the response, leaving the agent uninformed about what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The example usage adds context for the 'orderId' parameter, but with 0% schema description coverage, the description could elaborate on the expected format or origin of the order ID.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'status of a specific order', distinguishing it from siblings like 'get_live_orders' which would return all orders.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides a concrete usage example with the correct JSON format, but does not explicitly state when to use this over other tools or mention any prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_positionsC

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountIdYes

TDQS

C2.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description fails to disclose side effects, permissions, required authentication, or what 'positions' entails. The usage examples are misleading, indicating lack of behavioral clarity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short, which is concise, but the usage examples are potentially incorrect and could be better formatted. It earns its place but is flawed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no annotations, and a single undocumented required parameter, the description is severely incomplete. It does not explain return values, error conditions, or what 'positions' means, making it inadequate for an agent to use effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description must compensate but only shows usage patterns without explaining the meaning of accountId (e.g., whose positions). The description adds minimal semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get current positions,' providing a specific verb and resource. However, it does not distinguish this tool from siblings like 'get_account_info' or 'get_alerts', which may overlap in functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage examples show both an empty object and an object with accountId, but the schema requires accountId, making the empty object invalid. No guidance is given on when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

place_orderA

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 }

  • Option buy: { "accountId":"abc","symbol":"AAPL","secType":"OPT","expiry":"JAN27","strike":200,"right":"C","action":"BUY","orderType":"LMT","quantity":1,"price":4.5 }

  • Option by conid: { "accountId":"abc","conid":123456789,"secType":"OPT","action":"BUY","orderType":"MKT","quantity":1 }

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

ParametersJSON Schema
NameRequiredDescriptionDefault
tifNo
conidNo
priceNo
rightNo
actionYes
expiryNo
strikeNo
symbolNo
secTypeNo
exchangeNo
quantityYes
accountIdYes
orderTypeYes
stopPriceNo
suppressConfirmationsNo

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It mentions suppressConfirmations but does not explain execution latency, cancellation policies, success/failure responses, or rate limits. The description lacks critical behavioral context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence followed by 6 concise examples. The examples are well-organized and add significant value without redundancy. It could be slightly more structured with a summary line, but overall it's efficient and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 15 parameters, 4 required, no output schema, and no annotations, the description covers common order types and key parameters. However, it lacks details on return values, error handling, and some parameters (exchange, tif). For the complexity, it is moderately complete but has notable omissions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% (no field descriptions), so the description must compensate. The examples effectively illustrate parameter relationships (e.g., symbol vs conid, secType and expiry for options, suppressConfirmations). However, some parameters like exchange and tif are not demonstrated, leaving minor gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Place a trading order' and provides multiple examples covering various order types (market, limit, stop, options). This makes the purpose explicit and distinguishes it from sibling tools like confirm_order or get_order_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives (e.g., confirm_order, get_order_status). Usage context is implied through examples, but there is no guidance on exclusion criteria or prerequisites (e.g., authentication or account validation).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

resolve_option_conidA

Resolve a specific option contract conid. Usage: { "symbol": "AAPL", "expiry": "JAN27", "strike": 200, "right": "C" } or add { "exchange": "SMART" }.

ParametersJSON Schema
NameRequiredDescriptionDefault
rightYes
expiryYes
strikeYes
symbolYes
exchangeNo

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It only gives a usage example, failing to mention error cases, rate limits, or any side effects. This is insufficient for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences: purpose first, then usage example. Every word is necessary; no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, no output schema, and no schema descriptions, the description is adequate but incomplete. It lacks explanation of the return value (what is a conid?), and does not cover all parameter details (e.g., strike formats, expiry patterns). The usage example partially compensates.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, but the example shows expected formats (e.g., 'JAN27' for expiry, number for strike, 'C'/'P' for right, optional exchange). This adds significant meaning beyond the schema types, though it only illustrates one format per parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool resolves a specific option contract conid, with a verb and resource. It distinguishes from siblings like get_option_chain, which returns option chains, not a single conid.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a usage example with parameter details, implying when to use it (to resolve an option conid), but lacks explicit guidance on when not to use it or alternatives among sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.24.1
    • Addedget_option_chain
    • Changedplace_order8 fields changed
      • addedInput schema / properties / conid
        Added value: +{
        +  "anyOf": [
        +    {
        +      "exclusiveMinimum": 0,
        +      "type": "number"
        +    },
        +    {
        +      "pattern": "^[0-9]+(\\.[0-9]+)?$",
        +      "type": "string"
        +    }
        +  ]
        +}
      • addedInput schema / properties / expiry
        Added value: +{
        +  "type": "string"
        +}
      • addedInput schema / properties / quantity / $ref
        Added value: +"#/properties/conid"
      • removedInput schema / properties / quantity / anyOf
        Removed value: -[
        -  {
        -    "exclusiveMinimum": 0,
        -    "type": "number"
        -  },
        -  {
        -    "pattern": "^[0-9]+(\\.[0-9]+)?$",
        -    "type": "string"
        -  }
        -]
      • addedInput schema / properties / right
        Added value: +{
        +  "enum": [
        +    "C",
        +    "P"
        +  ],
        +  "type": "string"
        +}
      • addedInput schema / properties / secType
        Added value: +{
        +  "enum": [
        +    "STK",
        +    "OPT"
        +  ],
        +  "type": "string"
        +}
      • addedInput schema / properties / strike
        Added value: +{
        +  "$ref": "#/properties/conid"
        +}
      • changedInput schema / required
        Previous value: -[
        -  "accountId",
        -  "symbol",
        -  "action",
        -  "orderType",
        -  "quantity"
        -]New value: +[
        +  "accountId",
        +  "action",
        +  "orderType",
        +  "quantity"
        +]
    • Addedresolve_option_conid
  2. 12 tool updatesv1.21.3
    • Addedactivate_alert
    • Addedauthenticate
    • Addedconfirm_order
    • Addedcreate_alert
    • Addeddelete_alert
    • Addedget_account_info
    • Addedget_alerts
    • Addedget_live_orders
    • Addedget_market_data
    • Addedget_order_status
    • Addedget_positions
    • Addedplace_order

TDQS

B3.4/5.0
Disambiguation5/5

Each tool targets a distinct action/entity: authentication, account info, alerts (create, get, activate, delete), orders (place, confirm, get live, get status), positions, and market data. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in snake_case, e.g., activate_alert, get_account_info, place_order. The naming is uniform and predictable.

Tool Count5/5

12 tools cover the core operations for a trading server: authentication, account/position queries, order management, alerts, and market data. This is well-scoped and not excessive.

Completeness3/5

Essential operations like placing and viewing orders are covered, but critical actions like canceling or modifying an order are missing. Also lacks historical market data and order history, creating notable gaps.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI models with secure access to Interactive Brokers trading data and functionality, enabling account management, market data retrieval, and trading operations through natural language interactions.
    18
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Connects AI assistants to Interactive Brokers for intelligent portfolio management, options analysis, risk monitoring, and automated trading strategy suggestions. Enables real-time account tracking, Greeks calculations, option chain analysis, and playbook-based risk adjustments through natural language.
    5
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with Interactive Brokers via the TWS API or IB Gateway to manage accounts, retrieve market data, and execute trades. It supports features like real-time market data, historical data queries, and order management for stocks and options.
    4
    -
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to trade on Interactive Brokers: check quotes, balance, positions, and execute buy/sell orders (including fractional shares by dollar amount) via the Client Portal API.
    20
    12
    MIT

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