OWASP MCP Top 10に基づいてModel Context Protocol サーバーを監査し、セキュリティ脆弱性の特定と安全性のグレード判定を行います。
別名 CodingSelim/mcp-scan, owasp-mcp-scan
- スター
- 0
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- 0.2.1
- 最終コミット
- 2026年10月10日
- ライセンス
- MIT
scan MCPとは
scanはMCPサーバーです。 OWASP MCP Top 10に基づいてModel Context Protocol サーバーを監査し、セキュリティ脆弱性の特定と安全性のグレード判定を行います。.
プロジェクトのREADMEから生成された概要
scan MCP server について
mcp-scanの主な機能は、Model Context Protocol サーバーのセキュリティ脆弱性を監査することです。このツールは、稼働中のサーバーを OWASP MCP Top 10 に照らして評価し、コマンドインジェクション、パス・トラバーサル、機密情報の露出などのリスクを特定します。分析結果に基づいて A から F までの安全性をグレード付けし、開発者がワークフローにサーバーを統合する前にその安全性を検証できるよう支援します。
ユーザーは、npx を使用したコマンドラインインターフェース(CLI)経由でスキャナーを実行でき、ローカルの stdio サーバーまたはリモートの HTTP エンドポイントを対象にできます。パッシブかつ読み取り専用として設計されているため、ツールを呼び出したりエクスプロイトを送信したりすることなく機能を分析するだけであり、本番環境でも安全に使用できます。スキャナーの結果は、CI/CD パイプラインへの統合が可能な console、JSON、または SARIF 形式で出力されます。
個別のツールチェックに加え、このスキャナーは特殊な toxic-flow 分析を使用して、「プライベートデータの読み取り」「信頼できないコンテンツの取り込み」「情報の流出」という致命的な3要素の組み合わせを検出します。また、このツール自体を MCP server としてインストールすることも可能で、Claude Desktop、Cursor、Windsurf などの AI クライアントが scan_mcp_server ツールを使用して、オンデマンドでセキュリティ監査を実行できるようになります。
できること
- 1ローカルサーバーの監査開発者は、エージェントに接続する前に、ローカルファイルシステムの MCP server に対してセキュリティチェックを実行できます。
- 2CI/CD でのセキュリティ自動化サーバーがハイリスクなセキュリティグレードを受けた場合にビルドを失敗させることで、デプロイメントパイプラインに制限をかけることができます。
- 3複雑なデータ流出の検出セキュリティリサーチャーは、toxic-flow チェックを通じて、データの読み取り機能と流出機能を組み合わせたサーバーを特定できます。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
scan MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude Codeにscan MCPをインストール
$ claude mcp add mcp-scan -- npx -y owasp-mcp-scanCursorにscan MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-scan": {
"command": "npx",
"args": [
"-y",
"owasp-mcp-scan"
]
}
}
}VS Codeにscan MCPをインストール
.vscode/mcp.json
{
"servers": {
"mcp-scan": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"owasp-mcp-scan"
]
}
}
}VS Code CLIにscan MCPをインストール
$ code --add-mcp '{"name":"mcp-scan","type":"stdio","command":"npx","args":["-y","owasp-mcp-scan"]}'Claude Desktopにscan MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"mcp-scan": {
"command": "npx",
"args": [
"-y",
"owasp-mcp-scan"
]
}
}
}Codexにscan MCPをインストール
$ codex mcp add mcp-scan -- npx -y owasp-mcp-scanCodex config.tomlにscan MCPをインストール
~/.codex/config.toml
[mcp_servers.mcp-scan] command = "npx" args = ["-y", "owasp-mcp-scan"]
Gemini CLIにscan MCPをインストール
$ gemini mcp add -s user mcp-scan npx -- -y owasp-mcp-scanGemini settings.jsonにscan MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"mcp-scan": {
"command": "npx",
"args": [
"-y",
"owasp-mcp-scan"
]
}
}
}自動チェック
実行日 2026年11月15日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能codingselim/mcp-scan is public and reachablegithub.com/codingselim/mcp-scan ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)No build attestation published for this release未チェック
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-10-10github.com/codingselim/mcp-scan ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from owasp-mcp-scan合格
- パッケージおよびその依存関係に重大な勧告なし100 resolved dependencies checked; no critical advisoryosv.dev ↗合格
- モデルへの隠れた指示がない0 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされている未チェック
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見る🛡️ mcp-scan
Passive security scanner for Model Context Protocol servers. Point it at any running MCP server; it audits the live server against the OWASP MCP Top 10 and grades it A–F. Read-only, so it is safe to run against production.
npx owasp-mcp-scan --stdio "npx -y @modelcontextprotocol/server-filesystem /tmp"
I ran it against the 12 most-installed MCP servers. 9 of them failed. No install, no config, no exploiting anything.
Why
MCP tool descriptions are fed straight into your model's context, and most public servers were never security-reviewed. A bad one can hide instructions in a description, expose a raw-shell tool, or leak a key; and your agent acts on it. Endor Labs found 82% of servers prone to path traversal, 34% to command injection.
mcp-scan is the gut-check before you wire a server in. It's passive: it reads advertised capabilities and analyzes them statically, never invoking tools, so it's safe against production servers.
How it works
- Connects to the server over stdio or Streamable HTTP and enumerates every advertised tool, prompt, and resource.
- Runs 12 static checks across that surface: secrets, injection, SSRF, path traversal, tool poisoning, excessive scope, and more.
toxic-flowreasons across the whole toolset for the lethal trifecta (reads private data + ingests untrusted content + can exfiltrate), the shape single-tool scanners miss.- Scores 0-100 and grades A-F (any critical forces F). Emits console, JSON, or SARIF.
It never calls a tool, never fuzzes, and never sends an exploit. The worst it does is read what the server already tells everyone.
Real findings on real servers
12 popular npm servers, actual output (snapshot 2026-07-11, full benchmark):
| Server | Tools | Grade | 🔴 | 🟠 | 🟡 | Notable |
|---|---|---|---|---|---|---|
firecrawl-mcp |
26 | F | 2 | 11 | 1 | lethal trifecta (MCP10) + code exec (MCP05) |
@modelcontextprotocol/server-filesystem |
14 | F | 0 | 1 | 11 | unconstrained path params (MCP01) |
@modelcontextprotocol/server-puppeteer |
7 | F | 1 | 2 | 0 | script param executes JS (MCP05) |
tavily-mcp |
5 | F | 0 | 3 | 1 | untrusted-input + exfiltration (MCP10) |
@modelcontextprotocol/server-memory |
9 | F | 0 | 3 | 0 | delete_* tools, no confirmation (MCP02) |
@modelcontextprotocol/server-github |
26 | D | 0 | 0 | 2 | state-changing tools (MCP02) |
@modelcontextprotocol/server-slack |
8 | C | 0 | 1 | 0 | reads + posts = data + exfil (MCP10) |
@modelcontextprotocol/server-everything |
13 | A | 0 | 0 | 0 | clean ✓ |
@kazuph/mcp-fetch |
1 | A | 0 | 0 | 0 | clean ✓ |
9 of 12 flagged, 3 clean, every row audited finding-by-finding, false positives stripped rather than padded. Reproduce any row yourself:
npx owasp-mcp-scan --stdio "npx -y firecrawl-mcp" # F: lethal trifecta + code exec
npx owasp-mcp-scan --stdio "npx -y @modelcontextprotocol/server-everything" # A: clean
Use it
CLI
npx owasp-mcp-scan --stdio "<command>" # local stdio server
npx owasp-mcp-scan --url https://host/mcp --header "Authorization: Bearer $TOKEN"
npx owasp-mcp-scan --config ~/.cursor/mcp.json --format sarif --output mcp.sarif
As an MCP server, let your agent scan servers on demand ("scan this MCP server before I add it"). Add to any client; this mcpServers shape works in Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, and Gemini CLI:
{ "mcpServers": { "mcp-scan": { "command": "npx", "args": ["-y", "owasp-mcp-scan", "--serve"] } } }
OpenAI Codex (~/.codex/config.toml):
[mcp_servers.mcp-scan]
command = "npx"
args = ["-y", "owasp-mcp-scan", "--serve"]
Exposes two tools: scan_mcp_server (audit a stdio/HTTP target) and list_checks.
Claude Code plugin
/plugin marketplace add CodingSelim/mcp-scan
/plugin install mcp-scan@mcp-scan
Also on the official MCP registry as io.github.CodingSelim/mcp-scan. Publishing steps: PUBLISHING.md.
What it checks
Full OWASP MCP Top 10 (2025) coverage, 12 checks:
| Check | OWASP | Catches |
|---|---|---|
secret-exposure |
MCP01 | AWS / OpenAI / Anthropic / GitHub / GitLab / Stripe / SendGrid / npm / HF / DB URIs / JWT / private keys in advertised text |
transport |
MCP01 | Plaintext http:// to a non-loopback host |
path-traversal |
MCP01 | file:///{path} templates and unconstrained path params |
excessive-scope |
MCP02 | Destructive tools (delete, drop, transfer) with no confirmation |
tool-poisoning |
MCP03 | Instruction overrides, hidden exfiltration directives, zero-width / Unicode-tag smuggling |
tool-shadowing |
MCP03 / MCP09 | Duplicate tool-name collisions and "call me first" precedence injection |
supply-chain |
MCP04 / MCP09 | Unpinned/placeholder versions and homoglyph server names |
command-injection |
MCP05 | Unconstrained command / shell / code params, raw SQL, advertised execution |
ssrf |
MCP05 | Arbitrary url / host params with no allowlist |
tool-poisoning (dynamic) |
MCP06 | Injection in resource contents and server instructions |
authn |
MCP07 | HTTP servers that complete an unauthenticated handshake |
telemetry |
MCP08 | High-impact tools with no audit trail (advisory, unscored) |
toxic-flow |
MCP10 | Lethal trifecta: one server that reads private data, ingests untrusted content, and can exfiltrate |
toxic-flow is the standout, it reasons across the whole toolset, catching the GitHub-MCP / email-agent injection shape that per-tool checks miss.
Output & CI
console (default) · json · sarif (GitHub Code Scanning). Exit code is non-zero at/above --fail-on (default high), so it gates CI:
- run: npx owasp-mcp-scan --url ${{ secrets.MCP_URL }} --format sarif --output mcp.sarif
- uses: github/codeql-action/upload-sarif@v3
with: { sarif_file: mcp.sarif }
Limitations (read these)
- Static analysis can't see runtime sandboxing, a server that safely confines paths still flags them. Verify against actual enforcement.
- Auth and transport checks apply to HTTP targets only.
- Heuristics favor recall, so triage findings in context. When a rule is tightened to kill a false positive, a test pins the intended behavior.
- Scanning a stdio target spawns that command, so run it only on servers you trust.
Develop
npm install && npm run build && npm test # 48 tests, incl. live end-to-end fixture scans
Checks are pure and isolated (src/checks/), reusing detectors in src/detectors/. See CONTRIBUTING.md.
References
OWASP MCP Top 10 · MCP Security Cheat Sheet · Vulnerable MCP Project · MCPTox
MIT © CodingSelim
scan MCPのよくある質問
scan MCPをClaude Codeに追加するには
ターミナルでclaude mcp add mcp-scan -- npx -y owasp-mcp-scanを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
scan MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
本番環境のサーバーに対して実行しても安全ですか?
はい。本番環境でも安全に使用できるパッシブな読み取り専用スキャナーです。ツールを呼び出すことなく、公開されている機能(capabilities)を分析します。
スキャナーは何をチェックしますか?
機密情報の露出、インジェクション、SSRF、パス・トラバーサル、および「toxic-flow」の3要素を含む、12項目の静的チェックを実行します。