JFrog模型上下文协议服务

@jfrog/mcp-jfrog
0 Stars 323 次浏览 jfrog 更新于 2026-08-23

实验性的模型上下文协议服务器,可访问 JFrog 平台 API 功能,包括存储库管理、构建跟踪、工件搜索和包安全分析。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "MCP-JFrog": {
      "args": [
        "exec",
        "-y",
        "github:jfrog/mcp-jfrog"
      ],
      "command": "npm",
      "env": {
        "JFROG_ACCESS_TOKEN": "ACCESS_TOKEN",
        "JFROG_URL": "https://\u003cYOUR_JFROG_INSTANCE_URL\u003e"
      }
    }
  }
}

该服务需要配置环境变量:JFROG_ACCESS_TOKEN、JFROG_URL

服务介绍

JFrog MCP 服务器 (🧪 实验性)

smithery 徽章

用于 JFrog 平台 API 的 Model Context Protocol (MCP) 服务器,支持仓库管理、构建跟踪、发布生命周期管理等功能。

https://github.com/user-attachments/assets/aca3af2b-f294-41c8-8727-799a019a55b5

免责声明

这是一个实验项目,旨在展示 JFrog 在 MCP 方面的能力。它不是由 JFrog 官方支持或验证的。

功能

  • 仓库管理:创建和管理本地、远程和虚拟仓库
  • 构建跟踪:列出并检索构建信息
  • 运行时监控:查看运行时集群和正在运行的容器镜像
  • 任务控制:查看关联的 JFrog 平台实例
  • 工件搜索:执行强大的 AQL 查询来搜索工件和构建
  • 目录和管理:访问包信息、版本、漏洞,并检查管理状态

工具

