npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@datalens-tech/mcp

v0.3.0

Published

MCP server for DataLens public API

Readme

datalens-mcp

An MCP server that exposes the DataLens public API to LLM agents.

On startup it fetches the API's OpenAPI spec and turns every RPC endpoint into a callable command when the operation declares a supported x-mcp-scope. Instead of registering hundreds of individual MCP tools (which would flood the model's context), it exposes a small gateway of five tools:

| Tool | Purpose | | --------------------------- | ---------------------------------------------------------------------- | | list_commands | List all command names with one-line summaries. Call this first. | | describe_commands | Return the full description and input schema for one or more commands. | | invoke_read_command | Call a command classified as read. | | invoke_write_command | Call a command classified as write. | | invoke_privileged_command | Call a command classified as privileged. |

The typical agent flow is: list_commands → describe_commands for the ones it needs → the invocation tool indicated by invoke_tool.

Both discovery tools include each command's scope and invoke_tool. Invocation checks the scope on the server before executing the API call.

Configure client approval policies for read, write, and privileged tools separately. Privileged calls require explicit user approval; descriptions and MCP annotations are hints, not an approval mechanism. Clients must enforce approvals themselves, and DataLens continues to enforce the user's permissions for every API call.

Setup

Choose the guide for your DataLens installation:

| Installation | Guide | | ------------ | -------------------------------------- | | Yandex Cloud | Cloud setup | | Internal | Internal setup | | Enterprise | Enterprise setup |

Each guide covers authorization, required variables, and a complete MCP client configuration. The server speaks MCP over stdio. Set environment variables in your client's server configuration.

Run

The setup guides use npx to fetch the published package on demand, without a separate install or build step.

--prefer-online asks npm to revalidate cached package metadata. It does not upgrade an already running MCP process; restart the server to pick up updates.

For Cloud and Internal installations, the server checks npm for updates in the background and notifies you when a newer stable version is available. Update the package yourself and restart the MCP server to use the new version.

Via a global install

npm install -g @datalens-tech/mcp

In the MCP client configuration from your installation guide, set command to datalens-mcp, remove args, and keep the guide's env settings.

From a local build

npm ci
npm run build

In the MCP client configuration from your installation guide, set command to node and args to ["/absolute/path/to/datalens-mcp/dist/index.js"]. Keep the guide's env settings.

Configuration reference

Installation-specific credentials and defaults are documented in the Cloud, Internal, and Enterprise guides.

These settings apply to every installation:

| Variable | Default | Purpose | | ----------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------- | | DATALENS_SCHEMA_URL | Derived from the installation and API URL | Overrides the OpenAPI JSON URL. | | DATALENS_API_VERSION | latest | Sent in the x-dl-api-version header. Keep the schema version consistent with it. | | DATALENS_MAX_RESPONSE_CHARS | 100000 | Truncates responses before forwarding them to the client. |

DATALENS_INSTALLATION defaults to cloud; supported values are cloud, internal, and enterprise. Unknown values are rejected.

Security boundaries

API and schema URLs must use HTTPS without embedded credentials. HTTP is also allowed for localhost, 127.0.0.1, and [::1] endpoints only when NODE_ENV=development (set by npm run dev). Redirects are rejected.

Response bodies are limited before JSON parsing: 10 MiB for API calls and 20 MiB for OpenAPI, measured after decompression. The 30-second request timeout includes reading the body. DATALENS_MAX_RESPONSE_CHARS remains a separate limit on API data and error details sent to the agent.

Command results are returned in a JSON envelope with trust: "untrusted_data" and a data string containing the serialized, potentially truncated API response. Tool descriptions instruct agents to treat API content and command metadata as data, never as instructions or authorization for subsequent actions. This reduces the risk of indirect prompt injection but does not guarantee protection; the MCP client must enforce its own approval and trust boundaries.

CLI failures do not expose child-process output. DataLens API errors preserve the upstream response details within the response size and timeout limits; schema diagnostics include the URL origin and path, without query or fragment.

Development

npm run lint        # prettier + eslint
npm run typecheck   # tsc --noEmit
npm test            # vitest