AgentShield MCP
Full-stack security for AI agents — static analysis + MCP runtime interception. 31 rules detect prompt injection, data exfiltration, backdoors, tool poisoning, and cross-file attack chains. Includes MCP proxy for real-time blocking, Python AST taint
What is AgentShield MCP?
AgentShield MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to full-stack security for ai agents — static analysis + mcp runtime interception. 31 rules detect prompt injection, data exfiltration, backdoors, tool poisoning, and cross-file attack chains. includes m...
Full-stack security for AI agents — static analysis + MCP runtime interception. 31 rules detect prompt injection, data exfiltration, backdoors, tool poisoning, and cross-file attack chains. Includes MCP proxy for real-time blocking, Python AST taint
This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Full-stack security for AI agents — static analysis + MCP ru
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx agentshieldConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use AgentShield MCP
AgentShield MCP is a full-stack security layer for AI agents that combines static code analysis with real-time MCP proxy interception to detect and block attacks before they reach your agent. It applies 31 detection rules covering prompt injection, data exfiltration attempts, backdoors, tool poisoning, and cross-file attack chains. The tool is built for developers working with Claude Code and other MCP-enabled agents who need runtime security observability without modifying their agent code.
Prerequisites
- Node.js 18+ installed
- An MCP-compatible AI agent or client such as Claude Desktop or Claude Code
- Access to the AgentShield repository or npx-available package
- Python 3.10+ if using the Python AST taint analysis component
Clone or install AgentShield
Install AgentShield using npx or by cloning the repository directly. The npx method provides the quickest start for MCP proxy use.
# Using npx
npx agentshield
# Or clone from GitHub
git clone https://github.com/yeick010/agentshield-mcp
cd agentshield-mcp
npm installConfigure the MCP proxy
AgentShield acts as a proxy that sits between your MCP client and the target MCP server. Configure it by specifying the upstream MCP server it should proxy and forward requests to.
{
"mcpServers": {
"agentshield": {
"command": "npx",
"args": ["agentshield"],
"env": {
"UPSTREAM_MCP_SERVER": "your-upstream-server-command",
"BLOCK_ON_DETECTION": "true"
}
}
}
}Run static analysis on your codebase
Use AgentShield's static analysis mode to scan your agent code for the 31 built-in security rules including prompt injection patterns, backdoor signatures, and data exfiltration markers.
npx agentshield scan ./srcReview security findings
AgentShield outputs a report of detected issues with rule IDs, severity levels, and file locations. Review the findings and remediate any flagged code before deployment.
Enable real-time blocking
With the proxy running, all MCP tool calls pass through AgentShield's interception layer. Suspicious calls matching the 31 detection rules are blocked before reaching the underlying tool.
AgentShield MCP Examples
Client configuration
Claude Desktop configuration to route all MCP traffic through the AgentShield security proxy.
{
"mcpServers": {
"agentshield": {
"command": "npx",
"args": ["agentshield"]
}
}
}Prompts to try
Example interactions to test AgentShield's detection capabilities and review security posture.
- "Scan the current project for prompt injection vulnerabilities"
- "Check if any tools are attempting data exfiltration in the current session"
- "Show me the security rules that have been triggered in the last session"
- "Analyze this code snippet for backdoor patterns: [paste code]"Troubleshooting AgentShield MCP
AgentShield proxy blocks legitimate tool calls
Review the rule that triggered the false positive in the scan output. Rules can be selectively disabled by adding them to an ignore list in the AgentShield configuration. Check the project repository issues for known false positive patterns.
npx agentshield fails with package not found
The package may not be published to npm under this exact name. Clone the repository directly from https://github.com/yeick010/agentshield-mcp, run npm install && npm run build, and reference the built binary directly in your MCP config.
Static analysis reports no findings on a known vulnerable file
Ensure you are pointing the scan command at the correct directory. The 31 rules target specific patterns — Python AST taint analysis requires Python 3.10+ to be installed and accessible in PATH.
Frequently Asked Questions about AgentShield MCP
What is AgentShield MCP?
AgentShield MCP is a Model Context Protocol (MCP) server that full-stack security for ai agents — static analysis + mcp runtime interception. 31 rules detect prompt injection, data exfiltration, backdoors, tool poisoning, and cross-file attack chains. includes mcp proxy for real-time blocking, python ast taint It connects AI assistants to external tools and data sources through a standardized interface.
How do I install AgentShield MCP?
Follow the installation instructions on the AgentShield MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with AgentShield MCP?
AgentShield MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is AgentShield MCP free to use?
Yes, AgentShield MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
AgentShield MCP Alternatives — Similar Security Servers
Looking for alternatives to AgentShield MCP? Here are other popular security servers you can use with Claude, Cursor, and VS Code.
Casdoor
★ 13.6kAn open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
ghidraMCP
★ 9.0kAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through
HexStrike AI
★ 8.9kHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b
IDA Pro MCP
★ 8.7kEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.
Anthropic Cybersecurity Skills
★ 6.6k754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform
Hooker
★ 5.1k🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u
Browse More Security MCP Servers
Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up AgentShield MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use AgentShield MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.