mockzilla-mcp — Claude Code MCP server: OpenAPI mock APIs
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.
MIT ★ 7 updated 2026-10-09
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/mcpWhat mockzilla-mcp 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.
What it helps with
- 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 for the agent
- Install the Mockzilla CLI into cache
- Spin up a local mock from
petstore.yamland give me the endpoints - Log me into Mockzilla and deploy a hosted Stripe mock named
stripe-test
How to install mockzilla-mcp
Platform CLI
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/mcpReplace <…> with your own values
Platform CLI
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/mcpReplace <…> with your own values
Config file
{
"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
Config file
{
"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
Platform CLI
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/mcpReplace <…> with your own values
Step 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 mockzilla-mcp
How to install mockzilla-mcp in Claude Code?
Run claude mcp add mockzilla-mcp -e MOCKZILLA_TOKEN=<MOCKZILLA_TOKEN> -- npx -y @mockzilla/mcp. The token is only required for hosted mocks; local ones work without it.
What does mockzilla-mcp do?
It starts local mock servers from OpenAPI specs, lints schemas, generates Go code, and deploys hosted mocks on mockzilla.org after login.
Why use the @latest flag in the npx command?
Without it, npx caches the first version and won't update. With @latest, every platform restart picks up the newest package from the registry, but startup takes around 200 milliseconds longer.