XploitScan
v1.9.3Security scanner for AI-generated code.
Model Context Protocol (MCP) server that exposes XploitScan as tools your AI coding agent can call. Scan AI-generated code for vulnerabilities from inside Claude Desktop, Cursor, Windsurf, or any other MCP client. XploitScan is a static security scanner tuned for the kind of code AI coding tools (Cursor, Lovable, Bolt, Replit, Claude Code) produce by default — unprotected webhooks, hardcoded API keys, SQL injection via template literals, missing auth middleware, CORS misconfigurations. 223 rules across 14 categories, all documented at xploitscan.com/rules.
Summary extracted from the README.
xploitscan-mcp
Model Context Protocol (MCP) server that exposes XploitScan as tools your AI coding agent can call. Scan AI-generated code for vulnerabilities from inside Claude Desktop, Cursor, Windsurf, or any other MCP client.
What this is
XploitScan is a static security scanner tuned for the kind of code AI coding tools (Cursor, Lovable, Bolt, Replit, Claude Code) produce by default — unprotected webhooks, hardcoded API keys, SQL injection via template literals, missing auth middleware, CORS misconfigurations. 223 rules across 14 categories, all documented at xploitscan.com/rules.
Without an API key, this server runs the 30 free rules. To run all 223, you need a paid plan (Pro or Team). Generate an API key at xploitscan.com/settings (requires a paid subscription — see pricing) and set XPLOITSCAN_API_KEY as shown below. Every scan_code and grade_code result says which rule set ran: "30 free rules" or "all 223 rules".
This package wraps the same scanner engine in the Model Context Protocol so an AI coding agent can check its own output before writing it to disk. Three tools:
scan_code— scan files, return findings with rule IDs, severity, and fix suggestionsexplain_rule— look up what a specific rule means (e.g.,VC005= unprotected Stripe webhook)grade_code— single-call "is this safe to ship" — returns a letter grade A+ through F plus summary
Runs locally over stdio. With no API key it makes no network calls. No telemetry.
Install
Claude Desktop
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the xploitscan server under mcpServers:
{
"mcpServers": {
"xploitscan": {
"command": "npx",
"args": ["-y", "xploitscan-mcp@latest"]
}
}
}
Restart Claude Desktop. The three tools show up in the tool picker.
Cursor
Cursor reads MCP config from ~/.cursor/mcp.json:
{
"mcpServers": {
"xploitscan": {
"command": "npx",
"args": ["-y", "xploitscan-mcp@latest"]
}
}
}
Other MCP clients
Any client that supports the standard MCP stdio transport. Command: npx -y xploitscan-mcp@latest. No flags.
Paid plans: all 223 rules
API keys are a paid-plan feature. On a Pro or Team plan (see pricing), generate an API key at xploitscan.com/settings (it starts with xpls_) and pass it to the server as an environment variable:
{
"mcpServers": {
"xploitscan": {
"command": "npx",
"args": ["-y", "xploitscan-mcp@latest"],
"env": { "XPLOITSCAN_API_KEY": "xpls_..." }
}
}
}
With a key, the server checks your plan with xploitscan.com, downloads the Pro rules (the same bundle the CLI uses) and caches them in ~/.xploitscan/ for 24 hours. Scanning still happens on your machine, and your code is never uploaded. The key is the only thing sent.
If the server can't use the Pro rules, it scans with the 30 free rules and the result says why:
- Invalid or revoked key, or an account without a paid plan: the 30 free rules run, and any cached Pro rules are deleted.
- xploitscan.com can't be reached: a cached copy downloaded in the last 7 days is used if there is one. Otherwise the 30 free rules run.
Usage
Once wired up, just ask your agent to scan. Examples:
"Scan the code you just wrote for security issues."
"Is this safe to ship?" (agent will call
grade_code)"What does VC005 mean?" (agent will call
explain_rule)
The agent decides when to call the tool. If you want explicit invocation, tools can usually be triggered directly from the client's tool picker.
Tool schemas
scan_code
Input:
{
"files": [
{ "path": "src/api/login.ts", "content": "..." },
{ "path": "src/db/users.ts", "content": "..." }
]
}
Output: text summary + structured { ruleSet, findings, filesScanned, findingCount }. ruleSet is { tier: "free" | "full", ruleCount, label, note }, where note explains a fallback.
explain_rule
Input:
{ "ruleId": "VC006" }
Output: rule title, severity, category, OWASP + CWE mapping, description. For a Pro rule without a paid key: its OWASP + CWE mapping and a link to its documentation.
grade_code
Input: same as scan_code.
Output: { grade, score, summary, ruleSet, findingCount, breakdown, findings }. A grade from the 30 free rules is not a grade from all 223, and the text says which one it is.
Relationship to the XploitScan CLI
The MCP server uses the same rule engine as the XploitScan CLI (npm i -g xploitscan) and the web scanner at xploitscan.com/scan. All three run the 30 free rules on the free plan and all 223 on a paid plan. The web scanner can also filter likely false positives with AI.
For CI, use the GitHub Action. For one-off local scans from the shell, use the CLI. Use this MCP server when you want your AI coding agent to self-check its output.
Privacy
All analysis runs locally in the subprocess started by your MCP client. Code never leaves your machine. No telemetry. Without XPLOITSCAN_API_KEY, the 30 free rules run and the server makes no network requests. With a key, it makes two requests to xploitscan.com: a plan check and the Pro rules download. Both send only the key.
License
MIT.