Skip to main content
Glama
datalens-dev-mcp

datalens-dev-mcp

by ADIKANT

datalens-dev-mcp

Русский · English

Публичный локальный MCP-плагин для разработки и сопровождения объектов Yandex DataLens. Версия 1.0 заменяет внутренний task workflow прямыми типизированными операциями: чтение, authoring, save/readback, publish-from-saved, backup и dependency-safe cleanup.

Плагин не является продуктом Yandex и работает только с правами текущего пользователя. Он не содержит языковую модель, Memory Bank, task compiler/journal, произвольный RPC/eval или browser-write fallback.

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

Требуется Python 3.11+.

python3 -m venv .venv
.venv/bin/python -m pip install .
.venv/bin/datalens-dev-mcp --version

Подключение stdio описано в .mcp.json. Для live-доступа задайте собственные DATALENS_ORG_ID и DATALENS_IAM_TOKEN в окружении либо в защищённом файле ${XDG_CONFIG_HOME:-~/.config}/datalens-dev-mcp/credentials.env; явный DATALENS_ENV_FILE имеет приоритет. Значения credentials никогда не возвращаются инструментами.

Related MCP server: Semantic BI MCP

Предметный маршрут

  • Inspect: точные ID, saved/published revision, pagination и прямые relations.

  • Dataset/Wizard: реальные GUID, aggregation/formula restrictions и bounded getDatasetData preview.

  • Editor: отдельные contracts для Table, Gravity, Advanced, Markdown и Selector; локальная проверка не выдаётся за browser runtime.

  • Authoring: восемь versioned recipes — KPI, time comparison, bar, dynamic matrix, weekly totals, cross-tab, native table и selector. Большой JS берётся из canonical packaged renderer и сохраняется в локальный artifact; MCP по умолчанию возвращает компактный draft_reference. Карта применяющих consumers отделяет наличие настройки от runtime-доказательства.

  • Delivery: create/update всегда заканчиваются saved readback. Publish — отдельная операция только из свежей saved revision с published readback.

  • Maintenance: snapshot export честно помечен как не доказанный full restore; cleanup требует неизменившийся exact delete set.

Порядок defaults: generic → user → project → explicit reference → explicit call. Пользовательский файл: ${XDG_CONFIG_HOME:-~/.config}/datalens-dev-mcp/authoring.json; проектный: .datalens/authoring.json.

SDK и API

Официальный datalens-sdk==3.2.0 используется для поддержанных typed операций. Точечный Public API adapter остаётся для full-state Dataset update, relations, HTML Page metadata/revision операций с exact-revision preview readback и license endpoints. MCP и публичный модуль datalens_dev_mcp.sdk вызывают одни и те же сервисы. Границы SDK, старых snapshots и HTML content описаны в совместимости SDK.

.build() и .execute() выполняют внешнюю запись. Pure authoring (dl_compile_recipe) сети не вызывает. SDK raw replace применяется только после fresh read и narrow semantic merge; серверной общей CAS/транзакции для batch не обещается.

Основные ограничения

  • Dataset и Connection не получают выдуманный publish lifecycle.

  • Wizard, Editor и QL не взаимозаменяются автоматически; update сохраняет технологию.

  • getDatasetData подтверждает Dataset-backed данные, но не Editor runtime и не published branch.

  • Browser используется read-only, когда задача требует rendered evidence, после API/readback и применимой проверки данных.

  • Неоднозначная потеря ответа не повторяет write: используется dl_operation_reconcile по известному ID/revision.

  • License revoke и общий ACL mutation не заявлены как поддержанные.

Полный tools/list возвращает закрытые JSON Schemas. Карта 62 пользовательских случаев находится в datalens_dev_mcp/schemas/capability-coverage.json. Пять bundled skills загружают только нужные references.

Разработка

.venv/bin/python -m pip install -e '.[test]'
.venv/bin/pytest -q tests/replacement
python -m build

Лицензия: Apache-2.0 для кода; дополнительные условия и атрибуции см. в NOTICE, THIRD_PARTY_NOTICES.md и LICENSES.

Available Tools

26 tools
dl_admin_assign_licensesB

Apply explicit documented license assignments; this operation does not support revoke.

Inputs: assignments (required).

dl_admin_inventoryA
Read-onlyIdempotent

Read documented license inventory and limits; report that license revoke is unsupported.

