Comparison

Mockd vs json-server

When your mock server needs to grow up with your project

Feature Comparison

Side-by-side comparison of Mockd and json-server capabilities.

FeatureMockdjson-server
Language / RuntimeGo (single binary)Node.js (npm install)
Protocols7 (HTTP, WS, GraphQL, gRPC, MQTT, SSE, SOAP)REST/HTTP only
Request MatchingPath, headers, body, JSONPath, regex, mTLSRoute-based only
Response TemplatingGo templates, Faker, dynamic valuesStatic JSON file
Stateful MockingYes (scenarios, state transitions)Pseudo (in-memory JSON DB)
Proxy / Record Yes No
OpenAPI Import Yes No
Postman Import Yes No
WebSocket Native No
gRPC Native No
GraphQL Native No
MQTT Native No
DependenciesNoneNode.js 18+
Built-in Cloud Tunnel Yes No
MCP Server (AI editors)18 tools No
AI Mock Generation4 providers No

Why Upgrade from json-server?

Beyond REST

json-server only serves REST endpoints from a JSON file. Mockd handles HTTP, WebSocket, gRPC, GraphQL, MQTT, SSE, and SOAP — mock your entire architecture, not just REST APIs.

Real Request Matching

json-server routes by URL path. Mockd matches on HTTP method, headers, query parameters, request body, JSONPath expressions, regex patterns, and mTLS client certificates. Return different responses for the same endpoint based on what the client sends.

Dynamic Response Templates

json-server returns whatever is in db.json. Mockd uses Go templates with Faker data generation, timestamp functions, request value echoing, and conditional logic. Generate realistic, varied data on every request.

No Node.js Required

json-server needs Node.js installed and npm install. Mockd is a single Go binary — download and run, no package manager, no node_modules, no version conflicts.

Import Your Existing Specs

Bring your OpenAPI specs, Postman collections, or HAR files. Mockd imports them into mock definitions automatically. json-server only reads a flat JSON file.

Proper Stateful Scenarios

json-server's in-memory JSON database simulates basic CRUD. Mockd supports explicit state machines: define scenarios where responses change based on previous requests, timeouts, or external triggers.

Share Mocks Instantly

Expose your local mocks to teammates or CI via a built-in QUIC cloud tunnel. One command gives you a public URL. json-server only runs locally unless you set up your own hosting.

When to Use Each Tool

json-server is great for quick prototypes. Mockd is for everything after that.

json-server works well for:

  • Quick throwaway REST APIs for frontend prototypes
  • Simple GET/POST/PUT/DELETE on flat resources
  • Teams already on Node.js wanting a 30-second setup
  • Static JSON served over REST, nothing more

Choose Mockd when you need:

  • More than REST — WebSocket, gRPC, GraphQL, MQTT, SSE, SOAP
  • Conditional responses — Different replies based on headers, body, query
  • Dynamic data — Faker types, templates, timestamps, UUIDs
  • Import specs — OpenAPI, Postman collections, HAR files
  • Team sharing — Built-in cloud tunnel, one command for a public URL
7x
More protocols
0
Dependencies
Matching flexibility

Easy Migration

Your existing db.json can be converted to Mockd endpoint definitions — each top-level key becomes a route with GET/POST/PUT/DELETE handlers. Run mockd init to scaffold a project, then define endpoints in mockd.yaml. If you have Postman collections documenting your json-server routes, import them directly with mockd import postman collection.json.

Ready to Upgrade?

Get started with Mockd in under a minute. Single binary, no dependencies.

# Quick install
curl -sSL https://get.mockd.io | sh