ToolTrust Scanner

io.github.AgentSafe-AI由 GitHub 帳號 AgentSafe-AI 發布v1.0.9更新於 Oct 24, 2026

Scans MCP servers for prompt injection, data exfiltration, and privilege escalation.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

靜態安全掃描器,為 MCP 伺服器及其工具定義評定 A–F 信任等級,辨識提示注入、資料外洩與權限提升風險。

可以做什麼
  • 掃描本機 MCP 設定,為每個伺服器與工具給出風險等級
  • 依指令啟動並掃描指定的 MCP 伺服器
  • 在記憶體中掃描原始 JSON 工具定義
  • 從 ToolTrust Directory 查詢伺服器的信任等級
  • 列出內建安全規則及其嚴重程度
適用情境
在把不熟悉的 MCP 伺服器加入設定之前使用,或讓助理稽核自身的工具集並取得風險等級與允許、需核准或封鎖的處置建議。
執行需求
以 stdio 在本機執行,通常透過 npx 免安裝啟動。掃描會把目標 MCP 伺服器當成子程序啟動,並讀取本機設定檔。目錄查詢與可選的 CVE 查詢需要網路連線;可用 TOOLTRUST_OSV_URL 指定其他 OSV 端點。
安裝前請注意
掃描伺服器會將其當成子程序執行,只應掃描你願意執行的程式碼。設定掃描會讀取本機 MCP 設定檔。目錄查詢會連線遠端 API,相依套件名稱與版本會傳送到 OSV 端點,該端點必須是可信服務。等級僅為靜態啟發式判斷,並不保證安全。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ToolTrust Scanner,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[ToolTrust]

ToolTrust Scanner

Static security scanner for MCP tool definitions
Trust grades (A–F) before your agent calls a tool — run as an MCP server, CLI, or CI check.

[CI] [Security] [Go Report Card] [License: MIT] [GitHub stars]


Every MCP tool your agent calls is an attack surface — prompt injection, data exfiltration, privilege escalation, supply-chain backdoors. ToolTrust scans tool definitions before your agent trusts them and assigns a trust grade (A–F) so you know the risk. ToolTrust is an MCP Server and a CLI/CI tool — not a host, gateway, or runtime proxy. Coverage is expanding beyond today’s MCP-focused workflows; skills and additional agent tool formats are on the roadmap.

Browse the live ToolTrust Directory — trust grades and scan-backed reports before you install.

[ToolTrust Directory UI]

MCP demo: run a full config scan from your agent.

[ToolTrust MCP demo]

Scan your setup in 30 seconds

Add ToolTrust as an MCP server and let your agent audit its own tools (stdio transport — no network listener; your host launches it as a subprocess):

json
{  "mcpServers": {    "tooltrust": {      "command": "npx",      "args": ["-y", "tooltrust-mcp"]    }  }}

Then ask your agent: "Run tooltrust_scan_config"

It reads your MCP config, connects to each server in parallel, scans every tool, and returns a risk report with grades and enforcement decisions — all in seconds.

Or use the CLI:

bash
curl -sfL https://raw.githubusercontent.com/AgentSafe-AI/tooltrust-scanner/main/install.sh | bashtooltrust-scanner scan --server "npx -y @modelcontextprotocol/server-filesystem /tmp"

Example snapshot (research cohort)

The public ToolTrust Directory holds current grades and aggregates as scanning scales. One published research pass illustrates the shape of the problem — 207 MCP servers, 3,235 tools — not an exhaustive count of everything we scan today:

MetricCount
MCP servers in cohort207
Individual tools analyzed3,235
Total security findings3,613
Servers with at least one finding145 (70%)
Servers with a clean Grade A22 (10%)
Servers with arbitrary code execution16

Only 10% of servers in that cohort had a clean Grade A. See tooltrust.dev for up-to-date directory-wide results (and use this table only as a labeled snapshot).

🔍 What it catches

ToolTrust runs 16 static tool-definition rules in this repo (AS-001–AS-011, AS-013–AS-017) plus 2 source-scan rules for embedded MCP implementations (AS-018, AS-019). AS-012 (tool drift) is evaluated in the ToolTrust Directory when new scan results are compared to previous runs.

IDSeverityDetects
🛡️ AS‑001CriticalTool Poisoning — Adversarial prompts hidden in tool descriptions (ignore previous instructions, <INST>)
🔑 AS‑002High/LowPermission Surface — exec, network, db, fs beyond stated purpose; over-broad input schema
📐 AS‑003HighScope Mismatch — Tool name contradicts its permissions (e.g. read_config with exec)
📦 AS‑004High/CriticalSupply Chain CVEs — Known CVEs in bundled dependencies via OSV
🔓 AS‑005HighPrivilege Escalation — admin/:write OAuth scopes; sudo/impersonate in descriptions
⚡ AS‑006CriticalArbitrary Code Execution — evaluate_script, _evaluate suffix, execute javascript, page.evaluate() patterns
ℹ️ AS‑007InfoInsufficient Tool Data — Tool lacks a valid description or schema
🚨 AS‑008CriticalKnown Compromised Package — Offline embedded blacklist of confirmed supply-chain attacks (LiteLLM 1.82.7/1.82.8, Trivy v0.69.4-v0.69.6, Langflow <1.9.0, Axios 1.14.1/0.30.4). Zero-latency, no network required.
🔤 AS‑009MediumTyposquatting — Tool name within edit-distance 2 of a well-known MCP tool, suggesting impersonation
🗝️ AS‑010MediumSecret Handling — Input params accepting API keys/passwords; credentials logged insecurely
⚡ AS‑011LowDoS Resilience — No rate-limit, timeout, or retry config on network/exec tools
🔄 AS‑012HighRug-Pull — Tool set changed between scans of the same version without a version bump (directory pipeline only)
👥 AS‑013High/MediumTool Shadowing — Duplicate or near-duplicate tool name hijacks calls intended for a trusted tool
ℹ️ AS‑014InfoDependency Inventory Unavailable — MCP server exposed neither metadata.dependencies nor a repo_url, so supply-chain coverage is limited and must be treated as incomplete
⚠️ AS‑015Medium/HighSuspicious NPM Lifecycle Script — npm dependency publishes preinstall / postinstall / similar install-time scripts; severity rises for remote-fetch or inline-execution patterns
🚨 AS‑016CriticalSuspicious NPM IOC Dependency — published npm metadata or install-time scripts reference a known malicious IOC package, domain, URL, or reviewed script pattern such as plain-crypto-js, even if the top-level package name is new
⚠️ AS‑017MediumSuspicious Data Exfiltration Description — tool description explicitly suggests sending user data, content, or conversation history to external / remote endpoints, without classifying it as prompt injection
ℹ️ AS‑018InfoEmbedded MCP Server Detected — source-level MCP SDK usage was found, but tools could not be enumerated from a manifest or live handshake, so manual review is still required
🔓 AS‑019HighUnauthenticated MCP Route Exposure — embedded MCP HTTP routes expose the same handler without equivalent authentication middleware

