mockzilla-mcp CLAUDE.md

mockzilla-mcp CLAUDE.md is an instructions file for coding agents from mockzilla/mockzilla-mcp. It costs 1,567 tokens per session, scanned C, original, MIT.

Development instructions for mockzilla-mcp, a local server that lets AI tools connect to Mockzilla through standard input and output. It describes the server layout, local and hosted tools, and how to add a local tool.

In plain words
What is it for?
Use it when developing, extending, installing, or troubleshooting mockzilla-mcp, including adding handlers, working with local services, or forwarding requests to the hosted service.
Why use it?
It gives contributors the project rules and file responsibilities needed to change the server safely. It also explains which operations need authentication and which run locally.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mockzilla/mockzilla-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/mockzilla/mockzilla-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mockzilla-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mockzilla/mockzilla-mcp/claude-md.svg)](https://agentmods.dev/instructions/mockzilla/mockzilla-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mockzilla/mockzilla-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/mockzilla/mockzilla-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,567 This file is loaded in full into every session.
When invoked 1,567 The same file — it is already loaded in full.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01567 $0.01567
Opus 5 $0.00783 $0.00783
Sonnet 5 $0.00313 $0.00313
Haiku 4.5 $0.00157 $0.00157

Measured 4d ago against content hash 5e8f0aa5c2af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

mockzilla-mcp CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

clean slate: `rm -rf ~/.cache/mockzilla-mcp`. To test the cache
CLAUDE.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

mockzilla-mcp

Stdio MCP server bridging Claude Desktop / Cursor / etc. to mockzilla. Pure-JS, no build step, ESM, Node ≥ 18.

Layout

bin/cli.js     JSON-RPC entry: stdin loop, dispatch, signal handlers.
lib/tools.js   The local tool registry (descriptions + handler refs).
lib/install.js check_cli, install_cli, resolveMockzilla, cache helpers.
lib/local.js   serve_locally, stop_locally, peek_openapi, child tracking.
lib/discover.js discover_specs (filesystem scan + spec summaries).
lib/docs.js    mockzilla_docs_{topics,read,search}; raw GitHub source +
               MOCKZILLA_DOCS_DIR override for contributors editing docs.
lib/version.js Bridge version + npm registry update check (bridge_status).
lib/proxy.js   Hosted-plane forwarding (uses MOCKZILLA_TOKEN).
lib/util.js    Tiny shared helpers (shellEscape).

bin/cli.js is the only file the npm bin entry runs. It owns the JSON-RPC loop and delegates everything else.

Two planes

  • Local plane. Tools that touch the user's machine. Defined in lib/tools.js, handlers live in lib/install.js or lib/local.js. Always available — no auth, no token.
  • Hosted plane. Tools the Django server defines at app/mcp/tools.py. Proxied through when MOCKZILLA_TOKEN is set. When the bridge sees a tools/call for a name it doesn't recognise locally, it forwards to the hosted endpoint.

Tool names must not collide — local tools always win the dispatch, so a local tool with the same name as a hosted one would shadow it.

Adding a new local tool

There's a registry pattern — lib/tools.js is the single source of truth for what the agent sees. The actual handler lives in lib/local.js (or, if it's an install/cache concern, lib/install.js).

1. Write the handler

Add an async function to lib/local.js:

export async function describe_thing(args) {
  // Validate args. Throw if invalid; the bridge translates thrown
  // errors into MCP `isError: true` results so the agent surfaces
  // them to the user.
  if (typeof args.target !== "string") {
    throw new Error("`target` must be a string");
  }

  // Do the work. Plain return value becomes the result's JSON text
  // content. Keep it small and structured — the agent reads it.
  return { target: args.target, observed: someState() };
}

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 170 lines · 1,567 tokens per session scan C 5e8f0aa5c2af

Subscribe to this mod's changes

mockzilla-mcp CLAUDE.md is an instructions file published in the GitHub repository mockzilla/mockzilla-mcp (5 stars, last pushed 3mo ago), licensed MIT. It adds 1,567 tokens to every session, about $0.0078 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.