# Mockttp: 6.9 out of 10

Reasonable, with limits. 4th of 10 in [Mocking and test data](https://elestia.ai/opensource/mocking/index.md).

Mockttp is the HTTP, HTTPS and WebSocket mock server and intercepting proxy that runs inside HTTP Toolkit. It is the strongest JS choice when the code under test runs in another process, a browser or a device. For mocking HTTP calls inside one process, MSW or Nock fit most people better.

**Best for:** Teams writing end-to-end or integration tests that must mock or rewrite real HTTP(S) traffic from separate processes, browsers or devices through a proxy.

## Scores

- **Overall: 6.9** (likely 5.9 to 8.0)
  - Claude Opus 5.5 (6.5): It is the best JS tool for proxy-based, cross-process HTTP(S) mocking, and it is well maintained. That makes it a strong pick for that kind of project. For most HTTP mocking in unit and component tests, MSW is simpler and far more widely adopted, and Nock still fits Node-only tests. Its heavy dependency footprint, reliance on one company and below-median growth keep it out of the top tier.
  - GPT-6.2 Sol (7.3): Pick Mockttp when tests need a real server or proxy to exercise network behavior across processes or devices. Mock Service Worker is the easier default for routine browser and Node.js API stubs. Active maintenance supports a new project, while concentrated release ownership and limited independent evidence widen the range.
- **Needed by many: 3.9** (likely 2.9 to 5.3)
  - Claude Opus 5.5 (3.5): Most JS developers who mock HTTP in tests get by with in-process tools like MSW, Nock or fetch-mock. Mockttp's real server-and-proxy approach serves a clear niche: cross-process e2e tests, HTTPS interception and custom MitM proxies. It also does none of the category's function mocking or test-data jobs.
  - GPT-6.2 Sol (4.3): Mocking is a common testing pain point. Mockttp serves the narrower group that needs a real network listener or proxy, and its server runs on Node.js. The survey does not measure how many teams need that specific setup.
- **Helps a lot: 7.9** (likely 6.8 to 8.9)
  - Claude Opus 5.5 (7.5): For its niche it is very capable. It generates TLS certificates on the fly, mocks WebSockets, offers SOCKS and raw passthrough, supports multi-step rules and URL rewriting, and has good TypeScript types and match/miss debugging. It is battle-tested as HTTP Toolkit's own proxy engine. The limits are setup friction (CA trust, proxy env vars, ProxyAgent for in-process fetch) and less material online for AI agents to learn from than MSW or Nock have.
  - GPT-6.2 Sol (8.2): Version 4.6.5 offers typed request rules, request verification, WebSocket mocks, and diagnostics for unmatched requests. The setup guide gives developers and coding agents a clear starting point, though client routing and TLS trust depend on the test environment. Current independent benchmarks and data on agent-generated code are sparse.
- **Holds up over time: 7.2** (likely 5.8 to 8.2)
  - Claude Opus 5.5 (7.0): Activity is steady: 135 commits in the last year, 16 npm versions with the latest in October 2026, and a Scorecard Maintained check of 10. The HTTP Toolkit product depends on it, which gives it an aligned funding source. That same fact makes it one maintainer's company, which is a concentration risk. v4 introduced many breaking changes.
  - GPT-6.2 Sol (7.3): Mockttp recorded 135 commits and 16 npm versions in the past year, and one recent external fix was merged within days. HTTP Toolkit uses it as its core proxy, giving the product a reason to keep it maintained. One listed npm maintainer and user-reported difficulty finding v4 migration guidance temper the two-year outlook.
- **Used widely: 3.8** (likely 2.8 to 5.0)
  - Claude Opus 5.5 (4.0): About 2.6M downloads in 4 weeks, up 2.4x in a year. That growth is below the 4.1 median, so it is losing relative ground. A few large CI suites, such as MetaMask's e2e tests, likely inflate the downloads. It has 2,373 dependent repos and 889 stars, close to testdouble and Mirage and far below MSW, Nock and Sinon.
  - GPT-6.2 Sol (3.5): Downloads reached 2.63 million in four weeks, 2.36 times the year-earlier count, against a 4.1 times catalog baseline. The 2,373 indexed repos and 149 packages suggest use by a few thousand projects, well below Mock Service Worker and Nock on the same measure. Repeat installs, use outside testing, and incomplete indexing make direct adoption hard to pin down.
- **Vouched for: 5.0** (likely 3.6 to 6.3)
  - Claude Opus 5.5 (4.5): The main backer is HTTP Toolkit itself, which runs all its proxying on Mockttp. MetaMask's e2e testing uses a proxy mock server, which appears to be built on Mockttp. There are a few independent practitioner write-ups, such as the Playwright article. It does not appear in surveys and has no independent benchmarks or Hacker News discussion.
  - GPT-6.2 Sol (5.4): Lokalise uses Mockttp in its Node service template's contract tests, and HTTP Toolkit ships it as its proxy engine. Unsplash's older Cypress evaluation praised maintainer responsiveness and raised concerns about integration. Recent independent evidence on performance and user satisfaction is limited.
- **Safe: 6.5** (likely 5.4 to 7.5)
  - Claude Opus 5.5 (6.5): It has no known advisories, uses the permissive Apache-2.0 licence, and is usually only a dev dependency. Its 41 direct dependencies make a large attack surface. The OpenSSF Scorecard is 5, with weak branch protection, code review, pinned dependencies and token permissions, and one person largely controls releases.
  - GPT-6.2 Sol (6.4): The licence is permissive Apache-2.0, and tagged builds use GitHub Actions with npm provenance. The 41 direct dependencies, one listed npm maintainer, and weak review, branch protection, and dependency pinning checks leave supply-chain risk. The OSV snapshot counted zero advisories, while GitHub documents a high-severity admin API exposure fixed by default in 4.6.0 and backported to 3.17.2. The fix is included in 4.6.5, and exposure still depends on how the optional admin server is configured.

## Good

- It runs a real mock server and proxy, so it can intercept traffic from child processes, browsers and mobile apps, which in-process mocks like MSW and Nock cannot.
- It intercepts HTTPS with CA certificates it generates on the fly, and it also handles WebSockets, SOCKS and non-HTTP passthrough.
- The same test code works in Node and in browsers through a remote admin server, and the TypeScript types are good.
- It is actively maintained as the core of a commercial product, with 16 npm releases and 135 commits in the last year.

## Bad

- It pulls in 41 direct dependencies, a heavy footprint for a test tool.
- Setup takes more work than an in-process mock: proxy environment variables, CA trust, and undici ProxyAgent for in-process fetch.
- v4 brought many breaking changes, including Node 20+, renamed handlers and steps, and changed event fields.
- Few independent write-ups or community threads exist, and one company maintains it.

## The numbers

- Downloads, 4 weeks: 2.6M
- In a year: ×2.4
- GitHub stars: 889
- Commits, 12 months: 135
- Last npm release: Oct 2026
- Advisories, 24 months: 0
- Licence: Apache-2.0
- GitHub: https://github.com/httptoolkit/mockttp
- npm: https://www.npmjs.com/package/mockttp

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
