
Injectshield
InjectShield scans untrusted text for prompt injection patterns before it reaches your LLM's context window. The MCP server exposes three tools: scan for raw text, scan_url for remote content, and patterns to inspect the current ruleset. It runs heuristic detection across nine categories including instruction injection, role hijack, exfiltration attempts, and encoding smuggling, then returns risk scores and sanitized output. You'd reach for this when your agent ingests git commits, documentation, user inputs, or any external content you don't control. The detection patterns are open source MIT, while the hosted API at api.injectshield.dev adds metering, custom patterns, and semantic classification via Workers AI.
- tools
- 3
- auth
- Secret needed
- transport
- STDIO
- env vars
- 2
- last updated
- May 6, 2026
Tools
3 toolsPublic tool metadata for what this MCP can expose to an agent.
scanScan text for prompt-injection patterns before it reaches the agent's context.
Scan text for prompt-injection patterns before it reaches the agent's context.
No parameter schema in public metadata yet.
scan_url
No parameter schema in public metadata yet.
patterns
No parameter schema in public metadata yet.
Sponsors
Configuration
INJECTSHIELD_API_KEY*secretAPI key from https://injectshield.dev (free tier: 10K req/mo).
INJECTSHIELD_API_BASEdefault: https://api.injectshield.devOverride the API base URL for self-hosted deployments.
Readme
InjectShield
Prompt-injection firewall for AI agents.
A drop-in REST API that detects and neutralizes injection attacks in any text — git commits, web pages, files, emails, user inputs — before they reach your AI agent's context window.
This repo is the open-source heuristic ruleset plus the source for the managed API at promptshield.pages.dev.
Why
In May 2026 a viral HN thread demonstrated that a single git commit message could burn a Claude Code user's entire session quota via a schema-driven attack ("OpenClaw"). The pattern is general: any AI agent that ingests untrusted text — code review bots, documentation summarizers, RAG agents, support copilots — is exposed to prompt injection. Most teams ship without any input-side defense.
InjectShield is one layer of a defense-in-depth strategy. It's not a silver bullet. Use it alongside system-prompt hardening, tool sandboxing, and output filtering.
Install as an MCP (Claude Code, Cursor, Cline, ...)
Details
- Repository
- github.com/bch1212/injectshield
- Website
- injectshield.dev
- Categories
- AI & LLM Tools, Security & Pentesting
- Package
@injectshield/mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active