{"id":51118969,"url":"https://github.com/sulthonzh/mcp-audit","last_synced_at":"2026-06-25T00:30:35.085Z","repository":{"id":363944675,"uuid":"1261424027","full_name":"sulthonzh/mcp-audit","owner":"sulthonzh","description":"Security scanner for MCP (Model Context Protocol) servers","archived":false,"fork":false,"pushed_at":"2026-06-19T10:53:36.000Z","size":209,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T12:27:48.581Z","etag":null,"topics":["agent","ai","audit","cli","mcp","scanner","security","vulnerability"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sulthonzh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T17:02:42.000Z","updated_at":"2026-06-19T10:53:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sulthonzh/mcp-audit","commit_stats":null,"previous_names":["sulthonzh/mcp-audit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sulthonzh/mcp-audit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fmcp-audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fmcp-audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fmcp-audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fmcp-audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sulthonzh","download_url":"https://codeload.github.com/sulthonzh/mcp-audit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fmcp-audit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34755061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","audit","cli","mcp","scanner","security","vulnerability"],"created_at":"2026-06-25T00:30:34.971Z","updated_at":"2026-06-25T00:30:35.069Z","avatar_url":"https://github.com/sulthonzh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP Audit 🔍\n\nSecurity scanner for MCP (Model Context Protocol) servers — and your container/K8s/Helm infrastructure too. Think of it as `npm audit` but for your AI agent integrations and cloud-native deployments.\n\n## Why MCP Audit?\n\nEveryone's installing MCP servers like crazy, but nobody's checking if they're about to give a plugin full access to their filesystem, data, and context. MCP Audit gives you visibility into what these servers can actually do — and flags the risky stuff before it bites you.\n\nIt also scans Dockerfiles, Kubernetes manifests, and Helm charts, because your AI tools don't live in a vacuum. They run in containers, on clusters, behind charts. Might as well audit the whole stack.\n\n## What It Scans\n\n| Target | Command | What It Catches |\n|--------|---------|-----------------|\n| MCP config files | `mcp-audit scan` | Risky permissions, overly broad file access |\n| MCP server repos | `mcp-audit check \u003crepo\u003e` | Prompt injection, hardcoded secrets, trust scoring |\n| Dockerfiles | `mcp-audit docker \u003cpath\u003e` | Root user, exposed secrets, outdated base images |\n| Kubernetes manifests | `mcp-audit k8s \u003cpath\u003e` | Privileged containers, hostNetwork, runaway resources |\n| Helm charts | `mcp-audit helm \u003cpath\u003e` | Hardcoded secrets in values.yaml, unsafe defaults |\n\n## Quick Start\n\n```bash\nnpm install -g mcp-audit\n\n# Scan your MCP config\nmcp-audit scan\n\n# Audit a remote MCP server\nmcp-audit check github.com/user/mcp-server\n\n# Scan a Dockerfile\nmcp-audit docker ./Dockerfile\n\n# Scan K8s manifests\nmcp-audit k8s ./manifests\n\n# Scan a Helm chart\nmcp-audit helm ./my-chart\n\n# CI mode (exits with code on findings)\nmcp-audit check --ci\n```\n\n## Usage\n\n### Scan MCP Configuration\nChecks `claude_desktop_config.json`, `.cursor/mcp.json`, and other MCP config files for risky permissions.\n\n```bash\nmcp-audit scan\nmcp-audit scan -o report.json  # save report\n```\n\n### Check a Remote Server\nClones the repo, runs static analysis, and generates a trust score based on GitHub signals.\n\n```bash\nmcp-audit check https://github.com/username/mcp-server\nmcp-audit check https://github.com/username/mcp-server --ci  # CI-friendly\n```\n\n### Docker Security\n```bash\nmcp-audit docker ./Dockerfile\nmcp-audit docker ./docker-dir  # scans all Dockerfiles in directory\n```\n\nDetects: root user, `ADD` vs `COPY`, hardcoded secrets, `latest` tags, missing `.dockerignore`.\n\n### Kubernetes Security\n```bash\nmcp-audit k8s ./manifests\nmcp-audit k8s ./manifests --strict  # stricter checks\n```\n\nDetects: privileged containers, hostNetwork/hostPID, missing resource limits, `alwaysPullPolicy` not set, containers running as root.\n\n### Helm Chart Security\n```bash\nmcp-audit helm ./my-chart\nmcp-audit helm ./my-chart --strict -o report.json\n```\n\nAutomatically detects Helm charts (looks for `Chart.yaml`). Scans `values.yaml` for hardcoded secrets and privileged flags, strips Go template syntax from `templates/` and runs K8s security checks, and validates `Chart.yaml` for deprecated API versions and missing metadata.\n\n### CI Integration\nAll scanners support `--ci` for pipeline-friendly output and proper exit codes. Use `--strict` to fail on warnings too.\n\n```yaml\n# GitHub Actions example\n- name: Security Audit\n  run: |\n    npx mcp-audit k8s ./k8s --ci --strict\n    npx mcp-audit docker . --ci\n    npx mcp-audit helm ./charts --ci\n```\n\n## Configuration\n\nCreate `mcp-audit.config.json` to customize:\n\n```json\n{\n  \"vulnerabilityDatabase\": \"https://raw.githubusercontent.com/your-org/mcp-vuln-db/main/database.json\",\n  \"trustWeight\": {\n    \"stars\": 0.3,\n    \"tests\": 0.3,\n    \"ci\": 0.2,\n    \"age\": 0.2\n  }\n}\n```\n\n## Pre-commit Hook\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: local\n    hooks:\n      - id: mcp-audit\n        name: MCP Security Audit\n        entry: mcp-audit check --ci\n        language: system\n```\n\n## How It Compares\n\n| Tool | Scope | MCP Config | Docker/K8s/Helm | SARIF Output | CLI |\n|------|-------|-----------|-----------------|-------------|-----|\n| **mcp-audit** | MCP servers + infra | ✅ | ✅ | ✅ | ✅ |\n| `npm audit` | npm deps only | ❌ | ❌ | ❌ | ✅ |\n| Trivy | Containers | ❌ | ✅ | ✅ | ✅ |\n| kube-bench | K8s CIS bench | ❌ | ✅ (K8s) | ✅ | ✅ |\n| checkov | IaC policies | ❌ | ✅ | ✅ | ✅ |\n\n**Why mcp-audit?** No other tool scans MCP config files for risky permissions. You'd need Trivy + kube-bench + a custom script to cover what mcp-audit does in one command.\n\n## Real-World Examples\n\n### 1. Pre-commit MCP Safety Check\n\nBefore committing changes that add or modify MCP servers, run a quick audit:\n\n```bash\n# In your project root\nmcp-audit scan --ci \u0026\u0026 echo \"✅ MCP config is safe\" || echo \"❌ Fix issues before committing\"\n```\n\n### 2. CI Pipeline Gate (GitHub Actions)\n\n```yaml\n# .github/workflows/mcp-audit.yml\nname: MCP Security Audit\non: [pull_request]\njobs:\n  audit:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - run: npm install -g @sulthonzh/mcp-audit\n      - run: mcp-audit scan --ci -o sarif-report.json\n      - uses: github/codeql-action/upload-sarif@v3\n        with:\n          sarif_file: sarif-report.json\n```\n\n### 3. Full Stack Security Scan (MCP + Docker + K8s)\n\n```bash\n# Scan everything before deployment\nmcp-audit scan                    # MCP config files\nmcp-audit docker ./Dockerfile     # Container security\nmcp-audit k8s ./manifests         # K8s manifest security\nmcp-audit helm ./charts           # Helm chart security\nmcp-audit check github.com/user/mcp-server  # Remote repo audit\n```\n\n## Contributing\n\nPRs welcome. Open an issue first if it's a significant change.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fmcp-audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsulthonzh%2Fmcp-audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fmcp-audit/lists"}