Mock Service Worker website screenshot

Mock Service Worker

Mock Service Worker (MSW) is an industry-standard, open-source API mocking library for the browser and Node.js. MSW intercepts outgoing requests at the network level using Service Workers in browsers and a request interception algorithm in Node.js, allowing developers to write client-agnostic mocks for HTTP, GraphQL, WebSocket, and Server-Sent Events and reuse them across any framework, tool, or environment for development, testing, and debugging.

Mock Service Worker publishes 1 API on the APIs.io network. Tagged areas include API Mocking, GraphQL, HTTP, Mock Server, and Mocking.

The Mock Service Worker catalog on APIs.io includes 1 JSON-LD context and 1 Spectral governance ruleset.

Mock Service Worker’s developer surface includes documentation, getting-started guide, GitHub presence, code examples, engineering blog, and 9 more developer resources.

32.9/100 thin ▬ flat Agent 5/100 human only Full breakdown ↓
scored 2026-07-28 · rubric v0.6
AccessFreemium
1 APIs
API MockingGraphQLHTTPMock ServerMockingService WorkerTestingWebSocket

Kin Score

Kin Score Kin Score How this is scored →
scored 2026-07-28 · rubric v0.6
Composite quality — 32.9/100 · thin
Contract Quality 2.0 / 25
Developer Ergonomics 4.3 / 20
Commercial Clarity 7.9 / 20
Operational Transparency 4.8 / 13
Governance 7.0 / 12
Discoverability 6.9 / 10
Agent readiness — 5/100 · human only
Machine-Readable Contract 0 / 18
Agentic Access Contract 0 / 10
MCP Server 0 / 12
Machine-Readable Auth 0 / 10
Idempotency 0 / 9
Stable Error Semantics 0 / 8
Request/Response Examples 7 / 7
Rate-Limit Signaling 7 / 7
Typed Event Surface 0 / 6
Agent Skills 0 / 5
Well-Known Catalog 0 / 4
Consent & Bot Identity 0 / 3
A2A Agent Card 0 / 8
Dry-Run / Simulate Mode 0 / 4
Improve this rating by publishing the missing artifacts — every area above can be raised, and the full rubric is at apis.io/rating/. This rating is computed from github.com/api-evangelist/mock-service-worker: open an issue to ask a question, or submit a pull request to add artifacts. Want it done for you? Prioritized profiling — $2,500 →

APIs 1

Individual APIs this provider publishes, each with its own machine-readable definition.

Mock Service Worker

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 e...

GraphQL 1

GraphQL schemas published by this provider.

Mock Service Worker GraphQL API

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 e...

GRAPHQL

Pricing Plans 1

Published pricing tiers and plan structures.

Rate Limits 1

Documented rate limits and quota policies.

Mock Service Worker Rate Limits

5 limits

RATE LIMITS

FinOps 1

Cost, billing, and metering signals for API financial operations.

Semantic Vocabularies 1

JSON-LD contexts and semantic vocabularies used across these APIs.

Mock Service Worker Context

4 classes · 0 properties

JSON-LD

Spectral Rules 1

Spectral governance rulesets for linting and validating these APIs.

Mock Service Worker API Rules

5 rules · 3 warnings 2 info

SPECTRAL

JSON Schema 1

Standalone JSON Schema definitions for this provider's data models.

Mock Service Worker Handler

0 properties

JSON SCHEMA

Security Posture 1

Authentication, domain security, vulnerability disclosure, and trust-center signals.

Mock Service Worker Domain Security

TLSv1.3 · HSTS

SECURITY

Resources

Get Started 1

Portal, sign-up, and the first successful call

Documentation 2

Reference material describing how the API behaves

Design & Contract 1

Pagination, idempotency, versioning, errors, and events

Build 3

SDKs, sample code, and the tooling you integrate with

Access & Security 1

Authentication, authorization, and security posture

Operate 1

Status, limits, changes, and where to get help

Commercial 1

Pricing, plans, and the legal terms of use

Company 2

The organization behind the API

Other 2

Properties that don't map to a standard resource type

Source (apis.yml)

apis.yml Raw ↑
aid: mock-service-worker
name: Mock Service Worker
description: Mock Service Worker (MSW) is an industry-standard, open-source API mocking library for the browser and Node.js.
  MSW intercepts outgoing requests at the network level using Service Workers in browsers and a request interception algorithm
  in Node.js, allowing developers to write client-agnostic mocks for HTTP, GraphQL, WebSocket, and Server-Sent Events and
  reuse them across any framework, tool, or environment for development, testing, and debugging.
type: Index
accessModel:
  pricing: freemium
  onboarding: unknown
  trial: false
  try_now: false
  public: false
  label: Freemium
  confidence: medium
  source:
  - plans
  generated: '2026-07-22'
  method: derived
image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/icons/mock-service-worker.png
url: https://raw.githubusercontent.com/api-evangelist/mock-service-worker/refs/heads/main/apis.yml
tags:
- API Mocking
- GraphQL
- HTTP
- Mock Server
- Mocking
- Service Worker
- Testing
- WebSocket
access: 3rd-Party
position: Consumer
created: '2025-01-08'
modified: '2026-04-28'
specificationVersion: '0.20'
apis:
- aid: mock-service-worker:msw
  name: Mock Service Worker
  description: 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.
  image: https://mswjs.io/static/logos/msw-logo.svg
  humanURL: https://mswjs.io/
  baseURL: https://mswjs.io/
  tags:
  - API Mocking
  - GraphQL
  - HTTP
  - Mocking
  - Service Worker
  - Testing
  - WebSocket
  properties:
  - type: Documentation
    url: https://mswjs.io/docs/
  - type: GettingStarted
    url: https://mswjs.io/docs/quick-start
  - type: HTTP Handler
    url: https://mswjs.io/docs/network-behavior/rest
  - type: GraphQL Handler
    url: https://mswjs.io/docs/network-behavior/graphql
  - type: WebSocket Handler
    url: https://mswjs.io/docs/network-behavior/websocket
  - type: GitHub
    url: https://github.com/mswjs/msw
  - type: Examples
    url: https://github.com/mswjs/examples
  - type: NPM
    url: https://www.npmjs.com/package/msw
  - type: License
    url: https://github.com/mswjs/msw/blob/main/LICENSE.md
  - url: graphql/mock-service-worker-graphql.md
    type: GraphQL
  contact:
  - FN: MSW Maintainers
    url: https://github.com/mswjs/msw
common:
- type: DomainSecurity
  url: security/mock-service-worker-domain-security.yml
- type: Website
  url: https://mswjs.io/
- type: Documentation
  url: https://mswjs.io/docs/
- type: GettingStarted
  url: https://mswjs.io/docs/quick-start
- type: GitHub
  url: https://github.com/mswjs/msw
- type: Examples
  url: https://github.com/mswjs/examples
- type: NPM
  url: https://www.npmjs.com/package/msw
- type: Discord
  url: https://kettanaito.com/discord
- type: Sponsor
  url: https://github.com/sponsors/mswjs
- type: OpenCollective
  url: https://opencollective.com/mswjs
- type: License
  url: https://github.com/mswjs/msw/blob/main/LICENSE.md
- type: JSONLD
  url: json-ld/mock-service-worker-context.jsonld
- type: JSONSchema
  url: json-schema/mock-service-worker-handler-schema.json
- type: Integrations
  url: https://mswjs.io/ecosystem
- url: https://mswjs.io/rss.xml
  type: Blog
integrations:
- name: Data
- name: Source
maintainers:
- FN: Kin Lane
  email: kin@apievangelist.com
  url: https://apievangelist.com