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.
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.
- github.com/httptoolkit/mockttp/blob/main/docs/setup.md: Shows where a real server or proxy helps and what setup it requires.
- mswjs.io/docs: MSW shares mock definitions across browser and Node.js tests.
- github commitsLastYear, npm versionsLastYear, peers: Active maintenance with a smaller user base than the main HTTP mocking peers.
- github.com/lokalise/node-service-template/blob/main/CHANGELOG.md: Current independent use in contract tests.
- intel.aikido.dev/packages/npm/mockttp: Lists one npm maintainer.
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.
- npm-compare.com/mockttp,msw,nock,sinon: Positioned as a proxy-based mock server, unlike in-process peers
- dev.to/playwright/mocking-server-side-http-in-playwright-with-mockttp-58jo: Used for the server-side e2e case that page.route cannot cover
- github description: HTTP mock server & proxy library
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.
- 2025.stateofjs.com/en-US/libraries/testing/#testing_pain_points: Mocking was the most cited testing pain point.
- github.com/httptoolkit/mockttp/blob/main/docs/setup.md: Documents Node.js hosting and browser and remote-device 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.
- github.com/httptoolkit/mockttp/releases/tag/v4.0.0: v4 adds URL rewriting, step chaining, SOCKS, unknown-protocol passthrough
- dev.to/playwright/mocking-server-side-http-in-playwright-with-mockttp-58jo: Practitioner praises the fluent rule builder and notes setup gotchas
- github.com/httptoolkit/mockttp: Node and browser support, HTTPS interception, parallel testing, typings
- npm hasTypes: Ships TypeScript types
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.
- npm latestVersion, hasTypes: Stable v4.6.5 ships TypeScript declarations.
- httptoolkit.github.io/mockttp/interfaces/Mockttp.html: Typed HTTP and WebSocket APIs and server lifecycle.
- github.com/httptoolkit/mockttp: Request verification and diagnostics for unmatched rules.
- github.com/httptoolkit/mockttp/blob/main/docs/setup.md: Examples cover client routing, browser setup, and certificate trust.
- gist.github.com/OliverJAsh/2f767b00cce6a227a196298ee42d1669: Unsplash's older Cypress comparison found setup friction.
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.
- github commitsLastYear, pushedAt, releasesLastYear: 135 commits and a recent push despite no new GitHub release entries.
- npm versionsLastYear, latestPublishedAt: 16 npm versions in the past year, with the latest in October 2026.
- github.com/httptoolkit/mockttp/pull/205: An external fix was reviewed and merged within days.
- github.com/httptoolkit/httptoolkit/blob/main/README.md?plain=1: Mockttp is the proxy behind HTTP Toolkit, which has paid features.
- intel.aikido.dev/packages/npm/mockttp: Lists one npm maintainer.
- github.com/httptoolkit/mockttp/issues/199: A v3 user asked for clearer upgrade guidance and received a same-day reply.
- github.com/httptoolkit/mockttp/releases/tag/v4.0.0: v4 raised the Node.js minimum and changed advanced rule and event APIs.
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.
- github.gg22.workers.dev/MetaMask/metamask-mobile/blob/main/tests/docs/MOCKING.md: MetaMask Mobile e2e tests run through a proxy mock server
- dev.to/playwright/mocking-server-side-http-in-playwright-with-mockttp-58jo: Independent practitioner tutorial
- hackerNews stories: No HN stories
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.
- github.com/lokalise/node-service-template/blob/main/CHANGELOG.md: Lokalise's service template uses Mockttp for API contract tests.
- github.com/httptoolkit/httptoolkit/blob/main/README.md?plain=1: Production use in the parent product.
- gist.github.com/OliverJAsh/2f767b00cce6a227a196298ee42d1669: Firsthand but older evaluation from Unsplash.
- 2025.stateofjs.com/en-US/libraries/testing: Tracks Mock Service Worker and gives no dedicated Mockttp satisfaction score.
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.
- npm license, dependencies: Apache-2.0 and 41 direct dependencies.
- scorecard score, checks: 5 out of 10, with weak code review, token permissions, dependency pinning, and branch protection.
- advisories total: The supplied OSV snapshot recorded zero.
- github.com/httptoolkit/mockttp/security/advisories/GHSA-7wvg-3v5v-p8hh: July 2026 disclosure lists fixes for both major versions.
- github.com/httptoolkit/mockttp/blob/v4.6.5/.github/workflows/ci.yml: Tag-triggered npm staging requests provenance after the build and test job.
- intel.aikido.dev/packages/npm/mockttp: Lists one npm maintainer.
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
- 8.5Mock Service Worker
- 8.1Faker
- 7.1Nock
- 6.9Mockttp
- 6.9Sinon.JS
- 6.5Fishery
- 5.7fetch-mock
- 5.6JSON Server
- 5.4testdouble.js
- 4.1Mirage JS