Mcp Config Auditor

io.github.GuardBee由 GitHub 账号 GuardBee 发布v0.9.0更新于 Nov 3, 2026

Scans Cursor/Claude/Windsurf/VS Code MCP configs for unpinned versions, secrets, typosquats

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

审计本机上的 MCP 客户端配置与 agent SKILL.md 文件,检查未固定版本、密钥泄露、仿冒包、通配自动批准和影子 MCP 服务器。

可以做什么
  • 扫描 MCP 客户端配置文本或单个配置文件,检查未固定版本、密钥、仿冒包、通配自动批准和未认证远程端点
  • 扫描 agent SKILL.md 文件,检查无限制的 allowed-tools、指令覆盖、读取凭据文件和明文密钥
  • 扫描目录中的 mcp.json、mcp_config.json、claude_desktop_config.json 与 SKILL.md,并比对技能名称冲突
  • 比对传入的工具清单,检测跨服务器工具遮蔽、易混淆名称和重定向
  • 在常见宿主配置路径中发现已安装服务器,并标出不在组织允许清单中的服务器
  • 列出检查的宿主配置路径,以及带 OWASP MCP Top 10 标签的检查规则
适用场景
适合在信任一台开发机或一批终端的 MCP 环境之前做审查:检查配置中风险较高的启动方式、内嵌凭据或过宽的自动批准,审计 agent 技能,或找出组织允许清单之外的服务器。
运行要求
以 stdio 本地运行,通常通过 npx 使用已发布的 npm 包。扫描本身不需要账号、API 密钥或环境变量。可选的上传功能需要 GuardBee 仪表板工作区密钥 GUARDBEE_API_KEY,影子 MCP 发现需要允许清单文件。下载 MCP Index 需要网络,除非使用离线缓存。
安装前请注意
扫描为只读且不会启动服务器,但可选的上传会把清单发送到 GuardBee 仪表板,其中包含主机名、操作系统和系统用户名,除非排除用户信息。遥测默认关闭,可用 GUARDBEE_TELEMETRY 开启,届时会发送工具名、耗时和文件路径等短参数值。配置和技能文件可能含凭据;报告中的匹配项会被脱敏,但仍应确认哪些数据离开本机。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Config Auditor,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@guardbee/mcp-config-auditor

🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch

[npm version] [npm downloads] [License: MIT]

An MCP server that audits the MCP client config on a machine: Cursor mcp.json, Claude Desktop claude_desktop_config.json, Windsurf mcp_config.json, and VS Code mcp.json.

mcp-server-auditor reads an MCP server's source. This package reads the config that decides which servers an agent will run. It does not start those servers and it does not send the config anywhere.

Telemetry is off by default. With GUARDBEE_TELEMETRY=1 it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields like content, token or password are replaced with a placeholder. See @guardbee/mcp-telemetry.

Claude ──► mcp-config-auditor ──► mcp.json  (or host-wide discover)              │              ├─ Unpinned package     (npx -y pkg, @latest)              ├─ Typosquat            (one edit from a known server package)              ├─ Secret in env/args              ├─ autoApprove "*"              ├─ Remote HTTP without auth              ├─ Cross-server shadowing (when you pass a tool inventory)              ├─ Agent SKILL.md (allowed-tools, body, lookalike names)              └─ Shadow MCP discover  (OWASP MCP09 — host paths + org allowlist)

Checks

