Basic information
About Prompt Injection Shield MCP Server
# PromptInjectionShield-MCP đĄď¸
Prompt Injection Shield is a MCP server in the Other category listed in the AddMCP.net directory, published by aniketkarne. It exposes 1 tool, including Privacy-first. Supported transport: stdio. Runtime: Python. License: MIT. The repository has 4 GitHub stars. Source code is hosted on github.com.
Setup
{
"mcpServers": {
"PromptInjectionShield": {
"command": "docker",
"args": [
"build",
"-t",
"shield-mcp",
"."
]
}
}
}
{
"mcpServers": {
"PromptInjectionShield": {
"command": "docker",
"args": [
"build",
"-t",
"shield-mcp",
"."
]
}
}
}
{
"servers": {
"PromptInjectionShield": {
"command": "docker",
"args": [
"build",
"-t",
"shield-mcp",
"."
]
}
}
}
Prompt Injection Shield MCP Server config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"PromptInjectionShield": {
"command": "docker",
"args": [
"build",
"-t",
"shield-mcp",
"."
]
}
}
}
Prompt Injection Shield MCP Server tools
- Privacy-first â prompt text never leaves the machine.
Overview
What is Prompt Injection Shield?
Prompt Injection Shield is a local-first, zero-cost MCP server that detects malicious prompt injection and jailbreak attempts in user input. It acts as a security gateway that integrates with LLM workflows (such as Claude Desktop) to pre-screen prompts before they reach the model, keeping all data on the userâs machine.
How to use Prompt Injection Shield?
Install from source (pip install .) or via Docker. Run the server with python -m shield_mcp.server, then configure it as an MCP server in your client (e.g., add to claude_desktop_config.json with command python and args ["-m", "shield_mcp.server"]). The server exposes a single tool called analyze_prompt that accepts a prompt string and returns is_injection, risk_score, and category. You can optionally customize the risk threshold and log directory by creating a shield_config.json file.
Key features of Prompt Injection Shield
- Local detection engine, no external API calls.
- Three-tiered detection: heuristics, semantic ML model, and structural check.
- Privacy-first: prompt text never leaves the machine.
- Zero-cost security checks.
- Integrates natively with Claude Desktop and any MCPâcompatible client.
Use cases of Prompt Injection Shield
- Wrap a chatbot or RAG system to reject malicious prompts before they reach the main LLM.
- Protect internal tools (code executors, database agents) from injected instructions in data context.
- Redâteam own applications by using the
risk_scoreto evaluate jailbreak attempts. - Preâscreen any user input in an MCPâenabled workflow without sending data to a thirdâparty API.
Frequently asked questions
1 Does Prompt Injection Shield require an internet connection for detection?
No. The entire detection pipeline runs locally; no external API calls are made during analysis.
2 How does the detection work?
It uses three layers: LevelâŻ1 heuristics (regex) for known jailbreak patterns, LevelâŻ2 semantic analysis with a local DeBERTa model (protectai/deberta-v3-base-prompt-injection-v2), and LevelâŻ3 structural checks for obfuscation (Base64, Hex, high entropy strings).
3 Can I adjust the detection sensitivity?
Yes. Create a shield_config.json in the working directory and set ârisk_thresholdâ (default 0.8) to control when a prompt is flagged as injection.
4 Where are logs stored?
Logs are saved by default in ~/.shield-mcp/logs; you can change the directory using the âlog_dirâ key in shield_config.json.
5 What transport does the server use?
The server is invoked via a command (e.g., python -m shield_mcp.server) and communicates over MCPâs standard input/output transport (stdio).
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In