
Injectshield
io.github.bch1212由 GitHub 帳號 bch1212 發布v0.1.4更新於 Oct 25, 2026
Prompt-injection firewall for AI agents — scan untrusted text before LLM calls.
概覽
本機 MCP 伺服器,把 InjectShield 提示注入偵測 API 包成工具,讓助理在把不可信文字或網頁交給另一個 LLM 前先掃描。
- 可以做什麼
- 掃描字串中的提示注入,回傳判定結果、信心分數、威脅類別、命中的樣式 ID,以及可選的淨化版本(將注入片段遮蔽)。抓取 URL 並掃描其內容,自動視為網頁內容處理。列出支援的威脅類別、內容類型與敏感度等級。
- 適用情境
- 當助理要讀取不可信文字、抓取的網頁或檔案,並希望在把內容送進另一個 LLM 呼叫前檢查提示注入時適用。它是輔助防線,不能取代其他防護措施。
- 執行需求
- 透過 npx 從 npm 套件 @injectshield/mcp 以本機 stdio 程序執行,需要 Node.js。需在 INJECTSHIELD_API_KEY 環境變數提供 API 金鑰,可從廠商網站取得(免費額度標示為每月 1 萬次請求)。可用 INJECTSHIELD_API_BASE 覆寫 API 位址以支援自架部署。需要能連線至 InjectShield API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Injectshield,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@injectshield/mcp
MCP server for InjectShield — exposes the InjectShield prompt-injection-detection API as MCP tools so any MCP-compatible client (Claude Code, Cursor, Cline, etc.) can scan untrusted text before passing it into another LLM call.
Tools
scan— Scan a string for prompt-injection. Returns verdict, confidence, threat category, matched pattern IDs, and an optional sanitized version with injection spans redacted.scan_url— Fetch a URL and scan its body. Sets context toweb_contentautomatically.patterns— List supported threat categories, context kinds, and sensitivity levels.
Get an API key
Free tier: 10,000 requests/month, no credit card. Self-serve at https://injectshield.dev — your key is delivered by email.
Install in Claude Code
Install in Cursor
Add to ~/.cursor/mcp.json:
Install in Cline / generic MCP client
Same shape as Cursor. Stdio transport, command npx -y @injectshield/mcp, set INJECTSHIELD_API_KEY in the env block.
Usage
Once installed, your agent has three new tools. Pattern-match this:
Before reading a fetched web page or file, call
scanwith the body and bail ifsafeisfalse. The cleaned variant incleaned_textis the safest thing to feed forward.
Example (model-side reasoning):
Configuration
Defense in depth
InjectShield reduces but does not eliminate prompt-injection risk. Pair it with system-prompt hardening, tool sandboxing, and output filtering. See the main repo for the full pattern library and a more thorough discussion.
License
MIT.
來源:packages/injectshield-mcp/README.md,提交 ec8eb5b
工具
0版本歷史
1- v0.1.4最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分