Greptar
The mutant dinosaur that hunts your bugs. Mutation-based code verification MCP server.
Ask AI about Greptar
Powered by Claude Β· Grounded in docs
I know everything about Greptar. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
The mutant dinosaur that hunts your bugs
grep + Reptar = Greptar. Find the mutations before they find you.
Greptar is a mutation-based code verification server that speaks MCP. It hunts bugs by injecting mutations into your code and measuring whether your tests and reviews catch them.
Two modes, one scoring matrix:
- Semantic mutations β AI-crafted realistic bugs a human might actually write
- Mechanical mutations β automated operator swaps via cargo-mutants for breadth
What survives is what you should worry about.
How it works
βββββββββββββββββββββββββββββββββββ
β Scoring Matrix β
ββββββββββββββββ¬ββββββββββββββββββββ€
β β Review catches it? β
β ββββββββββ¬βββββββββββ€
β β Yes β No β
ββββββββββββββββΌβββββββββΌβββββββββββ€
β Tests Yes β Strong βReviewGap β
β catch No βTestGap βBlindSpot β
β it? β β β
ββββββββββββββββ΄βββββββββ΄βββββββββββ
- Strong β both tests and review catch it. You're covered.
- TestGap β review catches it but tests don't. Write a test.
- ReviewGap β tests catch it but review missed it. Sharpen your eye.
- BlindSpot β nobody catches it. Highest priority.
Quick start
Prerequisites
- Rust (2024 edition)
- ripgrep (
rg) β for thescantool - cargo-mutants β for the
mutantstool (optional)
Build
cargo build --release
Configure your MCP client
Add to your MCP client config (e.g. Claude Code's settings.json):
{
"mcpServers": {
"greptar": {
"command": "/path/to/greptar/target/release/greptar",
"args": []
}
}
}
Workflows
Semantic (depth β AI-crafted realistic bugs)
scan β read context β generate plan β plan β execute_plan β score
scanβ discover mutation targets with ripgrep- Read surrounding context for each target
- Generate a mutation plan (realistic bugs a human might write)
planβ load the mutation planexecute_planβ run all mutations in one call (recommended) β or use the interactive loop:injectβtestβrecordβrevertscoreβ view the detection matrix
Mechanical (breadth β cargo-mutants operator swaps)
mutants β score
mutantsβ run cargo-mutants on specific filesscoreβ view results (merged with any semantic results)
Both workflows feed the same scoring matrix. Run them together for depth + breadth.
Tools
| Tool | Purpose | Phase |
|---|---|---|
scan | Discover mutation targets via ripgrep | Idle β Scanned |
plan | Load a mutation plan | Scanned β Planned |
inject | Apply a mutation to the codebase | Planned β Injected |
test | Run tests against injected mutation | Injected |
record | Record test/review outcome | Injected |
revert | Undo injected mutation via git | Injected β Planned |
execute_plan | Batch-run all mutations automatically | Planned β Planned |
mutants | Run cargo-mutants for mechanical mutations | Any* β Planned |
score | View the detection matrix | Any |
status | Check current phase | Any |
reset | Clear state and start over | Any (not Injected) |
State machine
Idle β (scan) β Scanned β (plan) β Planned β (inject) β Injected β (revert) β Planned
β β
ββββββββββββββββββββββββββββββββββββββββββββ
The name
Reptar is a fictional mutant dinosaur from Rugrats β a radioactive T-Rex that's equal parts terrifying and beloved. Greptar is grep + Reptar: it greps through your code to find where mutations can hide, then stomps on the ones your tests miss.
Mutation testing is about finding what survives. Greptar makes sure nothing does.
License
MIT
