Skip to main content
mcpscore --help prints the same flags, grouped the same way as the tables below.

What to audit

Give exactly one of these. Server stderr appears in the output prefixed with server stderr:, except when a .py target fails on a missing module: mcpscore then prints the command to run instead, and -v shows the stderr. The sessionless probes start the server again for their own requests; those extra processes stay silent.

Output

Rules and CI gates

Smoke checks

These flags call the server’s tools. See smoke mode.

Authentication

For URL targets. See authenticated servers. Only an Authorization credential marks the report authenticated: true. Other headers are sent and make no such claim.

Environment variables

Exit codes

Without a gate flag or a configured [gate], a completed audit exits 0 whatever the score. A failing gate names itself on the last line:

Fail on a severity

A score can clear --fail-under while a HIGH or CRITICAL rule fails. --fail-on fails the run on the rule instead of the number:
The score is 89% and the exit code is 3. Every run lists its failed HIGH and CRITICAL rules above the score line, with or without the flag, and --json carries them as blocking_failures. Only rules counted in the score are judged: readiness rules count when a modern-lifecycle server’s score includes them, the same as for --fail-under. A severity re-ranked in mcpscore.toml is judged at its new level. Combine --fail-on with --fail-under to gate on both; each failing gate names itself. A 2 that says the URL was redirected means mcpscore follows a redirect only within the endpoint’s origin and with the request unchanged. Audit the URL the message names. Troubleshooting has the other causes.

Output streams

Human-readable output goes to stderr. With --json, stdout carries the report and nothing else.

SARIF for GitHub code scanning

--sarif writes the failed rules in SARIF 2.1.0, the format GitHub’s Security tab reads. Upload the file and each failed rule becomes a code scanning alert. The upload workflow is in the GitHub Action guide.
A SARIF file is read by everyone who can see the repository’s alerts. Keep credentials in --token, --header, or --env NAME, never in a URL path or a program name.

JUnit XML for CI test reports

--junit writes every rule as a JUnit XML test case, the format GitLab, Jenkins, Azure Pipelines and GitHub test-report actions read. A failed rule shows as a failed test, so the merge request or build page lists what to fix next to your own test results.
Each rule group is one test suite and each rule one test case, named by its rule id:
The file is written before the gates run, so a job that fails on --fail-under still has it. A failed test case does not change mcpscore’s exit code; the gates do. GitLab and Azure Pipelines only display failed test cases, while Jenkins’ junit step marks the build unstable. The setup for each is in GitLab and other CI.

What’s next

Stability contract

Which flags, fields, and exit codes stay stable across releases

Troubleshooting

Exit codes, connection failures, and partial audits