TestLens
Mutation testing for Python unittest suites: finds the mutants your tests miss
- Pricing
- Free
- Platforms
- API
- Runs
- Remotely
- Version
- 1.1.0
- Listing updated
- 3 days ago
About TestLens
TestLens is a free MCP server for developer tools. It runs as a hosted remote server, so there is nothing to install locally.
Passing tests can still miss behaviour. This server mutates your code by flipping a comparison, swapping an operator, inverting a boolean or bumping a constant, then runs your unittest cases against each variant. Every mutant that survives points at a boundary or condition no test checks.
You send the code, which is saved as a module named solution, and the tests, which import it. The report gives a mutation score (killed divided by total), survivors with line numbers, and any hangs. The site's example is a clamp function whose tests only call clamp(5): flipping the lower-bound comparison goes unnoticed, so the boundary is untested.
Runs are limited: up to 24 mutants, 2.5 seconds per run, one at a time, and a few runs per hour per IP. Each run executes in a sandbox with an audit hook blocking sockets, subprocesses and exec, and the site says the API is free with no key. The page says it was built by an autonomous agent called lead-builder-2.
Install
Run in a terminal
claude mcp add --transport http testlens https://testlens.bigfloppy.net/mcpAdd to Settings → Connectors → Add custom connector
https://testlens.bigfloppy.net/mcpAdd to ~/.cursor/mcp.json
{
"mcpServers": {
"testlens": {
"url": "https://testlens.bigfloppy.net/mcp"
}
}
}Add to .vscode/mcp.json
{
"servers": {
"testlens": {
"type": "http",
"url": "https://testlens.bigfloppy.net/mcp"
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"testlens": {
"serverUrl": "https://testlens.bigfloppy.net/mcp"
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"testlens": {
"type": "http",
"url": "https://testlens.bigfloppy.net/mcp"
}
}
}Tools this server provides (2)
Taken from the project documentation; the running server may differ.
- testlens_mutate
- Runs your tests against auto-generated mutants of your code.
- testlens_health
- Checks that the API is up.
What it does
- Mutation score
- Reports killed mutants divided by total so you can see how strong the tests are.
- Survivor line numbers
- Lists each surviving mutant with the line it changed.
- Sandboxed runs
- An audit hook blocks sockets, subprocess and exec while tests run in a disposable temp directory.
- Free, keyless API
- A plain POST to /api/mutate works without signup, within fair-use limits.
- Remote MCP endpoint
- Streamable HTTP at /mcp exposes the same check to agents.
Good for
- Check whether AI-written tests really cover a function
- Find untested boundaries in a small Python module
- Add a mutation check to an agent's write-code-then-test loop
- Compare test suites by their mutation score
Pricing
Free
Free API, no key; fair-use limits
Prices change. Check testlens.bigfloppy.net before you buy.
TestLens FAQ
What languages and test frameworks are supported?
Python code with unittest cases that import the module solution.
Do I need an API key?
No. The site describes it as free with no key, under fair-use limits.
What are the limits per run?
Up to 24 mutants and 2.5 seconds per run, one concurrent run, and a few runs per hour per IP.
Is the code executed safely?
Each run uses an audit hook that blocks sockets, subprocess and exec, in a disposable temp directory.
Is TestLens free?
Yes. TestLens is free to use.
How do I add TestLens to Claude Code?
Run this command in your terminal: claude mcp add --transport http testlens https://testlens.bigfloppy.net/mcp
What are the best alternatives to TestLens?
The closest alternatives to TestLens are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to TestLens

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools