Mockzilla
OfficialMockzilla is an open-source API mock server. This server lets you install, manage, and interact with it to mock OpenAPI specs or individual HTTP endpoints, locally or hosted.
Setup & Status
Check CLI availability – Detect if Mockzilla is installed on your PATH, bridge cache, or via
go run.Install the CLI – Download a prebuilt binary, compile with
go install, or usego run(no system PATH changes).Check bridge status – Report the current bridge version and whether a newer version is available.
OpenAPI Exploration
Peek at a spec – Summarize an OpenAPI spec (title, version, endpoint count, paths) from a file or public URL without serving it.
Discover specs in a directory – Scan a folder for OpenAPI spec files and static mock directories.
Local Mocking (no account required)
Serve a mock server locally – Start an ephemeral mock server from one or more OpenAPI spec files, directories, or public URLs.
Stop the local server – Stop the server started by
serve_locally.Mock a single endpoint – Quickly mock one HTTP endpoint (any method/path/status/response body) without an OpenAPI spec; endpoints accumulate in a shared managed server.
List mocked endpoints – List all endpoints created via
mock_endpoint, along with the server and UI URLs.Clear all mocked endpoints – Wipe all mocks and stop the managed server for a fresh start.
Call an endpoint – Make an HTTP request to a URL and return the status, headers, and body to verify mocks.
Documentation
List doc topics – List all available Mockzilla documentation topics.
Read a doc topic – Retrieve the full markdown for a specific topic.
Search the docs – Keyword-search across all docs and return top matching sections with snippets.
Hosted Mocking (requires MOCKZILLA_TOKEN)
List deployed simulations – View your currently deployed hosted mock simulations.
Browse the catalog – See available pre-built API catalog products.
Deploy a hosted mock – Deploy from a catalog bundle, an OpenAPI spec, or a public URL.
Wait for a deploy – Poll until a deployment is ready and return the live URL.
Enables deploying a mock Stripe sandbox via mockzilla's catalog, allowing testing of Stripe integrations without a real account.
@mockzilla/mcp
MCP server for Mockzilla - an open-source API mock server for OpenAPI specifications. Let Claude Code, Claude Desktop, Cursor, or Gemini CLI install Mockzilla, inspect OpenAPI specs, and spin up realistic local mock APIs in seconds. No account required for local use.
Source: github.com/mockzilla/mockzilla-mcp
Use cases
Local API development - mock any OpenAPI spec without a real backend or sandbox account
CI/CD integration testing - zero external dependencies in your pipeline
PSP and payment API mocking - Stripe, PayPal, Adyen from your editor without test accounts
Crypto exchange API mocking - Binance, Bybit without registered accounts
Rate limit protection - develop against OpenAI, Twilio without burning quota
Agentic workflows - let Claude or Cursor spin up and manage mock servers automatically
Two planes
@mockzilla/mcp exposes two planes of tools to your MCP client.
Local plane (no account required)
Works entirely on your machine. Nothing leaves the user's box.
From an agent you can:
Check whether the Mockzilla CLI is installed.
Install Mockzilla into a managed cache (no changes to system PATH).
Inspect an OpenAPI spec (title, version, endpoint count, paths).
Serve any OpenAPI spec locally as a portable mock server.
Mock a single HTTP endpoint without a spec.
List, stop, and clear locally managed mocks.
Hosted plane (requires MOCKZILLA_TOKEN)
When MOCKZILLA_TOKEN is set, the bridge forwards extra tools to mockzilla.org's MCP endpoint.
Agents can then:
List deployed sims.
Browse catalog products.
Deploy hosted mocks from a spec, URL, or catalog bundle.
Wait for a deploy and return the live URL.
Without a token, only the local plane is exposed. Agents can still help users explore Mockzilla and run local mocks before they sign up.
Example prompts
You can use these directly from Claude Code, Claude Desktop, Cursor, or Gemini CLI once mockzilla is configured as an MCP server.
Local plane (no token)
"Is the mockzilla CLI installed on this machine?"
"Install Mockzilla for me."
"Spin up the Petstore OpenAPI spec locally so I can curl it."
"What endpoints does
https://example.com/openapi.yamlexpose?""Mock
POST /checkoutto return a 402 response.""List the mock endpoints you're managing."
"Stop the mock server you started."
Hosted plane (with MOCKZILLA_TOKEN)
"List the sims I have deployed."
"Show me the catalog products."
"Deploy a Stripe sandbox named
stripe-testand give me the live URL.""Create a hosted mock from this OpenAPI URL on mockzilla.org."
Install
Claude Code
One-liner, no config file editing:
claude mcp add -s user mockzilla -- npx -y @mockzilla/mcp@latest-s userinstalls for your user account (available in every project).Drop
-s userto scope to the current project only.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mockzilla": {
"command": "npx",
"args": ["-y", "@mockzilla/mcp@latest"]
}
}
}Restart Claude Desktop after editing.
Cursor
Easiest: Settings -> MCP Servers -> Add new MCP server and fill in:
Name:
mockzillaCommand:
npxArgs:
-y @mockzilla/mcp@latest
Or edit ~/.cursor/mcp.json directly:
{
"mcpServers": {
"mockzilla": {
"command": "npx",
"args": ["-y", "@mockzilla/mcp@latest"]
}
}
}Restart Cursor after editing.
Gemini CLI
One-liner, no manual JSON editing:
gemini mcp add -s user mockzilla npx -y @mockzilla/mcp@latest-s userwrites to~/.gemini/settings.json(available in every project).Drop
-s user(or use-s project) to scope to the current directory's.gemini/settings.json.
Or edit the settings file directly:
{
"mcpServers": {
"mockzilla": {
"command": "npx",
"args": ["-y", "@mockzilla/mcp@latest"]
}
}
}Restart the Gemini CLI after editing.
Why @latest?
Without @latest, npx caches the first resolved version and won't pick up new publishes. Pinning to @latest makes npx re-check the registry on every spawn, so a Claude / Cursor / Gemini restart is enough to upgrade. Trade-off: ~200 ms extra startup time.
Local tools
These tools are always available and never leave the user's machine.
Setup and status
check_cliResolve Mockzilla on this machine: systemPATH-> bridge cache ->go runinvocation. Returns install options if nothing matches.install_cliInstall Mockzilla into~/.cache/mockzilla-mcp/. Methods:download(prebuilt from GitHub releases, default),go-install,go-run. Never touches systemPATH.bridge_statusReport the bridge's version, check npm for newer publishes, and surface upgrade steps.
OpenAPI exploration and docs
peek_openapiSummarise an OpenAPI spec without serving it:{title, version, openapi_version, endpoint_count, paths}.mockzilla_docs_topicsList available Mockzilla doc topics.mockzilla_docs_readReturn the full markdown for one topic.mockzilla_docs_searchKeyword search across all docs; returns top sections with snippets.
Local mocking
serve_locallyStart a portable mock server on a free port. Accepts a spec file, directory, or publichttpsURL. Returns{url, port, pid, services}.stop_locallyStop a server started byserve_locally.mock_endpointQuickly mock a single HTTP endpoint without an OpenAPI spec. Writes a static response into the managed mocks dir and (re)starts the shared server.list_mock_endpointsList all endpoints currently mocked, plus the running server's URL and the Mockzilla UI URL.clear_mock_endpointsWipe all mocks and stop the managed server.
Hosted tools
When MOCKZILLA_TOKEN is set, @mockzilla/mcp forwards hosted tools to mockzilla.org's MCP endpoint.
At the time of writing, the hosted surface includes:
get_contextlist_simslist_catalog_productsdeploy_mock_from_catalogdeploy_mock_from_specdeploy_mock_from_urlwait_for_deploy
Refer to the hosted server's docs or the MCP registry entry for the live tool list.
Configuration
Env var | Default | Purpose |
| unset | Bearer token ( |
|
| Override the hosted endpoint (staging, self-hosted). |
| matches bridge version | Pin a specific Mockzilla CLI version for |
|
| Preferred port for the |
| unset | Read docs from this local directory instead of GitHub (useful when editing docs). |
|
| Override the GitHub repo to fetch docs from. |
|
| Override the branch to fetch docs from. |
Cache layout
The bridge keeps everything under ~/.cache/mockzilla-mcp/:
~/.cache/mockzilla-mcp/
├── bin/mockzilla # downloaded or go-installed binary
├── config.json # { method, version, invocation? }
└── mocks/ # mock_endpoint persists static endpoints here
└── static/
└── <service>/<path>/<method>/index.<ext>rm -rf ~/.cache/mockzilla-mcpfully resets the bridge (binary + all mocked endpoints).To wipe just the mocks:
rm -rf ~/.cache/mockzilla-mcp/mocks.The system
PATHis never touched, so reset doesn't affect a separatebrewinstall of Mockzilla.
Updates
Recommended way to stay current:
Pin
@mockzilla/mcp@latestin your MCP client config sonpxre-checks the registry on every spawn.Restart Claude Desktop / Cursor / Gemini periodically. That's when the new tarball is fetched.
If something seems off, ask the agent: "Run
bridge_statusand tell me if@mockzilla/mcpis up to date."
If it's stale, run:
npx clear-npx-cache @mockzilla/mcpand restart your MCP client.
The Mockzilla CLI version is pinned by the bridge (via MOCKZILLA_VERSION in lib/install.js). Updating the bridge updates the pin; the next install_cli call brings the CLI itself up to date.
Development
See CLAUDE.md for project conventions and a walkthrough of adding a new tool.
Releasing
The bridge has two registries to keep in sync: npm (@mockzilla/mcp) and the MCP registry (server.json). Skipping the second one leaves discovery clients pinned to the previous tarball.
Bump
versioninpackage.json.Run:
make publish-allThis will:
Run the smoke test.
npm publishthe new tarball.Mirror the version into
server.json.Run
mcp-publisher publishagainst the MCP registry.
Commit the
server.jsonbump.
If you only want one side:
make publishfor npm only.make publish-mcpfor the MCP registry only (server.jsonis always re-synced frompackage.jsonfirst).
mcp-publisher must be on PATH (brew install mcp-publisher or follow the installation docs).
Related
mockzilla.org - hosted API simulation, per-PR mock URLs, GitHub Actions integration
mockzilla/mockzilla - the core open-source API mock server
Documentation - full usage guide for portable and codegen modes
License
Copyright © 2026-present
Licensed under the MIT License
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mockzilla/mockzilla-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server