SNAP Protocol

Official registry Finance and payments

Private agent payments on Solana via ZK proofs: deposit, withdraw, list pools, estimate fees.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package snap-mcp-server
Claude Code
claude mcp add snap-protocol -e 'SNAP_RPC_URL=<SNAP_RPC_URL>' -e 'SNAP_POOL_ADDRESS=<SNAP_POOL_ADDRESS>' -e 'SNAP_RELAYER_URL=<SNAP_RELAYER_URL>' -- npx -y snap-mcp-server@0.1.2
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "snap-protocol": {
            "command": "npx",
            "args": [
                "-y",
                "snap-mcp-server@0.1.2"
            ],
            "env": {
                "SNAP_RPC_URL": "<SNAP_RPC_URL>",
                "SNAP_POOL_ADDRESS": "<SNAP_POOL_ADDRESS>",
                "SNAP_RELAYER_URL": "<SNAP_RELAYER_URL>"
            }
        }
    }
}

Environment variables

  • SNAP_RPC_URL required Solana RPC endpoint URL
  • SNAP_POOL_ADDRESS required Default shielded pool address
  • SNAP_RELAYER_URL Optional relayer URL for private withdrawals

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. SNAP — Shield Network Agent Payments
  2. What SNAP Does
  3. How It Works
  4. Quick Start
  5. Architecture
  6. Mainnet
  7. Project Structure
  8. Development
  9. Security
  10. License

SNAP — Shield Network Agent Payments

Private agent-to-agent payments on Solana using zero-knowledge proofs.

SNAP is live on Solana mainnet. See the security docs for the protocol's threat model and trust assumptions.

What SNAP Does

SNAP lets AI agents pay each other without on-chain observers learning who paid whom. Deposits enter a shielded pool under a cryptographic commitment. Withdrawals leave the pool with a Groth16 proof that shows the recipient is entitled to the funds without revealing which deposit is being claimed.

How It Works

  1. Agent A deposits SOL plus a commitment into the pool.
  2. Agent A sends a secret note to Agent B through a private channel.
  3. Agent B reconstructs the Merkle path and generates a Groth16 proof.
  4. Agent B withdraws SOL with withdraw_zk or withdraw_zk_relayed.
  5. Observers can see the pool activity, but they cannot link the withdrawal to a specific deposit.

Quick Start

Install the SDK and its peer dependencies:

npm install snap-solana-sdk @solana/web3.js @coral-xyz/anchor

Minimal private payment:

import { Connection, Keypair, PublicKey, clusterApiUrl } from "@solana/web3.js";
import { SNAPClient } from "snap-solana-sdk";

async function main() {
  const connection = new Connection("https://your-rpc-url.com", "confirmed");
  const sender = Keypair.generate();
  const recipient = Keypair.generate();
  const pool = new PublicKey("B8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf");

  const snapA = new SNAPClient(connection, sender);
  const snapB = new SNAPClient(connection, recipient);

  const note = await snapA.deposit(pool, 0.1);
  const serialized = SNAPClient.serializeNote(note);
  await snapB.withdraw(pool, SNAPClient.deserializeNote(serialized), recipient);
}

void main();

If you want a runnable walkthrough from this repo, use:

npx tsx examples/basic-payment.ts
npx tsx examples/agent-to-agent.ts
npx tsx examples/relayed-withdrawal.ts

Architecture

ComponentDescription
Solana ProgramAnchor program with deposit, withdraw_zk, and withdraw_zk_relayed
ZK Circuitcircom Groth16 circuit using Poseidon and a depth-10 Merkle tree
SDKsnap-solana-sdk for note handling, proof generation, and client API
Agent Kit PluginSolana Agent Kit v2 plugin with snap_create_pool, snap_deposit, snap_withdraw, and snap_withdraw_private
LangChain Toolssnap-langchain-tools — StructuredTool wrappers for LangChain/LangGraph agents
RelayerExpress service for gas-abstracted private withdrawals

Mainnet

Pool denominations are 0.1 SOL, 1 USDC, and 10 USDC. See THREAT_MODEL.md for trust assumptions.

FieldValue
Program ID9uePoqdgaXpqFLQM2ED1GGQrwSEiqe3r6tW1AfsnrrbS
Pool — 0.1 SOLB8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf
Pool — 1 USDC5LeuHrPBgHNhgbCy996MEjcsBk5gNHhVj6AiuuCHZ8od
Pool — 10 USDCECuHf8kgiWfmL3Q6id4WGBQWvuukhzqvF5vsxuPAKZBv
NetworkSolana mainnet-beta
Protocol fee0.25%

Project Structure

├── programs/           # Solana program (Rust/Anchor)
├── circuits/           # circom ZK circuit
├── sdk-package/        # snap-solana-sdk npm package
├── agent-kit-tool/     # Solana Agent Kit plugin
├── relayer/            # Express relay service
├── agents/             # Demo agent scripts
├── examples/           # Minimal end-to-end examples
├── scripts/            # Deployment and quickstart scripts
├── docs/               # Troubleshooting, circuit, and compliance docs
└── tests/              # Integration tests

Development

# Build the Solana program
anchor build

# Run validator-backed tests
PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH" anchor test --skip-build

# Build and test the SDK package
cd sdk-package && npm install && npm run build && npm test

Security

Known risks, protocol limits, and security documentation are in FINDINGS.md, docs/CIRCUIT_SPEC.md, docs/THREAT_MODEL.md, docs/COMPLIANCE.md, and docs/GOVERNANCE.md.

License

MIT

Frequently asked questions

What is SNAP Protocol?

Private agent payments on Solana via ZK proofs: deposit, withdraw, list pools, estimate fees.

How do I install SNAP Protocol?

It runs on your machine. In Claude Code: claude mcp add snap-protocol -e 'SNAP_RPC_URL=<SNAP_RPC_URL>' -e 'SNAP_POOL_ADDRESS=<SNAP_POOL_ADDRESS>' -e 'SNAP_RELAYER_URL=<SNAP_RELAYER_URL>' -- npx -y snap-mcp-server@0.1.2. For other clients, paste the JSON configuration from this page into their MCP settings.

Does SNAP Protocol need an API key?

Yes. It expects SNAP_RPC_URL, SNAP_POOL_ADDRESS, which you set in its configuration.

Is SNAP Protocol open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains SNAP Protocol?

It is published by agentzeny. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.