Announcing an open-source MCP server for OWASP ASVS
Published 8 min readBy Saeed Yari

On this page
I've released version 0.1 of mcp-server-asvs-security-assistant, an open-source MCP server that brings the OWASP Application Security Verification Standard (ASVS) 5.0.0 into your AI assistant. It answers "which requirement covers this?" with an ID and a level instead of a guess, and it checks code, HTTP headers and nginx configuration against the standard. It runs locally and offline, and it's licensed under Apache-2.0.
Independent project. It is not affiliated with, endorsed or certified by the OWASP Foundation. Its results support application security work; they are not an ASVS verification or certification and don't replace a security review by qualified people.
ASVS is a list of security requirements, each with an ID and a level. In a security review, the ID is the part that matters: it goes into the ticket, the pull request and the test plan. AI assistants are bad at exactly that part. They give sound general advice but cite requirement numbers from memory, and ASVS 5.0.0 reorganized the standard, so the IDs they remember are often from 4.0.3. As I wrote in the overview of ASVS 5.0, only 11 of the 286 numbered requirements in 4.0.3 carried over unchanged, and even those have new IDs. Some assistants also answer with the OWASP Top 10, an awareness document rather than a list of testable requirements (the comparison covers the difference).
It's the same problem I solved for PCI DSS with the PCI DSS MCP server, and the two standards meet in the middle: PCI DSS Requirement 6.2.4 asks you to prevent common software attacks, and ASVS spells out what that means in code, as in my mapping of ASVS to Requirement 6.
I first planned ASVS as a feature of the PCI DSS server. I made it a separate project for two reasons. Most teams that care about ASVS never touch card data, and they shouldn't need a PCI DSS dataset to use it. And the licenses differ: PCI DSS can't be redistributed, so that server makes you build a dataset from your own copy, while ASVS is published under CC BY-SA 4.0 and can ship inside the package. So this server has nothing to build. It works as soon as it's installed.
The server has 7 read-only tools, 2 resources and 2 prompts:
| Area | Tools | A question it answers |
|---|---|---|
| Look up the standard | get_asvs_requirement, search_asvs_requirements |
"Which ASVS requirements cover SQL injection, and at which level?" |
| Plan the work | generate_asvs_checklist |
"What does level 1 require?" |
| Link to PCI DSS | get_pci_dss_mapping |
"Which ASVS requirements help with PCI DSS 8.3.6?" |
| Check code and configuration | scan_code_for_security_issues, audit_http_security_headers, audit_directory |
"Review this request handler for security issues." |
As with the PCI DSS server, you don't name the tools. You ask in plain language, and the assistant picks them from their descriptions.

