Who it is forA team lead or DevSecOps engineer whose repository commits .vscode/mcp.json, .cursor/mcp.json, or similar project-level MCP configs.
The problemDevelopers can add an MCP server with a plaintext HTTP endpoint, a wildcard permission, or a hardcoded token in a pull request, and nothing checks it before merge.
The outcomeEach pull request gets a SARIF upload that appears in the repository Security tab, and the workflow fails when a finding meets the severity threshold.
What you need first
- Python 3.9 or newer
- pipx or pip available in the terminal
- An MCP client config file (for example claude_desktop_config.json or .cursor/mcp.json), or access to the machine where those files live
Steps
- Add a workflow file that sets
permissions:withsecurity-events: writeand checks out the repository. - In the workflow, install the tool with
pipx install git+https://github.com/graygnatconsole/mcp-audit-tool.git. - Run
mcp-audit scan .vscode/mcp.json .cursor/mcp.json --format sarif --output results.sarif(adjust paths to your repo's MCP config files). - Add a step that uploads results.sarif with
github/codeql-action/upload-sarif@v3. - Add
--fail-on highto the scan command so the build fails on HIGH or worse findings, then open a test pull request to confirm the gate works.
Prompt for your agent
Use the GitHub repo graygnatconsole/mcp-audit-tool to add a GitHub Actions workflow to <repo-path> that runs `mcp-audit scan` on the project MCP config files and writes SARIF output. Return the workflow file contents. Verify that the workflow has `security-events: write` permission and that the scan step includes `--format sarif`.
Caveat. The README example uses `actions/checkout@v4`, `actions/setup-python@v5`, and `upload-sarif@v3`, so keep those versions unless you have checked them against your own runner setup.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for graygnatconsole/mcp-audit-tool and "Block risky MCP config changes in pull requests"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer