Skip to main content
Glama
mcp-over-quik

mcp-over-quik

by pvstekunov

mcp-over-quik

MCP-сервер для торгового терминала webQUIK Сбербанка (webquik.sberbank.ru).

Позволяет AI-агентам в Cursor подключаться к webQUIK по WebSocket-протоколу: смотреть портфель, котировки, заявки и выставлять ордера.

Каждый MCP-клиент (каждый пользователь Cursor) получает отдельную сессию webQUIK — логин и пароль передаются через tool login, а не хранятся в конфиге сервера.

Требования

  • Python 3.11+

  • Брокерский счёт Сбербанка с доступом к webQUIK

  • Логин — номер брокерского счёта (начинается с 4)

Related MCP server: IBKR TWS MCP Server

Установка

cd mcp_over_quik
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Настройка Cursor (локально, stdio)

{
  "mcpServers": {
    "webquik": {
      "command": "/absolute/path/to/mcp_over_quik/.venv/bin/mcp-over-quik"
    }
  }
}

Настройка Cursor (удалённый сервер, HTTP)

{
  "mcpServers": {
    "webquik": {
      "url": "https://webquik-sber-mcp.petrstekunov.ru/mcp"
    }
  }
}

Установка расширения (.mcpb / .dxt)

One-click bundle для Claude Desktop и других MCPB-клиентов (формат MCP Bundle):

./scripts/pack-mcpb.sh

Готовые файлы:

Откройте .mcpb в Claude Desktop (двойной клик или перетаскивание). После установки вызовите login, затем при необходимости submit_pin.

Исходники манифеста: extension/manifest.json.

Настройка Claude Code

Скачать конфиг с сервера:

curl -fsSL https://webquik-sber-mcp.petrstekunov.ru/claude/mcp.json -o .mcp.json
curl -fsSL https://webquik-sber-mcp.petrstekunov.ru/claude/CLAUDE.md -o .claude/CLAUDE.md

Каталог файлов: https://webquik-sber-mcp.petrstekunov.ru/claude/

В репозитории уже есть project-scoped конфиг .mcp.json — Claude Code подхватит его автоматически в этом проекте.

Или установить вручную:

claude mcp add-json webquik '{"type":"http","url":"https://webquik-sber-mcp.petrstekunov.ru/mcp","timeout":120000}' --scope project

Локальный stdio-сервер (без k8s):

MODE=local ./scripts/install-claude-code.sh

Проверка: claude mcp list → /mcp в сессии Claude Code.

Инструкции для агента: .claude/CLAUDE.md

После подключения обязательно вызовите login с логином и паролем своего брокерского счёта.

Инструменты (tools)

Tool

Описание

login

Вход в webQUIK (логин + пароль пользователя)

submit_pin

Ввод SMS/PIN-кода

logout

Выход и удаление сессии

session_status

Статус сессии текущего MCP-клиента

webquik_list_classes

Список классов инструментов

webquik_search_securities

Поиск бумаг

webquik_get_portfolio

Портфель

webquik_get_orders

Активные заявки

webquik_get_trades

Сделки

webquik_get_limits

Лимиты по деньгам и бумагам

webquik_get_quotes

Стакан котировок

webquik_get_security_info

Параметры инструмента

webquik_send_order

Выставить заявку

webquik_cancel_order

Снять заявку

Пример сценария

  1. login login=4XXXXXXXXXX, password=... — вход (может вернуть pin_required)

  2. submit_pin pin=123456 — если нужен SMS-код

  3. webquik_search_securities query=SBER

  4. webquik_get_quotes class_code=TQBR, sec_code=SBER

  5. webquik_send_order — лимитная или рыночная заявка

  6. logout — завершить сессию

Мультипользовательский режим

На одном MCP-сервере могут работать несколько пользователей одновременно. Сессии изолированы по MCP session ID (HTTP transport) или по локальному подключению (stdio). У каждого пользователя свой счёт webQUIK — credentials не хранятся в deployment/env сервера.

Протокол

Клиент подключается к wss://webquik.sberbank.ru/quik с subprotocol dumb-increment-protocol и обменивается JSON-сообщениями с полем msgid (как браузерный webQUIK 7.14).

