Skip to main content
Glama
lzt-dev-mcp

lzt-dev-mcp

by open-lzt

lzt-mcp

MCP-сервер для экосистемы lolzteam/lzt.market: тестовые запросы к API (testnet по умолчанию, прод заблокирован без явного токена), управление сценариями lzt-flow, управление подписками/событиями lzt-eventus.

uv sync --extra dev
scripts/run.sh

Документация для AI-агентов — карта модулей и инварианты, читать перед исходниками.

Установка

uv sync --extra dev

pylzt и lzt-testnet — git-зависимости (tool.uv.sources в pyproject.toml), обе тянутся с ветки main репозиториев open-lzt/pylzt и open-lzt/lzt-testnet. Без --extra dev lzt-testnet не ставится и pytest -m e2e не соберётся.

Related MCP server: amoCRM MCP Server

Подключение к MCP-клиенту

.mcp.json (или конфиг Claude Desktop) — cwd указывает на абсолютный путь до этого репозитория:

{
  "mcpServers": {
    "lzt-mcp": {
      "command": "uv",
      "args": ["run", "python", "-m", "lzt_dev_mcp"],
      "cwd": "/absolute/path/to/lzt-mcp"
    }
  }
}

По умолчанию сервер поднимается на транспорте stdio (scripts/run.sh делает то же самое). Для streamable HTTP:

uv run python -m lzt_dev_mcp --http --host 127.0.0.1 --port 8770

Инструменты

29 инструментов, зарегистрированы в server.py из четырёх групп:

Тестирование запросов (lzt_dev_mcp.testing)

Инструмент

Что делает

list_methods(namespace=None, search=None)

Список методов API pylzt с фильтром по namespace/поиску

get_method_schema(method_name)

Поля запроса метода + имя модели ответа

get_model_schema(model_name)

JSON Schema модели ответа по имени

send_request(method_name, params, target="testnet", token=None)

Реальный запрос: testnet по умолчанию, прод — под гвардом

describe_api(query)

Полнотекстовый поиск по каталогу методов

Flow (lzt_dev_mcp.flow)

Инструмент

Что делает

list_flows()

Список flow текущего тенанта

get_flow(flow_id)

Полная спецификация flow по id

create_flow(spec)

Создать flow из FlowSpec

export_flow(flow_id)

Экспорт flow как версионированного конверта FlowSpec

import_flow(envelope)

Импорт flow из экспортированного конверта (гейт: компиляция + dry-run)

compile_flow(flow_id)

Компиляция flow в неизменяемый FlowIR

list_catalog()

Каталог узлов lzt-flow (типы action/logic/trigger)

list_dynamic_methods(facade)

Методы фасада pylzt, доступные как динамические узлы flow

get_dynamic_method(facade, method)

Параметры и форма возврата одного динамического метода

create_run(req)

Запуск скомпилированного flow (идемпотентно по run_key)

list_runs()

Список ранов текущего тенанта

get_run(run_id)

Текущий статус рана

get_run_trace(run_id)

Трейс выполнения рана по узлам

Вспомогательные (lzt_dev_mcp.helpers)

Инструмент

Что делает

get_rate_limits()

Опубликованные лимиты запросов по RateClass

get_error_catalog()

Типизированные классы ошибок pylzt с их аргументами

get_testnet_status()

Доступен ли настроенный инстанс lzt-testnet

События (lzt_dev_mcp.eventus)

Инструмент

Что делает

list_subscriptions()

Список подписок lzt-eventus (гейт админ-ключом)

create_subscription(spec)

Новая подписка (webhook/websocket/sse/polling)

poll_pending_events(subscription_id, event_type=None, limit=100)

Опрос ожидающих событий подписки на polling-транспорте

confirm_read(subscription_id, up_to_seq)

Зафиксировать прогресс чтения подписки до seq

get_event_types()

Каталог типов событий, на которые можно подписаться

register_token_account(spec)

Регистрация токен-аккаунта lzt-eventus

