Token导航 LogoToken导航TokenDH.com
MCP Dependency Version logo
安全风控stdio官方级别未说明来源级核验

MCP Dependency Version

MCP Server

一个用于查询多个软件包注册表中依赖版本信息的服务,支持版本查找、漏洞扫描和许可证检查等功能。

工具数

5

提示词数

0

GitHub Stars

2

资源数

0
依赖管理安全审计TypeScriptClaude版本控制Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Tripletex

提供方

Tripletex

最后核验

2026/5/17 20:19

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run --rm -i ghcr.io/tripletex/mcp-dependency-version:latest

详细介绍

MCP依赖版本

一个用于跨平台查找包版本的模型上下文协议(MCP)服务器 多个包注册表。

特性

  • 多注册表支持:npm、Maven Central、PyPI、crates.io、Go代理,

JSR、NuGet、Docker Hub、RubyGems、Packagist、pub.dev、Swift PM、GitHub Actions

  • 版本查询:获取最新的稳定(以及可选的预发布)版本
  • 版本列表:列出所有可用版本及其元数据
  • 漏洞扫描:使用以下命令检查OSV和NVD数据库中的包

重复数据消除后,CVSS对结果进行评分

  • 依赖性分析:分析依赖关系文件并检查更新
  • Docker支持:查找图像标签并分析

Dockerfile/docker-compose.yml依赖关系

安全:使用精确版本

始终使用精确版本而不是版本范围来防止供应链 攻击。

坏(易受攻击)好(安全)
^1.2.31.2.3
~1.2.31.2.3
>=1.2.31.2.3
1.x1.2.3

版本范围(如 ^1.2.3~1.2.3)允许新时自动更新 发布次要版本或补丁版本。如果攻击者破坏了一个包 发布恶意版本,您的项目可能会自动将其拉入 没有你的知识。

使用精确版本可确保您精确控制在您的 项目。当你想更新时,明确更改版本并查看 变化。

Docker:使用摘要固定引用

Docker标签不是不可变的。 与npm/PyPI/等中的包版本不同 Docker标签可以随时移动到一个完全不同的镜像。

坏(易受攻击)好(安全)
nginx:1.27.3nginx@sha256:1948e0c46...
postgres:16postgres@sha256:abc123...

当你使用 nginx:1.27.3,您今天绘制的图像可能与 如果标签更新了,你明天就可以取一个。这造成了供应链攻击 矢量。

使用摘要固定引用 (image@sha256:...)确保你总是拉 完全相同的图像。这 lookup_versionlist_versions 工具返回 digestsecureReference Docker镜像的字段使这变得容易。

GitHub操作:使用提交SHA固定引用

GitHub Action标签不是不可变的。 标签如 v4 可以强行推动 随时指向不同的提交,创建供应链攻击向量。

坏(易受攻击)好(安全)
actions/checkout@v4actions/checkout@b4ffde65... # v4.2.0
actions/setup-node@v4actions/setup-node@1a4442c... # v4.0.1

使用提交SHA固定引用 (owner/repo@sha)确保您始终使用 完全相同的动作代码。这 lookup_versionlist_versions 工具 返回 digest (提交民政事务局局长)及 secureReference GitHub操作字段 为了使这变得容易。

支持的注册表

注册表API端点包格式
npm注册表.npmjs.orgpackage-name, @scope/package
mavenrepo1.maven.org/maven2groupId:artifactId
pypipypi.orgpackage-name
货物crate-name
goproxy.golang.orggithub.com/user/repo
jsrapi.jsr.io@scope/name
nugetapi.nuget.orgPackage.Name
dockerhub.docker.comimage, user/image
rubygemsrubygems.orggem-name
packagistpackagist.orgvendor/package
pubpub.devpackage_name
swiftapi.github.comowner/repo
github操作api.github.comowner/repo

安装

先决条件

使用Claude Desktop进行设置

添加到您的Claude Desktop配置文件 (~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上, ~/.config/claude-desktop/claude_desktop_config.json 在Linux上):

{
  "mcpServers": {
    "mcp-dependency-version": {
      "command": "deno",
      "args": [
        "run",
        "--allow-net",
        "--allow-env",
        "--allow-read",
        "/path/to/mcp-dependency-version/main.ts"
      ]
    }
  }
}

使用Claude Code CLI进行设置