Full rule details: docs/RULES.md

How it works

  1. Parse — Connects to a live MCP server (or reads a JSON file) and extracts every tool definition
  2. Analyze — Runs tool-definition rules against each tool's name, description, schema, and permissions; source scans add embedded MCP implementation checks
  3. Grade — Assigns a numeric risk score and letter grade (A–F) per tool
  4. Enforce — Maps each grade to a gateway policy: ALLOW, REQUIRE_APPROVAL, or BLOCK

Pure static analysis. No LLM calls. No data leaves your machine (except optional CVE lookups). Runs in milliseconds. Deterministic and reproducible.

Install

bash
# One-line install (macOS / Linux)curl -sfL https://raw.githubusercontent.com/AgentSafe-AI/tooltrust-scanner/main/install.sh | bash
# Gogo install github.com/AgentSafe-AI/tooltrust-scanner/cmd/tooltrust-scanner@latest
# npx (no install needed)npx -y tooltrust-mcp

MCP tools

When running as an MCP server, ToolTrust exposes these tools to your agent:

ToolWhat it doesData access
tooltrust_scan_configScan all MCP servers in your .mcp.json or ~/.claude.jsonReads local config; spawns each server as subprocess
tooltrust_scan_serverLaunch and scan a specific MCP server by commandRuns user-supplied command as subprocess (stdio)
tooltrust_scanner_scanScan a raw JSON blob of tool definitionsIn-memory only; no subprocess or network
tooltrust_lookupLook up a server's trust grade from the ToolTrust DirectoryNetwork request to ToolTrust Directory API
tooltrust_list_rulesList all built-in security rulesLocal catalog only

CI / GitHub Actions

Block risky MCP servers in your pipeline:

yaml
- name: Audit MCP Server  uses: AgentSafe-AI/tooltrust-scanner@main  with:    server: "npx -y @modelcontextprotocol/server-filesystem /tmp"    fail-on: "approval"

Deployment and security

For deployment, use the install paths in Install or the workflow example in CI / GitHub Actions. For vulnerability reporting and disclosure policy, see docs/SECURITY.md.

Scan-before-install gate

Never add an untrusted MCP server to your config again:

bash
# Scans the server, then auto-installs if Grade A/B, prompts on C/D, blocks on Ftooltrust-scanner gate @modelcontextprotocol/server-memory -- /tmp
# Replace `claude mcp add` with a scanned installalias mcp-add='tooltrust-scanner gate'

Full gate options and pre-commit hook setup: docs/USAGE.md

Add a trust badge to your project

If your MCP server passes ToolTrust, let people know:

markdown
[![ToolTrust Grade A](https://img.shields.io/badge/ToolTrust-Grade%20A-brightgreen)](https://www.tooltrust.dev/)

[ToolTrust Grade A]


Supply-chain alert: ToolTrust detects and blocks confirmed compromised packages including LiteLLM v1.82.7/8 (TeamPCP backdoor), Trivy v0.69.4–v0.69.6, and Langflow < 1.9.0. If you encounter a Grade F with rule AS-008, remove the package immediately and rotate all credentials.


Usage guide · Developer guide · Contributing · Deployment & security · Changelog · Security · License: MIT

Vulnerability lookup completeness

If an OSV lookup fails (including rate limiting, service errors, malformed responses or timeouts), the scan fails with scan incomplete instead of issuing a success report or security grade. Partial lookup failure also fails the scan. CLI exits nonzero, MCP scan calls return tool errors, and gate does not install the server. This deliberately favors explicit incomplete results over availability; an OSV outage can prevent scans of tools with declared dependencies.

TOOLTRUST_OSV_URL optionally selects an OSV-compatible query endpoint (default: https://api.osv.dev/v1/query). Use only a trusted service: declared dependency names and versions are sent there. HTTPS is required, except numeric loopback HTTP for local integration fixtures; embedded credentials and fragments are rejected. There is no fallback to the public API when an override fails.

The project-local verification skill runs in GitHub Actions as CLI and MCP Verification, covering baseline paths, discovery regressions, and an owned loopback OSV fixture. Reports and command transcripts are uploaded even on failure. Live public OSV availability and MCP HTTP transport are not part of this job.

來源:README.md,提交 9ef1ed4

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.9最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分