PatternSeverityOWASPWhat it means
unpinned_packagehighMCP04:2025A launcher (npx, uvx, pnpm, yarn, bunx, pipx) runs a package with no major.minor.patch pin
unpinned_container_imagehighMCP04:2025docker run / podman run starts an image by tag, not by @sha256: digest
typosquat_packagecriticalMCP04:2025The package name is one edit from a known MCP server package
secret_in_envcriticalMCP01:2025A credential-shaped value or a sensitive key with a long literal
secret_in_argscriticalMCP01:2025A token on the command line
auto_approve_wildcardcriticalMCP02:2025autoApprove / alwaysAllow is * or true
cleartext_remotehighMCP07:2025A non-loopback http:// URL
unauthenticated_remotehigh/mediumMCP07:2025A non-loopback URL with no Authorization / API-key header and no token env var
cross_server_tool_shadowhighMCP03:2025The same tool name on two servers
confusable_tool_namecriticalMCP03:2025Homoglyph or one-edit tool names across servers
cross_server_tool_redirecthighMCP03:2025A description tells the model to call another server's tool
skill_unrestricted_shellcriticalMCP02:2025allowed-tools includes bare Bash, shell, or *
skill_unrestricted_writehighMCP02:2025allowed-tools includes Write or Edit with no path limit
skill_instruction_overridecriticalMCP06:2025The skill tells the model to ignore prior instructions
skill_covert_instructioncriticalMCP06:2025The skill tells the model to hide its behavior from the user
skill_secret_file_readcriticalMCP01:2025The skill tells the model to read .ssh, .env, or a similar file
skill_at_secret_refcriticalMCP01:2025An @ reference inlines a credential path
secret_in_skillcriticalMCP01:2025A literal token is written in the skill file
skill_name_shadowhighMCP03:2025Two SKILL.md files use the same name
skill_confusable_namecriticalMCP03:2025Two skill names differ only by a lookalike character
shadow_mcp_serverhighMCP09:2025discover — server installed on the host but not on the org allowlist
allowlist_not_configuredmediumMCP09:2025discover ran without an allowlist
unreviewed_mcp_serverlowMCP09:2025Server seen during discover with no allowlist yet
mcp_server_drift_across_clientsmediumMCP09:2025Same server key maps to different packages/URLs in two clients
mcp_index_grade_below_minimumhigh (F: critical)MCP04:2025--min-grade — the server's GuardBee MCP Index grade is below the minimum

Loopback URLs (localhost, 127.0.0.1, ::1) are not remote findings. Placeholder values (${API_KEY}, changeme) are not secrets. Reported secret matches are redacted. Bash(git diff:*) is a command allowlist and is not an unrestricted shell. Read alone is not flagged.

Quick start

json
{  "mcpServers": {    "guardbee-mcp-config-auditor": {      "command": "npx",      "args": ["-y", "@guardbee/mcp-config-auditor"]    }  }}
bash
npx @guardbee/mcp-config-auditor scan .cursor/mcp.json --fail-on=high --format=sarif > results.sarifnpx @guardbee/mcp-config-auditor inventory ./tool-inventory.jsonnpx @guardbee/mcp-config-auditor discover --allowlist=./mcp-allowlist.json --fail-on=high

GuardBee MCP Index grades

--grades (on scan <file> and discover) shows the GuardBee MCP Index grade of every configured server: an A–F trust grade for each server in the official MCP Registry, rebuilt weekly from its published package. The grade comes from the shipped code (the GuardBee scanners), known vulnerabilities and malware (OSV), Sigstore build provenance and maintenance signals; the rubric is public and versioned. --min-grade=C also reports every server graded below C (mcp_index_grade_below_minimum, so --fail-on can gate on it).

bash
npx @guardbee/mcp-config-auditor discover --min-grade=C#   A  filesystem  npm:@modelcontextprotocol/server-filesystem  graded @modelcontextprotocol/[email protected]#   D  notes       npm:notes-mcp                                graded [email protected] (the config runs the latest version)#   –  internal    local command: not a registry package

The whole index is downloaded (and cached for a day in ~/.guardbee/mcp-index.json) and searched on this machine, so no server or package name is sent anywhere. --offline uses the cache only; --index-url= points at another copy. Local commands, remote URLs and servers outside the official registry have no grade and are never findings.

Shadow MCP discover (MCP09)

Walks well-known Cursor / Claude Desktop / Claude Code / Windsurf / VS Code / Gemini CLI / Cline / Zed paths on this machine and compares every installed server to an organization allowlist. Does not start servers. Claude Code's per-project servers (projects["<path>"].mcpServers in ~/.claude.json) are listed under claude-code:<path>; Zed's context_servers and JSON with comments are understood.

