Elestia Open Source Ratings
6.9

Mockttp

Reasonable, with limits. 4th of 10 mocking and test data.

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.

WebsiteGitHubnpm

Scores

Overall6.9

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 6.5, likely 5.5 to 7.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.

  • peers Mock Service Worker downloadsLast4Weeks: MSW has 134M downloads and is growing much faster
  • npm-compare.com/mockttp,msw,nock,sinon: Comparison shows Mockttp is the proxy option among HTTP mocks
  • github commitsLastYear: Actively maintained

GPT-6.2 Sol: 7.3, likely 6.2 to 8.4

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 many3.9

How many developers need a tool for this job?

Claude Opus 5.5: 3.5, likely 2.5 to 5.0

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, likely 3.2 to 5.5

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 lot7.9

How well does it do the job for those who need it?

Claude Opus 5.5: 7.5, likely 6.5 to 8.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, likely 7.1 to 9.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 time7.2

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 5.5 to 8.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.

  • github commitsLastYear: 135 commits in the last year
  • npm versionsLastYear: 16 releases; latest 4.6.5 on 2026-10-22
  • github.com/httptoolkit/mockttp/releases/tag/v4.0.0: Long list of v4 breaking changes, Node 20+ minimum
  • HTTP Toolkit business model: Built and funded largely by HTTP Toolkit's founder

GPT-6.2 Sol: 7.3, likely 6.1 to 8.4

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 widely3.8

How many use it, and is that growing?

Claude Opus 5.5: 4.0, likely 3.0 to 5.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.

  • npm downloadsLast4Weeks: 2.63M versus 1.11M a year ago, ratio 2.36, below the 4.1 median
  • dependents: 2,373 repos and 149 packages, against MSW's 11,851 and Nock's 130k
  • github stars: 889 stars
  • bluesky posts: 3 posts, all from the maintainer account

GPT-6.2 Sol: 3.5, likely 2.5 to 4.9

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.

  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 2.63 million versus 1.11 million, with growth below the catalog baseline.
  • dependents, peers dependentRepos: 2,373 indexed repos versus 11,851 for MSW and 130,286 for Nock.
  • github stars, bluesky posts, peers: 889 stars and three maintainer Bluesky posts, versus 53 posts for MSW.
  • github.com/httptoolkit/mockttp: Standalone proxy use contributes to package adoption beyond testing.
Vouched for5.0

Who stands behind it being good?

Claude Opus 5.5: 4.5, likely 3.0 to 6.0

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, likely 4.1 to 6.5

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.

Safe6.5

How safe is it to depend on?

Claude Opus 5.5: 6.5, likely 5.5 to 7.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.

  • advisories total: 0 advisories
  • npm dependencies: 41 direct dependencies
  • scorecard: Score 5; Code-Review 2, Branch-Protection 0, Pinned-Dependencies 0
  • github license: Apache-2.0

GPT-6.2 Sol: 6.4, likely 5.2 to 7.5

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

npm downloads, 4 weeks
2.6M ×2.4 in a year
GitHub stars
889
Commits, 12 months
135
npm version
4.6.5 Oct 2026
Versions, 12 months
16
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
5.0 out of 10, Nov 2026
Licence
Apache-2.0

Read on 21 November 2026 from GitHub (httptoolkit/mockttp), npm (mockttp), OSV and the OpenSSF Scorecard.

Mocking and test data

  1. 8.5Mock Service Worker
  2. 8.1Faker
  3. 7.1Nock
  4. 6.9Mockttp
  5. 6.9Sinon.JS
  6. 6.5Fishery
  7. 5.7fetch-mock
  8. 5.6JSON Server
  9. 5.4testdouble.js
  10. 4.1Mirage JS
Compare all 10 on six scores