{"id":50451551,"url":"https://github.com/mockzilla/mockzilla-mcp","last_synced_at":"2026-06-01T00:04:03.732Z","repository":{"id":355215229,"uuid":"1226854278","full_name":"mockzilla/mockzilla-mcp","owner":"mockzilla","description":"MCP server for Mockzilla. Let Claude Code, Cursor, and Gemini CLI install Mockzilla, inspect OpenAPI specs, and spin up realistic local mock APIs in seconds. No account required for local use.","archived":false,"fork":false,"pushed_at":"2026-05-23T17:47:19.000Z","size":113,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T19:23:40.542Z","etag":null,"topics":["ai-tools","api-mocking","api-simulation","claude-code","claude-desktop","cursor","developer-tools","gemini-cli","javascript","mcp","mock-server","mockzilla","model-context-protocol","open-source","openapi"],"latest_commit_sha":null,"homepage":"https://mockzilla.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mockzilla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T22:47:53.000Z","updated_at":"2026-05-23T17:47:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mockzilla/mockzilla-mcp","commit_stats":null,"previous_names":["mockzilla/mockzilla-mcp"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mockzilla/mockzilla-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockzilla%2Fmockzilla-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockzilla%2Fmockzilla-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockzilla%2Fmockzilla-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockzilla%2Fmockzilla-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mockzilla","download_url":"https://codeload.github.com/mockzilla/mockzilla-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mockzilla%2Fmockzilla-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33753932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","api-mocking","api-simulation","claude-code","claude-desktop","cursor","developer-tools","gemini-cli","javascript","mcp","mock-server","mockzilla","model-context-protocol","open-source","openapi"],"created_at":"2026-06-01T00:04:03.659Z","updated_at":"2026-06-01T00:04:03.720Z","avatar_url":"https://github.com/mockzilla.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @mockzilla/mcp\n\nMCP server for [Mockzilla](https://mockzilla.org/) - 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.\n\nSource: [github.com/mockzilla/mockzilla-mcp](https://github.com/mockzilla/mockzilla-mcp)\n\n## Use cases\n\n- **Local API development** - mock any OpenAPI spec without a real backend or sandbox account\n- **CI/CD integration testing** - zero external dependencies in your pipeline\n- **PSP and payment API mocking** - Stripe, PayPal, Adyen from your editor without test accounts\n- **Crypto exchange API mocking** - Binance, Bybit without registered accounts\n- **Rate limit protection** - develop against OpenAI, Twilio without burning quota\n- **Agentic workflows** - let Claude or Cursor spin up and manage mock servers automatically\n\n## Two planes\n\n`@mockzilla/mcp` exposes two planes of tools to your MCP client.\n\n### Local plane (no account required)\n\nWorks entirely on your machine. Nothing leaves the user's box.\n\nFrom an agent you can:\n\n- Check whether the Mockzilla CLI is installed.\n- Install Mockzilla into a managed cache (no changes to system PATH).\n- Inspect an OpenAPI spec (title, version, endpoint count, paths).\n- Serve any OpenAPI spec locally as a portable mock server.\n- Mock a single HTTP endpoint without a spec.\n- List, stop, and clear locally managed mocks.\n\n### Hosted plane (requires `MOCKZILLA_TOKEN`)\n\nWhen `MOCKZILLA_TOKEN` is set, the bridge forwards extra tools to `mockzilla.org`'s MCP endpoint.\n\nAgents can then:\n\n- List deployed sims.\n- Browse catalog products.\n- Deploy hosted mocks from a spec, URL, or catalog bundle.\n- Wait for a deploy and return the live URL.\n\nWithout a token, only the local plane is exposed. Agents can still help users explore Mockzilla and run local mocks before they sign up.\n\n## Example prompts\n\nYou can use these directly from Claude Code, Claude Desktop, Cursor, or Gemini CLI once `mockzilla` is configured as an MCP server.\n\n### Local plane (no token)\n\n- \"Is the mockzilla CLI installed on this machine?\"\n- \"Install Mockzilla for me.\"\n- \"Spin up the Petstore OpenAPI spec locally so I can curl it.\"\n- \"What endpoints does `https://example.com/openapi.yaml` expose?\"\n- \"Mock `POST /checkout` to return a 402 response.\"\n- \"List the mock endpoints you're managing.\"\n- \"Stop the mock server you started.\"\n\n### Hosted plane (with `MOCKZILLA_TOKEN`)\n\n- \"List the sims I have deployed.\"\n- \"Show me the catalog products.\"\n- \"Deploy a Stripe sandbox named `stripe-test` and give me the live URL.\"\n- \"Create a hosted mock from this OpenAPI URL on mockzilla.org.\"\n\n## Install\n\n### Claude Code\n\nOne-liner, no config file editing:\n\n```bash\nclaude mcp add -s user mockzilla -- npx -y @mockzilla/mcp@latest\n```\n\n- `-s user` installs for your user account (available in every project).\n- Drop `-s user` to scope to the current project only.\n\n### Claude Desktop\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"mockzilla\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mockzilla/mcp@latest\"]\n    }\n  }\n}\n```\n\nRestart Claude Desktop after editing.\n\n### Cursor\n\nEasiest: **Settings -\u003e MCP Servers -\u003e Add new MCP server** and fill in:\n\n- Name: `mockzilla`\n- Command: `npx`\n- Args: `-y @mockzilla/mcp@latest`\n\nOr edit `~/.cursor/mcp.json` directly:\n\n```json\n{\n  \"mcpServers\": {\n    \"mockzilla\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mockzilla/mcp@latest\"]\n    }\n  }\n}\n```\n\nRestart Cursor after editing.\n\n### Gemini CLI\n\nOne-liner, no manual JSON editing:\n\n```bash\ngemini mcp add -s user mockzilla npx -y @mockzilla/mcp@latest\n```\n\n- `-s user` writes to `~/.gemini/settings.json` (available in every project).\n- Drop `-s user` (or use `-s project`) to scope to the current directory's `.gemini/settings.json`.\n\nOr edit the settings file directly:\n\n```json\n{\n  \"mcpServers\": {\n    \"mockzilla\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mockzilla/mcp@latest\"]\n    }\n  }\n}\n```\n\nRestart the Gemini CLI after editing.\n\n### Why `@latest`?\n\nWithout `@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.\n\n## Local tools\n\nThese tools are always available and never leave the user's machine.\n\n### Setup and status\n\n- **`check_cli`**\n  Resolve Mockzilla on this machine: system `PATH` -\u003e bridge cache -\u003e `go run` invocation. Returns install options if nothing matches.\n\n- **`install_cli`**\n  Install Mockzilla into `~/.cache/mockzilla-mcp/`. Methods: `download` (prebuilt from GitHub releases, default), `go-install`, `go-run`. Never touches system `PATH`.\n\n- **`bridge_status`**\n  Report the bridge's version, check npm for newer publishes, and surface upgrade steps.\n\n### OpenAPI exploration and docs\n\n- **`peek_openapi`**\n  Summarise an OpenAPI spec without serving it: `{title, version, openapi_version, endpoint_count, paths}`.\n\n- **`mockzilla_docs_topics`**\n  List available Mockzilla doc topics.\n\n- **`mockzilla_docs_read`**\n  Return the full markdown for one topic.\n\n- **`mockzilla_docs_search`**\n  Keyword search across all docs; returns top sections with snippets.\n\n### Local mocking\n\n- **`serve_locally`**\n  Start a portable mock server on a free port. Accepts a spec file, directory, or public `https` URL. Returns `{url, port, pid, services}`.\n\n- **`stop_locally`**\n  Stop a server started by `serve_locally`.\n\n- **`mock_endpoint`**\n  Quickly mock a single HTTP endpoint without an OpenAPI spec. Writes a static response into the managed mocks dir and (re)starts the shared server.\n\n- **`list_mock_endpoints`**\n  List all endpoints currently mocked, plus the running server's URL and the Mockzilla UI URL.\n\n- **`clear_mock_endpoints`**\n  Wipe all mocks and stop the managed server.\n\n## Hosted tools\n\nWhen `MOCKZILLA_TOKEN` is set, `@mockzilla/mcp` forwards hosted tools to `mockzilla.org`'s MCP endpoint.\n\nAt the time of writing, the hosted surface includes:\n\n- `get_context`\n- `list_sims`\n- `list_catalog_products`\n- `deploy_mock_from_catalog`\n- `deploy_mock_from_spec`\n- `deploy_mock_from_url`\n- `wait_for_deploy`\n\nRefer to the hosted server's docs or the MCP registry entry for the live tool list.\n\n## Configuration\n\n| Env var | Default | Purpose |\n|---------|---------|---------|\n| `MOCKZILLA_TOKEN` | unset | Bearer token (`mz_oauth_*` or `mz_*`). Hosted tools are hidden when unset. |\n| `MOCKZILLA_MCP_URL` | `https://platform.mockzilla.org/mcp/` | Override the hosted endpoint (staging, self-hosted). |\n| `MOCKZILLA_BIN_VERSION` | matches bridge version | Pin a specific Mockzilla CLI version for `install_cli` to fetch. |\n| `MOCKZILLA_MANAGED_PORT` | `2200` | Preferred port for the `mock_endpoint` server. Falls back to a kernel-picked port if busy. Avoid 3000 (Next.js/React), 5173 (Vite), 8080. Try 2400 or 4444 if 2200 is unavailable. |\n| `MOCKZILLA_DOCS_DIR` | unset | Read docs from this local directory instead of GitHub (useful when editing docs). |\n| `MOCKZILLA_DOCS_REPO` | `mockzilla/mockzilla` | Override the GitHub repo to fetch docs from. |\n| `MOCKZILLA_DOCS_BRANCH` | `main` | Override the branch to fetch docs from. |\n\n## Cache layout\n\nThe bridge keeps everything under `~/.cache/mockzilla-mcp/`:\n\n```text\n~/.cache/mockzilla-mcp/\n├── bin/mockzilla        # downloaded or go-installed binary\n├── config.json          # { method, version, invocation? }\n└── mocks/               # mock_endpoint persists static endpoints here\n    └── static/\n        └── \u003cservice\u003e/\u003cpath\u003e/\u003cmethod\u003e/index.\u003cext\u003e\n```\n\n- `rm -rf ~/.cache/mockzilla-mcp` fully resets the bridge (binary + all mocked endpoints).\n- To wipe just the mocks: `rm -rf ~/.cache/mockzilla-mcp/mocks`.\n- The system `PATH` is never touched, so reset doesn't affect a separate `brew` install of Mockzilla.\n\n## Updates\n\nRecommended way to stay current:\n\n1. Pin `@mockzilla/mcp@latest` in your MCP client config so `npx` re-checks the registry on every spawn.\n2. Restart Claude Desktop / Cursor / Gemini periodically. That's when the new tarball is fetched.\n3. If something seems off, ask the agent: \"Run `bridge_status` and tell me if `@mockzilla/mcp` is up to date.\"\n\nIf it's stale, run:\n\n```bash\nnpx clear-npx-cache @mockzilla/mcp\n```\n\nand restart your MCP client.\n\nThe 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.\n\n## Development\n\nSee [CLAUDE.md](https://github.com/mockzilla/mockzilla-mcp/blob/main/CLAUDE.md) for project conventions and a walkthrough of adding a new tool.\n\n## Releasing\n\nThe 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.\n\n1. Bump `version` in `package.json`.\n2. Run:\n\n   ```bash\n   make publish-all\n   ```\n\n   This will:\n   - Run the smoke test.\n   - `npm publish` the new tarball.\n   - Mirror the version into `server.json`.\n   - Run `mcp-publisher publish` against the MCP registry.\n\n3. Commit the `server.json` bump.\n\nIf you only want one side:\n\n- `make publish` for npm only.\n- `make publish-mcp` for the MCP registry only (`server.json` is always re-synced from `package.json` first).\n\n`mcp-publisher` must be on `PATH` (`brew install mcp-publisher` or follow the [installation docs](https://github.com/modelcontextprotocol/registry)).\n\n## Related\n\n- [mockzilla.org](https://mockzilla.org) - hosted API simulation, per-PR mock URLs, GitHub Actions integration\n- [mockzilla/mockzilla](https://github.com/mockzilla/mockzilla) - the core open-source API mock server\n- [Documentation](https://mockzilla.github.io/mockzilla/) - full usage guide for portable and codegen modes\n\n## License\n\nCopyright © 2026-present\n\nLicensed under the [MIT License](https://github.com/mockzilla/mockzilla-mcp/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockzilla%2Fmockzilla-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmockzilla%2Fmockzilla-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmockzilla%2Fmockzilla-mcp/lists"}