{"_id":"@0gzk/mcp","name":"@0gzk/mcp","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@0gzk/mcp","version":"0.1.0","description":"MCP server for 0gzk: circuit discovery over the catalog and live registries, plus circuit authoring tools","type":"module","bin":{"0gzk-mcp":"dist/bin.js"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js"},"./catalog":{"types":"./dist/catalog/index.d.ts","import":"./dist/catalog/index.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/0gzk/core.git","directory":"packages/mcp"},"homepage":"https://github.com/0gzk/core#readme","bugs":{"url":"https://github.com/0gzk/core/issues"},"license":"MIT","author":{"name":"0gzk"},"keywords":["mcp","model-context-protocol","zk","zero-knowledge","circom","groth16","0g","0gzk"],"engines":{"node":">=20"},"dependencies":{"@0gfoundation/0g-ts-sdk":"^1.2.4","@modelcontextprotocol/server":"^2.0.0","ethers":"^6.13.0","snarkjs":"^0.7.5","zod":"^4.2.0","@0gzk/sdk":"^0.4.0"},"devDependencies":{"@types/node":"^22.7.4","rimraf":"^6.0.1","typescript":"^5.6.2","vitest":"^2.1.0"},"scripts":{"build":"tsc -p tsconfig.json","dev":"tsc -p tsconfig.json --watch","clean":"rimraf dist *.tsbuildinfo","lint":"tsc -p tsconfig.json --noEmit","test":"vitest run"},"_id":"@0gzk/mcp@0.1.0","_integrity":"sha512-yEY38PuArrytPR45XBMvoFVihc/pVFhQBWqHQrr44DGqSVuXL4Xv91giSHcrGkReOQcFrXbFaD+8CPTgSyYHpg==","_resolved":"/tmp/6ca9bfbb14a65c302390d3a48106a2f4/0gzk-mcp-0.1.0.tgz","_from":"file:0gzk-mcp-0.1.0.tgz","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-yEY38PuArrytPR45XBMvoFVihc/pVFhQBWqHQrr44DGqSVuXL4Xv91giSHcrGkReOQcFrXbFaD+8CPTgSyYHpg==","shasum":"53503003d704ac75fd21fd570b8dac4a01b09ffa","tarball":"https://registry.npmjs.org/@0gzk/mcp/-/mcp-0.1.0.tgz","fileCount":83,"unpackedSize":197720,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCWRztuLUdk1b+cLfjhZ+ueJpiZgwVSxV7lDvMSWrGCrgIgSdvTmaSY/c8afgdEOgREB+q9ZK55j/qY/b+PELElMhs="}]},"_npmUser":{"name":"0gzk-dev","email":"admin@runwalklondon.com"},"directories":{},"maintainers":[{"name":"0gzk-dev","email":"admin@runwalklondon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.1.0_1788311694077_0.714795435617714"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-02T01:14:53.923Z","0.1.0":"2026-09-02T01:14:54.248Z","modified":"2026-09-02T01:14:54.544Z"},"maintainers":[{"name":"0gzk-dev","email":"admin@runwalklondon.com"}],"description":"MCP server for 0gzk: circuit discovery over the catalog and live registries, plus circuit authoring tools","homepage":"https://github.com/0gzk/core#readme","keywords":["mcp","model-context-protocol","zk","zero-knowledge","circom","groth16","0g","0gzk"],"repository":{"type":"git","url":"git+https://github.com/0gzk/core.git","directory":"packages/mcp"},"author":{"name":"0gzk"},"bugs":{"url":"https://github.com/0gzk/core/issues"},"license":"MIT","readme":"# @0gzk/mcp\n\nMCP (Model Context Protocol) server for the 0gzk circuit ecosystem: lets AI\nagents discover ZK circuits (from the repo catalog or the live on-chain\nregistries), inspect their input/output schemas, check a user's values against\nthem, generate proofs, and author new circuits — scaffold, validate, build —\nover stdio.\n\n```bash\nnpx -y @0gzk/mcp\n```\n\n## Tools\n\n| Tool | Mode | What it does |\n| --- | --- | --- |\n| `search_circuits` | both | Weighted search over names, tags, keywords, use cases, descriptions (registry name-match in discovery mode) |\n| `list_circuits` | both | List catalog circuits or page through a live registry |\n| `get_circuit` | both | Full record for one circuit: metadata, constraints, example input, publications, how-to-prove; can fetch published bundles into the cache |\n| `get_example_input` | both | The committed `example_input.json` for a catalog circuit |\n| `resolve_circuit` | both | Resolve `name[@version]` against all registries → rootHash/vkeyHash/verifier per chain |\n| `validate_inputs` | both | Check candidate inputs against a circuit's signal schema without proving → `{valid, errors, schema}`; call it with no inputs to get the schema (and `missing`) so you can ask the user for exactly what is needed |\n| `read_input_file` | both | Read a local JSON input file and report only the signal **names and value types** — the values stay on the machine; pass the path to `prove_circuit` as `inputFile` |\n| `prove_circuit` | both | Generate + locally verify a proof from a repo bundle (`name`), a bundle dir, or a published rootHash. Inputs inline or via `inputFile`; `outDir` writes `proof.json`, `public.json`, `result.json` |\n| `scaffold_circuit` | repo | Create `circuits/<name>/` with a `.circom` skeleton, `metadata.json`, `build.sh`, empty `example_input.json` |\n| `validate_metadata` | repo | Validate a `metadata.json` → `{valid, errors, warnings}` |\n| `build_circuit` | repo | circom compile + Groth16 phase-2 setup → publish-ready `circuit_bundle/` (needs `circom` on PATH) |\n\nThat is **11 tools in repo mode, 8 in discovery mode**. Chain-aware tools default to `base`.\n\nResources: `ogzk://guide/circom-authoring` (the authoring guide) and\n`ogzk://catalog` (the raw `circuits/index.json`, repo mode only). The scheme is\n`ogzk` because URI schemes cannot start with a digit.\n\n## Repo mode vs discovery mode\n\n- **Repo mode** — the server found a 0gzk checkout (via `--repo-root`,\n  `OGZK_REPO_ROOT`, walking up from the cwd, or an explicit `--catalog\n  path/to/index.json`). The catalog powers search/list/get, and all four\n  authoring tools are registered: 11 tools total.\n- **Discovery mode** — no checkout, no catalog. The five discovery tools plus\n  `validate_inputs`, `read_input_file` and `prove_circuit` are registered (8\n  total), answered from the live registries; `get_circuit` and `prove_circuit`\n  fetch published bundles into `~/.0gzk/bundles/<rootHash>/` on demand.\n\n## Client configuration\n\nClaude Code:\n\n```bash\nclaude mcp add 0gzk -- npx -y @0gzk/mcp\n```\n\nClaude Desktop / Cursor (JSON config):\n\n```json\n{\n  \"mcpServers\": {\n    \"0gzk\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@0gzk/mcp\"]\n    }\n  }\n}\n```\n\nWorking inside the 0gzk repo itself, use the checked-in `.mcp.json` (points at\n`packages/mcp/dist/bin.js`), or pass `--repo-root <path>`.\n\n## Environment variables\n\n| Variable | Effect |\n| --- | --- |\n| `OG_NETWORK` / `OGZK_NETWORK` | Selects the network that `OG_RPC_URL` applies to (`base` — the default — `base-sepolia`, `0g-mainnet`, `0g-testnet`) |\n| `OG_RPC_URL` | RPC override for the selected network only |\n| `OGZK_REGISTRY_ADDRESS_BASE` | Override the built-in CircuitRegistry address on Base |\n| `OGZK_REGISTRY_ADDRESS_BASE_SEPOLIA` | Override the built-in CircuitRegistry address on Base Sepolia |\n| `OGZK_REPO_ROOT` | Path to a 0gzk checkout (enables repo mode) |\n| `OGZK_CACHE_DIR` | Bundle cache dir (default `~/.0gzk/bundles`) |\n\n## Library usage\n\nThe package is also importable: `@0gzk/mcp` (server + context),\n`@0gzk/mcp/catalog` (catalog generate/load/search/README table), and\n`@0gzk/mcp/tools` (transport-agnostic tool definitions).\n","readmeFilename":"README.md","_rev":"1-5a801d57c8a69d026d48506992ddf177"}