Skip to main content
Glama
Whambammy

ZK Proofs & Cryptography MCP

README.md
<p align="center">
  <img src="./assets/logo.png" width="130" height="130" alt="ZK Proofs & Cryptography MCP Logo" />
</p>

# ZK Proofs & Cryptography MCP

[![Smithery Compatible](https://img.shields.io/badge/Smithery-Compatible-blue.svg)](https://smithery.ai)
[![Model Context Protocol](https://img.shields.io/badge/MCP-Standard%20v1.0-emerald.svg)](https://modelcontextprotocol.io)
[![Base L2 Settlement](https://img.shields.io/badge/Base%20L2-USDC%20x402-blue.svg)](https://base.org)
[![Tools](https://img.shields.io/badge/Tools-5%20Curated-purple.svg)](#included-tools)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

**Poseidon Merkle membership proofs, Groth16 zk-SNARK verification, Merkle Mountain Ranges, and EIP-712 structured data hashing.**

Built specifically for Zero-knowledge proof engineers, Web3 identity builders, and cryptographic protocol developers.

---

## ⚡ Quickstart

### Smithery Install
```bash
smithery skill add whambammy/zk-proof-identity-mcp
```

### Claude Desktop / Cursor (`claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "zk-proof-identity-mcp": {
      "command": "npx",
      "args": ["-y", "@whambammy/zk-proof-identity-mcp"],
      "env": {
        "PAYMENT_WALLET": "0x9793E7269b3301893318dEa8338576Ba612F39B3",
        "BASE_RPC_URL": "https://mainnet.base.org"
      }
    }
  }
}
```

---

## 🛠️ Included Tools

| Tool Name | Price (USDC) | Capability |
| :--- | :---: | :--- |
| `zero_knowledge_merkle_membership_proof` | $0.050 | Generates and verifies Poseidon hash-based Merkle tree membership proofs for private zero-knowledge credential verification without revealing identity. |
| `zk_snark_groth16_proof_verifier` | $0.050 | Verifies off-chain zk-SNARK Groth16 cryptographic proofs over the BN254/alt_bn128 pairing curve, guaranteeing proof validity before gas-expensive on-chain calls. |
| `merkle_mountain_range_mmr_prover` | $0.045 | Constructs and verifies append-only Merkle Mountain Range (MMR) proofs for lightweight blockchain cross-chain block headers and rolling state proofs. |
| `generate_merkle_proof` | $0.02 | Constructs binary SHA-256 Merkle trees and generates lightweight cryptographic inclusion proofs for whitelist and state verification. |
| `eip712_typed_data_hasher` | $0.030 | RFC-compliant EIP-712 typed structured data hasher that eliminates domain separator discrepancies, type string misordering, and nested array padding bugs. |


---

## 🔄 End-to-End Workflow

A privacy agent generates a private credential -> builds a Poseidon Merkle proof -> creates and verifies a zk-SNARK Groth16 proof -> signs the authorization payload using EIP-712 without revealing the underlying identity.

---

## 💰 The x402 Base L2 Micropayment Protocol

When an agent invokes a tool without payment, the server responds with a deterministic `HTTP 402 Payment Required` challenge containing:
- Target tool price in USDC
- Base Native USDC Contract: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
- Recipient payout wallet address
- Single-use cryptographic nonce

Once broadcasted on Base L2, resubmitting with `paymentSignature` unlocks deterministic execution.

---

## 📄 License
MIT License. Created by [Whambammy](https://github.com/Whambammy).

TDQS

B3.1/5.0

Scored across 5 tools

Disambiguation3/5

Three tools revolve around Merkle-style proofs (zero_knowledge_merkle_membership_proof, merkle_mountain_range_mmr_prover, generate_merkle_proof), which could be confused without careful reading. The descriptions do differentiate them by hash function (Poseidon vs SHA-256), structure (binary tree vs MMR), and use case, but the boundaries remain soft for an agent. The Groth16 verifier and EIP-712 hasher are clearly distinct.

Naming Consistency2/5

Naming mixes conventions: some are long noun phrases (zero_knowledge_merkle_membership_proof, zk_snark_groth16_proof_verifier) while others begin with a verb (generate_merkle_proof) or are pure noun phrases (eip712_typed_data_hasher). There is no predictable verb_noun pattern, and 'proof'/'prover'/'verifier' suffixes are used inconsistently across similar tools.

Tool Count4/5

Five tools is a reasonable, well-scoped set for a cryptography primitives server, with each primitive earning its place. It sits comfortably in the 3-15 range without feeling bloated.

Completeness3/5

The surface covers Merkle/MMR proof generation and a Groth16 verifier plus EIP-712 hashing, but there are notable gaps such as no Groth16/SNARK proof generation counterpart (only verification), no signature or key utilities, and no generic hashing helper. Agents needing to create SNARK proofs or sign typed data would hit dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues