NPM Sentinel MCP
You can use NPM Sentinel MCP to analyze NPM packages for security, dependency, quality, popularity, and maintenance intelligence through MCP-compatible AI clients.
Fetch latest versions, full version history, dist-tags, release dates, SRI hashes, and deprecation status.
Analyze direct/transitive dependencies, TypeScript type support, bundle size, license compatibility, maintainers, repository stats, OpenSSF Scorecard, npms.io quality/maintenance scores, and download trends.
Scan packages and transitive dependencies for vulnerabilities via deps.dev/OSV.dev, detect deprecated packages, and analyze changelogs/release history.
Search NPM, compare packages side-by-side, and find smarter alternatives with plugin/extension filtering.
Retrieve package READMEs and external changelog text wrapped as untrusted external content for prompt-injection defense.
Use MCP v2 dual
content+structuredContentresponses, Zod output schemas, embedded SVG icons, caching with lockfile invalidation/manual bypass, batch limits of 25 packages, and STDIO/Streamable HTTP transports.Access MCP resources (
doc://server/readme,doc://mcp/specification) and theanalyze-packageprompt.
Provides repository statistics and metrics for NPM packages hosted on GitHub
Offers comprehensive NPM package analysis including version tracking, dependency mapping, security scanning, and quality metrics
Verifies TypeScript support and compatibility for NPM packages
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NPM Sentinel MCP scan react for security vulnerabilities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NPM Sentinel MCP
A powerful Model Context Protocol (MCP v2) server built on @modelcontextprotocol/server and @modelcontextprotocol/core (v2) that revolutionizes NPM package analysis through AI. Built to integrate seamlessly with Claude, Anthropic AI, and any MCP v2 compatible client, it provides real-time intelligence on package security, dependencies, and performance.
This server features Modular ESM Architecture (src/), Dual Output Protocol Returns (content + structuredContent), Zod Output Schemas (outputSchema), Embedded SVG Data URI Icons, and Real-Time Context Logging.
Key Features
MCP v2 Native Protocol: Fully upgraded to MCP v2 with
outputSchemaZod validation, dualstructuredContentreturning, and diagnostic context logging (ctx.mcpReq.log).Self-Contained Vector Icons: Pre-configured SVG Data URIs (
data:image/svg+xml) embedded across all 19 tools, resources, and prompts for enhanced client UI presentation.Advanced Security Scanning: Recursive dependency checks powered by Google's
deps.devand OSV.dev, ecosystem awareness, and accurate version resolution.Smart Alternatives Filtering (
npmAlternatives): Intelligent search based on functional domain keywords with strict ecosystem plugin/extension filtering (e.g., excludesexpress-rate-limitwhen searching for alternatives toexpress).Strict Input Validation & Batch Rate Control: Input sanitization via Zod against Path Traversal, SSRF, and Command Injection. Search queries (
npmSearch) are capped at 100 characters and filtered for control characters. Batch analysis tools enforce a strict cap of 25 packages per request to prevent registry enumeration DoS.Dependency & Transitive Mapping: Complete dependency tree analysis mapping through
deps.dev.Package Quality & Maintenance Metrics: Real-time scoring using OpenSSF Scorecard, GitHub repository metrics, and npms.io.
Download Trends & Performance: Real-time download statistics and bundle size analysis.
Smart SemVer Shorthand & Range Resolution: Transparently resolves major version shorthands, prefixes, and ranges (e.g.,
express@2,express@v4,zod@3.x,react@^18,lodash@~4.17) to the highest matching release without failing on missing exact version keys.Indirect Prompt Injection Defense (OWASP LLM01): All tools returning raw 3rd-party Markdown/text (
npmPackageReadme,npmChangelogAnalysis) wrap untrusted content in<untrusted_external_content>tags, attach_meta.untrustedExternalContent = trueflags, and enforce strict tool schema warnings.Efficient Caching System: Automated cache invalidation on workspace lockfile changes (
pnpm-lock.yaml,package-lock.json,yarn.lock) with manual bypass (ignoreCache: true).
Related MCP server: NPM Helper MCP
Security & OWASP LLM01 Compliance
This server implements Defense-in-Depth controls aligned with OWASP LLM01:2025 (Indirect Prompt Injection):
XML Data Demarcation: Content from external packages (
README.md, GitHub changelogs, release notes) is wrapped inside<untrusted_external_content source="..." package="..." type="...">tags so consuming LLM models distinguish untrusted data from instructions.Metadata Signaling (
_meta): Responses include_meta.untrustedExternalContent = trueand_meta.sourcesarrays for programmatic client-side detection and policy enforcement.Tool & Prompt Safety Warnings: Tool descriptions and prompt definitions explicitly instruct LLM agents to treat documentation as passive data and ignore embedded execution commands.
Batch Size Capping & Query Sanitization: All 18 multi-package analysis tools enforce a 25-package limit per request (
PackageListSchema). Search queries are sanitized and capped at 100 characters (SearchQuerySchema).Prototype Pollution Protection: Enforces
Object.hasOwn()checks on dictionary lookups (blocking reserved properties likeconstructorand__proto__).
To ensure data accuracy while maintaining high performance:
Automatic Invalidation: The cache is automatically invalidated whenever
pnpm-lock.yaml,package-lock.json, oryarn.lockchanges in your workspace.Force Refresh: All tools accept an optional
ignoreCache: trueparameter to bypass the cache and force a fresh lookup from the NPM registry.
Example Usage (JSON-RPC)
{
"name": "npmVersions",
"arguments": {
"packages": ["react"],
"ignoreCache": true
}
}Installation & Transports
Dual-Era MCP Architecture (v1 2025-11-25 + v2 2026-07-28)
This MCP server features native Dual-Era Protocol Compatibility, seamlessly serving both modern MCP v2 clients (2026-07-28) and legacy MCP v1 clients (2025-11-25) out of the box across both STDIO and Streamable HTTP transports:
STDIO Mode (
npx @nekzus/mcp-server): Powered byserveStdio({ legacy: "serve" }). Handles modernserver/discoverprobes sessionlessly and conjoins seamlessly with legacyinitializehandshakes for local execution (Claude Desktop, Cursor, Docker).Streamable HTTP / SSE Mode (
@nekzus/mcp-server/http): Powered bycreateMcpHandler({ legacy: "stateless" }). Designed for serverless and web-standard runtimes (Cloudflare Workers, Hono, Express, Vercel API Routes).
Example: Mounting HTTP Handler (Cloudflare Workers / Hono / Express)
import { createMcpHttpHandler } from '@nekzus/mcp-server/http';
const handleRequest = createMcpHttpHandler();
export default {
async fetch(request, env, ctx) {
return handleRequest(request);
}
};Development Commands:
# Install dependencies
pnpm install
# Compile TypeScript to dist/
pnpm run build
# Start STDIO server (Dual-Era)
pnpm run start
# Development server
pnpm run dev
# Run full unit and integration test suite (238 tests)
pnpm test -- --run
# Run full E2E tarball verification
node __tests__/full-e2e-pack-validation.jsInstall in VS Code / Cursor
Add this to your VS Code / Cursor MCP configuration:
{
"inputs": [],
"servers": {
"npm-sentinel": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@nekzus/mcp-server@latest"]
}
}
}Install in Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"npm-sentinel": {
"command": "npx",
"args": ["-y", "@nekzus/mcp-server@latest"]
}
}
}Configuration File Locations:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Docker Usage
# Build Docker image
docker build -t nekzus/npm-sentinel-mcp .
# Run with local volume mount
docker run -i --rm -w /projects -v ${PWD}:/projects nekzus/npm-sentinel-mcp node dist/index.jsWeb Standard Streamable HTTP & Cloudflare Workers Integration
The package exports createMcpHttpHandler and WebStandardStreamableHTTPServerTransport for serverless platforms (Cloudflare Workers, Hono, Vercel, Express, Fastify, Next.js API routes) requiring official Web Standard Streamable HTTP transport under MCP v2:
import { createMcpHttpHandler } from '@nekzus/mcp-server/http';
const handleMcpRequest = createMcpHttpHandler();
export default {
async fetch(request: Request): Promise<Response> {
return handleMcpRequest(request);
},
};100% MCP v2 Compliance: Powered by WebStandardStreamableHTTPServerTransport, this handler natively activates all 3 MCP primitives (Tools, Resources, and Prompts) with peak performance, SSE streaming support, and full Web Standard Request $\rightarrow$ Response compatibility.
Configuration
The server supports the following configuration parameters:
Environment Variable | Config Object Property | Default | Description |
|
|
| URL of the NPM registry to use for all requests |
MCP Server Capabilities (v2 API)
All tool responses conform to the MCP v2 dual output format, providing both human-readable text in content and parsed JSON objects in structuredContent:
{
"content": [
{
"type": "text",
"text": "{\n \"queryPackages\": [\"express\"],\n \"results\": [...]\n}"
}
],
"structuredContent": {
"queryPackages": ["express"],
"results": [...]
}
}Server Resources
Accessible via MCP readResource requests:
doc://server/readmeDescription: Main documentation file for NPM Sentinel MCP server.
MIME Type:
text/markdownIcon: Embedded Document SVG Data URI.
doc://mcp/specificationDescription: Complete Model Context Protocol specification file (
llms-full.txt).MIME Type:
text/plainIcon: Embedded Document SVG Data URI.
Server Prompts
Accessible via MCP getPrompt requests:
analyze-packageDescription: Generates a comprehensive prompt template for AI analysis of an NPM package including security, performance, dependencies, and health metrics.
Arguments:
package(string, required)Icon: Embedded Security SVG Data URI.
Tools Catalog (19 Tools)
All 19 tools define inputSchema, outputSchema, annotations (title, readOnlyHint), and icons:
1. npmLatest
Get latest version information, release dates, SRI integrity hashes, and dist-tags.
Input:
packages(string[]),ignoreCache(boolean, optional)
2. npmVersions
Get full version history with release dates and deprecation statuses.
Input:
packages(string[]),ignoreCache(boolean, optional)
3. npmDeps
Complete dependency tree analysis including direct dependencies and full transitive graph mapping via
deps.dev.Input:
packages(string[]),ignoreCache(boolean, optional)
4. npmTypes
Verify TypeScript support (native
index.d.tsdeclaration files vs@types/*DefinitelyTyped packages).Input:
packages(string[]),ignoreCache(boolean, optional)
5. npmSize
Package bundle size, minified size, and gzip impact analysis.
Input:
packages(string[]),ignoreCache(boolean, optional)
6. npmVulnerabilities
Instant transitive vulnerability scanning powered by Google's
deps.devand OSV.dev advisories.Input:
packages(string[]),ignoreCache(boolean, optional)
7. npmTrends
Historical download statistics over customizable time ranges (
last-week,last-month,last-year).Input:
packages(string[]),period("last-week"|"last-month"|"last-year"),ignoreCache(boolean, optional)
8. npmCompare
Side-by-side metric comparison across multiple packages.
Input:
packages(string[]),ignoreCache(boolean, optional)
9. npmMaintainers
List of package maintainers, public emails, and publishing activity.
Input:
packages(string[]),ignoreCache(boolean, optional)
10. npmScore
Consolidated score combining quality, popularity, maintenance, and OpenSSF Scorecard.
Input:
packages(string[]),ignoreCache(boolean, optional)
11. npmPackageReadme
Retrieve full formatted raw README markdown content from NPM registry / CDN.
Input:
packages(string[]),ignoreCache(boolean, optional)
12. npmSearch
Search NPM registry packages by query with rich metadata (scores, publisher, keywords).
Input:
query(string),limit(number, optional)
13. npmLicenseCompatibility
Analyze license compatibility across multiple packages (MIT, Apache-2.0, GPL, etc.).
Input:
packages(string[]),ignoreCache(boolean, optional)
14. npmRepoStats
Repository statistics (GitHub stars, forks, open issues) combined with OpenSSF Scorecard checks.
Input:
packages(string[]),ignoreCache(boolean, optional)
15. npmDeprecated
Detect deprecation status on package and recursive sub-dependencies.
Input:
packages(string[]),ignoreCache(boolean, optional)
16. npmChangelogAnalysis
Extract release notes and GitHub release history.
Input:
packages(string[]),ignoreCache(boolean, optional)
17. npmAlternatives
Smart functional alternative suggestions filtering out ecosystem plugins (e.g. excludes
express-rate-limitforexpress).Input:
packages(string[]),ignoreCache(boolean, optional)
18. npmQuality
Package code quality score (0–1).
Input:
packages(string[]),ignoreCache(boolean, optional)
19. npmMaintenance
Package maintenance activity score (0–1).
Input:
packages(string[]),ignoreCache(boolean, optional)
License
This MCP server is licensed under the MIT License. See LICENSE for details.
MIT © nekzus
Available Tools
19 toolsnpmAlternativesBRead-onlyInspect
Find alternative packages with similar functionality
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmChangelogAnalysisCRead-onlyIdempotentInspect
Analyze changelog and release history of packages
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmCompareBRead-onlyIdempotentInspect
Compare multiple NPM packages based on various metrics
Inputs: packages (required), ignoreCache. Returns: message, results, queryPackages
npmDeprecatedCRead-onlyIdempotentInspect
Check if packages are deprecated
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmDepsARead-onlyIdempotentInspect
Analyze dependencies and devDependencies of an NPM package
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmLatestBRead-onlyIdempotentInspect
Get the latest version and changelog of an NPM package
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmLicenseCompatibilityBRead-onlyIdempotentInspect
Check license compatibility between multiple packages
Inputs: packages (required), ignoreCache. Returns: compatibility, licenseDetails, packagesAnalyzed
npmMaintainersBRead-onlyIdempotentInspect
Get maintainers information for NPM packages
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmMaintenanceBRead-onlyIdempotentInspect
Analyze package maintenance metrics
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmPackageReadmeBRead-onlyIdempotentInspect
Get the README content for NPM packages
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmQualityCRead-onlyIdempotentInspect
Analyze package quality metrics
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmRepoStatsBRead-onlyIdempotentInspect
Get repository statistics for NPM packages
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmScoreARead-onlyIdempotentInspect
Get consolidated package score based on quality, maintenance, and popularity metrics
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmSearchARead-onlyInspect
Search for NPM packages with optional limit
Inputs: query (required), limit, ignoreCache. Returns: query, message, results, limitUsed, +2 more
npmSizeARead-onlyIdempotentInspect
Get package size information including dependencies and bundle size
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmTrendsARead-onlyIdempotentInspect
Get download trends and popularity metrics for packages
Inputs: packages (required), period, ignoreCache. Returns: message, results, summary
npmTypesARead-onlyIdempotentInspect
Check TypeScript types availability and version for a package
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmVersionsARead-onlyIdempotentInspect
Get all available versions of an NPM package
Inputs: packages (required), ignoreCache. Returns: message, results, summary
npmVulnerabilitiesCRead-onlyInspect
Check for known vulnerabilities in packages
Inputs: packages (required), ignoreCache. Returns: message, results, summary
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool targets a distinct aspect of NPM packages (e.g., versions, dependencies, vulnerabilities, trends). There is no overlap; even similar-sounding tools like npmQuality, npmMaintenance, and npmScore have clearly separated purposes.
All tools follow a consistent camelCase pattern starting with 'npm' followed by a descriptive noun or noun phrase (e.g., npmVersions, npmChangelogAnalysis). The naming is predictable and uniform.
With 19 tools, the set is slightly above the typical well-scoped range of 3-15, but each tool serves a specific and valuable function within the domain of NPM package analysis, making the count reasonable.
The tools cover a wide range of NPM package metrics and information (versions, dependencies, vulnerabilities, trends, license, etc.), leaving few gaps (e.g., dependents or reverse dependencies missing). The coverage is comprehensive for the server's purpose.
Maintenance
Related MCP Connectors
Live npm and UNPKG data for AI agents: resolution, audits, import maps, malware/CVE checks.
Dive into the world of npm with our NPM Package Info MCP. Access crucial metadata about any npm
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that allows AI models to fetch detailed information about npm packages and discover popular packages in the npm ecosystem.11ISC
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides tools for NPM package management, including dependency searching, updates, conflict resolution, and version management to help AI assistants safely upgrade project dependencies.51 npm8MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables language models to interact with npm services securely, providing tools for package management, project initialization, script execution, and security auditing.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for searching, inspecting, and evaluating NPM packages through health scoring and license risk assessments. It provides comprehensive package analysis including maintenance status, popularity trends, and security vulnerability reports to help users make informed dependency decisions.4MIT