FindSoftware

Mock Service Worker

API mocking library for JavaScript that intercepts requests in the browser and in Node.js and answers them with mocked responses.

Mock Service Worker is an API mocking library for JavaScript that answers an application’s requests with mocked responses while the application code stays unchanged. In the browser it uses the Service Worker API to intercept requests at the network level. In Node.js it intercepts requests at the socket level, and the same request handlers serve tests, local development and debugging in both environments.

Handlers use an Express-like routing syntax and can describe REST, GraphQL, Server-Sent Events and WebSocket traffic. The documentation covers setup for each environment, and a comparison page sets it beside Nock, JSON Server, Mirage, Cypress and Playwright.

Worth knowing

The FAQ says Node.js versions below a stated minimum are not supported.

Identity

Status
Active
Maintainer
Artem Zakharchenko4
Maintained by
Individual4
First release
20185

Rendering and deploy

Install with
npm7

Releases

Current major version
36
Last release
2026-11-156

Adoption

GitHub stars
18,3513
npm downloads a week
33,333,0708
Contributors
17210
Dependent repositories
11,8519
Dependent packages
2,2349

Why these figures do not compare

Sources

  1. 2026-11-16: links, Categories, Runtime
    mswjs.io
  2. 2026-11-16: links
    mswjs.io/docs/
  3. 2026-11-16: links, Written in, GitHub stars
    api.github.com/repos/mswjs/msw
  4. 2026-11-16: Maintainer, Maintained by, License, License model
    github.com/mswjs/msw/blob/main/LICENSE.md
  5. 2026-11-16: First release
    registry.npmjs.org/msw
  6. 2026-11-16: Current major version, Last release
    api.github.com/repos/mswjs/msw/releases
  7. 2026-11-16: Install with
    mswjs.io/docs/quick-start
  8. 2026-11-16: npm downloads a week
    api.npmjs.org/downloads/range/2026-11-01:2026-11-07/msw
  9. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/msw
  10. 2026-11-16: Contributors
    api.github.com/repos/mswjs/msw/contributors?per_page=1

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON