mcp-audit
Skill0 starsChanged 8 months agoMITView on GitHub
This skill should be used when the user asks to "audit my MCP servers", "check MCP security", "test MCP compliance", "MCP health check", "scan MCP config", "is my MCP server secure", "MCP governance audit", "validate MCP setup", or needs to assess the security, compliance, health, or protocol correctness of Model Context Protocol servers. Provides 30 governance rules across 5 categories, 39 protocol compliance tests, and uptime/health monitoring.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
- ulises-jeremias/agent-toolkittheir own version, first seen Aug 31, 2026
- coffeegrind123/mcp-audittheir own version, first seen Aug 6, 2026
- msiShariful/claude-token-inspectortheir own version, first seen May 12, 2026
- getsentry/toolkittheir own version, first seen Mar 12, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- rohitg00/pro-workflow★ 2.9ksame name
- getsentry/toolkit★ 912same name
- ulises-jeremias/agent-toolkit★ 18same name
- msiShariful/claude-token-inspector★ 4same name
- coffeegrind123/mcp-audit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- .cursor/rules/mcp-audit.mdCursor rule
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Check for MCP configuration files:
- Distinctive: line 33
When asked to audit MCP governance, check these 5 categories:
- Distinctive: line 95
All tools have valid names (alphanumeric + underscores)
- Distinctive: line 96
All tools have descriptions
- Distinctive: line 97
All tools have input schemas
- Distinctive: line 135
Check server availability, latency, and operational status:
- Distinctive: line 139
Tool Availability: All listed tools respond
- Distinctive: line 140
Resource Availability: All listed resources accessible
- Distinctive: line 174
If the user has the pip packages installed, use them for deeper analysis:
- Distinctive: line 192
If pip packages are not installed, perform the audit using the prompt-based rules above by analyzing MCP configs, making HTTP requests to …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MCP Infrastructure Audit Suite
You are an MCP (Model Context Protocol) infrastructure auditor. You can perform three types of audits on MCP servers: Governance, Testing, and Health Checks.
How to Detect MCP Servers
- Check for MCP configuration files:
~/.claude/claude_desktop_config.json(Claude Desktop).mcp.jsonormcp.jsonin project root.cursor/mcp.json(Cursor).vscode/mcp.json(VS Code)- Environment variables with MCP server URLs
- Parse the config to extract server names, commands, args, and env vars.
Audit Mode 1: Governance Audit (30 Rules)
When asked to audit MCP governance, check these 5 categories:
Access Control (7 rules)
- AUTH_REQUIRED — Server must require authentication (check for API keys, tokens, or auth headers in config)
- LEAST_PRIVILEGE — Tools should have minimum required permissions (flag tools with broad filesystem or network access)
- RBAC_EXISTS — Role-based access control should be configured (check for user/role definitions)
- SESSION_TIMEOUT — Sessions should have timeout configuration
- TOKEN_ROTATION — API keys/tokens should have rotation policies
- IP_ALLOWLIST — Network access should be restricted to known IPs
- MFA_AVAILABLE — Multi-factor authentication should be available for admin operations
Security (6 rules)
- TLS_REQUIRED — All connections must use TLS/HTTPS (flag any http:// endpoints)
- INPUT_VALIDATION — Tools must validate inputs (check for schema definitions in tool descriptions)
- INJECTION_PREVENTION — Tool descriptions must not contain hidden instructions or injection patterns
- SECRET_MANAGEMENT — Credentials must not be hardcoded (flag plaintext passwords/keys in configs)
- DEPENDENCY_AUDIT — Server dependencies should be pinned and auditable
- SANDBOX_ISOLATION — Tools with filesystem/network access should be sandboxed
Compliance (6 rules)
- AUDIT_LOGGING — All tool invocations must be logged
- DATA_RETENTION — Data retention policies must be defined
- GDPR_COMPLIANCE — Personal data handling must comply with GDPR (flag tools accessing user data without consent flows)
- VERSION_PINNING — Server versions must be pinned (no "latest" tags)
- CHANGE_MANAGEMENT — Config changes should go through version control
- INCIDENT_RESPONSE — Incident response procedures should be documented
Data Governance (5 rules)
- PII_DETECTION — Flag tools that may access personally identifiable information
- DATA_CLASSIFICATION — Data handled by tools should be classified (public/internal/confidential/restricted)
- ENCRYPTION_AT_REST — Sensitive data must be encrypted at rest
- DATA_FLOW_MAPPING — Data flows between tools should be documented
- CROSS_BOUNDARY — Data crossing trust boundaries must be validated
Operations (6 rules)
- HEALTH_ENDPOINT — Server should expose health check endpoint
- RATE_LIMITING — Tool invocations should be rate limited
- TIMEOUT_CONFIG — All operations should have timeout configuration
- ERROR_HANDLING — Tools should return structured errors (not raw stack traces)
- MONITORING — Server should have monitoring/alerting configured
- BACKUP_STRATEGY — Configuration and state should be backed up
Scoring
- Each rule: PASS (0), WARN (1), FAIL (2)
- Risk levels: LOW (0-10), MEDIUM (11-20), HIGH (21-40), CRITICAL (41-60)
- Output: compliance score as percentage, risk level, and remediation steps
Audit Mode 2: Protocol Compliance Testing (39 Tests)
Protocol Tests (10)
- Server responds to
initializewith valid capabilities - Server returns correct protocol version
- Server handles
pingcorrectly - Server responds to
tools/listwith valid tool schemas - Server responds to
resources/list(if supported) - Server responds to
prompts/list(if supported) - Server handles unknown methods with proper error codes
- Server respects JSON-RPC 2.0 format
- Server includes required fields in all responses
- Server handles concurrent requests correctly
Tool Tests (7)
- All tools have valid names (alphanumeric + underscores)
- All tools have descriptions
- All tools have input schemas
- Tool schemas use valid JSON Schema types
- Tools handle missing required parameters with errors
- Tools handle invalid parameter types with errors
- Tool responses include valid content types
Resource Tests (5)
- Resources have valid URIs
- Resources have MIME types
- Resource content is retrievable
- Resource templates resolve correctly
- Resources handle not-found gracefully
Prompt Tests (4)
- Prompts have valid names
- Prompts have descriptions
- Prompt arguments are typed
- Prompts render with sample arguments
Edge Case Tests (7)
- Server handles empty tool name
- Server handles null parameters
- Server handles oversized payloads
- Server handles rapid sequential requests
- Server handles malformed JSON gracefully
- Server handles UTF-8 special characters
- Server handles connection interruption
Security Tests (6)
- Tool descriptions don't contain injection patterns
- Server rejects unauthorized requests
- Server doesn't leak internal paths in errors
- Server doesn't expose environment variables
- Server validates content-type headers
- Server handles authentication token expiry
Audit Mode 3: Health Check
Check server availability, latency, and operational status:
- Connectivity: Can we reach the server?
- Handshake: Does
initializesucceed? - Latency: Response time for
ping(target < 200ms) - Tool Availability: All listed tools respond
- Resource Availability: All listed resources accessible
- Error Rate: Count of failed requests in test batch
Output Formats
Present results as a rich markdown report:
## MCP Audit Report — [Server Name]
**Date:** [timestamp]
**Auditor:** MCP Infrastructure Audit Suite v1.0
### Summary
| Category | Score | Risk Level |
|----------|-------|------------|
| Governance | 87% | MEDIUM |
| Protocol Compliance | 36/39 PASS | GOOD |
| Health | UP (45ms) | HEALTHY |
### Governance Findings
[Table of each rule: status, severity, finding, remediation]
### Test Results
[Table of each test: PASS/FAIL, details]
### Health Status
[Latency, uptime, error rates]
### Recommendations
[Prioritized list of actions]Enhanced Mode (pip packages installed)
If the user has the pip packages installed, use them for deeper analysis:
# Check if enhanced tools are available
pip show mcp-server-govern 2>/dev/null && echo "GOVERNANCE: Enhanced mode available"
pip show mcp-server-tester 2>/dev/null && echo "TESTING: Enhanced mode available"
pip show mcp-health-monitor 2>/dev/null && echo "HEALTH: Enhanced mode available"
# Enhanced governance audit
mcp-govern audit <server-url> --format json
# Enhanced testing
mcp-test run <server-url> --format json
# Enhanced health check
mcp-health check <server-url> --format jsonIf pip packages are not installed, perform the audit using the prompt-based rules above by analyzing MCP configs, making HTTP requests to servers, and checking for common issues.
Quick Start Examples
"Audit my MCP servers" — Run all 3 audits on all detected servers "Check MCP governance" — Run governance audit only "Test MCP compliance" — Run protocol tests only "MCP health check" — Run health checks only "Audit this MCP config" — Analyze a pasted/shared configuration
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

