MCPLint
Security testing tool for Model Context Protocol (MCP) servers.
Features
- Protocol validation - verify MCP compliance with 56 validation rules
- Security scanning - detect vulnerabilities with 20+ detection rules
- Multi-server scanning - parallel scanning with aggregated results
- 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
- Advanced prompt engineering - chain-of-thought reasoning with few-shot examples
- Neo4j knowledge graph - vector similarity search for related vulnerabilities (optional)
- Watch mode - differential display showing new/fixed issues
- Shell completions - bash, zsh, fish, PowerShell, elvish
- CI/CD integration - SARIF, JUnit, GitLab output formats
- Smart context detection - auto-detects TTY, CI, NO_COLOR modes
- Config file support - reads Claude Desktop config to find servers
- Interactive mode - guided wizards for scan, fuzz, and init commands
Interactive Mode
MCPLint includes interactive wizards that guide you through common operations when running in a terminal. Interactive mode automatically activates when:
- Running in a TTY (terminal)
- Not in a CI environment
- Command arguments are omitted
Scan Wizard
Run mcplint scan without arguments to launch the scan wizard:
# Prompts for:
# - Server selection (from configured servers)
# - Scan profile (quick/standard/full/enterprise)
# - Categories to include
# - Output format
# - Severity threshold for failure
Fuzz Wizard
Run mcplint fuzz without arguments:
# Prompts for:
# - Server selection
# - Fuzz profile (quick/standard/intensive/CI)
# - Duration
# - Number of workers
# - Corpus directory
Init Wizard
Run mcplint init to generate configuration with guidance:
# Prompts for:
# - Output path
# - Servers to test
# - Default scan profile
# - Create GitHub Actions workflow
# - Run initial scan
Explain Wizard
Run mcplint explain without arguments to get AI-powered explanations:
# Prompts for:
# - Server selection
# - AI provider (Ollama/Anthropic/OpenAI)
# - Audience level (beginner/intermediate/expert)
# - Severity filter (optional)
# - Max findings to explain
# - Enable interactive follow-up Q&A
Interactive mode is disabled in CI environments or when piping output. Use explicit arguments for non-interactive execution.
Installation
# From crates.io
# From source
# With optional Neo4j knowledge graph support
# Or build manually
Optional Features
| Feature | Description | Install |
|---|---|---|
neo4j |
Neo4j knowledge graph for vulnerability similarity search | --features neo4j |
redis |
Redis distributed cache backend | --features redis |
Quick Start
# List servers from Claude Desktop config
# Validate a server
# Security scan
# Scan all servers in parallel
# Watch mode with differential display
Commands
# Core commands
# Utility commands
Command Reference
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.
multi-scan
Scan multiple MCP servers in parallel.
)
)
# Examples
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.
watch
Watch files and rescan on changes with differential display.
# Shows differential output:
# ❌ NEW ISSUES - newly detected vulnerabilities
# ✅ FIXED - previously detected issues now resolved
completions
Generate shell completions with server name support.
# Installation examples
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 |
| html | --format html | Rich HTML reports with charts |
HTML Reports
Generate visual HTML reports with severity charts and detailed findings:
HTML reports include:
- Severity distribution pie chart
- Finding cards with details
- Remediation guidance
- Responsive design for viewing on any device
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