# mockzilla-mcp

Spins up local mocks from OpenAPI specs and deploys hosted ones on mockzilla.org. The agent installs the CLI, lints specs, generates Go code, and manages running servers.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7 repo stars
- Author: mockzilla
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mockzilla/mockzilla-mcp
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/mockzilla-mcp

## What it does

The server operates in two modes. Locally, it runs mocks without an account: the agent checks for the CLI, installs it into cache, reads specs and `.mockz` archives, simplifies heavy schemas, generates Go models and servers for 14 routers, starts a mock server, and returns endpoints. Linting catches schemas that no value can satisfy, so broken specs are flagged before serving.

The hosted mode activates after a single browser login: the agent gains access to an organization and can deploy mocks from a spec, URL, or catalog, list running sims, and wait for deployment to complete. You can mock payment APIs (Stripe, PayPal, Adyen), crypto exchanges (Binance, Bybit), and rate-limited services (OpenAI, Twilio) without test accounts or burning quota. The CLI installs into `~/.cache/mockzilla-mcp/` and never touches the system `PATH`.

\`npx` with the `@latest` flag checks the registry on every spawn: restarting the platform picks up the newest version, but adds around 200 milliseconds to startup.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `MOCKZILLA_TOKEN`, `MOCKZILLA_MCP_URL`, `MOCKZILLA_MANAGED_PORT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env MOCKZILLA_TOKEN=<MOCKZILLA_TOKEN> --env MOCKZILLA_MCP_URL=<MOCKZILLA_MCP_URL> --env MOCKZILLA_MANAGED_PORT=<MOCKZILLA_MANAGED_PORT> --transport stdio mockzilla-mcp -- npx -y @mockzilla/mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mockzilla-mcp --env MOCKZILLA_TOKEN=<MOCKZILLA_TOKEN> --env MOCKZILLA_MCP_URL=<MOCKZILLA_MCP_URL> --env MOCKZILLA_MANAGED_PORT=<MOCKZILLA_MANAGED_PORT> -- npx -y @mockzilla/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mockzilla-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@mockzilla/mcp"
            ],
            "env": {
                "MOCKZILLA_TOKEN": "<MOCKZILLA_TOKEN>",
                "MOCKZILLA_MCP_URL": "<MOCKZILLA_MCP_URL>",
                "MOCKZILLA_MANAGED_PORT": "<MOCKZILLA_MANAGED_PORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mockzilla-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mockzilla/mcp"
            ],
            "env": {
                "MOCKZILLA_TOKEN": "<MOCKZILLA_TOKEN>",
                "MOCKZILLA_MCP_URL": "<MOCKZILLA_MCP_URL>",
                "MOCKZILLA_MANAGED_PORT": "<MOCKZILLA_MANAGED_PORT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e MOCKZILLA_TOKEN=<MOCKZILLA_TOKEN> -e MOCKZILLA_MCP_URL=<MOCKZILLA_MCP_URL> -e MOCKZILLA_MANAGED_PORT=<MOCKZILLA_MANAGED_PORT> mockzilla-mcp npx -y @mockzilla/mcp
```
Replace <…> with your own values

## When to use it
- spin up a Stripe or Binance mock without registration or test account
- lint an OpenAPI spec and find schemas that no value can match
- generate Go models, server, and client from a specification
- deploy a hosted mock on mockzilla.org from the editor
- mock a single HTTP endpoint without a full spec

## Example prompts
- Install the Mockzilla CLI into cache
- Spin up a local mock from `petstore.yaml` and give me the endpoints
- Log me into Mockzilla and deploy a hosted Stripe mock named `stripe-test`

## Similar
- [agent-ready-mpp](https://affpapa.org/en/nevibecode/skills/agent-ready-mpp.md) — skill · ★ 141 repo stars
- [stripe-best-practices](https://affpapa.org/en/nevibecode/skills/stripe-best-practices-2.md) — skill · 102700 installs
- [stripe](https://affpapa.org/en/nevibecode/skills/vercel-labs-stripe.md) — skill · 294 installs
- [api-mock](https://affpapa.org/en/nevibecode/commands/api-mock.md) — command · ★ 42780 repo stars
- [payment-testing](https://affpapa.org/en/nevibecode/rules/payment-testing.md) — rule · ★ 1216 repo stars
- [stripe-integration-expert](https://affpapa.org/en/nevibecode/skills/stripe-integration-expert.md) — skill · 612 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