list_token_accounts()

Список токен-аккаунтов (гейт админ-ключом)

get_eventus_status()

Доступен ли настроенный инстанс lzt-eventus

CRUD в группах Flow и События неполный не случайно: lzt-flow и lzt-eventus сами не предоставляют update/delete для flow и подписок — инструменты отражают их REST API один в один, ничего сверху не достроено.

Гард прода

send_request(target="prod") без явного непустого token всегда бросает ProdBlocked (errors.py) — фолбэка через переменные окружения нет и не будет: config.py намеренно не содержит настройки allow_prod, чтобы не было второго, более слабого ответа на тот же вопрос. Прод-клиент собирает client_factory.build_client:

if target == "prod":
    if not token:
        raise ProdBlocked()
    return Client([token])

target="testnet" (значение по умолчанию) без настроенного LZT_DEV_MCP_TESTNET_BASE_URL бросает TestnetUnavailable, а не тихо уходит на прод.

Конфигурация

Переменные окружения с префиксом LZT_DEV_MCP_ (config.py, Settings):

Переменная

Дефолт

Назначение

LZT_DEV_MCP_TESTNET_BASE_URL

не задан

Куда бьёт send_request(target="testnet") и get_testnet_status()

LZT_DEV_MCP_LZT_FLOW_BASE_URL

http://127.0.0.1:8000

REST API lzt-flow для группы Flow

LZT_DEV_MCP_LZT_FLOW_API_KEY

не задан

X-API-Key для мутирующих маршрутов lzt-flow (compile_flow, create_run, create_flow, import_flow)

LZT_DEV_MCP_LZT_EVENTUS_BASE_URL

http://127.0.0.1:27543

REST API lzt-eventus для группы События

LZT_DEV_MCP_LZT_EVENTUS_ADMIN_API_KEY

не задан

Админ-ключ для маршрутов lzt-eventus: подписки, токен-аккаунты

.env.example в репозитории задаёт только первые три переменные — lzt-eventus работает с дефолтным base_url без ключа, пока не нужны админ-маршруты.

Разработка

uv run ruff check .
uv run ruff format --check .
uv run mypy src
uv run pytest -q              # юнит-тесты, e2e пропускаются (маркер `e2e` в pyproject.toml)
uv run pytest -m e2e -q       # нужен запущенный lzt-testnet + dev-инстанс lzt-flow

.github/workflows/ci.yml гоняет тот же набор (ruff check, ruff format --check, mypy, pytest) на каждый push в main и на каждый PR.

Экосистема

Лицензия

MIT

Available Tools

29 tools
compile_flowC

Compile a flow into an immutable FlowIR.

Inputs: flow_id (required). Returns: flow_ir_id, node_count

confirm_readB

Confirm read progress for a polling-transport subscription up to a seq.

Inputs: up_to_seq (required), subscription_id (required). Returns: last_seq, subscription_id

create_flowC

Create a new lzt-flow flow from a FlowSpec.

Inputs: spec (required). Returns: flow_id

create_runB

Start a run of a compiled flow (idempotent on run_key).

Inputs: req (required). Returns: run_id, status

create_subscriptionB

Create a new lzt-eventus subscription (webhook/websocket/sse/polling).

Inputs: spec (required). Returns: ctx, scope, active, secret, +6 more

describe_apiC

Search the method catalog by a free-text query.

Inputs: query (required). Returns: result

export_flowB

Export a flow as a versioned FlowSpec envelope.

Inputs: flow_id (required). Returns: flow, schema_version

get_dynamic_methodC

Describe one dynamic facade method's params and return shape.

Inputs: facade (required), method (required). Returns: name, params, returns

get_error_catalogA

List pylzt's typed error classes with their carried args.

Inputs: no named parameters. Returns: result

get_event_typesA

List lzt-eventus's subscribable event-type catalog.

Inputs: no named parameters. Returns: result

get_eventus_statusA

Check whether the configured lzt-eventus instance is reachable.