search_asvs_requirements ranks all 345 requirements with BM25, a keyword ranking. Section and chapter names count extra, and light stemming lets store, stored and storing match. Acronyms the standard spells out, such as XSS, SQLi, SSTI, JWT, CSP, SRI, MFA and OTP, are expanded to its own words at half weight, so they can't outweigh what you typed. A query that is an ID, such as V6.2, puts that section first, and you can filter by level and chapter.
generate_asvs_checklist lists every requirement up to a level, grouped by chapter and section: 70 at level 1, 253 at level 2 and all 345 at level 3. Each line shows its level and, where the mapping has them, the related PCI DSS requirements, so a payment team sees both at once.
The scanners are static pattern checks, and each finding carries the ASVS requirement it relates to, the requirement's level and the closest CWE:
- Code: injection (SQL, OS commands, server-side templates,
eval), HTML sinks such asinnerHTMLwithout sanitizing, path traversal, unsafe deserialization, XML external entities, disabled TLS certificate checks, JWT signature bypasses, insecure randomness, weak cryptography and fast password hashes, hardcoded secrets, cookie flags, permissive CORS, debug mode and secrets written to logs. The rules know Python, JavaScript and TypeScript, Java, PHP, Go, Ruby and C#. - HTTP headers and nginx: HSTS, Content Security Policy (including
frame-ancestorsand reporting),nosniff, Referrer-Policy, Cross-Origin-Opener-Policy, CORS, cookie attributes and prefixes, and version disclosure in raw response headers; TLS protocols and ciphers, HTTPS redirects,server_tokensandautoindexin nginx. - Whole projects:
audit_directorywalks a local folder read-only and returns one gap analysis, with totals per ASVS level, chapter and PCI DSS requirement.
A finding from a Python file looks like this:
{
"severity": "high",
"asvs_requirement_id": "V1.2.4",
"asvs_level": 1,
"cwe": "CWE-89",
"issue_description": "SQL statement built with string concatenation or formatting (SQL injection risk).",
"remediation_step": "Use parameter binding, e.g. cursor.execute('SELECT ... WHERE id = %s', (user_id,)) or an ORM.",
"pci_dss_ids": ["6.2.4"],
"line": 1,
"evidence": "<scanned_artifact>cur.execute(f\"SELECT * FROM orders WHERE id = {order_id}\")</scanned_artifact>"
}
The asvs_code_review_prompt prompt combines the scanner with the checklist for your target level. It runs the scan, confirms each finding with get_asvs_requirement and treats findings above your level as recommendations rather than gaps. Then it works through the checklist for what a scanner can't see, such as authorization and business logic, and reports a table ordered by severity.
If you build payment systems, connect both servers. MCP servers don't call each other, so the two don't talk directly. The assistant in your client uses both, and each server's instructions tell it how to use the other.
- Shared IDs. ASVS findings, requirements and checklists carry
pci_dss_ids, and the PCI DSS server's findings carryasvs_requirement_ids. The assistant looks each standard's IDs up on the server that has its text. - One mapping, with the conflicts written down. The mapping links 61 PCI DSS v4.0.1 controls to 105 ASVS requirements, in both directions. Where the standards disagree, it says so and explains how to meet both. Password composition is the clearest case: PCI DSS 8.3.6 asks for passwords with both letters and digits, while ASVS V6.2.5 forbids composition rules. For systems in PCI DSS scope, the PCI DSS rule applies, and you document the ASVS deviation. Periodic password changes (8.3.9) and account lockout (8.3.4) get the same treatment.
- One review.
unified_compliance_review_promptruns both servers'audit_directoryon the same folder and merges findings that share a file and line. A SQL injection appears once, with both6.2.4andV1.2.4, and the report is one table with PCI DSS, ASVS and CWE columns. What only one server finds stays in: card numbers and track data from the PCI DSS server, deserialization and JWT checks from this one.
The mapping is a community mapping of requirement IDs, with notes in my own words. It contains no PCI SSC text, and meeting an ASVS requirement doesn't mean a PCI DSS requirement is satisfied.
It follows the same rules as the PCI DSS server:
- Read-only and offline. The server writes no files, makes no network calls and starts no subprocesses, and a test fails if its code imports networking or subprocess modules or opens a file for writing.
- Capped input. Code and configuration are limited to 500,000 characters, and every other parameter has its own limit.
- No secrets in output. Every tool result passes through a sanitizer that redacts common secret formats and masks card numbers, and the scanners hide the secret values they find.
- Scanned content is marked as untrusted. Anything quoted from your input is wrapped in
<scanned_artifact>tags, with look-alike tags inside neutralized, and the descriptions and fixes are fixed text. A comment in scanned code that tells the assistant to do something stays inside the tags as data. - Directory audits stay inside the folder.
audit_directoryrefuses filesystem roots, system directories and your home folder itself, never follows symlinks, and skips.git,node_modules, binaries and large files.
You need uv, which installs Python 3.11 or newer if you don't have it. In Claude Code, one command adds the server:
claude mcp add asvs -- uvx mcp-server-asvs-security-assistant
For Claude Desktop, Cursor and other clients, add it to the client's MCP config:
{
"mcpServers": {
"asvs": {
"command": "uvx",
"args": ["mcp-server-asvs-security-assistant"]
}
}
}
VS Code uses "servers" instead of "mcpServers", and the repository's examples/ folder has ready-made files for each client, including one with both servers. There's also a multi-architecture Docker image, ghcr.io/itssaeedyari/mcp-server-asvs-security-assistant, that runs with no network and a read-only filesystem. To call the tools by hand, run npx @modelcontextprotocol/inspector uvx mcp-server-asvs-security-assistant. The README and the wiki cover configuration, Docker and troubleshooting.
- Not a verification. An ASVS verification checks design, configuration and process, and much of it needs people who test the running application. A scanner sees only the code and configuration you give it.
- Not complete. The scanners can report 36 of the 345 requirements. The checklist covers the rest, but you have to work through it. Pattern matching also has false positives and misses, so review every finding before you act on it.
- Not a substitute for PCI DSS evidence. The mapping helps you see where application security work supports PCI DSS. Your assessment decides whether a PCI DSS requirement is met.
Contributions are welcome. CONTRIBUTING.md explains how to add a scanner rule, usually one entry with a pattern, the ASVS ID and the CWE, and how to propose a mapping change. The issues I most want are false positives and misses from real code, reduced to a sanitized example, and mapping corrections with your reasoning. If the server saves you a search through the standard, a star on GitHub helps others find it.
FAQ
Is it allowed to ship the ASVS text in the package?
Yes. OWASP publishes ASVS under CC BY-SA 4.0, which allows redistribution with attribution under the same license. The package ships OWASP's official CSV file unmodified, a test checks its checksum, and the NOTICE file carries the attribution. The server's own code is Apache-2.0.
Does the server send my code anywhere?
The server itself makes no network calls. Your MCP client still passes the code and the tool results to the assistant's model, as it does with any tool, so your model provider's data terms apply. Known secret formats and card numbers are masked in tool results, but code you paste into the chat reaches the model as you pasted it.
Do I need the PCI DSS server too?
No. The ASVS server works on its own for any web application or API. Connect the PCI DSS server as well only if your system handles card data.
Why is the version 0.1?
It's experimental. Tool names and finding fields may still change once it has been used in real clients, and the 0.x version number says so.
References
- mcp-server-asvs-security-assistant · GitHub
- Release v0.1.0 · GitHub
- Release v0.1.1 · GitHub
- mcp-server-asvs-security-assistant · PyPI
- OWASP Application Security Verification Standard · OWASP Foundation
- OWASP ASVS repository · GitHub
- Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) · Creative Commons
- Model Context Protocol · Model Context Protocol
- mcp-server-pci-dss-compliance-assistant · GitHub