claude mcp add mcp-dependency-version -- deno run --allow-net --allow-env --allow-read /path/to/mcp-dependency-version/main.ts

使用Docker进行设置

该服务可以使用stdio传输作为Docker映像提供。

拉取图像:

docker pull ghcr.io/tripletex/mcp-dependency-version:latest

直接运行:

docker run --rm -i ghcr.io/tripletex/mcp-dependency-version:latest

Claude桌面配置:

{
  "mcpServers": {
    "mcp-dependency-version": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "ghcr.io/tripletex/mcp-dependency-version:latest"
      ]
    }
  }
}

本地开发

  1. 克隆存储库:
   git clone https://github.com/tripletex/mcp-dependency-version.git
   cd mcp-dependency-version
  1. 运行服务器:
   deno task start

配置

服务器支持每种注册表类型的自定义存储库配置。 这允许您使用私有注册表、镜像或多个存储库 注册表。

配置文件

在以下位置创建配置文件 ~/.config/mcp-dependency-version/config.json:

{
  "repositories": {
    "npm": {
      "npmjs": {
        "name": "npm",
        "url": "https://registry.npmjs.org",
        "default": true
      },
      "github": {
        "name": "GitHub Packages",
        "url": "https://npm.pkg.github.com",
        "auth": {
          "token": "ghp_xxxxxxxxxxxx"
        }
      }
    },
    "maven": {
      "central": {
        "name": "Maven Central",
        "url": "https://repo1.maven.org/maven2",
        "default": true
      },
      "atlassian": {
        "name": "Atlassian Maven",
        "url": "https://packages.atlassian.com/maven/public"
      },
      "jitpack": {
        "name": "JitPack",
        "url": "https://jitpack.io"
      }
    },
    "pypi": {
      "pypi": {
        "name": "PyPI",
        "url": "https://pypi.org/pypi",
        "default": true
      },
      "private": {
        "name": "Private PyPI",
        "url": "https://pypi.example.com/simple",
        "auth": {
          "username": "user",
          "password": "pass"
        }
      }
    }
  }
}

环境变量

您可以使用以下命令覆盖配置文件路径 MCP_DEPENDENCY_VERSION_CONFIG 环境变量:

export MCP_DEPENDENCY_VERSION_CONFIG=/path/to/config.json

认证

该配置支持两种身份验证方法:

承载令牌:

{
  "auth": {
    "token": "your-token-here"
  }
}

基本身份验证:

{
  "auth": {
    "username": "user",
    "password": "pass"
  }
}

默认存储库

如果不存在配置文件,服务器将使用官方公共注册表:

注册表默认URL
npmhttps://registry.npmjs.org
mavenhttps://repo1.maven.org/maven2
pypihttps://pypi.org/pypi
货物https://crates.io/api/v1/crates
去吧https://proxy.golang.org
jsrhttps://api.jsr.io
nugethttps://api.nuget.org/v3
dockerhttps://hub.docker.com
rubygemshttps://rubygems.org
包装师https://repo.packagist.org
酒吧https://pub.dev/api
swifthttps://api.github.com
github操作https://api.github.com

工具

查找版本

查找软件包的最新版本。

参数:

  • registry (必填):包注册表(npm, maven, pypi, cargo,

go, jsr, nuget, docker, rubygems, packagist, pub, swift, github-actions)

  • package (必填):包名称
  • includePrerelease (可选):包括alpha/beta/rc版本
  • versionPrefix (可选):按前缀过滤版本(例如。, "2." 2.x)

例子:

{
  "registry": "npm",
  "package": "lodash"
}

输出:

{
  "packageName": "lodash",
  "registry": "npm",
  "latestStable": "4.17.21",
  "publishedAt": "2021-02-20T15:42:16.891Z"
}

Docker输出(包括用于安全固定的摘要):

{
  "packageName": "nginx",
  "registry": "docker",
  "latestStable": "1.27.3",
  "publishedAt": "2024-12-04T18:51:59.819Z",
  "digest": "sha256:1948e0c46da16a3565a844aa65ab848e1546f85cf47e47d044a567906a3a497f",
  "secureReference": "nginx@sha256:1948e0c46da16a3565a844aa65ab848e1546f85cf47e47d044a567906a3a497f",
  "securityNotes": [
    "WARNING: Docker tags are NOT immutable. A tag can be moved to point to a different image at any time.",
    "Using the digest-pinned reference (image@sha256:...) provides protection against tag tampering.",
    "Digest-pinned references ensure you always pull the exact same image, preventing supply chain attacks.",
    "When updating, explicitly change the digest and verify the new image before deployment."
  ]
}

