Skip to main content
Glama

NPM Sentinel MCP

Github 工作流程 npm 版本 npm-month npm-total 铁匠徽章 询问 DeepWiki 捐

强大的模型上下文协议 (MCP) 服务器,通过 AI 革新 NPM 包分析。它与 Claude 和 Anthropic AI 集成,提供有关包安全性、依赖项和性能的实时情报。这款 MCP 服务器提供即时洞察和智能分析,以保护和优化您的 npm 生态系统,使现代开发工作流程中更快、更安全地进行包管理决策。

特征

  • 版本分析与跟踪

  • 依赖关系分析和映射

  • 安全漏洞扫描

  • 包装质量指标

  • 下载趋势和统计数据

  • TypeScript 支持验证

  • 封装尺寸分析

  • 维护指标

  • 实时套餐比较

  • 标准化错误处理和 MCP 响应格式

  • 高效缓存,提高性能和 API 速率限制管理

  • 使用 Zod 进行严格的模式验证和类型安全

注意:服务器通过 MCP 集成提供 AI 辅助分析。

Related MCP server: NPM Helper MCP

安装

在 VS Code 中安装

将其添加到你的 VS Code MCP 配置文件中。更多信息请参阅VS Code MCP 文档。

{
  "servers": {
    "npm-sentinel": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@nekzus/mcp-server@latest"]
    }
  }
}

Docker

建造

# Build the Docker image
docker build -t nekzus/npm-sentinel-mcp .

用法

您可以使用 Docker 运行 MCP 服务器并将目录挂载到/projects :

{
  "mcpServers": {
    "npm-sentinel-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-w", "/projects",
        "--mount", "type=bind,src=${PWD},dst=/projects",
        "nekzus/npm-sentinel-mcp",
        "node",
        "dist/index.js"
      ]
    }
  }
}

对于多个目录:

{
  "mcpServers": {
    "npm-sentinel-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-w", "/projects",
        "--mount", "type=bind,src=/path/to/workspace,dst=/projects/workspace",
        "--mount", "type=bind,src=/path/to/other/dir,dst=/projects/other/dir,ro",
        "nekzus/npm-sentinel-mcp",
        "node",
        "dist/index.js"
      ]
    }
  }
}

注意:所有挂载的目录必须位于/projects下才能正确访问。

与 Claude Desktop 一起使用

将其添加到您的claude_desktop_config.json中:

{
  "mcpServers": {
    "npmsentinel": {
      "command": "npx",
      "args": ["-y", "@nekzus/mcp-server@latest"]
    }
  }
}

配置文件位置:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Linux:(Claude for Desktop 目前尚未正式支持 Linux)

NPX

{
  "mcpServers": {
    "npm-sentinel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nekzus/mcp-server@latest"
      ]
    }
  }
}

API

服务器通过模型上下文协议 (MCP) 暴露其工具。所有工具均遵循标准化的响应格式:

{
  "content": [
    {
      "type": "text",
      "text": "string",
      "isError": boolean // Optional
    }
    // ... more content items if necessary
  ]
}

资源

  • npm://registry :NPM 注册界面

  • npm://security :安全分析接口

  • npm://metrics :包指标接口

服务器资源

服务器还提供可通过 MCP GetResource请求访问的以下信息资源:

  • doc://server/readme :

    • 描述:检索此 NPM Sentinel MCP 服务器的主要README.md文件内容。

    • MIME 类型: text/markdown

  • doc://mcp/specification :

    • 描述:检索llms-full.txt内容,提供全面的模型上下文协议规范。

    • MIME 类型: text/plain

工具

npm版本

  • 获取包的所有版本

  • 输入: packages (string[])

  • 返回:带有发布日期的版本历史记录

npm最新

  • 获取最新版本信息

  • 输入: packages (string[])

  • 返回:最新版本详细信息和更新日志

npmDeps

  • 分析包依赖关系

  • 输入: packages (string[])

  • 返回:完整的依赖树分析

npm类型

  • 检查 TypeScript 支持

  • 输入: packages (string[])

  • 返回:TypeScript 兼容性状态

npm大小

  • 分析包裹大小

  • 输入: packages (string[])

  • 返回:捆绑包大小和导入成本分析

npm漏洞

  • 扫描安全漏洞

  • 输入: packages (string[])

  • 返回:安全公告和严重性评级

