api-mock-server

Create mock REST and GraphQL APIs with MSW or json-server.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/vecear/Nipponverb --skill api-mock-server-vecear
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-mock-server
Source: https://github.com/vecear/Nipponverb/tree/main/.claude/skills/api-mock-server
Command: npx skills add https://github.com/vecear/Nipponverb --skill api-mock-server-vecear

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Real backend APIs can be costly or unavailable during development and testing. This Skill provides a structured way to generate and consume realistic mock APIs, enabling reliable frontend and integration testing without depending on live services.

Core Features & Use Cases

  • MSW integration: Mock Service Worker handlers for browser-based tests and UI development.
  • json-server support: Fast RESTful API emulation with fixtures and routes.
  • Custom handlers: Build bespoke mock responses for edge cases and complex scenarios.
  • Fixtures & scenarios: Predefined data sets and stateful simulations for robust testing.
  • End-to-end integration: Works across browser and Node environments, with test-suite compatibility.
  • Documentation & contracts: Clear API expectations and usage guidelines for teams.

Quick Start

Install the mocking tools, define your first handlers, and start the mock server to begin serving API responses.

Frequently Asked Questions about api-mock-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create mock APIs for frontend testing without a live backend?

Mock APIs simulate REST and GraphQL endpoints using MSW handlers or json-server fixtures. This provides consistent API contracts for frontend and integration tests, local development, and CI pipelines without relying on unavailable or costly real backend services.

Can I use MSW and json-server together for mocking REST and GraphQL APIs?

Yes, MSW and json-server can be used together for mocking REST and GraphQL endpoints. MSW provides browser-based service worker handlers while json-server offers fast RESTful API emulation, covering both UI development and Node integration test environments.

What is the best way to set up fixture factories for API mocking in CI pipelines?

The best way to set up fixture factories for API mocking in CI pipelines involves defining predefined data sets and stateful simulations using MSW or json-server. This ensures consistent API contracts and robust test-suite integration across Node and browser environments.

Does API mocking work with both browser and Node environments for integration tests?

API mocking works with both browser and Node environments for integration tests. By applying MSW handlers and json-server fixtures, it supports end-to-end test-suite compatibility, enabling consistent API contracts across different runtime environments.

How do I simulate edge cases and complex scenarios with custom mock handlers?

You simulate edge cases and complex scenarios by building bespoke custom mock handlers. This allows you to define specific mock responses and stateful simulations, ensuring robust testing of edge cases beyond standard predefined fixtures.

When should I not use a mock server for API development?

You should avoid using a mock server for API development when you need to verify actual backend database integrations or test real network latency. Mock APIs are designed for frontend and integration testing, not for validating live service behavior or performance.