datalens-mcp
MCP server for the Yandex DataLens public API: 70 tools for dashboards, charts, datasets and connections
Install
npm install
npm run build
claude mcp add datalens -- node /path/to/datalens-mcp/dist/index.jsRun inside a clone of the repo, then set the environment variables.
This is third-party code. Review the repository files before installing.
What it does
Wraps nearly the whole Yandex DataLens public API as 70 MCP tools generated from the official OpenAPI spec. The agent can read and create dashboards, charts, datasets, connections, workbooks and access bindings. Delete tools are intentionally omitted, and DATALENS_READ_ONLY=1 keeps only read tools. The composite clone_entry tool copies objects server-side.
Who it is for. Analysts and BI developers who build reporting in Yandex DataLens.
Good fit when
- Understand the structure of an existing workbook, dashboard or dataset
- Clone a dashboard or chart and point it at a new dataset
- Audit access bindings and connections
- Move objects between workbooks in bulk
Not a fit when
- You need to delete objects: the server cannot
- You need to edit an existing dataset in place: the DataLens API currently rejects such edits
Example request
List all dashboards in the sales workbook and show which datasets their charts useLimitations
Needs an IAM token that lasts about 12 hours and is read once at startup, so restart the server after refreshing it. Yandex OAuth tokens are not supported. Editing existing datasets fails with DATASET_REVISION_MISMATCH on the API side; use clone_entry instead. DataLens marks dashboard and chart create and update as experimental. The confirmation policy is advisory; only read-only mode is a hard guarantee.
How to disable. Run claude mcp remove datalens or remove the datalens block from ~/.claude.json.
MCP
- Transport
- stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| DATALENS_IAM_TOKEN required, secret | IAM token from yc iam create-token, valid for about 12 hours |
| DATALENS_ORG_ID required | DataLens organization ID for the x-dl-org-id header |
| DATALENS_READ_ONLY | 1 registers read tools only |
| DATALENS_USE_YC_TOKEN | 1 mints a token via yc when using datalens-launch.sh |
| DATALENS_API_BASE | API base URL for self-hosted DataLens |
Security check
- Requires a Yandex Cloud IAM token
- Tools create and modify objects, including access bindings and public embeds
- Large responses with connection config are saved to temp files
README in short
The server runs over stdio and splits 70 tools into read, create and modify kinds with different confirmation levels. Tools are generated from the OpenAPI spec and checked by a conformance audit. The README covers IAM token auth, token auto-refresh via yc, large response handling and Claude Code setup. DataLens API limits for datasets and experimental objects are described separately.
FAQ
How do I avoid refreshing the IAM token by hand?
Launch via bin/datalens-launch.sh with DATALENS_USE_YC_TOKEN=1: it mints a fresh token with the yc CLI on every start.
What about very large responses?
If a result exceeds DATALENS_MAX_RESPONSE_CHARS, the full JSON is written to a temp file and the tool returns its path.
Does it work with self-hosted DataLens?
Yes, set DATALENS_API_BASE; it must be https, with http allowed for localhost or with DATALENS_ALLOW_INSECURE_BASE=1.
Related
166 skills for scientific work: bioinformatics, cheminformatics, clinical data, geospatial analysis and 100+ databases
Postgres Professional utility for PostgreSQL backup and recovery with incremental backups and PITR
MCP SQLite Server (npx)
MCP SQLite Server
Node.js MCP server for SQLite databases that runs via npx, no Python or uvx needed
MPSTATS skills
Claude Code Skills — MPSTATS
Official MPSTATS skills: Wildberries, Ozon and Yandex Market analytics plus product card visuals via the API