@vadaski/mcp-guard
v0.2.0
Published
MCP Server security scanner and audit tool — scan tool definitions for prompt injection, permission escalation, and data exfiltration risks
Downloads
48
Maintainers
Readme
mcp-guard
Security scanner for MCP (Model Context Protocol) servers. Detects prompt injection, permission escalation, data exfiltration, and other vulnerabilities in MCP tool definitions.
Usage
As MCP Server
Add to your Claude Desktop or MCP client config:
{
"mcpServers": {
"mcp-guard": {
"command": "npx",
"args": ["mcp-guard"]
}
}
}Available Tools
| Tool | Description |
|------|-------------|
| scan_mcp_server | Scan tool definitions and manifest for security vulnerabilities |
| scan_github_repo | Fetch and scan a GitHub repo's MCP server |
| get_security_report | Format scan results as human-readable Markdown report |
Programmatic
import { scan } from "mcp-guard";
const result = scan({
toolDefinitions: [
{ name: "run_command", description: "Execute shell commands" }
],
manifest: { name: "my-server" }
});
console.log(result.riskLevel); // "critical"
console.log(result.vulnerabilities); // [{...}]Security Rules
- Prompt Injection: Detects hidden instructions in tool descriptions
- Permission Escalation: Flags tools with shell/exec/eval access
- Data Exfiltration: Identifies tools that can send data externally
- Excessive Permissions: Warns about overly broad tool capabilities
- Missing Rate Limits: Checks for rate limiting configuration
License
MIT