Inventory. --format=json adds an inventory: for every server its client, config path, name, transport, command and arguments, npm/PyPI package with version and whether it is pinned, URL, the names of its env variables and headers, auto-approve, and the findings for it. It never holds a secret: env and header values are left out, argument values after --token/--api-key-style flags, KEY=value pairs, provider tokens and passwords in connection strings are [redacted], and URLs lose their credentials and query values. --format=text prints the same list; --format=sarif the findings.

Fleet. FLEET.md has Jamf, Intune, systemd and CI recipes. --allowlist-from-dashboard checks against the organization allowlist admins manage in the dashboard (merged with --allowlist when both are given), and --grades adds MCP Index grades to the uploaded inventory.

Organisation-wide. --upload sends the inventory to the GuardBee dashboard (GUARDBEE_API_KEY, a workspace key with the gateway.write scope), which keeps the latest inventory per machine; run it from your device-management tool or a login script. The machine's host name, OS and OS user name are included — --no-user leaves the user out.

bash
GUARDBEE_API_KEY=gb_… npx @guardbee/mcp-config-auditor discover --allowlist=./mcp-allowlist.json --upload --fail-on=none

Allowlist JSON:

json
{  "names": ["filesystem", "github"],  "packages": ["@modelcontextprotocol/server-filesystem", "@guardbee/mcp-secret-scanner"],  "hosts": ["mcp.example.com"]}

Or lines: name:filesystem, package:@scope/pkg, host:mcp.example.com, or a bare server name.

A directory scan opens mcp.json, mcp_config.json, claude_desktop_config.json, and SKILL.md. Pass a file path to scan any other name. A file named SKILL.md is audited as an agent skill. Same-name and lookalike skill findings appear on a directory scan, because one file cannot see the others.

guardbee.yml:

yaml
mcp-config-auditor:  fail-on: high  max-files: 5000  exclude:    - "fixtures/"

Tool inventory shape:

json
{  "servers": [    { "name": "github", "tools": [{ "name": "create_issue", "description": "Open an issue" }] }  ]}

Shadowing needs that inventory because a client config does not list tools. rug-pull-detector can collect a live tools/list; this package compares several of those lists.

Feedback

Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.

来源:packages/mcp-config-auditor/README.md,提交 8cc1e03

工具

8

scan_config_text

Scan an MCP client config JSON string (Cursor mcp.json, Claude Desktop, Windsurf, or VS Code) for unpinned packages, secrets, wildcard auto-approve, unauthenticated remote endpoints, and typosquats.

输入参数labelcontent必填

scan_file

Scan one MCP client config file, or a SKILL.md agent skill when the file has that name.

输入参数path必填

scan_skill_text

Scan one agent SKILL.md (YAML frontmatter plus body) for unrestricted allowed-tools, instruction override, credential file reads, and literal secrets. Name collisions across skills require a directory scan.

输入参数labelcontent必填

scan_directory

Find mcp.json, mcp_config.json, claude_desktop_config.json, and SKILL.md under a directory and audit each one. A directory scan also compares skill names. Does not start any MCP server.

输入参数path必填excludemaxFiles

scan_inventory

Detect cross-server tool shadowing from an inventory of tool catalogs. Pass the tool names and descriptions already collected from each installed server. This tool does not connect to those servers.

输入参数inventory必填

discover_shadow_mcp

OWASP MCP09:2025 — discover MCP client configs in well-known host paths (Cursor, Claude Desktop, Windsurf, VS Code, Claude Code) and flag servers that are not on an organization allowlist (Shadow MCP). Does not start any MCP server.

输入参数homeallowlistincludeContentAudit

list_host_config_paths

List the well-known MCP client config paths this auditor checks during shadow (MCP09) discovery on the current OS.

输入参数home

list_patterns

List the MCP config, agent skill, shadow-MCP discovery, and cross-server shadowing checks, with their OWASP MCP Top 10 tags.

无需输入参数。

版本历史

6
  1. v0.9.0最新Nov 1, 2026
  2. v0.8.1Oct 30, 2026
  3. v0.7.0Oct 29, 2026
  4. v0.6.2Oct 22, 2026
  5. v0.6.1Oct 22, 2026
  6. v0.5.0Oct 14, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分