MCPLint
Security testing tool for Model Context Protocol (MCP) servers.
Features
- Protocol validation - verify MCP compliance
- Security scanning - detect vulnerabilities
- Coverage-guided fuzzing - find crashes and edge cases
- Tool fingerprinting - detect schema changes and breaking API updates
- AI-powered explanations - understand findings with remediation guidance
- CI/CD integration - SARIF, JUnit, GitLab output formats
- Config file support - reads Claude Desktop config to find servers
Installation
Or build from source:
Usage
# List servers from Claude Desktop config
# Validate a server
# Security scan
# Fuzz a server
# AI-powered explanations
# Watch mode
# List security rules
# Environment check
# Cache management
# Tool fingerprinting
# Generate config
Commands
validate
Check MCP server for protocol compliance. Runs 56 validation rules across protocol, schema, sequence, tool, resource, security, and edge case categories.
scan
Scan for security vulnerabilities.
fuzz
Coverage-guided fuzzing.
)
)
explain
AI-powered explanations for security findings.
AI providers require environment variables:
- Anthropic: ANTHROPIC_API_KEY
- OpenAI: OPENAI_API_KEY
- Ollama: runs locally, no key needed
fingerprint
Generate and compare tool definition fingerprints to detect schema changes.
# Generate fingerprints
# Compare against baseline
)
Exit codes for compare:
- 0: No changes or minor/patch changes
- 1: Breaking changes detected
- 2: Major changes detected
See docs/fingerprinting.md for detailed documentation.
servers
List MCP servers from Claude Desktop config.
cache
Manage cache storage.
Validation Rules
56 rules across 7 categories:
| Category | Rules | Description |
|---|---|---|
| Protocol | PROTO-001 to PROTO-015 | JSON-RPC 2.0 compliance, MCP version |
| Schema | SCHEMA-001 to SCHEMA-005 | JSON Schema validation |
| Sequence | SEQ-001 to SEQ-003 | Method call sequences |
| Tool | TOOL-001 to TOOL-005 | Tool invocation |
| Resource | RES-001 to RES-003 | Resource listing and reading |
| Security | SEC-001 to SEC-015 | Path traversal, injection, SSRF, XXE, template injection, prompt injection, tool shadowing |
| Edge | EDGE-001 to EDGE-010 | Null bytes, deep nesting, overflow, timeouts |
Run mcplint rules --details to see all rules.
Security Rules (Scanner)
20+ rules for vulnerability detection:
| Category | Description |
|---|---|
| injection | Command injection, SQL injection, path traversal, SSRF |
| auth | Authentication, credential exposure, OAuth scope abuse |
| transport | TLS/SSL security |
| protocol | Tool poisoning, shadowing, rug pull detection |
| data | Data exposure |
| dos | Denial of service |
Output Formats
| Format | Flag | Use |
|---|---|---|
| text | --format text | Terminal output (default) |
| json | --format json | Machine-parseable |
| sarif | --format sarif | GitHub Code Scanning |
| junit | --format junit | Test runners |
| gitlab | --format gitlab | GitLab Code Quality |
Configuration
Create .mcplint.toml:
Example:
[]
= "standard"
= ["MCP-DOS-002"]
= ["critical", "high"]
[]
= 600
= 8
[]
= "ollama"
= "llama3.2"
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success, no findings |
| 1 | Success, findings detected |
| 2 | Error |
| 3 | Partial success |
| 4 | Timeout |
License
MIT