# Mock Service Worker

**Canonical:** https://apis.io/apis/mock-service-worker/msw/  
**Provider:** Mock Service Worker — https://apis.io/providers/mock-service-worker/  
**Base URL:** https://mswjs.io/  
**Documentation:** https://mswjs.io/

Mock Service Worker is published by [Mock Service Worker](https://apis.io/providers/mock-service-worker/) on the [APIs.io](https://apis.io/) network. Tagged areas include API Mocking, GraphQL, HTTP, Mocking, and Service Worker. The published artifact set on APIs.io includes API documentation and a getting-started guide.

Mock Service Worker (MSW) is an open-source library for mocking REST, GraphQL, WebSocket, and Server-Sent Events APIs at the network level. It provides setupWorker for browser environments and setupServer for Node.js, with handlers (http, graphql, ws, sse) that allow developers to declare mocked responses without modifying application code.

## Machine-readable artifacts (11)

- **Documentation** — https://mswjs.io/docs/
- **GettingStarted** — https://mswjs.io/docs/quick-start
- **HTTP Handler** — https://mswjs.io/docs/network-behavior/rest
- **GraphQL Handler** — https://mswjs.io/docs/network-behavior/graphql
- **WebSocket Handler** — https://mswjs.io/docs/network-behavior/websocket
- **GitHub** — https://github.com/mswjs/msw
- **Examples** — https://github.com/mswjs/examples
- **NPM** — https://www.npmjs.com/package/msw
- **License** — https://github.com/mswjs/msw/blob/main/LICENSE.md
- **GraphQL** — https://raw.githubusercontent.com/api-evangelist/mock-service-worker/refs/heads/main/graphql/mock-service-worker-graphql.md
- **APIsJSON** — https://raw.githubusercontent.com/api-evangelist/mock-service-worker/refs/heads/main/apis.yml

## Tags

API Mocking, GraphQL, HTTP, Mocking, Service Worker, Testing, WebSocket

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/mock-service-worker/msw/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/mock-service-worker/.