Inputs: no named parameters. Returns: ok

get_flowB

Get a flow's full spec by id.

Inputs: flow_id (required). Returns: name, spec, flow_id

get_method_schemaB

Get a method's declared request fields and response model name.

Inputs: method_name (required). Returns: name, fields, returning, required_fields

get_model_schemaB

Get a response model's JSON Schema by name.

Inputs: model_name (required). Returns: object

get_rate_limitsB

List pylzt's published per-RateClass request ceilings.

Inputs: no named parameters. Returns: result

get_runC

Get a run's current status.

Inputs: run_id (required). Returns: run_id, status

get_run_traceC

Get a run's per-node execution trace.

Inputs: run_id (required). Returns: result

get_testnet_statusA

Check whether the configured lzt-testnet instance is reachable.

Inputs: no named parameters. Returns: reachable, latency_ms

import_flowC

Import a flow from an exported envelope (compile+dry-run gated).

Inputs: envelope (required). Returns: name, flow_id

list_catalogA

List lzt-flow's node catalog (action/logic/trigger types).

Inputs: no named parameters. Returns: result

list_dynamic_methodsC

List pylzt facade methods usable as dynamic flow nodes.

Inputs: facade (required). Returns: result

list_flowsA

List lzt-flow flows for the current tenant.

Inputs: no named parameters. Returns: result

list_methodsB

List pylzt API methods, optionally filtered by namespace/search.

Inputs: search, namespace. Returns: result

list_runsB

List runs for the current tenant.

Inputs: no named parameters. Returns: result

list_subscriptionsA

List lzt-eventus subscriptions (admin-key gated).

Inputs: no named parameters. Returns: result

list_token_accountsA

List lzt-eventus token accounts (admin-key gated).

Inputs: no named parameters. Returns: result

poll_pending_eventsC

Poll pending events for a polling-transport subscription.

Inputs: subscription_id (required), limit, event_type. Returns: items, drained, next_seq, committed, +2 more

register_token_accountC

Register a new lzt-eventus token account.

Inputs: spec (required). Returns: token, active, metadata, account_id, +2 more

send_requestC

Send a real pylzt request; defaults to testnet, prod requires a token.

Inputs: params (required), method_name (required), token, target. Returns: body, status, elapsed_ms

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 29 tools

    Disambiguation4/5

    Most tools cleanly target distinct resources (flows, runs, subscriptions, schemas), but a few pairs could confuse an agent: list_methods vs describe_api both surface API catalog information, and get_method_schema vs get_dynamic_method both describe method inputs/outputs. Overall, descriptions and naming help separate the main workflows.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern: list_*, get_*, create_*, import_*, export_*, send_*, poll_*, confirm_*, register_*. The naming is uniform across the pylzt, lzt-flow, and lzt-eventus subdomains, making the tool set predictable and easy to navigate.

    Tool Count4/5

    At 29 tools, this is on the heavier side, but the server covers three distinct subsystems (pylzt, lzt-flow, lzt-eventus), each with a reasonable set of operations. The count feels justified for the stated purpose, though a few introspection helpers could potentially be consolidated.

    Completeness4/5

    The server provides strong lifecycle coverage: flows can be listed, created, imported, exported, compiled, and run; subscriptions can be created, listed, polled, and confirmed; API introspection covers methods, schemas, rate limits, and errors. Minor gaps like updating or deleting flows/subscriptions exist, but agents can likely work around them.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      An MCP (Model-Controller-Processor) server for accessing League of Legends client data. This server provides a collection of tools that communicate with the League of Legends Live Client Data API to retrieve in-game data.
      12
      12
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides 36 tools for interacting with the amoCRM (Kommo) API v4, covering leads, contacts, companies, and tasks. It supports full entity lifecycles, account analytics, and bulk operations with integrated OAuth 2.0 and rate limiting.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server providing access to Lolzteam Market and Forum APIs with 271 tools for account trading, forum interactions, and more.
      5
      MIT