npm snap-mcp-serverstdioMITupdated 3mo ago
Private agent-to-agent payments on Solana using zero-knowledge proofs.
What can you do with SNAP Protocol?
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
- Agent A deposits SOL plus a commitment into the pool.
- Agent A sends a secret note to Agent B through a private channel.
- Agent B reconstructs the Merkle path and generates a Groth16 proof.
- Agent B withdraws SOL with
withdraw_zkorwithdraw_zk_relayed. - 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
| Component | Description |
|---|---|
| Solana Program | Anchor program with deposit, withdraw_zk, and withdraw_zk_relayed |
| ZK Circuit | circom Groth16 circuit using Poseidon and a depth-10 Merkle tree |
| SDK | snap-solana-sdk for note handling, proof generation, and client API |
| Agent Kit Plugin | Solana Agent Kit v2 plugin with snap_create_pool, snap_deposit, snap_withdraw, and snap_withdraw_private |
| LangChain Tools | snap-langchain-tools ā StructuredTool wrappers for LangChain/LangGraph agents |
| Relayer | Express 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.
| Field | Value |
|---|---|
| Program ID | 9uePoqdgaXpqFLQM2ED1GGQrwSEiqe3r6tW1AfsnrrbS |
| Pool ā 0.1 SOL | B8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf |
| Pool ā 1 USDC | 5LeuHrPBgHNhgbCy996MEjcsBk5gNHhVj6AiuuCHZ8od |
| Pool ā 10 USDC | ECuHf8kgiWfmL3Q6id4WGBQWvuukhzqvF5vsxuPAKZBv |
| Network | Solana mainnet-beta |
| Protocol fee | 0.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
Install
Add SNAP Protocol to your client. Pick the one you use.
claude mcp add snap-mcp-server -- npx -y snap-mcp-servercodex mcp add snap-mcp-server -- npx -y snap-mcp-serveramp mcp add snap-mcp-server -- npx -y snap-mcp-server{
"mcpServers": {
"snap-mcp-server": {
"command": "npx",
"args": [
"-y",
"snap-mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"snap-mcp-server": {
"command": "npx",
"args": [
"-y",
"snap-mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"snap-mcp-server","command":"npx","args":["-y","snap-mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"snap-mcp-server": {
"command": "npx",
"args": [
"-y",
"snap-mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"snap-mcp-server": {
"command": "npx",
"args": [
"-y",
"snap-mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"snap-mcp-server": {
"command": "npx",
"args": [
"-y",
"snap-mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"snap-mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"snap-mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"snap-mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"snap-mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y snap-mcp-serverRun `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation20/25
- Maintenance16/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 87 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 0.1.2Latest | Jun 6, 2026 |