null-402-mcp
Provides tools for creating Stellar wallets, depositing XLM into a privacy pool, and paying x402-protected endpoints privately on the Stellar blockchain.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@null-402-mcpcreate a wallet, deposit 10 XLM, then pay https://api.example.com/v1/price/BTC privately"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
null-402-mcp
An MCP server that lets any agent pay x402 APIs privately on Stellar. Plug it into Claude (Desktop / Code) or any MCP client and your agent can create a wallet, deposit into the null-402 privacy pool, and pay x402-protected endpoints with a zero-knowledge proof — revealing only a nullifier, never the wallet, amount, or endpoint.
Tools
Tool | What it does |
| Generate + fund a Stellar testnet wallet |
| Address, XLM balance, spendable notes |
| Escrow XLM into the pool → a private note (real on-chain tx) |
| Pay an x402 URL with a note, return the API response (only a nullifier is revealed) |
Related MCP server: clawpay-mcp
Plug into Claude
claude_desktop_config.json (or Claude Code MCP config):
{
"mcpServers": {
"null-402": {
"command": "node",
"args": ["/ABS/PATH/null-402-mcp/src/index.mjs"],
"env": { "NULL402_WALLET": "/ABS/PATH/.null-402/wallet.json" }
}
}
}Then ask Claude: “deposit 1 XLM, then pay https://…/v1/price/BTC privately and tell me the price.”
Prerequisites
(cd ../null-402-circuits && npm install && npm run build) # proving artifacts
(cd ../null-402-sdk && npm install && npm run build) # SDK → dist
(cd ../null-402-gateway && npm install && npm run build) # gateway → dist
npm install🤖 Autonomous agent demo (Groq)
A Groq LLM, given the null-402 MCP tools, autonomously sets up a wallet, deposits a note, and pays an x402 API privately:
GROQ_API_KEY=… NULL402_PROVIDER=$(stellar keys address null402) npm run agentReal run (llama-3.3-70b-versatile):
🤖 Groq agent + null-402 MCP
MCP tools: create_wallet, wallet_status, deposit, pay
paid API: http://localhost:52138/v1/price/BTC
→ agent calls create_wallet({})
Created + funded a Stellar testnet wallet: GA6OMXJK…BYI3
→ agent calls deposit({"amount_xlm":10})
Deposited 10 XLM — a private note was created.
deposit tx: d29336cc5eb711d697097592b1369a8ea10bfb965d268df22ef6046faf75fb7c
→ agent calls pay({"url":"http://localhost:52138/v1/price/BTC"})
Paid privately — HTTP 200, X-Privacy=zk-groth16.
The only thing revealed on-chain: nullifier 267844233394430905995016…
API response: { … "price": 52648.45 … }
💬 agent answer: The current BTC price is ~$52,648 — paid for privately via null-402.The agent's deposit tx is public; the payment reveals only a nullifier — not which agent paid, how much, or which endpoint.
Self-test (no LLM)
Exercises the tool logic against a real local gateway + the deployed testnet contracts:
NULL402_PROVIDER=$(stellar keys address null402) npm run selftest[create_wallet] Created + funded: GBUGJSZA…MLWN
[deposit 1 XLM] deposit tx: d55d3574998bd89cd05f94ddecc59a7262fa9c4923beee41523585d4582fd282
[pay /v1/price/BTC] Paid privately — HTTP 200, X-Privacy=zk-groth16.
API response: { … "price": 51695.81 … }
OK - MCP tools work end-to-end (real deposit + private x402 pay).How pay works
GET url→402with the payment terms (payTo, price).Pick an unspent note → generate a real Groth16 proof bound to (gateway, price, request) — locally, secrets never leave.
Retry with
X-PAYMENT: <proof>→ the gateway verifies the proof on-chain (Soroban BN254 pairing) →200+ the API response.
Deployed testnet contracts (defaults; override via NULL402_POOL / NULL402_VERIFIER):
id | |
Pool |
|
Verifier |
|
Wallets are stored locally (
NULL402_WALLET) and never committed. This is a testnet demo — don't put real funds in the file-based wallet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shinothelegend/null-402-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server