ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/kimbo128/drain-mcp
Or

Handshake58 — 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

VariableDefaultDescription
DRAIN_RPC_URLPublic RPCCustom Polygon RPC (Alchemy/Infura recommended)
DRAIN_DIRECTORY_URLhandshake58.com/api/mcp/providersProvider directory endpoint
DRAIN_CHAIN_ID137Polygon 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.

ParameterExampleDescription
limit?limit=5Limit number of results
model?model=gpt-4oFilter by model name
format?format=compactMinimal 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

  1. Get USDC on Polygon (transfer or bridge from Ethereum)
  2. Get ~$0.10 POL for gas (one-time)

How It Works

  1. Pay Session Fee — Transfer $0.01 USDC to the marketplace fee wallet
  2. Open Channel — Deposit USDC into smart contract (~$0.02 gas)
  3. 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.
  4. 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

Author@kimbo128
Stars1776
Views0
Updated2026-03-02
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-kimbo128-drain-mcp": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.