SSL / сертификаты

webquik.sberbank.ru использует корпоративный CA. Если подключение падает с CERTIFICATE_VERIFY_FAILED:

  1. Положите CA-цепочку в certs/sberca-chain.pem или задайте WEBQUIK_CA_BUNDLE

  2. Для локальной отладки: WEBQUIK_SSL_VERIFY=false

Безопасность

  • Пароли передаются только в tool login и не сохраняются в конфиге сервера

  • Торговые операции могут требовать SMS-подтверждение

  • Используйте на свой риск; автор не несёт ответственности за торговые решения

Лицензия

MIT

Available Tools

14 tools
loginA

Create a personal webQUIK session for this MCP connection.

Required before any trading or market-data tools. Each user connects with their own broker account (login starts with 4). Returns pin_required if SMS confirmation is needed — then call submit_pin.

Inputs: login (required), password (required), lang. Returns: result

logoutA

Logout from webQUIK and remove this MCP connection's session.

Inputs: no named parameters. Returns: result

session_statusA

Return this MCP connection's webQUIK session state.

Inputs: no named parameters. Returns: result

submit_pinA

Submit SMS/PIN code after login returned pin_required.

Inputs: pin (required). Returns: result

webquik_cancel_orderB

Cancel an active order by order number and class code.

Inputs: class_code (required), order_number (required). Returns: result

webquik_get_limitsB

Return cash and depo limits.

Inputs: no named parameters. Returns: result

webquik_get_ordersC

Subscribe to and return active orders.

Inputs: include_stop_orders. Returns: result

webquik_get_portfolioB

Subscribe to and return client portfolio positions.

Inputs: no named parameters. Returns: result

webquik_get_quotesC

Get order book quotes for an instrument (e.g. class_code=TQBR, sec_code=SBER).

Inputs: sec_code (required), class_code (required), depth. Returns: result

webquik_get_security_infoC

Get static parameters for a security (lot size, price step, etc.).

Inputs: sec_code (required), class_code (required). Returns: result

webquik_get_tradesC

Subscribe to and return recent trades.

Inputs: no named parameters. Returns: result

webquik_list_classesA

List instrument classes available after login (e.g. TQBR for MOEX equities).

Inputs: no named parameters. Returns: result

webquik_search_securitiesB

Search securities by ticker or name within loaded class lists.

Inputs: query (required), limit, class_code. Returns: result

webquik_send_orderC

Place a new order on MOEX via webQUIK.

side: buy | sell order_type: limit | market account: trading account (e.g. L01-00000F00) client_code: broker client code

Inputs: account (required), quantity (required), sec_code (required), class_code (required), +4 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool targets a clearly distinct action or resource: session lifecycle (login, logout, session_status, submit_pin), market data (list_classes, search_securities, get_quotes, get_security_info), account data (get_portfolio, get_orders, get_trades, get_limits), and order actions (send_order, cancel_order). There is no meaningful overlap between any pair.

    Naming Consistency3/5

    Most trading/market-data tools use a consistent webquik_verb_noun pattern, but the session tools (login, logout, session_status, submit_pin) lack the prefix and mix verb-only and noun-only styles. The mixed convention is still readable but not fully predictable.

    Tool Count5/5

    14 tools is well within the ideal range and each tool earns its place for a trading integration. The set covers session, market data, account data, and order operations without redundancy.

    Completeness4/5

    Core lifecycle for trading is well covered: login/logout, session status, market data, portfolio/orders/trades/limits, and order placement/cancellation. A modify/replace order tool is a minor but noticeable gap, and there is no order-history beyond recent trades, but agents can work around these limitations.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI applications to interact with MetaTrader 5 terminals via WebSocket MCP protocol for trading operations and account management.
      4
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with Interactive Brokers through 48 tools for market data, orders, account management, and more, via the MCP protocol.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server providing financial data from Moscow Exchange and Bank of Russia, including quotes, bond metrics, interest rates, and portfolio analysis. Enables AI agents to analyze Russian financial markets through natural language.
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to operate a local financial terminal, including market data, backtesting, paper portfolio management, and news digest, through safe, gated tools over MCP.
      6
      1
      MIT