One binary. Seven protocols. Zero dependencies.
One binary. Seven protocols. Zero dependencies.
Mock HTTP, gRPC, GraphQL, WebSocket, MQTT, SSE, and SOAP from a single CLI tool. Import OpenAPI specs. Build digital twins. Let AI agents create mocks for you.
Website · Docs · Samples · Contributing
Quick Start
# Install
curl -sSL https://get.mockd.io | sh
# Start + create a stateful CRUD API in one command
mockd start
mockd add http --path /api/users --stateful users
# It works immediately
curl -X POST localhost:4280/api/users -d '{"name":"Alice","email":"alice@test.com"}'
# → {"id":"a1b2c3","name":"Alice","email":"alice@test.com"}
curl localhost:4280/api/users
# → {"data":[{"id":"a1b2c3","name":"Alice","email":"alice@test.com"}],"meta":{"total":1}}
More install options
brew install getmockd/tap/mockd # Homebrew
docker run -p 4280:4280 -p 4290:4290 ghcr.io/getmockd/mockd:latest # Docker
go install github.com/getmockd/mockd/cmd/mockd@latest # Go
Pre-built binaries for Linux, macOS, and Windows on the Releases page.
Why mockd?
Every other mock tool makes you choose: pick one protocol, install a runtime, bolt on extensions. mockd doesn't.
| mockd | WireMock | Mockoon | json-server | Prism | MockServer | |
|---|---|---|---|---|---|---|
| Single binary, no runtime | :white_check_mark: | :x: JVM | :x: Node | :x: Node | :x: Node | :x: JVM |
| HTTP + gRPC + GraphQL + WS | :white_check_mark: | 🔌 Ext | :x: | :x: | :x: | Partial |
| MQTT + SSE + SOAP + OAuth | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| Stateful CRUD | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| Import OpenAPI/Postman/HAR | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
| Chaos engineering | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: | :x: |
| MCP server (AI-native) | :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
| Cloud tunnel sharing | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: |
| Built-in web dashboard | :white_check_mark: | :x: | :white_check_mark: | :x: | :x: | :x: |
🔌 Ext = available via separate extension, not bundled. mockd includes everything in a single binary.
Digital Twins
Import a real API spec, bind it to stateful tables, and get a mock that passes the real SDK:
# mockd.yaml — Stripe digital twin
version: "1.0"
imports:
- path: stripe-openapi.yaml
as: stripe
tables:
- name: customers
idStrategy: prefix
idPrefix: "cus_"
seedData:
- { id: "cus_1", name: "Acme Corp", email: "billing@acme.com" }
extend:
- { mock: stripe.GetCustomers, table: customers, action: list }
- { mock: stripe.PostCustomers, table: customers, action: create }
- { mock: stripe.GetCustomersCustomer, table: customers, action: get }
- { mock: stripe.PostCustomersCustomer, table: customers, action: update }
- { mock: stripe.DeleteCustomersCustomer, table: customers, action: delete }
mockd start -c mockd.yaml --no-auth
curl -X POST localhost:4280/v1/customers -d "name=Test&email=test@corp.com"
# → {"id":"cus_a1b2c3","object":"customer","name":"Test","email":"test@corp.com"}
Validated with real SDKs:
- Stripe: 49/49
stripe-goSDK tests pass - Twilio: 13/13
twilio-goSDK tests pass - OpenAI:
openaiPython SDK verified (models, assistants, chat completions)
See mockd-samples for complete digital twin configs.
AI-Native (MCP)
mockd includes a built-in Model Context Protocol server
Tools (3)
add_mockCreates a new mock endpoint for a specified protocol.list_mocksLists all currently active mock endpoints.delete_mockRemoves an existing mock endpoint.Configuration
{"mcpServers": {"mockd": {"command": "mockd", "args": ["mcp"]}}}