Inputs: no named parameters.

dl_auth_checkA
Read-onlyIdempotent

Run a harmless API probe and return classified secret-free authentication or scope errors; reuse a failed automatic refresh until explicit recovery.

Inputs: no named parameters.

dl_authoring_defaultsC
Read-onlyIdempotent

Resolve effective presentation for one family. For a registered recipe, recipe_contract exposes the compiler's bindings_schema, supported source routes, technology and distinct create/static/compiled-update inputs.

Inputs: family, explicit, reference, project_root.

dl_auth_refreshA

Refresh IAM once using the existing yc account/profile. By default yc may open the system external browser for its configured SSO sign-in (up to 120 seconds); cached sign-in can finish automatically. Update API/SDK credentials and verify API access without returning tokens or login URLs. Set allow_browser=false only when browser sign-in is disallowed (15-second noninteractive attempt).

Inputs: allow_browser.

dl_backup_exportC
Idempotent

Export exact object snapshots and a completeness manifest to local files; this is not a full-restore claim.

Inputs: targets (required), output_dir (required).

dl_cleanup_applyB
DestructiveIdempotent

Delete exact ordered objects from an unchanged preview. repeat_of asserts separate informed user authorization for one new attempt after an unknown delete; it never enables automatic retries.

Inputs: preview (required), confirmed_delete (required), repeat_of, budget_sec, +2 more.

dl_cleanup_previewB
Read-onlyIdempotent

Compute dependency-based preserve and delete sets without deleting anything.

Inputs: candidates (required), preserve_roots (required), budget_sec, max_provider_calls.

dl_compile_recipeA
Idempotent

Compile a typed recipe to a compact local artifact reference; never access or write DataLens. First read dl_authoring_defaults(family=recipe_id).recipe_contract for bindings_schema, source routes and distinct create/static/compiled-update inputs.

Inputs: bindings (required), recipe_id (required), reference, output_dir, +2 more.

dl_dashboard_snapshotC
Read-onlyIdempotent

Read one dashboard and only its direct dependencies; keep an optional style reference separate.

Inputs: dashboard_id (required), view, branch, fields, +5 more.

dl_dataset_previewC
Read-onlyIdempotent

Run a bounded Dataset query by exact field GUIDs; this is data evidence, not chart branch proof.

Inputs: columns (required), dataset_id (required), sort, limit, +6 more.

dl_dataset_validateA
Read-onlyIdempotent

Validate Dataset fields locally, or set provider=true to validate a saved Dataset through the provider without saving. Optional exact refresh_source_ids refresh source schemas without forcing field replacement. include_provider_state returns the full validation candidate for an explicit revision-guarded save; this is not a saved result or chart execution.

Inputs: fields, provider, dataset_id, refresh_source_ids, +1 more.

dl_editor_validateA
Read-onlyIdempotent

Validate one Editor draft or a mixed typed draft batch, including artifact references, without execution. With destination and output_dir, prepare exact typed-dashboard wire in a private local artifact (static_validity_only, zero provider calls). An Editor draft uses the observed variant and filename-keyed tabs (meta.json, params.js, etc.), not raw provider data keys. Required tabs depend on subtype; a static draft does not replace the full saved snapshot.

Inputs: draft, drafts, output_dir, destination.

dl_method_schemaC
Read-onlyIdempotent

Return the versioned backend and effect contract for one supported DataLens operation.

Inputs: method (required).

dl_object_createB

Create typed DataLens drafts or local JSON artifact references ({artifact_path: absolute path}) in dependency order, save, and read back. A typed Dataset uses top-level object_type/name/client_ref and nested dataset.connection_id/source/fields. References may override client_ref/depends_on only.

Inputs: drafts (required), destination (required), operation_id, delivery_mode.

dl_object_diffB
Read-onlyIdempotent

Read one saved object and return a compact diff without mutation. Supply patch or, for native dashboard tabs, dashboard_patch with addressed items/layout/connections. Set include_proposed=true only when the full merged snapshot is needed.

Inputs: object_id (required), object_type (required), patch, artifact_path, +4 more.

dl_object_getA
Read-onlyIdempotent

Read a known target by ID, branch and optional revision. chart (alias widget) accepts confirmed Editor/Wizard/QL subtypes and returns observed_identity; explicit subtypes remain strict. Mutations require the exact observed type. Use summary/projection for inspection, full state for preservation.

