# mockd

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 151
- Author: getmockd
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/getmockd/mockd
- Updated: 2026-09-17
- HTML: https://affpapa.org/en/nevibecode/mcp/mockd

## What it 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.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mockd -- docker run -i --rm ghcr.io/getmockd/mockd
```

### Codex

**Platform CLI**
```bash
codex mcp add mockd -- docker run -i --rm ghcr.io/getmockd/mockd
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mockd": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/getmockd/mockd"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mockd": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/getmockd/mockd"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mockd docker run -i --rm ghcr.io/getmockd/mockd
```

## When to use it
- 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
- Start the mock server and create a stateful CRUD at `/api/users`
- Import `stripe-openapi.yaml` and build a Stripe digital twin
- Add a 500 ms delay to every request on `/api/orders`

## Similar
- [conducting-api-security-testing](https://affpapa.org/en/nevibecode/skills/conducting-api-security-testing.md) — skill · 643 installs
- [api-recon-and-docs](https://affpapa.org/en/nevibecode/skills/api-recon-and-docs.md) — skill · 3800 installs
- [mcp2cli](https://affpapa.org/en/nevibecode/skills/mcp2cli.md) — skill · 1400 installs
- [api-documenter](https://affpapa.org/en/nevibecode/skills/api-documenter.md) — skill · 717 installs
- [api-documentation](https://affpapa.org/en/nevibecode/skills/bobmatnyc-api-documentation.md) — skill · 379 installs
- [api-designer](https://affpapa.org/en/nevibecode/skills/api-designer.md) — skill · 6500 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
