跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Snyk,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
在 AI 智能体中查看 Snyk:组织、目标和项目,所有产品的漏洞及其他问题(含修复信息和依赖路径),SBOM、依赖、按 purl 检查软件包、成员、忽略规则和策略;经你确认后还能给项目打标签、设置项目属性并忽略问题。
试试这样问
Snyk 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Snyk、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Snyk + Meta Muse
在 AI 智能体中查看 Snyk:组织、目标和项目,所有产品的漏洞及其他问题(含修复信息和依赖路径),SBOM、依赖、按 purl 检查软件包、成员、忽略规则和策略;经你确认后还能给项目打标签、设置项目属性并忽略问题。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
SNYK_API_URL, SNYK_TOKEN
步骤 1 — 获取凭证
设置大约需要 3 分钟。使用 API 需要 Snyk Enterprise 方案:Free 和 Team 的令牌只能用于 CLI 和 IDE,在这里会返回 401 或 403。
- 创建令牌。共享连接器最好使用 service account:在 Organization 或 Group settings 的 Service accounts 中创建,只读取时用 Org Collaborator 角色,需要忽略规则和属性时用 Org Admin。个人使用可以在 Account settings 的 Personal access tokens 中创建 personal access token(最长 90 天后过期),或使用 Account settings 中的 API 令牌。
- 把它粘贴到
SNYK_TOKEN,不要带token或Bearer之类的前缀。它会以Authorization: token <key>的形式发送。 - 把
SNYK_API_URL设为你所在区域的 API,不带/rest或/v1:https://api.snyk.io(app.snyk.io)、https://api.us.snyk.io(app.us.snyk.io)、https://api.eu.snyk.io(app.eu.snyk.io)、https://api.au.snyk.io(app.au.snyk.io)或https://api.snykgov.io(Snyk for Government)。看你的 Snyk 应用地址就能知道是哪一个。 - 安装连接器,先运行
snyk_get_self,再运行snyk_list_orgs获取组织 id。
连接器使用 Snyk 的 REST API(版本 2026-03-25),REST 没有对应功能的地方则使用 v1 API。
id:每个工具都使用组织的 id(来自 snyk_list_orgs 的 UUID),而不是 slug。snyk_list_issues 返回的 REST 问题 id 是 UUID;v1 工具(snyk_list_issue_paths、snyk_create_ignore、snyk_delete_ignore)使用 v1 问题 id,例如 SNYK-JS-LODASH-567746,即 snyk_list_aggregated_issues 中的 id,在 REST 问题中为 attributes.problems[].id。
可以读取:
- 资产清单:
snyk_get_self、snyk_list_orgs、snyk_get_org、snyk_list_targets和snyk_get_target(仓库、容器镜像、CLI 上传),snyk_list_projects和snyk_get_project(含类型、来源、标签、属性以及按严重程度统计的最新问题数),snyk_list_integrations(GitHub、GitLab、Bitbucket Cloud、Azure Repos、Docker Hub、ECR 等)和snyk_list_org_members。 - 问题:
snyk_list_issues查看整个组织,snyk_list_project_issues查看单个项目,涵盖开源漏洞和许可证、Code、IaC、容器和密钥泄露。可按类型、effective_severity_level、状态(open、resolved)、是否已忽略或日期筛选;再用snyk_get_issue查看受影响的软件包版本和修复方法。 - 修复:
snyk_list_aggregated_issues适用于开源和容器项目,给出软件包和版本、CVSS 和优先级评分、漏洞利用成熟度、能否升级或打补丁以及已修复的版本;snyk_list_issue_paths列出把漏洞软件包带入项目的每条依赖路径。 - 供应链:
snyk_get_project_sbom以 CycloneDX 1.4 至 1.6(JSON 或 XML)或 SPDX 2.3 JSON 导出项目最近一次扫描的 SBOM,snyk_list_dependencies显示某个软件包在哪些项目中使用,snyk_list_package_issues在你引入某个软件包版本之前按 purl(例如pkg:npm/[email protected])进行检查。 - 忽略规则:
snyk_list_project_ignores(v1,开源和容器项目),以及snyk_list_policies和snyk_get_policy,用于查看 Snyk Code 和较新产品使用的组织级 consistent ignore。
经你确认后可以修改:snyk_add_project_tag 和 snyk_remove_project_tag(键和值,例如 team:payments)、snyk_set_project_attributes(业务重要性、环境和生命周期;传入的列表会替换旧值)以及 snyk_create_ignore。忽略会让漏洞不再出现在测试、报告和 pull request 检查中,因此 AI 会说明问题、项目、原因类型(not-vulnerable、wont-fix 或 temporary-ignore)和到期时间,优先使用带结束日期的临时忽略,并在你同意后才调用。
安装时关闭:snyk_delete_ignore。它会删除项目中某个问题的全部忽略规则,连同原因和历史记录,且无法撤销,因此需要时由工作区管理员开启。
数据格式:REST 响应采用 JSON:API:字段位于 data[].attributes,关联 id 位于 relationships。严重程度为 critical、high、medium 和 low(部分产品还有 info);effective_severity_level 包含你的组织对严重程度所做的调整。日期为 UTC 的 ISO 8601。大型项目的 SBOM 体积很大。
分页:REST 列表接受 limit(默认 20,最多 100)并返回 links.next;AI 会把该链接中的值作为 starting_after 继续调用,直到 links.next 消失。v1 工具用 page 和 perPage 分页。
限制:Snyk 允许每个令牌每分钟约 1,620 个 REST 请求,每个用户每分钟 2,000 个 v1 请求;收到 429 请等待一分钟。
常见错误:401 表示令牌错误、已过期或已吊销,属于其他区域(检查 SNYK_API_URL),或方案没有 API 访问权限。403 表示令牌的角色不允许在该组织中进行此调用。404 表示 id 错误,或在需要 id 的地方传了组织 slug。400 或 422 会指出错误的参数。
连接器不会启动测试或扫描,不导入仓库,不删除、停用或移动项目和目标,也不创建组织级策略。组级报告、审计日志、设置、集成配置、成员和邀请、service account、Snyk Apps 以及 cloud 和 AI-BOM 相关端点均不在支持范围内。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Muse 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Muse 以自定义连接器的形式添加远程 MCP 服务器,并通过 OAuth 登录。
- 在 Muse 中打开 Settings → Connectors,选择 Add custom connector。
- 粘贴 MCP 服务器 URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。 - Muse 会打开 AnythingMCP 的登录页面:登录并批准访问。
- 在聊天中,向 Muse 提出需要用到
Snyk的工具的请求。
你也可以在聊天中完成设置,适用于网页版、iOS 和 Android 应用以及 WhatsApp。给 Muse 发送这条消息:
Create a Custom Connector for a new remote MCP server, then connect to it:
Name: AnythingMCP
Transport: remote streamable HTTP
URL: https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID
Auth: OAuth
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Muse 从 Meta 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
snyk_get_self | Read the Snyk user or service account the token belongs to: id, name, username, email and default organization |
snyk_list_orgs | List the organizations the token can access: id, name, slug, group id and whether it is personal |
snyk_get_org | Read one organization: name, slug, group id and dates |
snyk_list_projects | List the projects of an organization (one per scanned manifest, container image, Code or IaC target): id, name, type, origin, target… |
snyk_get_project | Read one project: name, type, origin, target file and reference, status, test frequency, tags, attributes and the latest issue counts |
snyk_list_issues | List the issues of a whole organization across all products (open source vulnerabilities and licenses, Code, IaC, container, secrets): id… |
snyk_list_project_issues | List the issues of one project, with the same fields and filters as snyk_list_issues |
snyk_get_issue | Read one issue by its id from snyk_list_issues: title, severity, status, problems, coordinates with the affected package versions and… |
snyk_list_targets | List the targets of an organization (a repository, container image or CLI upload that holds projects): id, display name, URL, private flag… |
snyk_get_target | Read one target: display name, URL, private flag, source type and dates |
snyk_get_project_sbom | Export the software bill of materials (SBOM) of a project from its latest scan, in CycloneDX or SPDX: every component with version, purl… |
snyk_list_package_issues | Check one open source package version for known vulnerabilities before using it, by its package URL (purl), e.g. pkg:npm/[email protected] or… |
snyk_list_org_members | List the members of an organization: user id, name, username, email, login method and role |
snyk_list_policies | List the organization-level ignore policies (the consistent ignores used by Snyk Code and newer products): id, name, ignore type, reason… |
snyk_get_policy | Read one organization-level policy: its condition (the finding it matches), ignore type, reason, expiry and review state |
snyk_list_aggregated_issues | List the open source or container issues of one project with fix details from the v1 API: package and version, severity, CVSS and priority… |
snyk_list_issue_paths | Show how a vulnerable package gets into a project: every dependency path from the project to the issue, with the package versions along the… |
snyk_list_dependencies | List the open source dependencies used across an organization's projects: package name and version, type, licenses, how many issues by… |
snyk_list_project_ignores | List the ignores of one project (v1): for each issue id the ignore rules with reason, reason type, expiry, path and who created them |
snyk_list_integrations | List the SCM and registry integrations of an organization (github, gitlab, bitbucket-cloud, azure-repos, docker-hub, ecr ...) with their… |
snyk_add_project_tag | Add a tag (key and value) to a project, e.g. team:payments, to group and filter projects |
snyk_remove_project_tag | Remove a tag (key and value) from a project |
snyk_set_project_attributes | Set a project's business criticality, environment and lifecycle attributes, which feed prioritisation and reports |
snyk_create_ignore | Ignore an issue in a project (v1, open source and container projects), so it no longer counts in tests, reports and pull request checks |
snyk_delete_ignore | Delete all ignore rules of an issue in a project (v1), so it counts again in tests and reports |
示例提示
- “我们 Snyk 组织中,哪些项目目前有未解决的严重(critical)漏洞?”
- “pkg:npm/[email protected] 可以安全使用吗?如果不行,哪个版本修复了这些问题?”
- “api-server 项目中,哪些高危问题可以通过升级修复?每个问题是经由哪个依赖引入的?”
- “把 checkout-service 项目的 SBOM 导出为 CycloneDX JSON。”
- “在 web-frontend 项目中把 SNYK-JS-LODASH-567746 以 temporary-ignore 忽略到年底,原因:我们的代码无法触达该漏洞。”
FAQ
Muse 在哪些地区可用? Meta 目前在美国和加拿大提供 Muse,可在网页版、iOS 和 Android 应用以及 WhatsApp 中使用。
Meta 会审核这个连接器吗? 不会。Meta 不审核自定义连接器。Muse 只能看到你在 AnythingMCP 中为此 MCP 服务器启用的工具,你也可以随时在 Settings → Connectors 中断开它。
下一步
这份指南对你有帮助吗?