# TestLens

> TestLens is a free MCP server for developer tools. Mutation testing for Python unittest suites: finds the mutants your tests miss. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** API
- **Website:** https://testlens.bigfloppy.net
- **Repository:** https://github.com/wminno/testlens
- **MCP Registry name:** net.bigfloppy.testlens/testlens
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http testlens https://testlens.bigfloppy.net/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://testlens.bigfloppy.net/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "testlens": {
      "url": "https://testlens.bigfloppy.net/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "testlens": {
      "type": "http",
      "url": "https://testlens.bigfloppy.net/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "testlens": {
      "serverUrl": "https://testlens.bigfloppy.net/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "testlens": {
      "type": "http",
      "url": "https://testlens.bigfloppy.net/mcp"
    }
  }
}
```

## Tools

- `testlens_mutate`: Runs your tests against auto-generated mutants of your code.
- `testlens_health`: Checks that the API is up.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/testlens
