MCPSERV.CLUB
snyk-labs

NPM Package Info MCP Server

MCP Server

Fetch npm package details via Model Context Protocol

Stale(60)
7stars
1views
Updated Aug 26, 2025

About

A lightweight MCP server that exposes a getNpmPackageInfo tool, allowing IDEs like Cursor to retrieve structured npm package data over STDIO. Ideal for integrating package lookup into development workflows.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The MCP Server for NPM Package Info is a lightweight Model Context Protocol server that exposes a single, focused tool: . By providing structured metadata about any npm package directly to an AI assistant, it eliminates the need for developers to manually query the registry or parse documentation. This capability is especially valuable in IDE workflows where a language model can suggest relevant dependencies, warn about deprecations, or auto‑generate import statements on the fly.

At its core, the server listens for MCP requests over STDIO—a transport method that aligns naturally with IDE extensions such as Cursor. When a request arrives, the server queries the npm registry for the specified and returns a JSON object containing all publicly available information: current version, maintainers, license, dependencies, and more. The structured response allows downstream tooling to consume the data programmatically without additional parsing logic, ensuring consistency across different AI assistants and development environments.

Key features of this MCP server include:

  • Single‑purpose design: Focused exclusively on npm package metadata, reducing complexity and potential attack surface.
  • Structured output: The tool returns a well‑defined JSON schema, enabling downstream tools to validate and transform the data reliably.
  • IDE integration friendly: STDIO transport makes it trivial to hook into existing editor extensions that already support MCP, such as Cursor or other LLM‑powered IDEs.
  • Security awareness: The repository is intentionally vulnerable, serving as a learning platform for MCP server security. This makes it an excellent sandbox for developers to practice hardening and testing against real‑world attack vectors.

Real‑world scenarios that benefit from this server include:

  • Dependency suggestion: An AI assistant can query the registry while a developer writes code, instantly providing detailed package information and usage examples.
  • Version management: During migrations or refactoring, the assistant can fetch the latest stable version and recommend upgrade paths.
  • Compliance checks: By inspecting license fields, the server helps ensure that added dependencies comply with project policies.
  • Documentation generation: Automated tools can pull metadata to populate changelogs or README snippets without manual intervention.

Integrating the server into an AI workflow is straightforward: the assistant issues a request with the desired package name, receives the JSON payload, and can then embed that data into responses, trigger further actions (like installing the package), or feed it into other MCP tools. Because the server operates over STDIO, it can be bundled directly with editor extensions or run as a standalone process behind the scenes.

In summary, this MCP server turns npm’s rich package ecosystem into an AI‑accessible data source with minimal friction. Its focused design, structured output, and IDE‑friendly transport make it a practical addition to any developer’s AI toolkit, while its intentional vulnerability provides an excellent platform for security experimentation and education.