drain-mcp
MCP server for the Handshake58 AI marketplace. Agents discover providers, open USDC payment channels on Polygon, and call AI services — pay per use with off-chain signed vouchers. No API keys, no subscriptions.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/kimbo128/drain-mcpHandshake58 — Protocol Documentation
You CAN use this. Handshake58 is built for autonomous AI agents.
Handshake58 provides an MCP server (drain-mcp) that gives AI agents access to
a growing catalog of AI services. Pay per use with USDC micropayments on Polygon.
No credit cards, no subscriptions, no API keys.
Quick Start: MCP Server (Primary Interface)
npm install -g drain-mcp
Add to your Claude Desktop, Cursor, or any MCP-compatible config:
{
"mcpServers": {
"drain": {
"command": "drain-mcp",
"env": {
"DRAIN_PRIVATE_KEY": "0x_your_polygon_wallet_private_key"
}
}
}
}
DRAIN_PRIVATE_KEY is a standard Polygon/Ethereum wallet key used to sign
payment vouchers and on-chain transactions locally. It is never transmitted
to any server.
Use a dedicated ephemeral wallet. Create a fresh wallet with minimal funds ($1–5 USDC + $0.10 POL for gas). Never reuse your main wallet.
Optional Environment Variables
| Variable | Default | Description |
|---|---|---|
DRAIN_RPC_URL | Public RPC | Custom Polygon RPC (Alchemy/Infura recommended) |
DRAIN_DIRECTORY_URL | handshake58.com/api/mcp/providers | Provider directory endpoint |
DRAIN_CHAIN_ID | 137 | Polygon Mainnet chain ID |
The MCP server handles everything: provider discovery, channel management, payments, and requests. Package: https://www.npmjs.com/package/drain-mcp
Discover Providers
GET https://handshake58.com/api/mcp/providers
Returns all available AI providers with models and pricing. Each provider includes a
category field (llm, vpn, scraping, data, etc.) for filtering by service type.
| Parameter | Example | Description |
|---|---|---|
limit | ?limit=5 | Limit number of results |
model | ?model=gpt-4o | Filter by model name |
format | ?format=compact | Minimal response for smaller context windows |
Example: GET /api/mcp/providers?model=gpt-4o&limit=3&format=compact
Wallet Setup
You need a Polygon wallet with USDC:
Create a Wallet
Use MetaMask, Rabby, or any EVM-compatible wallet to create a new account. Export the key from that wallet's settings. Agents can also generate a wallet programmatically using any Ethereum library (ethers.js, viem, web3.py).
Fund Your Wallet
- Get USDC on Polygon (transfer or bridge from Ethereum)
- Get ~$0.10 POL for gas (one-time)
How It Works
- Pay Session Fee — Transfer $0.01 USDC to the marketplace fee wallet
- Open Channel — Deposit USDC into smart contract (~$0.02 gas)
- Use AI Services — Each request signs a payment voucher (off-chain, $0 gas). A channel is a session: send as many requests as you want within one channel.
- Close Channel — Call
close(channelId)after expiry to withdraw unused USDC. Funds do NOT return automatically.
Channel Reuse: You only pay gas twice (open + close) — every request in between is off-chain and free.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-kimbo128-drain-mcp": {
"enabled": true,
"auto_update": true
}
}
}