
Injectshield
io.github.bch1212Published by GitHub account bch1212v0.1.4Updated Oct 25, 2026
Prompt-injection firewall for AI agents — scan untrusted text before LLM calls.
Overview
A local MCP server that exposes the InjectShield prompt-injection detection API so an assistant can scan untrusted text or web pages before passing them to anLL
- What you can do
- Scan a string for prompt-injection and get a verdict, confidence, threat category, matched pattern IDs and an optional sanitized version with injection spans redacted. Fetch a URL and scan its body, automatically treating it as web content. List supported threat categories, context kinds and sensitivity levels.
- When to use it
- Useful when an assistant ingests untrusted text, fetched web pages or files and you want a check for prompt-injection before feeding that content into another LLM call. It is a supporting layer, not a replacement for other defenses.
- Requirements
- Runs as a local stdio process via npx from the npm package @injectshield/mcp, so Node.js is needed. Requires an API key in the INJECTSHIELD_API_KEY environment variable, obtained from the vendor's site (free tier listed at 10K requests/month). INJECTSHIELD_API_BASE can override the API base URL for self-hosted deployments. Network access to the InjectShield API.
Installation
In SourceWeft
- Open Injectshield in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: packages/injectshield-mcp/README.md at commit ec8eb5b
Tools
0Version history
1- v0.1.4LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts