Handshake58 for Agents
Pay for any AI service with USDC micropayments. No API keys. No subscriptions. One MCP server — two protocols: DRAIN and MPP.
Setup
Agents can do most of this autonomously. Only funding requires human action.
Agent Can Do
Install
Install the MCP server (ask user to approve if needed):
npm install -g drain-mcp
Wallet
Generate a private key locally — nothing sent over the network:
node -e "const w=require('ethers').Wallet.createRandom();console.log('Address:', w.address, '\nKey:', w.privateKey)"Or: MetaMask → Account → Export Private Key
Configure
Add drain-mcp to the MCP client config:
{
"mcpServers": {
"drain": {
"command": "drain-mcp",
"env": {
"DRAIN_PRIVATE_KEY": "0x_the_exported_private_key"
}
}
}
}Works for both DRAIN and MPP. Compatible with Cursor, Claude Desktop, Cline, Windsurf, or any MCP-compatible client.
Requires Human
Fund the Wallet
Send $5+ USDC on Polygon. Free gas:
POST /api/gas-station
{"address": "0x..."}After funding, the agent operates fully autonomously — provider discovery, payment, and AI requests.
Choose Your Protocol
Both protocols use the same MCP server and wallet. Pick the one that fits your use case — or use both.
MPP — Simple Path
- · Per-request payment
- · No channel or deposit needed
- · 1 tool:
mpp_chat - · No gas fees
- · Best for: quick tasks, low volume
DRAIN — Power Path
- · Payment channels (deposit once)
- · Many off-chain requests per channel
- · 11 tools for full control
- · ~$0.02 gas per channel open/close
- · Best for: high volume, cost efficiency
MPP Protocol — Simple Path
Fastest way to get started. HTTP 402-based per-request payments — no channel setup, no deposit, no gas fees. Each request is paid individually.
drain_providers(category: "llm", protocol: "mpp") — find MPP providersmpp_chat(provider, messages) — send request, payment automaticNo channel or deposit required. Some Skills use both protocols simultaneously (mixed mode).
DRAIN Protocol — Power Path
Lower cost at volume. Payment channels on Polygon (USDC) — deposit once, make many off-chain requests. Close to reclaim unspent funds. ~$0.02 gas per channel.
drain_providers(category: "llm") — find providersdrain_open_channel(provider, amount, duration) — deposit USDCdrain_chat(channelId, messages) — send paid requestsdrain_cooperative_close(channelId) — close, instant refunddrain_feedback(channelId, rating) — rate the session (optional)AI Skills
Skills are pre-defined multi-provider workflows — sequences of AI steps across multiple providers, with execution instructions for agents.
Browse Skills
GET https://handshake58.com/api/skills?status=published
Get Skill Definition + Execution Instructions
GET https://handshake58.com/api/skills/<slug>
Returns: skill definition, step flow, provider roles, and a full step-by-step execution guide for your agent.
Protocol Filter
GET /api/skills/<slug>?protocol=drain GET /api/skills/<slug>?protocol=mpp
Overrides the skill's default protocol. Use this if your agent only supports one payment method.
Important: The HTML page at /skills/<slug> is client-rendered and not readable by agents without JavaScript. Always use the API endpoint /api/skills/<slug> to fetch skill data programmatically.
MCP Tools (12 Total)
MPP Tool
mpp_chatSend request via MPP (no channel needed, per-request payment)Shared Tools (work with both protocols)
drain_providersList providers (filter by model, category, protocol)drain_provider_infoProvider details + usage docsdrain_balanceCheck wallet USDC balancedrain_feedbackRate a session (works / broken)DRAIN-Only Tools
drain_approveApprove USDC for the contractdrain_open_channelOpen a payment channeldrain_chatSend paid request via DRAIN channeldrain_channel_statusCheck channel status and balancedrain_channelsList all known channelsdrain_cooperative_closeClose channel early (instant refund)drain_close_channelClose expired channel, reclaim fundsDiscover Providers
GET https://handshake58.com/api/mcp/providers
Filters
?protocol=drainDRAIN-only providers?protocol=mppMPP-only providers?category=llmFilter by category?model=gpt-4oFilter by model?minScore=0.8Min Oracle quality score?limit=5Limit results?format=compactCompact responseQuality Oracle
All providers are monitored by the Bittensor Subnet 58 decentralized oracle. Miners score providers on latency, reliability, and response quality. Scores feed into provider rankings.
Use ?minScore=0.7 on the providers API to filter by oracle quality score. Verified skills on /skills/browse are tested by the HS58 team.
Protocol Fee
Contract Addresses
0x0C2B3aA1e80629D572b1f200e6DF3586B3946A8A0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359