...
  1. check_jfrog_availability

    • Check if JFrog platform is ready and functioning
    • Returns: Platform readiness status
  2. create_local_repository

    • Create a new local repository in Artifactory
    • Inputs:
      • key (string): Repository key
      • rclass (string): Repository class (must be "local")
      • packageType (string): Package type of the repository
      • description (optional string): Repository description
      • projectKey (optional string): Project key to assign the repository to
      • environments (optional string[]): Environments to assign the repository to
    • Returns: Created repository details
  3. create_remote_repository

    • Create a new remote repository in Artifactory to proxy external package registries
    • Inputs:
      • key (string): Repository key
      • rclass (string): Repository class (must be "remote")
      • packageType (string): Package type of the repository
      • url (string): URL to the remote repository
      • username (optional string): Remote repository username
      • password (optional string): Remote repository password
      • description (optional string): Repository description
      • projectKey (optional string): Project key to assign the repository to
      • environments (optional string[]): Environments to assign the repository to
      • Many other optional parameters for specific repository configurations
    • Returns: Created repository details
  4. create_virtual_repository

    • Create a new virtual repository in Artifactory that aggregates multiple repositories
    • Inputs:
      • key (string): Repository key
      • rclass (string): Repository class (must be "virtual")
      • packageType (string): Package type of the repository
      • repositories (string[]): List of repository keys to include in the virtual repository
      • description (optional string): Repository description
      • projectKey (optional string): Project key to assign the repository to
      • environments (optional string[]): Environments to assign the repository to
      • Other optional parameters for specific repository configurations
    • Returns: Created repository details
  5. list_repositories

    • List all repositories in Artifactory with optional filtering
    • Inputs:
      • type (optional string): Filter repositories by type (local, remote, virtual, federated, distribution)
      • packageType (optional string): Filter repositories by package type
      • project (optional string): Filter repositories by project key
    • Returns: List of repositories matching the filters
  6. set_folder_property

    • Set properties on a folder in Artifactory, with optional recursive application
    • Inputs:
      • folderPath (string): Path to the folder where properties should be set
      • properties (object): Key-value pairs of properties to set
      • recursive (optional boolean): Whether to apply properties recursively to sub-folders
    • Returns: Operation result
  7. execute_aql_query

    • Execute an Artifactory Query Language (AQL) query to search for artifacts, builds, or other entities in JFrog Artifactory
    • Inputs:
      • query (string): The AQL query to execute. Must follow AQL syntax (e.g., items.find({"repo":"my-repo"}).include("name","path"))
      • domain (optional string): The primary domain to search in (items, builds, archive.entries, build.promotions, releases)
      • transitive (optional boolean): Whether to search in remote repositories
      • limit (optional number): Maximum number of results to return
      • offset (optional number): Number of results to skip
      • include_fields (optional string[]): Fields to include in the results
      • sort_by (optional string): Field to sort results by
      • sort_order (optional string): Sort order (asc or desc)
    • Returns: Search results with metadata
  1. list_jfrog_builds

    • 返回 JFrog 平台中的所有构建列表
    • 返回值: 构建列表
  2. get_specific_build

    • 通过名称获取特定构建的详细信息
    • 输入参数:
      • buildName (字符串): 要检索的构建名称
      • project (可选字符串): 用于限定构建搜索范围的项目键
    • 返回值: 构建详细信息
  1. list_jfrog_runtime_clusters

    • 返回 JFrog 平台中的所有运行时集群列表
    • 输入参数:
      • limit (可选整数): 要返回的最大集群数量
      • next_key (可选字符串): 用于分页的下一个键
    • 返回值: 运行时集群列表
  2. get_jfrog_runtime_specific_cluster

    • 通过 ID 返回特定的运行时集群
    • 输入参数:
      • clusterId (整数): 要检索的集群 ID
    • 返回值: 集群详细信息
  3. list_jfrog_running_images

    • 列出运行时集群中所有正在运行的容器镜像及其安全和操作状态
    • 输入参数:
      • filters (可选字符串): 应用的过滤器
      • num_of_rows (可选整数): 要返回的行数
      • page_num (可选整数): 页码
      • statistics (可选布尔值): 是否包含统计信息
      • timePeriod (可选字符串): 查询的时间段
    • 返回值: 正在运行的镜像列表
  1. list_jfrog_environments

    • 获取 JFrog 平台中所有环境类型的列表及其详细信息
    • 输入参数:
    • 返回值: 环境列表
  2. list_jfrog_projects

    • 获取 JFrog 平台中所有项目的列表及其详细信息
    • 输入参数:
    • 返回值: 项目列表
  3. get_specific_project

    • 获取 JFrog 平台中特定项目的详细信息
    • 输入参数:
      • project_key (字符串): 要检索的项目的唯一键
    • 返回值: 项目详细信息
  4. create_project

    • 在 JFrog 平台上创建新项目
    • 输入参数:
      • project_key (字符串): 项目的唯一标识符
      • display_name (字符串): 项目的显示名称
      • description (字符串): 项目描述
      • admin_privileges (对象): 项目的管理权限
      • storage_quota_bytes (数字): 存储配额(以字节为单位,-1 表示无限制)
    • 返回值: 创建的项目详细信息
  1. jfrog_get_package_info

    • 获取关于软件包的公开信息
    • 输入:
      • type (字符串):包的类型 (pypi, npm, maven, golang, nuget, huggingface, rubygems)
      • name (字符串):包的名称,如在包仓库中所示
      • version (可选字符串):包的版本 (默认: "latest")
    • 返回:包信息包括描述、最新版本、许可证和URL
  2. jfrog_get_package_versions

    • 获取带有发布日期的公开可用包的版本列表
    • 输入:
      • type (字符串):包的类型 (pypi, npm, maven, golang, nuget, huggingface, rubygems)
      • name (字符串):包的名称,如在包仓库中所示
    • 返回:带有发布日期的包版本列表
  3. jfrog_get_package_version_vulnerabilities

    • 获取影响特定开源包版本的已知漏洞列表
    • 输入:
      • type (字符串):包的类型 (pypi, npm, maven, golang, nuget, huggingface, rubygems)
      • name (字符串):包的名称,如在包仓库中所示
      • version (可选字符串):包的版本 (默认: "latest")
      • pageSize (可选数字):每页返回的漏洞数量 (默认: 10)
      • pageCount (可选数字):返回的页数 (默认: 1)
    • 返回:影响指定包版本的漏洞列表
  4. jfrog_get_vulnerability_info

    • 获取有关特定漏洞的详细信息,包括受影响的包和版本
    • 输入:
      • cve_id (字符串):要查找的CVE ID或漏洞标识符
      • pageSize (可选数字):每页返回的漏洞数量 (默认: 10)
      • pageCount (可选数字):返回的页数 (默认: 1)
    • 返回:详细的漏洞信息和受影响的包
  5. jfrog_get_package_curation_status

    • 检查特定包版本的管理状态
    • 输入:
      • packageType (字符串):包的类型 (pypi, npm, maven, golang, nuget, huggingface, rubygems)
      • packageName (字符串):包的名称,如在包仓库中所示
      • packageVersion (字符串):包的版本,如在包仓库中所示
    • 返回:管理状态 (approved, blocked, 或 inconclusive)

