cert-review-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CERT_REVIEW_HOME | No | Path to the cert-review-mcp checkout containing the data/ and profiles/ directories. Defaults to the package checkout. | |
| CERT_REVIEW_AUTOSAR_TEXTS | No | Path to your licensed copy of AUTOSAR C++14 guideline texts, used for official headlines and quote validation. | |
| CERT_REVIEW_MISRA_C_TEXTS | No | Path to your licensed copy of MISRA C:2012 guideline texts, used for official headlines and quote validation. | |
| CERT_REVIEW_MISRA_CPP_TEXTS | No | Path to your licensed copy of MISRA C++:2023 guideline texts, used for official headlines and quote validation. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
SEI CERT C/C++ secure-coding review for local source trees. Every tool only reads local files and bundled data and runs local analyzers (clang-tidy, clang, cppcheck, and Semgrep, Infer or CodeQL when installed); nothing is written to the project, uploaded or posted. Rule lookup: list_rules (structured filters), search_rules (keywords), get_rule (one rule's full text), get_rule_coverage (what checkers can detect). Review flow:
review_pr for a git change (preferred), or check_diff for a change, or check_files for whole files or directories; pass baseline_path to hide findings already recorded in a .cert-review-baseline.json. explain_finding turns one finding into a rule summary, the closest CERT example and a fix.
build_review_packet for rules no checker decides; judge each hunk and write findings that cite a candidate rule_id and quote that rule's text verbatim.
validate_findings to drop ungrounded findings.
format_findings to draft markdown, GitHub or GitLab review payloads, SARIF or GitLab reports. format_pr_review merges check_diff + build_review_packet into one PR comment with hints and style nits. Use absolute paths and profile "ceph" for Ceph trees. A tool status "partial" or non-empty warnings means some files did not compile or timed out, so a clean result is not proof. MISRA C:2012, MISRA C++:2023 and AUTOSAR C++14: pass
standardto the lookup tools orstandards(or profile "misra" / "autosar") to check_files and check_diff. Their official texts are copyrighted and not bundled (IDs, classification, mappings and short summaries only), so validate_findings needs no quote for them unless the user loaded a licensed rule-texts file. Never post review comments without the user approving the exact text.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_rulesA | List rules from the bundled databases, filtered by standard, language, category, kind, risk level, CERT detectability, MISRA/AUTOSAR classification or checker coverage. Default standard is SEI CERT C/C++ (388 rules and recommendations); standard='misra' or 'autosar' lists MISRA C:2012 (221), MISRA C++:2023 (178) or AUTOSAR C++14 (397) guidelines. Use to enumerate rules by structured criteria, e.g. all L1 C++ rules no checker detects or all mandatory MISRA C rules. Do not use for free-text lookup (use search_rules) or one rule's details (use get_rule). Reads bundled data only; fast. Returns summaries; |
| search_rulesA | Rank rules by keyword relevance to a free-text query: API names (strcpy, malloc, pthread_mutex_lock), concepts (integer overflow) or a rule ID in any accepted form (EXP34-C, misra-c2012-10.4, A5-2-2). Searches SEI CERT C/C++ by default; set |
| get_ruleA | Return the full record of one rule. SEI CERT: text, noncompliant and compliant code examples, exceptions, risk assessment, CWE IDs, related MISRA/AUTOSAR guidelines (cross_references), the checkers that detect it, and how the profile adjusts or disables it. MISRA/AUTOSAR: classification, section, enforcement, related CERT rules, checkers and our one-line summary; the official text appears only when the user loaded a licensed rule-texts file (text_source, quote_required). Use before judging or explaining a finding, or to copy the verbatim |
| get_rule_coverageA | Count rules per detection tier: deterministic (a rule-specific checker exists, e.g. a clang-tidy cert-* alias or the cppcheck MISRA addon), partial (only general checkers map) and llm-only (no checker; manual review needed), for all checker mappings, for the pinned reference toolchain (clang-tidy and Clang Static Analyzer 19.1.7, cppcheck 2.17.1, Semgrep with the bundled rules) and for the extended toolchain (plus Infer and the CodeQL CERT packs). SEI CERT by default; set |
| check_filesA | Run clang-tidy, the Clang Static Analyzer and cppcheck (plus Semgrep and Infer when installed, CodeQL on request; see |
| check_diffA | Run the check_files analyzers on the C/C++ files of a change and keep only findings on added or modified lines, mapped to the same standards ( |
| explain_findingA | Explain one finding: a short rule summary, why the finding matches the rule (checker mapping, APIs, shared identifiers), the rule's noncompliant/compliant example pair most similar to the flagged code (token overlap), a unified diff between them, and concrete fix steps derived from that compliant example plus per-API and per-category advice. Use after check_files or check_diff when you need to explain or fix a finding; pass the finding object unchanged, or rule_id with file and line, or with a code snippet. Use get_rule instead for the full rule text and all examples, and validate_findings (not this tool) to check that a manually written finding is grounded. Deterministic and offline: reads only the bundled rules and the named file. An unknown rule_id returns an error listing close matches. |
| build_review_packetA | Build a packet for reviewing code against SEI CERT rules that analyzers cannot decide: code hunks, each with up to max_rules_per_hunk candidate rules (picked by token/API heuristics and profile idioms, rules fully covered by a specific checker left out) and their text excerpts. Diff mode ( |
| validate_findingsA | Accept or reject findings written from a build_review_packet review, with reasons. A finding passes only if its rule_id exists (C++ rules are rejected on .c files, MISRA C rules on C++ files), its quote is a passage of 20+ characters found in that rule's text or examples (case, whitespace, curly quotes and markdown are normalised; MISRA/AUTOSAR need a quote only when a licensed rule-texts file is loaded, otherwise accepted findings carry grounding='rule-id-only'), it has a file, a line >= 1 and a message, and the profile does not disable the rule. With |
| format_pr_reviewA | Build a single markdown PR comment from |
| review_prA | Run check_diff on |
| format_findingsA | Render findings as a report or review payload without sending it. style: markdown (string); github (object for POST /repos/{owner}/{repo}/pulls/{n}/reviews, event COMMENT, one comment per finding); gitlab (array of merge-request discussion bodies; position SHAs are placeholders to fill from diff_refs); sarif (SARIF 2.1.0 object); codequality (GitLab Code Quality array); gitlab-sast (GitLab SAST report object). Use as the last step, then show drafted comments to the user before anyone posts them. Pass findings unchanged from check_files/check_diff |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| cert_review | Review code against SEI CERT C/C++. |
| ceph_review | Review Ceph code against SEI CERT with Ceph idioms taken into account. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 12 tools
Every tool has a distinct role in a clear pipeline, and the descriptions explicitly fence off neighbours ('Do not use to discover rules (use search_rules or list_rules)', 'for whole files use check_files', 'Use get_rule instead for the full rule text'). The only overlaps are the intentional composites (review_pr = check_diff + build_review_packet + format_pr_review) and format_pr_review vs format_findings, both of which are disambiguated by explicit 'prefer this over three separate calls' / output-format guidance.
All twelve names are snake_case verb_noun (get_rule, check_diff, explain_finding, build_review_packet, validate_findings, format_pr_review, list_rules, search_rules, review_pr). The verb choices are also semantically consistent: get_/list_/search_ for reads, check_ for analyzer runs, build_/validate_/format_ for the review pipeline stages.
Twelve tools is well within the sweet spot and each earns its place: three rule-lookup tools, two analyzer runners, three review-pipeline stages, two formatters, one coverage statistic, and one composite convenience wrapper. Nothing looks padded or redundant.
The end-to-end flow is covered: discover rules (search/list) → inspect (get_rule) → detect (check_files/check_diff) → explain → build packet → validate → format, plus a composite review_pr and coverage reporting. Minor gaps: the server never posts results (format_pr_review and format_findings only draft, with placeholder SHAs), and a baseline can be consumed via baseline_path but no tool creates or updates one, leaving a small dead end at the delivery step.