GitHub操作输出(包括用于安全固定的提交SHA):

{
  "packageName": "actions/checkout",
  "registry": "github-actions",
  "latestStable": "4.2.0",
  "publishedAt": "2024-10-01T12:00:00.000Z",
  "digest": "b4ffde65f46336ab88eb53be808477a3936bae11",
  "secureReference": "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.2.0",
  "securityNotes": [
    "GitHub Action tags are NOT immutable. Tags can be force-pushed to point to different commits.",
    "Use commit SHA-pinned references (owner/repo@sha) for supply chain security.",
    "Secure reference: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.2.0"
  ]
}

list_versions

列出软件包的所有可用版本。

参数:

  • registry (必填):包注册表
  • package (必填):包名称
  • limit (可选):要返回的最大版本数(默认值:20)

例子:

{
  "registry": "pypi",
  "package": "requests",
  "limit": 5
}

输出:

{
  "packageName": "requests",
  "registry": "pypi",
  "versions": [
    {
      "version": "2.31.0",
      "publishedAt": "2023-05-22T15:12:44.000Z",
      "isPrerelease": false,
      "isDeprecated": false
    }
  ],
  "totalCount": 142,
  "showing": 5
}

检查漏洞

检查软件包版本是否存在已知的安全漏洞。

并行查询OSV和NVD以获得全面覆盖。结果是 通过CVE ID进行重复数据消除——当两个数据库中都出现漏洞时,NVD CVSS v3.1评分用作权威严重性评级。

设置 NVD_API_KEY 环境变量用于更高的NVD速率限制(50 vs 5 每30秒请求数)。索取免费钥匙 https://nvd.nist.gov/developers/request-an-api-key.

参数:

  • registry (必填):包注册表
  • package (必填):包名称
  • version (必填):要检查的版本
  • severityThreshold (可选):最低严重程度(LOW, MEDIUM, HIGH,

CRITICAL)

例子:

{
  "registry": "npm",
  "package": "lodash",
  "version": "4.17.20"
}

输出:

{
  "packageName": "lodash",
  "version": "4.17.20",
  "registry": "npm",
  "vulnerabilities": [
    {
      "id": "GHSA-29mw-wpgm-hmr9",
      "summary": "Prototype Pollution in lodash",
      "severity": "HIGH",
      "cvss": 7.2,
      "cveIds": ["CVE-2021-23337"],
      "cweIds": ["CWE-94"],
      "fixedVersions": ["4.17.21"],
      "source": "osv+nvd"
    }
  ],
  "totalCount": 1,
  "hasVulnerabilities": true,
  "summary": {
    "critical": 0,
    "high": 1,
    "medium": 0,
    "low": 0
  }
}

分析依赖关系

分析依赖文件并检查可用更新。

