Mockzilla
OfficialMockzilla MCP lets agents manage and run Mockzilla API mock servers locally and in the cloud, without an account for local use.
Local setup: check if the Mockzilla CLI is installed, install it (download/go-install/go-run), and report bridge version/updates.
OpenAPI exploration: inspect, lint, and discover OpenAPI specs; search/read bundled Mockzilla docs.
Spec reshaping: simplify heavy specs and pack service directories into
.mockzarchives.Local mocking: serve specs/URLs/folders as ephemeral mock servers, call endpoints, mock single endpoints without a spec, list/stop/clear mocks, and inspect request history with diagnostics.
Replay & stability: record and replay responses per endpoint, pin generated responses, and list recordings.
GitHub publishing: check deployability, list user repos, publish mocks to a repo, wait for deployment, and unpublish/delete.
Hosted cloud (after login): log in/out, get org/access context, list sims, browse catalog products, deploy hosted mocks from catalog/spec/URL, and wait for live URLs.
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
Related MCP server: claudecode-mcp
Two planes
@mockzilla/mcp exposes two planes of tools to your MCP client.
Local plane (no account required)
Runs on your machine. No Mockzilla account needed.
From an agent you can:
Check whether the Mockzilla CLI is installed, and install it into a managed cache (no changes to system PATH).
Inspect and lint an OpenAPI spec, or scan a folder for specs.
Simplify a spec that is too heavy to mock, or pack services into a
.mockzarchive.Generate Go code from a spec: models, a server for one of 14 routers, a client, or MCP tools.
Serve any OpenAPI spec locally as a portable mock server, and call its endpoints.
Mock a single HTTP endpoint without a spec.
List, stop, and clear locally managed mocks.
Hosted plane (log in once)
Ask your agent to log in, or ask for something hosted. The agent calls the login tool, your browser opens the Mockzilla login, and you pick an organization and read-only or read-and-write access. The bridge keeps the login on your machine and renews it by itself. Hosted tools are listed from the start; before you log in, the agent is told to log in first.
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.
Before logging in, 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 account)
"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."
"Generate Go models and a chi server for
openapi.ymlinto./api."
Hosted plane (after logging in)
"Log me in to Mockzilla."
"List the sims I have deployed."
"Show me the catalog products."
"Deploy a Stripe mock 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
infoSummarise an OpenAPI spec without serving it:{title, version, openapi_version, endpoint_count, paths}. Also reads.mockzpackages.lintFind schemas in a spec that no value can satisfy, so a broken spec is caught before serving it:{clean, defect_count, defects}.discover_specsScan a directory for OpenAPI specs and folders of static endpoint files. Returns asuggested_inputforserve_locally.mockzilla_docs_topicsList the Mockzilla docs, by category, with each topic's title and summary. The product docs from mockzilla.org, the engine docs and the mockzilla-codegen docs all ship inside the package, so no network or login is needed.mockzilla_docs_readReturn the full markdown for one or more topics, or a whole category.mockzilla_docs_searchKeyword search across all docs; returns top sections with snippets.
Reshaping specs
simplifyDrop or reduce union types, stripx-*extensions, and optionally cap optional properties per schema. Writes the simplified spec to disk and returns its path.packPack a directory of services into a.mockzarchive thatserve_locallycan serve, even from a URL.
Generating code
generateRunmockzilla generate, the built-in mockzilla-codegen: Go models from a spec, plus a server, a client or MCP tools when asked. Readscodegen.yamlwhen the folder has one. Writes the files, lists them first withdry_run, or reports stale ones withcheck, along with the spec's errors and warnings. Needs CLI 2.11.0 or newer.
Local mocking
serve_locallyStart a portable mock server on a free port. Accepts a spec file, directory, or publichttpsURL. Returns{url, port, pid, services}. For a single spec,latency,errors,mountandcontextadd delay, inject error responses, change the mount path, or set replacement values.stop_locallyStop a server started byserve_locally.call_endpointMake an HTTP request and return{status, headers, body}, to show a mock's response. Localhost only unlessallow_remoteis set.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. Takesstatusandheadersfor a failure or a redirect with a real body (404 with an error payload, 201 with aLocation); omitresponsefor a body-less 204 or 304. Needs mockzilla 2.8.20 or newer.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.request_historyList the requests the running server answered: method, URL, status, content type, latency, and whether the response came from an upstream. Passidwithservicefor one request's full headers and body. Reads the server's own history API, so no account is needed.diagnose_requestsExplain what is wrong with the recorded traffic and where its data came from: a breakdown by origin, status and content type, latency p50/p95/max, and findings such as an upstream that failed and silently fell back to a generated mock, a 404 from a wrong mount prefix, or a JSON body under a non-JSON content type.setup_replayConfigure replay for a service: record a response once, then serve it back for every matching request. Returnsrecording_scopesaying what each endpoint is keyed by, since with no match fields every call to an endpoint shares one recording. Writesconfig.ymlonly inside the bridge's own mocks dir; for a folder from your own project it returns the YAML and where it goes.list_replaysList a service's recordings, with the request values each one is keyed by.check_github_deployableSay whether a repository or folder would deploy a mock, and what is missing if not. Knows both kinds: portable service folders and a codegen Go server. Read-only.list_github_reposThe user's repositories, flagging which already publish mocks, so the agent can ask which one to use.publish_to_githubPush mocks to one of the user's own repositories and let the Mockzilla action deploy them at a host of their own,https://<label>.api.mockz.io. The label is the repository name, with-2,-3if it is taken. No Mockzilla account needed: the first push registers the repository. Merges into an existing services folder rather than replacing it, and never overwrites an existing workflow.wait_for_github_deployWait for the workflow run and return the live URL, as the action reported it.unpublish_from_githubTake the mocks down and free the simulation slot, optionally deleting the repository too.
Account
loginOpens the Mockzilla login in the browser, where the user picks an organization and read-only or read-and-write access. Returns right away with the login link. The agent calls a hosted tool again once the user approves. The login is saved under~/.config/mockzilla-mcp/, one per server URL, and renewed automatically.logoutRevokes the connection and deletes the saved login. Log out and in again to switch organization or access.
Hosted tools
@mockzilla/mcp lists the hosted tools from the start and forwards them to mockzilla.org's MCP endpoint once you log in. 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.
On a machine without a browser, such as CI or a remote server, set MOCKZILLA_TOKEN to an API key from the dashboard instead of logging in. The hosted tools are then available from the start.
Configuration
Env var | Default | Purpose |
| unset | API key ( |
|
| Override the hosted endpoint, e.g. |
| unset | Set to |
|
| OAuth client id |
| matches bridge version | Pin a specific Mockzilla CLI version for |
|
| Preferred port for the |
| unset | Read docs from another build of |
Files
The bridge keeps the CLI and mocks under ~/.cache/mockzilla-mcp/, and the login under ~/.config/mockzilla-mcp/:
~/.cache/mockzilla-mcp/
├── bin/mockzilla # downloaded or go-installed binary
├── config.json # { method, version, invocation? }
└── mocks/ # mock_endpoint persists static endpoints here
└── services/
└── <first path segment>/<rest of path>/<method>/
├── index.<ext> # the response body
└── meta.json # status and headers, written only when set
~/.config/mockzilla-mcp/
└── credentials.json # saved logins, one per server URL, readable only by yourm -rf ~/.cache/mockzilla-mcpresets the CLI and all mocked endpoints. The login stays.To wipe just the mocks:
rm -rf ~/.cache/mockzilla-mcp/mocks.To drop the login, ask the agent to log out. That also revokes it on mockzilla.org.
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.
The usual way is to bump version in package.json, merge, and publish a GitHub release tagged v<version>. That covers both registries: see From GitHub Actions below.
To release by hand instead:
Bump
versioninpackage.json.Run:
make publish-allThis will:
Build
docs/andhosted-tools.jsonfrom the published docs bundle, plus the engine docs at the pinned CLI version. Maintainers only: it needsDOCS_BUNDLE_CMDinlocal.mk.Run the smoke tests: the stdio round-trip, login against a fake OAuth server, the docs tools,
mock_endpointagainst the real CLI, and the behavior checks that each tool reports only what the server really does (CLI-dependent ones skip when no CLI is installed).npm publishthe new tarball.Mirror the version into
server.json.Log
mcp-publisherin with the GitHub token from Keychain (see below).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).
MCP registry login
A registry login lasts 5 minutes, so make publish-mcp logs in before every publish. It reads a GitHub token from macOS Keychain, because the browser login (mcp-publisher login github without a token) can't publish under io.github.mockzilla.
One-time setup:
Create a classic GitHub token with
read:organdread:user.Store it in Keychain. The command prompts for the token:
security add-generic-password -a "$USER" -s mcp-publisher-github -w
From GitHub Actions
Publishing a GitHub release whose tag matches package.json runs .github/workflows/publish.yml, which builds the docs, runs the smoke tests and publishes to npm with provenance. It skips a version npm already has, so it is safe to run after make publish.
Two things have to be set up for it, both one-time:
npm Trusted Publishing. On npmjs.com, under the package's settings, add a trusted publisher: repository
mockzilla/mockzilla-mcp, workflowpublish.yml. No token is stored anywhere.AWS_ROLE_ARNrepository secret, set to thegithub_mcp_release_role_arnoutput of infra'slive/aws/iam-github-oidc. The docs bundle is only in S3 - nothing serves it, and the CDN in front of that bucket caches for a day - so the release assumes a role that can read that one key.
.github/workflows/publish-mcp.yml starts on the same release and covers the other registry. It skips versions the MCP registry already has, waits up to 10 minutes for the version to appear on npm, then publishes server.json using GitHub OIDC, so no token is needed. It can still be started by hand from the Actions tab.
The two run in parallel rather than in sequence. The wait loop is what keeps that safe, and it is needed anyway: npm accepts a tarball before it can be read back.
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
mockzilla/mockzilla-codegen - the Go code generator behind
mockzilla generate
License
Copyright © 2026-present
Licensed under the MIT License
Available Tools
35 toolsbridge_statusA
Report the bridge's own version and check whether a newer one is on npm. Returns {bridge_version, bridge_latest, update_available, upgrade_steps}. Call this when the user asks 'is mockzilla-mcp up to date?', or proactively if a tool starts failing in a way that could be a stale-bridge issue.
Inputs: no named parameters.
call_endpointA
Make an HTTP request to a URL and return {status, headers, body}. Use this to demonstrate a mock by hitting it after serve_locally (e.g. http://localhost:PORT/openapi/pet/findByStatus), to inspect the admin API (/.services returns the registered services, /healthz for liveness), or to verify a freshly-mocked endpoint works. Default scope is localhost only; pass allow_remote: true for arbitrary URLs (rare — the bridge isn't a general-purpose HTTP client).
Inputs: url (required), body, method, headers, +1 more.
check_cliA
Check whether the mockzilla CLI is available — either on the system PATH, in the bridge's own cache (~/.cache/mockzilla-mcp/), or via a go run invocation. Call FIRST when the user wants to try mockzilla locally. If nothing resolves, the response carries install_options; suggest install_cli to the user and ask them which method (download / go-install / go-run) they prefer.
Inputs: no named parameters.
check_github_deployableA
Say whether a GitHub repository (or a local folder) would deploy a mock, and what is missing if not. Use it when the user has a repo and asks whether it can serve mocks, or before adding the action to one. Detects which of the two kinds it is: a portable repo of service folders, or a codegen repo that builds a Go server. Returns problems (these stop it deploying), warnings (it deploys but something costs later, such as no teardown trigger, or specs large enough to exhaust a free simulation's 128MB), and workflow_to_add when there is no Mockzilla workflow at all. Read-only: it never changes the repository.
Inputs: dir, repo.
clear_mock_endpointsA
Wipe ALL mocks created via mock_endpoint and stop the managed server. Equivalent to rm -rf ~/.cache/mockzilla-mcp/mocks plus stop_locally. Use when the user wants to start fresh. Does not touch the mockzilla CLI binary or other bridge state.
Inputs: no named parameters.
deploy_mock_from_catalogA
Create a HOSTED, SHAREABLE mock from a catalog spec (Stripe, Adyen, etc.) on mockzilla.org. The mock persists in the user's account and gets a stable URL anyone with the link can hit. Use this when the user wants something durable, team-visible, or reachable from outside their machine — NOT for ephemeral local exploration (use serve_locally for that). Pass catalog_spec_id from list_catalog_products; mount_path defaults to the spec slug. The returned sim is in deploying state -- follow up with wait_for_deploy to receive the live URL.
Inputs: name (required), slug (required), catalog_spec_id (required), domain, +2 more.
deploy_mock_from_specA
Create a HOSTED, SHAREABLE mock on mockzilla.org from an inline OpenAPI 3.0+ spec (YAML or JSON in the spec field, 4MB cap). The mock persists in the user's account and gets a stable URL anyone with the link can hit. Use this when the user pastes spec content AND wants a durable, team-visible result — NOT for ephemeral local exploration (use serve_locally for that). The returned sim is in deploying state — follow up with wait_for_deploy to receive the live URL.
Inputs: name (required), slug (required), spec (required), domain, +2 more.
deploy_mock_from_urlA
Create a HOSTED, SHAREABLE mock on mockzilla.org from an OpenAPI 3.0+ spec at a public https URL. The server fetches the spec (SSRF-protected) and parses it. Use this when the user gives you a spec URL AND wants a durable, team-visible result — NOT for ephemeral local exploration (use serve_locally for that, it accepts the same URL form). The returned sim is in deploying state -- follow up with wait_for_deploy to receive the live URL.
Inputs: name (required), slug (required), spec_url (required), domain, +1 more.
diagnose_requestsA
Explain what is going wrong with the traffic the local server has served, and where each response's data came from. Returns a breakdown by source (generated / upstream / replay / cache), by status and by content type, latency p50/p95/max, and a list of concrete findings: upstream failures that silently fell back to a generated mock, 404s from a wrong mount prefix, a body that is JSON under a non-JSON content type, and unusually slow requests. Prefer this over request_history when the user asks why a response looks wrong, whether data is real or mocked, or why something is slow. Note that a replayed or cached response never reaches the history log, so a call the user made and cannot find here was most likely served from a recording or the cache rather than not happening. Read-only, localhost only.
Inputs: limit, service.
discover_specsA
Scan a directory and report what mockzilla can do with it: top-level OpenAPI spec files (with title and endpoint count) plus any folders of static endpoint files mockzilla can serve. Returns a suggested_input the agent can hand directly to serve_locally. Use this when the user says 'I have a folder of specs/files, what's in it?' or 'mock this directory'. Scans one level only: on a tree of spec folders it names the subdirectories to recurse into. A big folder is summarised up to a cap, with truncated: true and the full spec_file_count.
Inputs: dir (required).
get_contextARead-only
Return the org, role and access (read or write) the current MCP credential is scoped to. Use this once at the start of a session to know which org you are acting in. A read connection cannot deploy; the user has to log in again with write access.
Inputs: no named parameters.
infoA
Summarise an OpenAPI spec or .mockz package without serving it. For a spec, returns {title, version, openapi_version, endpoint_count, paths} with operation IDs. For a package, returns its manifest. Pass input as a local file or a public https URL. Use this when the user wants to know what's in a spec or package before deciding whether to serve or deploy it.
Inputs: input (required).
install_cliA
Install the mockzilla CLI for this user. Three methods — ASK the user which one they want before calling:
• download (recommended): fetch the prebuilt binary for this OS/arch from github.com/mockzilla/mockzilla releases (~38MB). Fast, no toolchain needed.
• go-install: run go install <module>@v<version> to compile from source. Needs Go on PATH.
• go-run: don't install at all — the bridge stores a go run <module>@v<version> invocation. First serve_locally compiles into Go's module cache; later runs are instant. Needs Go.
Files land in the bridge's own cache, never on system PATH; blow it away with rm -rf ~/.cache/mockzilla-mcp.
Inputs: method.
lintA
Check an OpenAPI spec for schemas no value can satisfy, such as an array with a scalar enum or additionalProperties: false next to oneOf properties. Mockzilla can't generate valid responses for these, so requests to affected endpoints fail validation. Returns {clean, defect_count, defects: [{rule, path, detail}], truncated}; at most 50 defects are listed. Pass input as a local spec file or a public https URL. Use it before serving or deploying a spec, or when a mock returns unexpected validation errors. OpenAPI 3.x only.
Inputs: input (required).
list_catalog_productsARead-only
List the catalog specs (Stripe, Adyen, etc.) available to attach to a HOSTED sim on mockzilla.org. Returns recommended runtime settings the agent should compare against the org's tier before suggesting a deploy. Pass search to substring-match by slug or name. The returned ids/slugs are ONLY usable with deploy_mock_from_catalog — they are NOT URLs and NOT valid input for serve_locally. If the user wants to try a catalog product locally instead, skip this tool and call serve_locally with the public OpenAPI URL for the service (recall it from your training knowledge — Stripe, Twilio, etc. all publish OpenAPI specs on GitHub).
Inputs: page, limit, search.
list_github_reposA
List the user's GitHub repositories so you can ASK which one to publish mocks to. Never pick one yourself. publishes_mocks: true means that repo already has the Mockzilla workflow, so publishing there updates its existing mock instead of creating another. Useful in clients with no shell, where you cannot run gh repo list.
Inputs: limit, owner.
list_mock_endpointsA
List all endpoints currently mocked via mock_endpoint. Returns {endpoints: [{method, service, path, status, headers?, file}], server_url, ui_url}. An endpoint with body: null answers with no body. If a managed server is running, ui_url is the mockzilla UI (opens in a browser, shows endpoints grouped by service plus request inspection). Suggest the UI to the user when they want to explore beyond what the agent can show in chat.
Inputs: no named parameters.
list_replaysA
List the replay recordings a service currently holds, so you can tell the user what is pinned and what a matching request will return. Use it after setup_replay to confirm a recording was captured, or when a response looks stale and you suspect it is being replayed rather than produced fresh. Read-only.
Inputs: service (required), key.
list_simsARead-only
List the sims (deployed mocks) accessible to the current org. Returns a page of sim entries with their refs, statuses, and live URLs. Pass search to substring-filter by name or sim_pk, or sim to look up exactly one sim_pk.
Inputs: sim, page, limit, search.
loginA
Log in to Mockzilla cloud so the hosted tools (deploying mocks, listing simulations, the catalog) become available. Opens the Mockzilla login in the user's browser, where they pick an organization and read-only or read-and-write access. Returns right away with the login url. Call it when a hosted tool says it needs a login, then call that tool again once the user approves. Local tools never need it. Side effects: starts a short-lived listener on 127.0.0.1 for the login callback, and saves the login under ~/.config/mockzilla-mcp/.
Inputs: no named parameters.
logoutA
Log out of Mockzilla cloud on this machine. Revokes the connection and deletes the saved login; hosted tools disappear until the next login. Call it when the user asks to log out or to switch organization or access level.
Inputs: no named parameters.
mock_endpointA
Quickly mock a single HTTP endpoint without writing an OpenAPI spec. Pass method (default GET), path (the EXACT HTTP path the user described, including all segments), and the response body (object → JSON, string → text). The bridge writes the response into a managed static dir at ~/.cache/mockzilla-mcp/mocks/ and (re)starts a single shared mockzilla server pointing at it.
Pass path AS IS. Do NOT prepend or duplicate any segment. The bridge derives the service name from the first segment for internal grouping, but it does not change the URL the user hits. Examples:
• User says GET /pets/{id} → call mock_endpoint with path=/pets/{id} → URL is http://HOST:PORT/pets/{id}
• User says POST /orders → path=/orders → URL is http://HOST:PORT/orders
• User says GET /v1/users/me → path=/v1/users/me → URL is http://HOST:PORT/v1/users/me
Pass status and/or headers to mock a failure or a redirect with a real body: status: 404 with an error payload, 201 with a Location, 429 with Retry-After. Omit response to send no body at all, which 204 and 304 require. These need mockzilla 2.8.20 or newer; the tool says so if the installed CLI is older. To fail a share of requests instead of every one, use serve_locally with errors.
Path placeholders like {id} are stored as literal directory names — by default ALL placeholder values share the same response. To return different responses for specific values, call mock_endpoint again with a literal value (e.g. /pets/123).
Calling this multiple times accumulates endpoints in the same server — adding POST /pets after GET /pets/{id} keeps both. Mutually exclusive with serve_locally: stop any ad-hoc server first. See mockzilla_docs_search('static directory') for the underlying convention.
Inputs: path (required), method, status, headers, +2 more.
mockzilla_docs_readA
Return the full markdown of Mockzilla doc topics. Pass topics with one or more ids from mockzilla_docs_topics, or category to read a whole category in one call. A large request returns what fits and lists the rest in remaining: read those in a second call. A link to another topic reads as (topic id). Each topic carries url, its public page, to give the user; don't fetch it, the markdown is the same page.
Inputs: topics, category.
mockzilla_docs_searchA
Search the Mockzilla docs by keyword. Returns the best matching sections {topic, title, heading, snippet} so you know which topics to read. Use it when no topic title from mockzilla_docs_topics clearly fits. Answer from the docs rather than from memory: they describe the product as it is now.
Inputs: query (required), limit.
mockzilla_docs_topicsA
List the Mockzilla docs that ship with this bridge: the product docs from mockzilla.org (what a simulation is, deploying, resilient backends, billing, settings, the CLI and this MCP server) and the open-source engine docs under engine/ (configuration, contexts, middleware, replay). Returns each category with its topics' id, title and one-line summary. The docs are files inside the bridge, so this needs no network and no login. Call it before answering a question about Mockzilla, then read the topics that fit.
Inputs: no named parameters.
packA
Pack a directory of mockzilla services into a .mockz archive for easier distribution or sharing. The archive carries a manifest (name, description, mounts, modes, git source) so the runtime can register every service without re-walking the tree. Hand the resulting .mockz to anyone — they can serve it with serve_locally, even from a URL. Use this when the user wants to share a working mock setup, snapshot one for a teammate, or publish it.
Defaults: output is <basename>.mockz next to dir. Git metadata (remote, ref, commit) is auto-embedded when dir is inside a git tree — pass skip_git: true to suppress.
Inputs: dir (required), name, output, skip_git, +2 more.
publish_to_githubA
Publish mocks to one of the USER'S OWN GitHub repositories and let the Mockzilla action deploy them at a shareable host of their own, https://.api.mockz.io. The label is the repository name, with -2, -3 if it is taken. No Mockzilla account is needed: the first push registers the repository. This is the free path for a user who is not logged in, and a valid choice for one who is when they want the mocks living in a repo and reviewed like code. If they are logged in and just want a quick hosted mock, prefer deploy_mock_from_* instead, which also gives history and replays in the app.
ASK THE USER FIRST, do not guess:
WHICH REPOSITORY. It is theirs, not one you invent. It can be an existing repo, including an app repo they already have, since this only adds a services folder and a workflow.
list_github_reposshows the candidates.PRIVATE OR PUBLIC, if it has to be created.
visibilityis required and has no default. The deployed mock URL is public either way, so say so: whatever is in these responses is readable by anyone with the link.
SIDE EFFECTS: uses the user's own gh login, may create a repository, commits and pushes, and triggers a public deploy. An existing services folder is merged into, not replaced, unless replace is true; an existing workflow is never overwritten.
Mocks here are static: spec-generated or fixed responses. If the user wants real logic or state, this is the wrong tool; that needs the codegen action and a Go server, and this refuses to publish into such a repository. Keep specs small too, since a free simulation has 128MB and a big spec costs far more in memory than on disk: simplify first if needed. Then call wait_for_github_deploy. The host is picked when the deploy runs, so this tool returns no URL and that one does.
Inputs: repo (required), visibility (required), source, message, +3 more.
request_historyA
List the requests the running local server has answered, newest first: method, URL, status, content type, how long it took, and where the response came from (generated, upstream, replay or cache). Use it to show the user what their code actually sent, to confirm a call arrived, or to find the request to look at next. Pass id together with service for one request's full headers and body. Reads the server's own history API, so it needs no account and works entirely on localhost. To ask what is WRONG with the traffic rather than list it, call diagnose_requests.
Inputs: id, limit, method, status, +3 more.
serve_locallyA
Start ONE mockzilla portable mock server on this machine that serves any number of APIs together — no mockzilla account needed. Pass input as a single spec path / directory / public https URL, OR an array of them to combine multiple APIs into the same server (each becomes a service mounted at //...). Returns {url, port, pid, services} plus example_endpoints, callable URLs for a single spec. Use one of those rather than guessing a path: each service answers under its mount prefix, not at the spec's bare path. Pair with stop_locally(pid) to clean up. Prefer this over deploy_mock_from_* whenever the user says 'try locally', 'experiment', or 'play with' — those tools create persistent hosted bundles, this one is ephemeral. The bridge only runs ONE local server at a time on purpose: if the user wants more APIs, stop the current server and restart with all of them in input.
To test how a client handles a slow or failing API, pass latency and/or errors. These and mount/context work only when input is a single spec or single-service folder.
If the user names a well-known API (stripe, twilio, github, openai, slack, etc.) WITHOUT providing a URL, recall the public OpenAPI spec URL from your training knowledge and pass that. Do NOT pass a catalog ID or slug from list_catalog_products — that catalog is for the HOSTED deploy_mock_from_catalog flow, its ids are not URLs. Examples of public OpenAPI URLs:
• Stripe: https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json
• Twilio: https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json
• GitHub: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json
• Petstore: https://petstore3.swagger.io/api/v3/openapi.json
Inputs: input (required), port, mount, errors, +2 more.
setup_replayA
Configure replay for a service: record a real response once, then serve it back for every matching request (VCR). Writes a replay: block into the service's config.yml.
ASK THE USER TWO THINGS BEFORE CALLING:
Record from a real backend, or pin the mock's own output? With
upstream_urlthe recording is the real backend's response. Without it, replay pins the generated response so repeat calls stop returning fresh random data, which is often what 'make it stable' means.One recording for the whole endpoint, or one per input? With no
matchfields the key is method and path only, so EVERY call to POST /foo replays the first response no matter what it sends. Look at what the endpoint actually takes, then ask which fields distinguish one case from another and pass those asmatch.
Match fields come from three sources: path (path variables, ignored unless listed), body (dotted paths like data.items[0].name, or "[0].name" for a top-level array, or flat keys for form bodies), and query. Returns recording_scope spelling out what each endpoint is keyed by. Only writes inside the bridge's own mocks dir; for a folder served from the user's project it returns the YAML and the path for them to apply. Config is read at startup, so restart after.
Inputs: service (required), endpoints (required), dir, duration, +3 more.
simplifyA
Simplify an OpenAPI spec: drop or reduce union types (anyOf/oneOf), strip x-* extensions, and optionally limit the number of optional properties per schema. Writes the simplified spec to disk and returns its path. Use this when a spec is too large or too complex to mock cleanly (deeply nested unions, hundreds of optional fields) — the output is a faithful subset the agent can hand to serve_locally.
Optional-property handling:
• omit optional to keep every optional property
• optional: N keeps exactly N per schema (0 drops them all)
• optional_min/optional_max (must come together) picks a random count in that range per schema
Pass config for an oapi-codegen-dd codegen.yml when the user wants filter + overlay + prune applied before simplification.
Inputs: input (required), config, output, optional, +2 more.
stop_locallyA
Stop the mockzilla server started by serve_locally. Takes no arguments — there's only ever one local server running. Returns {stopped: bool, pid?, reason?}.
Inputs: no named parameters.
unpublish_from_githubA
Take down the mocks a repository serves, freeing its simulation slot. Runs the workflow with delete: true, which needs the workflow_dispatch trigger this bridge writes; a repo whose own workflow lacks it cannot be torn down this way, and the result says so. Pass delete_repo: true to also delete the repository itself, which is permanent and needs the delete_repo scope, so confirm with the user before using it.
Inputs: repo (required), delete_repo.
wait_for_deployARead-only
Block until a sim's deploy reaches a terminal status (active or failed) or until timeout_s seconds elapse (default 25, max 30). Returns {sim_id, status, urls: {live, dashboard}} — urls.live is set once the deploy is ACTIVE. On timeout the response carries the current non-terminal status (typically deploying); the agent can call wait_for_deploy again with the same sim_id.
Inputs: sim_id (required), timeout_s.
wait_for_github_deployA
Wait for the Mockzilla workflow run to finish and return the live mock URL, as the action printed it in the run's log. Mockzilla picks the host when the deploy runs, so this is the one place to get it. Call after publish_to_github, or after the user pushes. A first deploy takes a minute or two. If it returns with no conclusion it ran out of time: call again.
Inputs: repo (required), timeout_seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Every tool has a clearly distinct purpose, and the descriptions actively cross-reference each other to prevent misselection: deploy_mock_from_* explicitly warns it is NOT valid input for serve_locally, request_history vs diagnose_requests are differentiated as list-vs-diagnose, and wait_for_deploy vs wait_for_github_deploy are separated by deployment target. Even the three near-identical deploy_mock_from_catalog/spec/url tools are cleanly distinguished by input source. With 35 tools this is an exceptional level of disambiguation.
The overwhelming majority follow a consistent snake_case verb_noun pattern (list_replays, serve_locally, deploy_mock_from_catalog, wait_for_github_deploy, unpublish_from_github), and related families share structural prefixes (mockzilla_docs_*, deploy_mock_from_*, wait_for_*). Minor deviations include bare verbs (info, lint, simplify, pack) and a noun-first name (bridge_status), but these are isolated and the overall pattern remains highly predictable.
35 tools is on the heavy side and exceeds the calibration's 25-tool threshold for 'too many', but the domain is genuinely broad: local serving, hosted deployment, GitHub publishing, replay, spec processing, CLI management, and docs each demand their own surface. Some consolidation is possible (deploy_mock_from_spec and deploy_mock_from_url could be one tool; wait_for_deploy vs wait_for_github_deploy) but each tool does earn a place in the platform's scope.
The surface covers the full lifecycle remarkably well: create (serve_locally, mock_endpoint, deploy_*), read (list_sims, list_mock_endpoints, request_history, info), modify (setup_replay, simplify), and delete (stop_locally, clear_mock_endpoints, unpublish_from_github). Workflows are chained explicitly (deploy → wait_for_deploy → list_sims). The only notable gap is the absence of update/delete operations for hosted sims themselves — list_sims lists them but nothing can remove or modify an individual hosted sim.
Maintenance
Related MCP Connectors
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that publishes CLI tools on your machine for discoverability by LLMs4 npm1MIT
- AlicenseAqualityBmaintenanceLocal MCP server that wraps the headless Claude Code CLI as MCP tools, providing stateless access to Claude's coding capabilities through prompt-based interactions. It enables users to execute Claude Code commands with various prompt formats and structured outputs directly from MCP clients.3MIT
- AlicenseNot gradedqualityDmaintenanceA dead simple MCP server for exposing your app functions to AI agents like Claude Desktop.6MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that exposes fixed tools for GPT, Claude, and Gemini while routing to any OpenAI-compatible chat completions backend with independent configuration per target.1-