SuperAPIAI Directory

sast-mcp-server

github.com · AI developer platforms

SAST/DAST scanners (Bandit, Semgrep, Trivy, CodeQL, OWASP ZAP and more) with closed-loop remediation, SARIF/SBOM/VEX export and compliance reporting.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux · API

About this tool

SAST MCP Server is a production-grade MCP server for AI agents that gives any AI agent the ability to scan code for security vulnerabilities. The project supports 11 industry-standard SAST/SCA/DAST scanners and works with any MCP-compatible agent, such as Gemini CLI, Claude Desktop, OpenAI Agents, Cursor, Windsurf, and more.

Key capabilities include: 11 scanners with a unified output format; AST-aware context that shows the full enclosing function rather than just line numbers; severity and confidence filtering; Git diff mode to scan only modified files for incremental review; ignore management to suppress false positives with an audit trail; pagination to handle large codebases without overwhelming the agent; dual transport modes (stdio local or Streamable HTTP remote deployment); JWT and API key authentication to protect remote deployments; one-command installation (pip install sast-mcp-server); multi-scanner mode to run all installed scanners in parallel and deduplicate; SARIF export for integration with GitHub, GitLab, and Azure DevOps; IaC scanning (Terraform, Kubernetes, Docker security policies); secret detection (finding hardcoded API keys, tokens, and passwords in code and Git history); SCA/dependency CVE scanning (scanning lock files for known vulnerabilities against the OSV database); DAST (dynamic baseline scanning of running applications via OWASP ZAP + Docker); baseline and trend tracking (caching scans and diffing against saved baselines); MCP prompts and resources (providing agents with prebuilt security workflows and a live dashboard); dashboard integration (pushing SARIF results to DefectDojo or GitHub Code Scanning); AI-assisted remediation (generating fix prompts and applying agent-written patches via git apply).

Usage: the server provides three installation paths. Option 1 is the full container (recommended, includes 9 scanners, no setup required), bundling bandit, njsscan, bearer, semgrep, trivy, checkov, gitleaks, osv-scanner, and grype, making scan_all immediately available. Option 2 is pip extras installation (4 scanners installable via pip). Option 3 is a minimal/custom installation, then install the required scanners (binary scanners are not pip packages). On startup the server logs how many scanners it can actually see (for example Scanners available: 9/11 (...)), and the list_scanners tool and /ready endpoint report the same information.

Using with AI agents: can be installed as an extension, or added as an MCP server in ~/.gemini/settings.json, claude_desktop_config.json, Cursor settings, or the OpenAI Agents SDK.

Available MCP tools include: scan_vulnerabilities (scan a directory with a specific scanner), scan_all (run all installed scanners in parallel with automatic deduplication), scan_git_history (scan the entire .git history for leaked secrets and credentials using Gitleaks), run_active_scan (run a dynamic DAST baseline scan using OWASP ZAP by orchestrating a Docker Compose stack), export_sarif (export scan results in SARIF 2.1.0 format), list_scanners (list available scanners, installation status, and supported languages), ignore_vulnerability (suppress findings in future scans with an audit trail), unignore_vulnerability (re-enable previously suppressed findings), list_ignored_vulnerabilities (show all currently suppressed findings in the project), save_baseline (run a scan and cache the results as a named baseline), compare_baseline (compare a new scan with a saved baseline), upload_to_defectdojo (import a SARIF export into DefectDojo), upload_to_github (upload a SARIF report to GitHub Code Scanning), generate_fix_prompt (package vulnerable code and context from cached findings into an LLM-ready prompt), apply_patch (apply agent-generated unified diffs via git apply), evaluate_policy (run all scanners and return an explicit PASS/FAIL verdict), export_sbom (run all scanners and export an SBOM/vulnerability report), generate_report (run all scanners and generate an executive security report), compliance_report (map findings to compliance frameworks and report posture), scan_image (scan container image references), remediate_and_verify (closed-loop remediation), ingest_sarif (ingest external SARIF files), assess_exploitability (get exploitability/false-positive assessment hints or record CycloneDX VEX decisions), post_pr_comment (post a security summary on a GitHub PR or GitLab MR), notify_slack / notify_teams (send notifications to Slack or Microsoft Teams incoming webhooks), create_jira_issue (open a Jira issue for a finding).

Authentication: over HTTP transport, every tool is scope-gated—scan:read (scan, report, export), scan:write (baseline, patch, upload, notify), config:write (ignore list). Set SAST_MCP_JWT_SECRET and issue scoped JWTs.

SARIF/CI/CD integration can export to SARIF 2.1.0 format, compatible with GitHub Code Scanning, GitLab SAST, Azure DevOps, and VS Code SARIF Viewer. Remote deployment (Streamable HTTP) supports JWT Bearer authentication or a static API key; the legacy sse transport is deprecated and requires migration to streamable-http.

MCP prompts provide prebuilt security workflows: security_review (full codebase assessment), fix_vulnerability (focused remediation advisor), pr_security_check (scan only the git diff and enforce severity gating),compliance_report (generate an OWASP Top 10 or PCI-DSS report). MCP resources provide read-only context data: sast://dashboard/{path} (security posture dashboard), sast://config (server configuration and status), sast://scanners (available scanners and languages), sast://cache/{path}/latest (latest scan result metadata).

The project measures production readiness in CI: 226 tests, 74% line coverage, passing on Python 3.10–3.13, with enforced mypy type checking. Every build self-scans, and the SARIF + summary are published as self-scan report artifacts. HTTP transport load testing: with 30 concurrent workers, the /health, /ready, and /metrics endpoints sustain about 210 req/s, p95 ≈ 290 ms, with zero failures. Operational endpoints include /health (liveness), /ready (cached scanner inventory, returns 503 when none installed), /metrics (Prometheus text). Bounded under load, with a configurable concurrency cap, per-client token-bucket rate limiting, per-scanner timeouts, and an optional incremental scan cache. Environment variables include SAST_MCP_JWT_SECRET, SAST_MCP_MAX_CONCURRENT_SCANS, SAST_MCP_RATE_LIMIT_PER_MIN, and others. Incremental scanning supports use_cache=true, identifying target files by fingerprint and reusing the previous scan when there are no changes.

Limitations: CodeQL and OWASP ZAP are not bundled in the image—CodeQL provides a multi-GB bundle (must be mounted at runtime), and ZAP's run_active_scan orchestrates Docker on the host. The server is only as useful as the scanners installed with it, so the installation path must be chosen according to requirements.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools