mockd
mockd is a versatile multi-protocol mock server for API simulation, testing, and development — with stateful data, chaos engineering, and AI-native tooling.
Multi-protocol Mocking: Create, retrieve, update, delete, list, and toggle mock endpoints for HTTP/HTTPS, gRPC, GraphQL, WebSocket, MQTT, SSE, SOAP, and OAuth — with request matching rules (path, method, headers, query params) and configurable responses.
Stateful Resource Management: Define and interact with CRUD collections (stateful tables) that persist data across requests — add items, list/get items, and reset to seed data.
Custom Operations: Register, list, retrieve, delete, and execute custom operations on stateful resources with defined steps and response logic.
Import/Export: Import mock definitions from OpenAPI specs, Postman collections, HAR files, WireMock stubs, cURL commands, or WSDL; export current mocks as YAML or JSON for backup or version control.
Chaos Engineering: Configure fault injection with latency, error rates, bandwidth throttling, and advanced stateful faults (circuit breakers, retry-after, progressive degradation, chunked dribble) — or apply named profiles like
slow-api,flaky, oroffline. Reset stats and manually trip/reset circuit breakers.Request Logging & Verification: Capture and filter request/response logs, identify unmatched requests with near-miss analysis, verify mock invocation counts (exact, at-least, at-most), and reset verification data between test runs.
Workspace Management: Organize mocks into isolated environments, keeping configurations, state, and logs separate per project or scenario.
Server Administration: Get server health, active ports, statistics, and manage server contexts to communicate with different mockd instances.
Proxy Recording & Cloud Tunneling: Record live traffic for replay as mocks, and share local mocks publicly via secure cloud tunnels.
AI Integration (MCP): Acts as an AI-native server via the Model Context Protocol, exposing 18 tools so AI agents can create and manage mocks programmatically.
Web Dashboard: Visual interface for managing mocks and viewing request logs via a dedicated admin port.
Allows importing cURL commands to instantly generate mock API definitions.
Provides tools for mocking GraphQL APIs, including operation-specific matching and response definitions.
Provides a built-in MQTT broker for mocking messaging topics and payloads.
Enables importing Postman collections to automatically create functional mock servers.
Supports importing OpenAPI and Swagger 2.0 specifications to generate mock API structures.
Supports mocking XML-based protocols such as SOAP and defining XML response bodies.
Uses YAML for mock configuration, environment setup, and importing/exporting API definitions.
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}}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 # GoPre-built binaries for Linux, macOS, and Windows on the Releases page.
Related MCP server: Mock MCP Server
Why mockd?
Every other mock tool makes you choose: pick one protocol, install a runtime, bolt on extensions. mockd doesn't.
mockd | WireMock | Mockoon | Prism | MockServer | Beeceptor | json-server | |
Single binary, no runtime | ✅ | ❌ JVM | ❌ Electron | ✅ | ❌ JVM | ❌ SaaS | ❌ Node |
All 9 protocols built-in | ✅ | 🔌 Ext | Partial | HTTP only | HTTP only | Partial | REST only |
Chaos profiles + circuit breakers | ✅ | ⚠️ Cloud | ❌ | ❌ | ❌ | ❌ | ❌ |
MCP server | ✅ local | ⚠️ Cloud | ❌ | ❌ | ❌ | ⚠️ Cloud, Team+ | ❌ |
Free + self-hostable, unlimited | ✅ | ✅ | ✅ | ✅ | ✅ | 50 req/day | ✅ |
🔌 Ext = requires separate extension JAR • ⚠️ Cloud = only in paid/hosted tier
Deployment
mockd | WireMock | Mockoon | Prism | MockServer | Beeceptor | json-server | |
Native single binary | ✅ Go | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Runtime required | none | JVM | Electron/Node | optional Node | JVM | n/a (SaaS) | Node |
Docker image | ✅ | ✅ | ✅ CLI | ✅ | ✅ | ⚠️ Enterprise | ❌ |
Managed SaaS offering | roadmap | WireMock Cloud | Mockoon Cloud | Stoplight | ❌ | ✅ | ❌ |
Protocol support
mockd | WireMock OSS | Mockoon | Prism | MockServer | Beeceptor | json-server | |
REST / HTTP | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
gRPC | ✅ | 🔌 Ext | ❌ | ❌ | ❌ | ✅ | ❌ |
GraphQL | ✅ | 🔌 Ext | ❌ | ❌ | ❌ | ✅ | ❌ |
WebSocket | ✅ | 🔌 Ext (beta) | ✅ | ❌ | ❌ | ❌ | ❌ |
MQTT | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
SSE | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
SOAP (WSDL) | ✅ | ❌ | Partial | ❌ | Partial | ✅ | ❌ |
mTLS | ✅ | ✅ | Partial | ❌ | ✅ | ✅ | ❌ |
OAuth flows | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Capabilities
mockd | WireMock OSS | Mockoon | Prism | MockServer | Beeceptor | json-server | |
Stateful CRUD | ✅ | ❌ | ✅ | Partial | ❌ | ✅ | ✅ |
Multi-step stateful flows | ✅ | ✅ Scenarios | Partial | ❌ | Partial | ✅ | ❌ |
Fault injection (delay, errors) | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ |
Chaos profiles | ✅ | ⚠️ Cloud | ❌ | ❌ | ❌ | ❌ | ❌ |
Circuit breakers | ✅ | ⚠️ Cloud | ❌ | ❌ | ❌ | ❌ | ❌ |
Bandwidth throttling | ✅ | ❌ | ❌ | ❌ | ❌ | roadmap | ❌ |
Admin REST API | ✅ | ✅ | CLI only | ❌ | ✅ | ✅ | Partial |
Built-in web dashboard | ✅ | ⚠️ Cloud | ⚠️ Cloud | ❌ | ✅ read-only | ✅ | ❌ |
Native desktop GUI | ❌ | ❌ | ✅ Electron | ❌ | ❌ | ❌ | ❌ |
MCP server | ✅ local | ⚠️ Cloud | ❌ | ❌ | ❌ | ⚠️ Cloud Team+ | ❌ |
Cloud tunnel sharing | ✅ | ❌ | ⚠️ Cloud | ❌ | ❌ | ✅ | ❌ |
Import / export
mockd | WireMock OSS | Mockoon | Prism | MockServer | Beeceptor | json-server | |
OpenAPI import | ✅ | ⚠️ Cloud | ✅ | ✅ | ✅ | ✅ | ❌ |
Postman import | ✅ | ⚠️ Cloud | ❌ | ✅ | ❌ | ❌ | ❌ |
HAR import | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
WSDL import | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
cURL import | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
WireMock format import | ✅ | native | ❌ | ❌ | ❌ | ❌ | ❌ |
Mockoon format import | ✅ | ❌ | native | ❌ | ❌ | ❌ | ❌ |
HAR export | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
Free tier limits
Requests | Mock rules | Cost | |
mockd | unlimited | unlimited | free (Apache 2.0) |
WireMock OSS | unlimited | unlimited | free (Apache 2.0) |
Mockoon desktop / CLI | unlimited | unlimited | free (MIT) |
Prism | unlimited | unlimited | free (Apache 2.0) |
MockServer | unlimited | unlimited | free (Apache 2.0) |
Beeceptor free tier | 50 / day / endpoint | 3 | $10/mo+ for more |
json-server | unlimited | unlimited | free (MIT) |
Legend: ✅ built-in • 🔌 Ext = separate OSS extension • ⚠️ Cloud = only in paid / hosted tier • Partial = limited implementation • roadmap = on the project's stated roadmap, not yet shipped
Note on WireMock imports. The
⚠️ Cloudmarks on OpenAPI and Postman import reflect first-party WireMock features. Community converters exist (e.g.openapi-to-wiremock, OpenAPI Generator targets) but are not bundled with the OSS standalone JAR.
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 passTwilio: 13/13
twilio-goSDK tests passOpenAI:
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 with 18 tools. AI agents can create mocks, manage state, import specs, and verify contracts without touching the CLI:
{
"mcpServers": {
"mockd": { "command": "mockd", "args": ["mcp"] }
}
}Works in Claude Desktop, Cursor, Windsurf, and any MCP-compatible editor. Tools cover mock CRUD, stateful resources, chaos injection, request logs, verification, workspaces, and import/export.
Features
Protocol | Port | Example |
HTTP/HTTPS | 4280 |
|
gRPC | 50051 |
|
GraphQL | 4280 |
|
WebSocket | 4280 |
|
MQTT | 1883 |
|
SSE | 4280 |
|
SOAP | 4280 |
|
mockd import openapi.yaml # OpenAPI 3.x / Swagger 2.0
mockd import collection.json # Postman collections
mockd import recording.har # HAR files
mockd import wiremock-mapping.json # WireMock stubs
mockd import service.wsdl # WSDL → SOAP mocks
mockd import "curl -X GET https://api.example.com/users" # cURL commands
mockd export --format yaml > mocks.yamlmockd chaos apply flaky # 30% error rate
mockd chaos apply slow-api # 200-800ms latency
mockd chaos apply offline # 100% 503 errors
mockd chaos disablemockd tunnel
# → https://a1b2c3d4.tunnel.mockd.io → http://localhost:4280All 7 protocols multiplexed through a single secure connection on port 443. Works behind NAT and firewalls.
mockd workspace create -n "Payment API" --use
mockd import stripe-openapi.yaml
mockd workspace create -n "Comms API" --use
mockd import twilio-openapi.yaml
# Mocks, state, and logs are fully isolated per workspacemockd proxy start --port 8888
# Configure your app to use http://localhost:8888 as proxy
# Traffic is recorded, then replay with:
mockd import recordings/session.jsonRelease builds serve a web UI from the admin port (http://localhost:4290). VS Code-style editor, command palette, mock tree with folders, request log viewer, and near-miss debugging.
Mockd Cloud
mockd works fully offline with no account required. For teams that want shared environments:
Persistent cloud mocks — deploy mock environments your whole team can hit
Team management — shared workspaces with access controls
Cloud tunnels — authenticated tunnels with custom domains
Coming soon. Join the waitlist.
Documentation
Full guides, API reference, and config docs at docs.mockd.io.
Contributing
Contributions welcome! See CONTRIBUTING.md for setup.
License
Apache License 2.0 — free for commercial use.
Available Tools
18 toolsclear_request_logsADestructiveIdempotent
Permanently remove all captured request/response logs. Use this for test isolation between test runs. This action cannot be undone.
Inputs: no named parameters.
export_mocksARead-onlyIdempotent
Export all current mocks as YAML or JSON configuration. Returns the full mock collection for backup, sharing, or version control.
Inputs: format.
get_chaos_configARead-onlyIdempotent
Retrieve the current chaos fault injection configuration including latency, error rate, and bandwidth throttle settings. Returns the active chaos config and injection statistics. Use this to check what chaos rules are active before modifying them.
Inputs: no named parameters.
get_mock_invocationsARead-onlyIdempotent
List all recorded invocations (request/response pairs) for a specific mock. Shows method, path, headers, body, and timestamp for each call. Use this to debug what requests actually hit a mock.
Inputs: id (required), limit.
get_request_logsARead-onlyIdempotent
Retrieve captured request/response logs. Filter by method, path, mock ID, or protocol. Use this to verify that expected API calls were made to the mock server.
Inputs: limit, method, mockId, offset, +3 more.
get_server_statusARead-onlyIdempotent
Get server health, ports, and statistics. Use this FIRST when debugging connectivity or port issues. Combines health check, stats, and port information into a single response.
Inputs: no named parameters.
get_stateful_faultsARead-onlyIdempotent
Retrieve the status of all stateful chaos fault instances: circuit breakers (state, trip count, request count), retry-after trackers (limited/passed counts), and progressive degradation (current delay, request count, error count). Use this to monitor active fault state machines after configuring advanced chaos rules.
Inputs: no named parameters.
import_mocksA
Import mocks from inline content or a file on the mockd server's filesystem. Supports OpenAPI, Postman, HAR, WireMock, cURL, and mockd YAML/JSON formats. Format is auto-detected if not specified. Use dryRun=true to preview without applying. Use the file parameter for large specs that are too large for inline content.
Inputs: content, dryRun, file, format, +1 more.
manage_circuit_breakerAIdempotent
Manually trip or reset a chaos circuit breaker by its state key. Circuit breaker keys follow the format "ruleIdx:faultIdx" (e.g., "0:0" for the first fault in the first rule). Use get_stateful_faults to discover active circuit breaker keys.
Inputs: action (required), key (required).
manage_contextA
View or switch the active admin server context. Use 'get' to see the current context and all available contexts. Use 'switch' to change which mockd server this session communicates with.
Inputs: action (required), name.
manage_custom_operationB
Manage custom operations on stateful resources. Use 'list' to see all operations, 'get' for details, 'register' to create new ones, 'delete' to remove, or 'execute' to run an operation with input data.
Inputs: action (required), definition, input, name.
manage_mockA
Create, retrieve, update, delete, list, or toggle mock endpoints. Use 'action' to specify the operation. For list, optionally filter by type or enabled status. For get/update/delete/toggle, provide the mock ID. For create, provide type and protocol-specific configuration.
Examples: List: {"action":"list","type":"http"} Get: {"action":"get","id":"http_060bff782a1de15f"} Create: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/hello"},"response":{"statusCode":200,"body":"{"msg":"hello"}"}}} Update: {"action":"update","id":"http_060bff782a1de15f","http":{"response":{"statusCode":201}}} Delete: {"action":"delete","id":"http_060bff782a1de15f"} Toggle: {"action":"toggle","id":"http_060bff782a1de15f","enabled":false}
Stateful binding examples (bind mocks to stateful resource tables for automatic CRUD): List: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/users"}},"extend":{"table":"users","action":"list"}} Create: {"action":"create","type":"http","http":{"matcher":{"method":"POST","path":"/api/users"}},"extend":{"table":"users","action":"create"}} Get: {"action":"create","type":"http","http":{"matcher":{"method":"GET","path":"/api/users/{id}"}},"extend":{"table":"users","action":"get"}} Update: {"action":"create","type":"http","http":{"matcher":{"method":"PUT","path":"/api/users/{id}"}},"extend":{"table":"users","action":"update"}} Delete: {"action":"create","type":"http","http":{"matcher":{"method":"DELETE","path":"/api/users/{id}"}},"extend":{"table":"users","action":"delete"}} Custom: {"action":"create","type":"http","http":{"matcher":{"method":"POST","path":"/api/users/{id}/verify"}},"extend":{"table":"users","action":"custom","operation":"VerifyUser"}}
Inputs: action (required), enabled, extend, graphql, +9 more.
manage_stateA
Manage stateful mock resources — CRUD collections that persist data across requests. Use 'overview' to see all resources, 'add_resource' to create a new resource with full table configuration, 'list_items' to browse items in a resource, 'get_item' for a specific item, 'create_item' to add data, 'reset' to restore seed data, or 'delete_resource' to fully unregister a resource.
Examples: Overview: {"action":"overview"} Add resource:{"action":"add_resource","resource":"users"} Add resource:{"action":"add_resource","resource":"customers","id_strategy":"prefix","id_prefix":"cus_","seed_data":[{"name":"Alice"}]} List items: {"action":"list_items","resource":"users","limit":10} Get item: {"action":"get_item","resource":"users","item_id":"abc123"} Create item: {"action":"create_item","resource":"users","data":{"name":"Alice"}} Reset: {"action":"reset","resource":"users"} Delete resource: {"action":"delete_resource","resource":"users"}
Inputs: action (required), data, id_field, id_prefix, +12 more.
manage_workspaceB
List available workspaces or switch the active workspace. Workspaces isolate mock configurations. Use 'list' to see all workspaces, 'switch' to route subsequent operations to a specific workspace.
Inputs: action (required), id, name.
reset_chaos_statsADestructiveIdempotent
Reset chaos injection statistics counters to zero without changing the active chaos configuration. Use this to start fresh measurement after modifying chaos rules.
Inputs: no named parameters.
reset_verificationADestructiveIdempotent
Clear verification data (invocation records and counters) for a specific mock or all mocks. Use this to reset counters before running a new test scenario.
Inputs: id.
set_chaos_configAIdempotent
Configure chaos fault injection rules. For simple chaos: set latency ranges, error rates, or bandwidth throttling. For advanced stateful faults: pass raw rules with fault types like circuit_breaker, retry_after, progressive_degradation, or chunked_dribble. Pass enabled=false to disable all chaos. For pre-built configurations, use named profiles like "slow-api" or "flaky".
Inputs: enabled (required), bandwidth_bytes_per_sec, error_codes, error_rate, +5 more.
verify_mockARead-onlyIdempotent
Check whether a mock was called the expected number of times. Returns pass/fail status, actual call count, and invocation details. Optionally assert with expected_count, at_least, or at_most parameters. Use this to assert your application is making the right API calls.
Inputs: id (required), at_least, at_most, expected_count.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools target distinct resources (mocks, chaos, state, context, workspace), but get_mock_invocations, get_request_logs, and verify_mock all deal with call history/verification and may be confused. Overall, the separation is reasonable.
All tool names follow a consistent verb_noun pattern (set_, get_, reset_, manage_, import_, export_, verify_, clear_). The manage_ prefix is uniformly applied to multi-action tools, making the naming predictable.
Eighteen tools is on the higher end but appropriate for a mock server covering chaos testing, stateful resources, verification, and server administration. Several tools (manage_state, manage_mock, manage_custom_operation) bundle many sub-operations, which keeps the count reasonable.
The tool surface covers the full mock-server lifecycle: creation/management, request verification, stateful behavior, chaos injection, monitoring, and environment/workspace controls. Missing operations can generally be performed via existing tools with action parameters.
Maintenance
Related MCP Connectors
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
Hosted mock APIs from OpenAPI, TypeScript or Postman: realistic data, errors and latency on demand.
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Mock REST APIs, fake OAuth2/OIDC provider, uptime monitors + heartbeats, live badge/QR images.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceAn Intelligent Model Context Protocol server that generates mock servers from OpenAPI specifications, featuring advanced logging, performance analytics, and server discovery for AI-assisted API development.MIT
- AlicenseBqualityDmaintenanceA mock MCP server for testing MCP client implementations and development workflows. Supports tools, prompts, and resources across multiple transport protocols (stdio, HTTP, SSE).1MIT
- AlicenseNot gradedqualityDmaintenanceEnables instant creation of mock API servers from OpenAPI specs or natural language descriptions, with built-in fake data generation, CRUD endpoints, and configurable delays/errors for testing.MIT
- AlicenseAqualityDmaintenanceAn MCP server for interacting with MockServer, enabling AI assistants to create mock HTTP expectations, verify requests, clear state, and manage MockServer instances programmatically.655 npm1MIT