设置

通过Smithery安装

要通过Smithery自动为Claude Desktop安装mcp-jfrog:

npx -y @smithery/cli install @jfrog/mcp-jfrog --client claude

先决条件

  • Node.js v18 或更高版本
  • Docker(如果使用Docker部署,请参阅)
  • 一个有效的JFrog平台实例,并具有适当的权限
  • 在您的JFrog平台实例中创建和管理访问令牌的权限

环境变量

  • JFROG_ACCESS_TOKEN: 您的 JFrog 访问令牌(必需)
  • JFROG_URL: 您的 JFrog 平台的基本 URL(必需)

JFrog 令牌 (JFROG_ACCESS_TOKEN)

要使用此 MCP 服务器,您需要创建一个 JFrog 访问令牌或使用具有适当权限的身份令牌:

有关如何创建 JFrog 令牌的信息,请参阅 JFrog 官方文档:

JFrog URL (JFROG_URL)

您的 JFrog 平台实例 URL(例如 https://acme.jfrog.io

如何构建

使用 git clone 将仓库克隆到本地机器,并使用 cd 进入项目目录:

git clone git@github.com:jfrog/mcp-jfrog.git

cd mcp-jfrog

构建为 Docker 镜像:

docker build -t mcp/jfrog -f Dockerfile .

构建为 npm 模块:

npm i && npm run build

使用方法

npm

{
  "mcpServers": {
    "MCP-JFrog": { 
      "command": "npm",
      "args": [
        "exec",
        "-y",
        "github:jfrog/mcp-jfrog"
      ],
      "env": {
        "JFROG_ACCESS_TOKEN": "ACCESS_TOKEN",
        "JFROG_URL": "https://<YOUR_JFROG_INSTANCE_URL>"
      }
    }
  },
  "mcp-local-dev":{
      "command": "node",
      "args": [
        "/<ABSOLUT_PATH_TO>/mcp-jfrog/dist/index.js"
      ],
      "env": {
        "JFROG_ACCESS_TOKEN": "<ACCESS_TOKEN>>",
        "JFROG_URL": "<JFROG_URL>"
      }
    }
}

Docker

{
  "mcpServers": { 
    "jfrog": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "JFROG_ACCESS_TOKEN",
        "-e",
        "JFROG_URL",
        "mcp/jfrog"
      ],
      "env": {
        "JFROG_ACCESS_TOKEN": "<YOUR_TOKEN>",
        "JFROG_URL": "https://your-instance.jfrog.io" // Your JFrog platform URL
      }
    }
  }
}

将以下内容添加到您的 claude_desktop_config.json 中:

Docker

{
  "mcpServers": { 
    "jfrog": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "JFROG_ACCESS_TOKEN",
        "-e",
        "JFROG_URL",
        "mcp/jfrog"
      ],
      "env": {
        "JFROG_ACCESS_TOKEN": "<YOUR_TOKEN>",
        "JFROG_URL": "https://your-instance.jfrog.io" // Your JFrog platform URL
      }
    }
  }
}

npm

{
"mcpServers": {
    "MCP-JFrog": { 
      "command": "npm",
      "args": [
        "exec",
        "-y",
        "github:jfrog/mcp-jfrog"
      ],
      "env": {
        "JFROG_ACCESS_TOKEN": "ACCESS_TOKEN",
        "JFROG_URL": "https://<YOUR_JFROG_INSTANCE_URL>"
      }
    }
  }
}

许可证

此 MCP 服务器根据 Apache License 2.0 许可。这意味着您可以自由使用、修改和分发该软件,但需遵守 Apache License 2.0 的条款和条件。更多详情,请参见项目仓库中的 LICENSE.md 文件。

相关 MCP 服务