关于 MCPVetter
MCPVetter 是供 MCP 服务管理者和 AI 生成代码审查者使用的本地审计工具。它扫描配置中的安全风险,经批准后可检查服务描述,并跟踪工具指纹变化。
主要功能
- 01离线静态扫描 MCP 配置
- 02实时检查工具、提示词和资源
- 03检测密钥、危险访问和投毒描述
- 04跟踪服务工具指纹变化
- 05生成带脱敏证据的文本与 JSON 报告
- 06可作为本地 MCP 服务运行
适用场景
- 01使用前审计已配置的 MCP 服务
- 02检查服务工具描述中的可疑内容
- 03查看服务更新后的工具变化
- 04在 CI 中运行安全扫描
MCP 相关
MCPVetter 可审计 MCP 服务配置,也能作为本地 MCP 服务运行。实时扫描会在获准后启动 stdio 服务并读取其列表,但不会调用工具。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcpvetter.com/mcpclaude mcp add --transport http com-mcpvetter-mcpvetter https://mcpvetter.com/mcp{"mcpServers":{"com-mcpvetter-mcpvetter":{"type":"http","url":"https://mcpvetter.com/mcp"}}}在 Cursor 中打开{"servers":{"com-mcpvetter-mcpvetter":{"type":"http","url":"https://mcpvetter.com/mcp"}}}在 VS Code 中打开{"mcpServers":{"com-mcpvetter-mcpvetter":{"type":"http","url":"https://mcpvetter.com/mcp"}}}{"mcpServers":{"com-mcpvetter-mcpvetter":{"serverUrl":"https://mcpvetter.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
mcpvetter
审计 AI 助手使用的 MCP 服务:泄露的密钥、未固定版本或仿冒的软件包、有风险的启动命令、未加密的远程服务、过宽的文件访问权限、被投毒的工具描述、隐藏的 Unicode 字符、工具劫持,以及静默的工具变更。
npx mcpvetter scan # discover + static scan, offline
npx mcpvetter scan --live # also read each server's tool descriptions (asks first)
本地运行,无需账号,不收集遥测数据。静态扫描只会读取 MCP 配置文件,不会读取其他内容。它绝不会修改配置文件。
检查结果示例
■ github
[HIGH] Plain-text secret in MCP config MCP-SECRET-001 · confidence high · static
server: github file: .mcp.json
Evidence: env GITHUB_PERSONAL_ACCESS_TOKEN=ghp_…[redacted 40 chars] (GitHub token)
Why it matters: Anything that can read this file, including other tools, backups, sync
folders, and anyone the file is shared or committed with, gets a working credential.
Fix: Rotate the credential first (removing it does not un-leak it), then reference it
from the environment or a secret store instead of the literal value. Claude Code and
Claude Desktop expand "${VAR}" in .mcp.json, Cursor expands "${env:VAR}", and VS Code
supports "${input:...}" prompts or an "envFile".
每项检查结果都包含一个稳定 ID、分别列出的严重性和置信度、已脱敏的证据、通俗易懂的原因说明,以及具体的修复方法。每条规则的检查内容和方式都发布在 mcpvetter.com/rules 和 src/scanner/rules 中。
已发现的客户端
Claude Code(~/.claude.json、.mcp.json)、Claude Desktop、Cursor(~/.cursor/mcp.json、.cursor/mcp.json)、VS Code(mcp.json、settings.json、.vscode/mcp.json)、Windsurf、Gemini CLI。也可以传入 --config <file>。
命令
mcpvetter scan [--live] [--yes] [--config <file>]... [--json [file]] [--summary] [--fail-on <severity>]
mcpvetter list inventory only
mcpvetter explain MCP-POISON-001 explain a finding
mcpvetter rules every rule and what it checks
mcpvetter suppress <ID> --server <name> --reason "<why>"
mcpvetter accept <server> --reason "<why>" accept a server's new tool fingerprint
mcpvetter serve run as a local MCP server (stdio)
退出代码:0 表示没有达到或超过 --fail-on(默认为 high)级别的检查结果;1 表示存在达到或超过该级别的检查结果;2 表示扫描无法完成。可直接在 CI 中使用。
抑制项始终会列在报告中,因此共享报告不会将其隐藏。
关于 --live
要读取工具描述,MCPVetter 必须启动每个 stdio 服务,与你的 AI 客户端每次启动时完全一样。它会在启动每个服务前征求许可,使用最小化环境和配置中声明的环境变量运行服务,并且只调用 initialize、tools/list、prompts/list 和 resources/list。它绝不会调用工具。首次获准探测时,会将每个服务的工具指纹记录到 ~/.mcpvetter/fingerprints.json;后续探测会报告任何变更(“拉地毯”攻击),并提供变更前后的差异。
在 AI 助手中使用
Claude Code:
claude mcp add mcpvetter -- npx -y [email protected] serve
Cursor / VS Code / Claude Desktop(mcpServers 或 servers):
{ "mcpServers": { "mcpvetter": { "command": "npx", "args": ["-y", "[email protected]", "serve"] } } }
然后询问:“审计我的 MCP 设置”。
无需账号即可免费使用:check_mcp_setup、explain_finding。使用 API 密钥(MCPVETTER_API_KEY,可在 mcpvetter.com/account 免费获取):review_code、secure_pattern、start_lab、check_lab、team_posture。代码审查在你的机器上运行;仅会发送规则 ID 和计数,用于记录历史。套餐:mcpvetter.com/pricing。
隐私
- 静态分析在你的机器上运行。不使用 API 密钥时,MCPVetter 不会发出网络请求。
- 使用 API 密钥时,仅会发送规则 ID、严重性和计数。绝不会发送代码、证据、文件路径或服务名称。
- 默认情况下,报告会对密钥值进行脱敏。
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。