Inputs: object_id (required), object_type (required), view, branch, +2 more.

dl_object_publishB
Destructive

Publish chart or dashboard objects only from a fresh verified saved revision, then read the published branch.

Inputs: targets (required), operation_id.

dl_object_relationsA
Read-onlyIdempotent

Read direct API-visible relations: direction=from for dependencies, to (legacy default) for consumers. Completeness covers the selected pagination, not a transitive or revision-bound graph. Optional publish_targets with intended saved revisions produces a read-only selected-dependency manifest; no automatic publication.

Inputs: object_id (required), direction, max_pages, page_size, +2 more.

dl_object_revisionsA
Read-onlyIdempotent

Read one bounded provider-ordered revision page for a known entry, optionally restricted to known revision IDs. Use the returned opaque continuation unchanged. Current saved/published flags are not a multi-page snapshot; absence in limited history cannot prove a write did not apply.

Inputs: entry_id (required), rev_ids, page_size, page_token.

dl_object_updateA
Destructive

Apply narrow saved-object patches with revision checks and readback; exact no-ops do not write. For existing dashboard tabs use dashboard_patch plus expected_revision: items/globalItems keyed by id with optional namespace, group_control children via group keyed by native id, layout by i, connections by from/to, with add/update/remove and small tab metadata patches. Send only changed records, not whole tabs. Named global parameter removal uses remove_global_params. Compiled Editor updates use artifact_path. Writes retain private receipts; unknown effects are not replayed.

Inputs: changes (required), operation_id, delivery_mode.

dl_operation_getB
Read-onlyIdempotent

Read one compact modifying-operation record by exact ID.

Inputs: operation_id (required), include_detail.

dl_operation_reconcileB
Read-onlyIdempotent

Reconcile by exact target readback without replay. ACKed historical updates may resolve with unverified content; new changes require fresh CAS. Unknown effects and connection provisioning remain held. New workbook dashboard creates recover by a persisted metadata marker and full readback, without replay. investigate_create=true also investigates legacy unmarked creates by name; names or absence never establish effect.

Inputs: operation_id (required), investigate_create.

dl_server_infoA
Read-onlyIdempotent

Return active process/package identity, capability revision and installed version comparison without accessing DataLens or the project.

Inputs: no named parameters.

dl_workbook_entriesB
Read-onlyIdempotent

Discover workbook entries or establish inventory completeness across numeric pages (up to 200 per page). Retains scope, renderer subtype, typed identity and completeness. A known target uses dl_object_get directly; a partial listing cannot prove absence.

Inputs: workbook_id (required), max_pages, page_size, continuation.

dl_workbooks_listB
Read-onlyIdempotent

List DataLens workbooks with bounded pagination and an explicit completeness marker.

Inputs: max_pages, page_size, continuation.

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

    Disambiguation4/5

    Most tools have clearly distinct purposes, but a few read/validation tools (dl_object_get, dl_dashboard_snapshot, dl_object_relations; dl_editor_validate, dl_dataset_validate) target overlapping resources or operations and could be confused. The detailed descriptions help, but subtle boundaries remain.

    Naming Consistency5/5

    All tools use a consistent dl_ prefix and snake_case with a predictable domain_action pattern. Minor variations like dl_workbooks_list versus dl_object_get do not break the overall convention.

    Tool Count3/5

    26 tools is heavy for an MCP server, and the granularity (separate auth check/refresh, cleanup preview/apply, operation get/reconcile) adds cognitive load. Each tool serves a distinct step, but the set is borderline over-scoped.

    Completeness4/5

    The surface covers core DataLens development workflows: auth, discovery, CRUD, validation, publishing, cleanup, backup, and admin. Minor gaps include no explicit generic delete (cleanup_apply requires a preview) and no chart execution/preview tool.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for Apache Superset that enables AI models to manage dashboards, create charts with auto-detection, and execute SQL queries programmatically. It utilizes stateless HTTP transport to ensure compatibility with integration tools like Open WebUI.
      136 npm
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Model Context Protocol (MCP) server that gives AI assistants a safe, correct data-analyst capability over business metrics - without raw SQL improvisation.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      An AI-DevOps MCP server that gives LLMs read-only-by-default access to Kubernetes clusters, Prometheus metrics, and GitHub Actions, enabling natural language queries about infrastructure status and safe write operations with previews.
      MIT