参数:

  • content (必填):文件内容(package.json、pom.xml、build.gradle、,

build.gradle.kts、requirements.txt、Cargo.toml、go.mod、deno.json, _哦,我的上帝。 Gemfile、composer.json、pubspec.yaml、Package.swift、.github/works/_.yml)

  • registry (必填):包注册表(使用 maven 对于Gradle文件,请使用

github-actions 用于工作流文件)

  • checkVulnerabilities (可选):同时扫描漏洞(默认值:

错误的

支持的依赖文件:

注册表文件格式
npmpackage.json
mavenpom.xml, build.gradle (Groovy), build.gradle.kts (科特林)
pypirequirements.txt
货物Cargo.toml
走吧go.mod
jsrdeno.json (支持jsr:和npm:导入)
nuget*.csproj (PackageReference格式)
dockerDockerfile, docker-compose.yml
rubygemsGemfile
包装师composer.json
酒吧pubspec.yaml
迅速Package.swift
github操作.github/workflows/*.yml

注: 对于GitHub Actions工作流文件,跳过SHA固定引用 因为它们已经安全了。对于Gradle文件,变量引用 ($version, ${libs.xxx},版本目录)被跳过,因为它们不能 在不评估构建的情况下解决。

示例(npm):

{
  "content": "{\"dependencies\": {\"lodash\": \"^4.17.20\", \"express\": \"^4.18.0\"}}",
  "registry": "npm",
  "checkVulnerabilities": true
}

示例(Gradle Kotlin DSL):

{
  "content": "dependencies {\n    implementation(\"org.springframework.boot:spring-boot-starter:3.2.0\")\n    testImplementation(\"org.junit.jupiter:junit-jupiter:5.10.0\")\n}",
  "registry": "maven"
}

输出:

{
  "registry": "npm",
  "dependencies": [
    {
      "name": "lodash",
      "currentVersion": "4.17.20",
      "latestVersion": "4.17.21",
      "updateAvailable": true,
      "updateType": "patch",
      "vulnerabilities": [
        { "id": "GHSA-29mw-wpgm-hmr9", "summary": "Prototype Pollution" }
      ]
    },
    {
      "name": "express",
      "currentVersion": "4.18.0",
      "latestVersion": "4.18.2",
      "updateAvailable": true,
      "updateType": "patch",
      "vulnerabilities": []
    }
  ],
  "summary": {
    "total": 2,
    "outdated": 2,
    "vulnerable": 1,
    "deprecated": 0,
    "majorUpdates": 0,
    "minorUpdates": 0,
    "patchUpdates": 2
  }
}

get_package_docs

获取软件包的README文档。

参数:

  • registry (必填):包注册表(npm, maven, pypi, cargo,

go, jsr, nuget, docker, rubygems, packagist, pub, swift, github-actions)

  • package (必填):包名称
  • version (可选):获取文档的特定版本

文件来源:

注册表README源代码存储库URL源代码
npm注册表APIrepository 现场
pypi注册表API(描述)project_urls 现场
货物API注册处repository 现场
mavenGitHub(回退)POM `` 部分
goGitHub(回退)模块路径(如果是GitHub.com)
jsrGitHub(回退)githubRepository 现场
nugetGitHub(回退)目录条目
dockerGitHub(回退)docker Hub页面
rubygems注册表API(信息)source_code_uri 现场
API注册处repository 现场
pub注册表API(说明)repository 现场
swiftGitHub(回退)GitHub存储库URL
github操作github(回退)github存储库URL

例子:

{
  "registry": "npm",
  "package": "lodash"
}

输出:

# lodash Documentation
Registry: npm
Source: registry
Documentation: https://www.npmjs.com/package/lodash
Repository: https://github.com/lodash/lodash

---

# lodash

A modern JavaScript utility library delivering modularity, performance & extras.
...

发展

命令

# Type check
deno task check

# Run tests
deno task test

# Start server
deno task start

# Start with file watching
deno task dev

# Lint
deno task lint

# Format
deno task fmt

项目结构

src/
├── config/       # Configuration loading
├── registries/   # Registry client implementations (npm, maven, pypi, etc.)
├── parsers/      # Dependency file parsers (package.json, pom.xml, etc.)
├── tools/        # MCP tool implementations
└── utils/        # Shared utilities (version parsing, caching, HTTP)

API 参考

注册表API

注册表API端点文档
npmregistry.npmjs.org/{package}文档
Mavenrepo1.maven.org/maven2文档
PyPIpypi.org/pypi/{package}/json文档
货物crates.io/api/v1/crates/{crate}文档
去吧proxy.golang.org/{module}/@v/list文档
JSRapi.jsr.io/scopes/{scope}/packages/{name}文档
NuGetapi.nuget.org/v3-flatcontainer/{id}/index.json文档
Dockerhub.docker.com/v2/repositories/{image}/tags文档
RubyGemsrubygems.org/api/v1/gems/{gem}.json文档
包装商repo.packagist.org/p2/{vendor}/{package}.json文档
酒吧pub.dev/api/packages/{package}文档
Swiftapi.github.com/repos/{owner}/{repo}/tags文档
GitHub操作api.github.com/repos/{owner}/{repo}/tags文档
OSVapi.osv.dev/v1/query文档
NVDservices.nvd.nist.gov/rest/json/cves/2.0文档

许可证

麻省理工学院

目录标签

目录标签

依赖管理安全审计TypeScriptClaude版本控制本地部署多注册表支持漏洞扫描

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Docker

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP