{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "graygnatconsole-mcp-audit-tool--gate-pull-requests-on-mcp-config-security",
 "repo": "graygnatconsole/mcp-audit-tool",
 "repo_url": "https://github.com/graygnatconsole/mcp-audit-tool",
 "repo_slug": "graygnatconsole-mcp-audit-tool",
 "title": "Block risky MCP config changes in pull requests",
 "page_title": "How to block risky MCP config changes in pull requests with MCP Audit Tool",
 "summary": "Run the audit in GitHub Actions, fail the build on high findings, and show results in Code Scanning.",
 "who": "A team lead or DevSecOps engineer whose repository commits .vscode/mcp.json, .cursor/mcp.json, or similar project-level MCP configs.",
 "problem": "Developers 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.",
 "outcome": "Each pull request gets a SARIF upload that appears in the repository Security tab, and the workflow fails when a finding meets the severity threshold.",
 "steps": [
  "Add a workflow file that sets `permissions:` with `security-events: write` and 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 high` to the scan command so the build fails on HIGH or worse findings, then open a test pull request to confirm the gate works."
 ],
 "agent_prompt": "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`.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "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.",
 "category": "Security and science",
 "tags": [
  "Security and science"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/graygnatconsole-mcp-audit-tool/gate-pull-requests-on-mcp-config-security/",
 "md": "https://dedupedai.com/use-cases/graygnatconsole-mcp-audit-tool/gate-pull-requests-on-mcp-config-security/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/graygnatconsole-mcp-audit-tool--gate-pull-requests-on-mcp-config-security.json",
 "api_version": "v1"
}