npm趋势

  • 获取下载趋势

  • 输入:

    • packages (字符串[])

    • period (“上周” | “上个月” | “去年”)

  • 返回:随时间推移的下载统计数据

npm比较

  • 比较多个包

  • 输入: packages (string[])

  • 返回:详细的比较指标

npm维护者

  • 获取软件包维护者

  • 输入: packages (string[])

  • 返回:维护者信息和活动

npm分数

  • 获取包质量分数

  • 输入: packages (string[])

  • 返回:综合质量指标

npmPackageReadme

  • 获取软件包自述文件

  • 输入: packages (string[])

  • 返回:格式化的 README 内容

npm搜索

  • 搜索包

  • 输入:

    • query (字符串)

    • limit (数字,可选)

  • 返回:匹配带有元数据的包

npm许可证兼容性

  • 检查许可证兼容性

  • 输入: packages (string[])

  • 返回:许可证分析和兼容性信息

npmRepoStats

  • 获取存储库统计信息

  • 输入: packages (string[])

  • 返回:GitHub/存储库指标

npm已弃用

  • 检查是否弃用

  • 输入: packages (string[])

  • 返回:弃用状态和替代方案

npm变更日志分析

  • 分析软件包变更日志

  • 输入: packages (string[])

  • 返回:变更日志摘要和影响分析

npmAlternatives

  • 查找软件包替代方案

  • 输入: packages (string[])

  • 返回:类似的包装与比较

npm质量

  • 评估包装质量

  • 输入: packages (string[])

  • 返回:质量指标和分数

npm维护

  • 检查维护状态

  • 输入: packages (string[])

  • 返回:维护活动指标

建造

# Build with npm
npm install
npm run build

执照

此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。


麻省理工学院 © nekzus

Available Tools

19 tools
npmAlternativesB
Read-only
Inspect

Find alternative packages with similar functionality

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmChangelogAnalysisC
Read-onlyIdempotent
Inspect

Analyze changelog and release history of packages

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmCompareB
Read-onlyIdempotent
Inspect

Compare multiple NPM packages based on various metrics

Inputs: packages (required), ignoreCache. Returns: message, results, queryPackages

npmDeprecatedC
Read-onlyIdempotent
Inspect

Check if packages are deprecated

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmDepsA
Read-onlyIdempotent
Inspect

Analyze dependencies and devDependencies of an NPM package

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmLatestB
Read-onlyIdempotent
Inspect

Get the latest version and changelog of an NPM package

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmLicenseCompatibilityB
Read-onlyIdempotent
Inspect

Check license compatibility between multiple packages

Inputs: packages (required), ignoreCache. Returns: compatibility, licenseDetails, packagesAnalyzed

npmMaintainersB
Read-onlyIdempotent
Inspect

Get maintainers information for NPM packages

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmMaintenanceB
Read-onlyIdempotent
Inspect

Analyze package maintenance metrics

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmPackageReadmeB
Read-onlyIdempotent
Inspect

Get the README content for NPM packages

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmQualityC
Read-onlyIdempotent
Inspect

Analyze package quality metrics

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmRepoStatsB
Read-onlyIdempotent
Inspect

Get repository statistics for NPM packages

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmScoreA
Read-onlyIdempotent
Inspect

Get consolidated package score based on quality, maintenance, and popularity metrics

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmSearchA
Read-only
Inspect

Search for NPM packages with optional limit

Inputs: query (required), limit, ignoreCache. Returns: query, message, results, limitUsed, +2 more

npmSizeA
Read-onlyIdempotent
Inspect

Get package size information including dependencies and bundle size

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmTrendsA
Read-onlyIdempotent
Inspect

Get download trends and popularity metrics for packages

Inputs: packages (required), period, ignoreCache. Returns: message, results, summary

npmTypesA
Read-onlyIdempotent
Inspect

Check TypeScript types availability and version for a package

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmVersionsA
Read-onlyIdempotent
Inspect

Get all available versions of an NPM package

Inputs: packages (required), ignoreCache. Returns: message, results, summary

npmVulnerabilitiesC
Read-only
Inspect

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

    A3.5/5.0

    Scored across 19 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      A Model Context Protocol server that allows AI models to fetch detailed information about npm packages and discover popular packages in the npm ecosystem.
      1
      1
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      46 npm
      8
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      A 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.
      11
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An 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.
      4
      MIT