DataLens official MCP server
datalens-mcp
The official DataLens MCP server from the development team: turns the public DataLens API into three gateway tools instead of hundreds of separate MCP tools
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- invoke_command can call any DataLens API command, including ones that change dashboards and datasets, within the IAM token's rights
- The IAM or OAuth token grants organization-level DataLens access under the user's rights
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/datalens-tech-datalens-mcpDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal
claude mcp add --transport stdio --env 'DATALENS_ORG_ID=<DATALENS_ORG_ID value>' datalens -- npx -y @datalens-tech/mcp@latestOr add to the file .mcp.json, in the project
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Run in a terminal
code --add-mcp '{"name":"datalens","type":"stdio","command":"npx","args":["-y","@datalens-tech/mcp@latest"],"env":{"DATALENS_ORG_ID":"<DATALENS_ORG_ID value>"}}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"datalens": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the servers key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Run in a terminal
codex mcp add datalens --env 'DATALENS_ORG_ID=<DATALENS_ORG_ID value>' -- npx -y @datalens-tech/mcp@latestOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.datalens]
command = "npx"
args = ["-y", "@datalens-tech/mcp@latest"]
env = { DATALENS_ORG_ID = "<DATALENS_ORG_ID value>" }If the file already exists, append the block to the end.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"datalens": {
"type": "local",
"command": [
"npx",
"-y",
"@datalens-tech/mcp@latest"
],
"environment": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcp key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the context_servers key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": [
"-y",
"@datalens-tech/mcp@latest"
],
"env": {
"DATALENS_ORG_ID": "<DATALENS_ORG_ID value>"
}
}
}
}If the file already exists, add the server inside the mcpServers key.
Keys and settings
DATALENS_ORG_IDrequired
Replace the values in angle brackets with your own. Keys never go into install links and are not stored by us.
Install and configure the yc CLI with yc init, set the DATALENS_ORG_ID environment variable, then add the server via npx -y @datalens-tech/mcp@latest in your MCP client config.
Other ways from the author
{
"mcpServers": {
"datalens": {
"command": "npx",
"args": ["-y", "@datalens-tech/mcp@latest"],
"env": {
"DATALENS_ORG_ID": "<org-id>"
}
}
}
}Requires a configured yc CLI to obtain an IAM token.
This is third-party code. Review the repository files before installing.
What it does
On startup the server fetches the public DataLens API's OpenAPI spec and turns every RPC endpoint into a callable command. Instead of registering hundreds of separate tools, which would flood the model's context, it exposes a gateway of three: list_commands lists every command with a one-line summary, describe_commands returns the full description and parameter schema for the commands you need, and invoke_command calls a command by name with parameters. Authorization against Yandex Cloud goes through the yc CLI: the server fetches an IAM token itself via yc iam create-token and refreshes it before it expires. For internal DataLens installations an OAuth token is supported instead of yc.
Who it is for. For DataLens analysts and developers who want agent access to the entire public API without parsing hundreds of separate methods.
Good fit when
- You need agent access to DataLens dashboards, charts and datasets in Yandex Cloud
- You run an internal DataLens installation and need OAuth access instead of yc
- You want to avoid flooding the model's context with hundreds of separate MCP tools
Not a fit when
- You have no yc CLI configured via yc init for the cloud setup, and no OAuth token for an internal one
- You want a ready set of named tools per operation, not a gateway of three generic commands
Example request
Find DataLens commands for working with datasets and show how to call dashboard creationLimitations
The yc-based IAM token lasts 12 hours; with a static token (DATALENS_YC_STATIC_AUTH) the user is responsible for refreshing it and restarting the server before it expires. API responses are size-limited (10 MiB for API calls, 20 MiB for OpenAPI), and data returned to the agent is marked untrusted_data and should not be treated as an instruction.
How to disable. Remove the datalens entry from mcpServers in your MCP client config.
MCP
- Transport
- stdio
- Authentication
- OAuth
| Environment variables | |
|---|---|
| DATALENS_ORG_ID required | Yandex Cloud organization id, required for the cloud installation |
| DATALENS_INSTALLATION | Installation type: cloud (default) or internal |
| DATALENS_OAUTH_TOKEN secret | OAuth token for an internal DataLens installation |
| DATALENS_YC_STATIC_AUTH | Use a static token from DATALENS_API_AUTH_HEADER instead of the yc CLI |
Security check
- invoke_command can call any DataLens API command, including ones that change dashboards and datasets, within the IAM token's rights
- The IAM or OAuth token grants organization-level DataLens access under the user's rights
README in short
The README explains the three-tool gateway scheme, yc CLI authorization and the static-token alternative, internal installation setup, three run modes (npx, global install, local build), a full environment variable table, and a detailed security-boundaries section: response size limits, rejecting unsafe redirects, and marking data as untrusted_data.
FAQ
Do I need a separate API key?
No, for the cloud setup a configured yc CLI is enough; the server fetches the token itself.
Does it work with an internal DataLens installation?
Yes, via DATALENS_INSTALLATION=internal, DATALENS_API_URL and DATALENS_OAUTH_TOKEN instead of yc.
Related
166 skills for scientific work: bioinformatics, cheminformatics, clinical data, geospatial analysis and 100+ databases
Google's open-source MCP server for databases: ready tools for Postgres, MySQL, BigQuery, Spanner and more, plus custom tools in tools.yaml
Official Hugging Face skills: Hub operations via the hf CLI, datasets, model training, Spaces, evals and deployment
A visualization language for agents and an MCP server: neat charts from a simple semantic spec