Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Mock Service Worker

API mocking library for seamless request interception in tests and development.

TestingNPM

GitHubWebsite

1. License

License from npm.

github.com/mswjs/msw

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Mock Service Worker does

API mocking library for seamless request interception in tests and development.

Mock Service Worker popularity

74 / 100
Gid Score, #224 overall
36.2M
downloads a week, npm
18.4K
GitHub stars
86
agent projects use it
Mock Service Worker: downloads per weeknpm, msw 36,198,584
Mock Service Worker: GitHub starsmswjs/msw 18,359

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Mock Service Worker is used

  • Mock Service Worker is a dependency in 86 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.8% of the 4,867 JavaScript/TypeScript ones), #10 of 122 in testing.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 141; those are left out of every share on this page.
  • Projects that use it most often also use Testing Library (77.9%), Vitest (79.1%), Vite (72.1%).

By coding agent

66 projects, 2.0%
41 projects, 1.4%
40 projects, 1.6%
14 projects, 3.0%
7 projects, 2.0%
7 projects, 1.5%

Often used with

In 77.9% of its projects
In 79.1% of its projects
In 72.1% of its projects
In 66.3% of its projects
In 60.5% of its projects
In 83.7% of its projects
In 96.5% of its projects
In 73.3% of its projects

More about Mock Service Worker

Funding
  • GitHub Sponsors: https://github.com/mswjs
  • Open Collective: https://opencollective.com/mswjs
  • 26 GitHub sponsors

See all

More in Testing

Alternatives

Mock Service Worker This page

MITGid 7436.2M/wk

Compare Mock Service Worker with another tool

Get started

Install it.

npm install msw

No step-by-step start for Mock Service Worker yet: we have not written its hand-checked card.