mockd — Claude Code MCP server: mock APIs in one command
A local MCP server that lets your agent spin up mock APIs over HTTP, gRPC, GraphQL, WebSocket, MQTT, SSE and SOAP. Useful when the backend isn't ready but the frontend or tests already need something to talk to.
claude mcp add mockd -- docker run -i --rm ghcr.io/getmockd/mockdWhat mockd does
mockd is a single Go binary serving mocks across seven protocols at once. Through MCP the agent creates endpoints, seeds them with data and changes behaviour on the fly. No runtime required — no JVM, no Node.
It imports OpenAPI, Postman, HAR, WSDL, cURL, plus WireMock and Mockoon formats. Stateful CRUD, multi-step flows, fault injection, chaos profiles, circuit breakers and bandwidth throttling are built in, along with an admin REST API and a web dashboard.
The MCP connection runs the server as docker run -i --rm ghcr.io/getmockd/mockd, so Docker has to be installed and running or the command fails. Apache 2.0, with no cap on requests or mock rules.
What it helps with
- stand up a mock API before the backend exists
- turn an OpenAPI spec into working endpoints
- see how a client behaves under delays and errors
- keep state across requests with a CRUD mock
- serve GraphQL or gRPC where only REST was available
Example prompts for the agent
- Start the mock server and create a stateful CRUD at
/api/users - Import
stripe-openapi.yamland build a Stripe digital twin - Add a 500 ms delay to every request on
/api/orders
How to install mockd
Platform CLI
claude mcp add mockd -- docker run -i --rm ghcr.io/getmockd/mockdPlatform CLI
codex mcp add mockd -- docker run -i --rm ghcr.io/getmockd/mockdConfig file
{
"mcpServers": {
"mockd": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/getmockd/mockd"
]
}
}
}Config file
{
"servers": {
"mockd": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/getmockd/mockd"
]
}
}
}Platform CLI
gemini mcp add mockd docker run -i --rm ghcr.io/getmockd/mockdStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mockd
How do I install mockd in Claude Code?
Run claude mcp add mockd -- docker run -i --rm ghcr.io/getmockd/mockd. Docker must be installed and running.
What does mockd do?
It runs a mock server over HTTP, gRPC, GraphQL, WebSocket, MQTT, SSE and SOAP, and lets your agent control it through MCP. Mocks can be imported from OpenAPI, Postman, HAR, WSDL and cURL.
Does mockd need Docker?
Yes, the install command starts the server in the ghcr.io/getmockd/mockd container. The tool itself is one binary with no runtime, but the MCP connection goes through Docker.