402 Coffee
Click on "Deploy 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., "@402 Coffeetip @tim 1.50 for helpful guide"
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.
☕ 402 Coffee
Non-custodial x402 tip jars for the agentic web. Claim a handle with your wallet, get a
live payment endpoint (/t/@you) and an embeddable button. Humans tip from a browser wallet
with a signature (no gas); agents tip over HTTP or MCP; every tip settles as USDC straight to
the creator's wallet. No custodian, no fee.
Live: https://402coffee.com · MIT · built on x402 v2, Base USDC.
Why non-custodial
payTo is the creator's own wallet. The service composes the payment challenge and asks a
facilitator to verify + settle; it never holds keys or funds. Structurally cannot rug anyone,
and stays out of money-transmitter territory.
Related MCP server: AgentPay-mcp
Two front doors, one rail
Humans — an embeddable widget runs the full x402 flow in-browser: the payer signs an EIP-3009
transferWithAuthorizationwith MetaMask/Coinbase/Rabby and pays zero gas.Agents — every jar is a real x402 endpoint and an MCP tool:
tip("@handle", 1.00, "great post").
Embed (any site)
<script src="https://402coffee.com/widget.js" data-handle="tim" async></script>README badge: [](https://402coffee.com/tim)
Routes
Path | What |
| The x402 tip endpoint (dynamic |
| Warm creator page (SSR, wall, tiers, embed, OG image) |
| SIWE-gated dashboard: ledger, per-post analytics, CSV, moderation |
| README tip badge |
| SIWE signup / update |
| Public profile JSON |
| SIWE-gated ledger ( |
| Public supporter wall |
| Discovery |
| SIWE nonce |
| Hosted MCP server ( |
| Machine-readable discovery |
| Nightly ledger↔onchain reconciliation (cron) |
Protocol (verified onchain, x402 v2)
Built on @x402/core@2.18.0 (protocol v2). All facts re-verified against the live SDK /
facilitator / chain — never from memory:
Item | Value |
Headers |
|
Networks | CAIP-2 |
USDC (Base) |
|
Scheme |
|
Amount / tx |
|
Architecture
lib/x402.mjs— thin x402 v2 core: build a challenge; verify + settle (the churn-exposed part)lib/tipflow.mjs— the shared settle-and-record core used by both/t/:handleand MCPlib/creators.mjs·lib/tips.mjs— Postgres store (creators, idempotent tip ledger)lib/siwe.mjs— stateless-nonce Sign-In-With-Ethereumlib/notify.mjs— HMAC-signed webhook + optional emaillib/reconcile.mjs— data-quality gate: ledger vs onchain USDC transfersapp/— Next.js App Router (routes above);public/widget.js— the zero-dep widget
Develop
npm install
# local Postgres (Docker):
docker run -d --name pg402 -e POSTGRES_PASSWORD=dev -e POSTGRES_USER=dev -e POSTGRES_DB=coffee402 -p 5433:5432 postgres:16-alpine
cp .env.example .env.local # set SIWE_SECRET + DATABASE_URL (see below)
npm run migrate # create schema
npm run dev # http://localhost:3000
npm test # x402 v2 protocol/codec tests (vs real SDK + live facilitator)
npm run test:db # DB + SIWE + notify + moderation integration tests
node scripts/e2e-local.mjs # live HTTP: signup, challenge, ledger
node scripts/e2e-widget.mjs # simulate the browser widget tip flow
node scripts/e2e-mcp.mjs # drive the MCP server end to endEnvironment
See .env.example. Production (Vercel) needs: DATABASE_URL (Neon), SIWE_SECRET,
CDP_API_KEY_ID / CDP_API_KEY_SECRET (mainnet facilitator), X402_NETWORK=mainnet.
Optional: CRON_SECRET, RESEND_API_KEY, BASE_RPC_URL.
License
MIT.
This server cannot be deployed
Maintenance
Related MCP Connectors
Give your AI agent an x402 wallet: discover and pay for services in USDC, or earn from your own.
Pay-per-call DeFi and macro intel for AI agents. x402 USDC tools via streamable HTTP /api/mcp.
15 paid AI agent primitives via x402 (USDC on Base). Pay-per-call MCP server.
x402 toolkit for AI agents: paid web, AI, and Base chain tools per call in USDC. Free tools too.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to facilitate cryptocurrency tipping using x402 payment collection and CDP automatic disbursement. Supports USDC tips on Base and Solana with automatic payment splitting (96% recipient, 4% platform) through dedicated wallets.205 npm8MIT
- AlicenseAqualityCmaintenanceNon-custodial x402 MCP payment layer for AI agents — the open-source alternative to Vercel x402-mcp1178 npm5MIT
- AlicenseNot gradedqualityDmaintenanceEnables any AI agent to send cryptocurrency tips via x402 payment collection and automatic CDP disbursement, turning agents into payment-enabled tipping platforms.205 npm9MIT
- AlicenseAqualityAmaintenanceA budget-bound x402 payment wallet for AI agents: it autonomously pays HTTP 402 payment-gated URLs across every major chain (EVM, Solana, and many non-EVM families). Self-custodial and backendless, your key, your RPC, with spend caps enforced before any on-chain send.89MIT