Security Scan MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Security Scan MCP
Security Scan MCP gives coding agents a security review checklist built from vulnerabilities that have actually happened. It is for developers who ask an agent to review their code and want that review to draw on more than the agent's general sense of what can go wrong. The National Vulnerability Database holds the relevant history in detail, but each CVE describes one bug in one product, which is hard to apply while reading a different codebase. This project does that translation ahead of time: Claude rewrites CVEs as generic review checks, the checks are grouped by the kind of software they apply to, and a Model Context Protocol server hands them to the agent on request.
Despite the name, it does not scan anything. An earlier version had an AST scanner, which was removed to concentrate on the prompts, and the run-scan.ts script still at the repository root no longer runs. The server tells an agent what to look for, and the agent still has to read the code and reach its own conclusions. The project is a prototype from January 2026. The bundled CWE lookups can be explored locally, while generating CVE-backed prompts still requires maintenance of the data pipeline.
How it works
Two build steps produce a local SQLite database, and the server answers from it.
Ingest.
npm run ingestseeds 40 CWE entries, then fetches HIGH and CRITICAL CVEs from the last five years through the NVD API, in the 120-day windows the API allows.Generate.
npm run build-promptssends the CVEs to Claude 20 at a time. For each one, Claude assigns a generic software type such asweb-serverorfile-parser, names the weakness, writes a check that applies to any code of that type, rates its severity and lists the code signals that identify that kind of software. Checks with the same type and title are merged, and each keeps the CVE IDs behind it.Serve. The MCP server answers over stdio from the database described in
src/db/schema.ts, with SQLite FTS5 behind its search tools. At this stage it makes no network calls and needs no API keys.
Claude chooses the types, so the list is not fixed in advance and an agent starts by asking what exists. Reviewing an Express application, it would call list_software_types, match the routes and HTTP handling against the code_signals for web-server, and then call get_security_prompts_for_type to receive checks shaped like this one:
{
"id": "web-server-1",
"title": "Header size validation",
"severity": "high",
"check_prompt": "Verify that HTTP header sizes are validated before processing...",
"based_on_cves": ["CVE-2021-xxxx", "CVE-2022-yyyy"]
}Related MCP server: Helios
Getting started
You need Node.js 18 or later. The repository ships no CVEs or generated prompts: data/vulnerabilities.db holds only CWE entries. Start with the bundled CWE lookups, which need no API keys:
git clone https://github.com/chrischabot/security-scan-mcp.git
cd security-scan-mcp
npm install
npm run cli -- cwe 79
npm run cli -- top-cwes web
npm run cli -- statsThe CLI creates the local database if needed; cwe and top-cwes read their guidance directly from the bundled taxonomy. CVE and prompt lookups remain empty until you populate that database. Generating CVE-backed prompts describes the separate data pipeline and its current blockers.
To prepare the compiled MCP server, run:
npm run buildThe compiler currently reports a missing argument at src/cli.ts:261 and exits nonzero, although it still emits dist/. This is a known build defect. The server reads local data and does not require NVD or Anthropic credentials. To register it with Claude Code:
claude mcp add --transport stdio security-scan -- node /absolute/path/to/security-scan-mcp/dist/index.jsOther MCP clients can launch the same command over stdio:
{
"mcpServers": {
"security-scan": {
"command": "node",
"args": ["/absolute/path/to/security-scan-mcp/dist/index.js"]
}
}
}The test-project/ directory holds deliberately vulnerable JavaScript, Python and React samples, which make a convenient first target for a review.
Generating CVE-backed prompts
The generation pipeline needs maintenance before it is ready to use. The default ingest writes CVE/CWE mappings before their CVE rows and encounters CWEs outside the bundled set, violating the declared foreign keys. Fix the import ordering and missing-CWE handling rather than disabling those checks. The Claude client also hard-codes claude-sonnet-4-20250514, which Anthropic retired in June 2026; its model, request parameters and JSON output handling need updating and verification.
Generation needs your own Anthropic API key for paid calls and an NVD API key for the ingest script. Copy .env.example to .env and fill in your own keys when working on that pipeline. Neither key is needed to serve an existing database.
The source provides these ingest modes: npm run ingest selects five years, npm run ingest -- ingest 2 selects two years, and npm run ingest -- update selects CVEs modified in the last seven days. npm run ingest -- seed seeds the bundled CWEs without fetching CVEs. The seven-day window does not cap record counts or spending: build-prompts reads the whole local database through its search terms and sends batches of 20 CVEs to Claude.
Three other limits matter:
build-promptsreplaces existing prompts at the end, even if some or all batches failed. Errors are logged and skipped, and the scripts can exit successfully after logging failures. Inspect the summary and resulting database.It reads CVEs through nine broad search terms capped at 10,000 rows each, so a large database is not necessarily read in full.
Replacing existing CVEs can leave stale FTS entries and cause
fts5: missing row. With thesqlite3command installed, rebuild the index in the same data directory used by the server:
sqlite3 "${SECURITY_SCAN_DATA_DIR:-$HOME/.security-scan-mcp}/vulnerabilities.db" "INSERT INTO cve_fts(cve_fts) VALUES('rebuild');"MCP tools
Tool | What it returns |
| Every generated type, with its description, code signals and prompt count |
| The checks for one type, optionally filtered by severity, as JSON or a Markdown checklist |
| Full-text search across all checks |
| Full-text search across stored CVE descriptions |
| Stored CVEs linked to a CWE, optionally filtered by severity |
| One of the 40 bundled CWE entries, with related stored CVEs |
| Selected entries from the 25 bundled weaknesses, 10 by default; accepts |
| CVE, CWE and prompt counts, plus the database path |
Search queries use FTS5 syntax, so quote anything containing punctuation, as in "cross-site scripting". The bundled weakness list is modelled on the CWE Top 25 rather than copied from it, so check MITRE's list for official rankings and scores.
Command line
The CLI offers the same lookups, which is useful for checking a build without an agent. Keep the --, because npm otherwise swallows flags such as --severity.
npm run cli -- help
npm run cli -- list-types
npm run cli -- get-prompts web-server --severity critical --checklist
npm run cli -- search-prompts "SQL injection"
npm run cli -- search-cves apache
npm run cli -- cwe 79
npm run cli -- top-cwes web
npm run cli -- statscwe and top-cwes read the bundled entries, so they work before you have built a database.
Configuration
Variable | Purpose |
| Required by |
| Your NVD key, used by |
| Directory holding |
The build scripts read these from .env in the repository root. The CLI does not load .env, and the server looks for it in whichever directory your MCP client starts it from, so if you move the database, set SECURITY_SCAN_DATA_DIR in your shell and in the client's server configuration as well.
Development
npm run dev # run the server from source with tsx
npm run build # compile to dist/npm test and npm run lint are wired into package.json, but the repository has no test files or ESLint configuration yet.
Project background
security-scan-mcp project overview on Chris Chabot’s site.
License and credits
Chris Chabot built this with Claude, which authored most of the commits in the public history. It is released under the MIT License.
CVE data comes from the National Vulnerability Database. This product uses the NVD API but is not endorsed or certified by the NVD. CWE entries are based on MITRE's Common Weakness Enumeration.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Zero-install security baseline for AI coding agents — OWASP/CWE-cited rules over MCP.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server for AI agent profiles and smart notes. 60+ coding prompt packs with expert personas.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that scans project dependencies for security vulnerabilities (CVEs) and provides fix instructions directly in VS Code via Copilot.3-
- AlicenseNot gradedqualityDmaintenanceMCP server that securely reviews AI-generated code for vulnerabilities such as SQL injection, command injection, and hardcoded credentials.12Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA lightweight MCP server for security reviews that injects security requirements before code generation, scans dependencies for CVEs, and verifies generated code without disrupting workflow.73MIT
- AlicenseAqualityCmaintenanceMCP server that provides a 216-rule, framework-aware Kotlin/JVM security analyzer, enabling AI coding agents to query real security findings while writing code.1MIT