{
  "schemaVersion": "1.0",
  "item": {
    "slug": "drain-mcp",
    "name": "Handshake58 DRAIN",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/kimbo128/drain-mcp",
    "canonicalUrl": "https://clawhub.ai/kimbo128/drain-mcp",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/drain-mcp",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=drain-mcp",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/drain-mcp"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/drain-mcp",
    "agentPageUrl": "https://openagent3.xyz/skills/drain-mcp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/drain-mcp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/drain-mcp/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Handshake58 — Protocol Documentation",
        "body": "You CAN use this. Handshake58 is built for autonomous AI agents.\n\nHandshake58 provides an MCP server (drain-mcp) that gives AI agents access to\na growing catalog of AI services. Pay per use with USDC micropayments on Polygon.\nNo credit cards, no subscriptions, no API keys."
      },
      {
        "title": "Quick Start: MCP Server (Primary Interface)",
        "body": "npm install -g drain-mcp\n\nAdd to your Claude Desktop, Cursor, or any MCP-compatible config:\n\n{\n  \"mcpServers\": {\n    \"drain\": {\n      \"command\": \"drain-mcp\",\n      \"env\": {\n        \"DRAIN_PRIVATE_KEY\": \"0x_your_polygon_wallet_private_key\"\n      }\n    }\n  }\n}\n\nDRAIN_PRIVATE_KEY is a standard Polygon/Ethereum wallet key used to sign\npayment vouchers and on-chain transactions locally. It is never transmitted\nto any server.\n\nUse a dedicated ephemeral wallet. Create a fresh wallet with minimal funds\n($1–5 USDC + $0.10 POL for gas). Never reuse your main wallet."
      },
      {
        "title": "Optional Environment Variables",
        "body": "VariableDefaultDescriptionDRAIN_RPC_URLPublic RPCCustom Polygon RPC (Alchemy/Infura recommended)DRAIN_DIRECTORY_URLhandshake58.com/api/mcp/providersProvider directory endpointDRAIN_CHAIN_ID137Polygon Mainnet chain ID\n\nThe MCP server handles everything: provider discovery, channel management, payments, and requests.\nPackage: https://www.npmjs.com/package/drain-mcp"
      },
      {
        "title": "Discover Providers",
        "body": "GET https://handshake58.com/api/mcp/providers\n\nReturns all available AI providers with models and pricing. Each provider includes a\ncategory field (llm, vpn, scraping, data, etc.) for filtering by service type.\n\nParameterExampleDescriptionlimit?limit=5Limit number of resultsmodel?model=gpt-4oFilter by model nameformat?format=compactMinimal response for smaller context windows\n\nExample: GET /api/mcp/providers?model=gpt-4o&limit=3&format=compact"
      },
      {
        "title": "Wallet Setup",
        "body": "You need a Polygon wallet with USDC:"
      },
      {
        "title": "Create a Wallet",
        "body": "Use MetaMask, Rabby, or any EVM-compatible wallet to create a new account.\nExport the key from that wallet's settings. Agents can also generate\na wallet programmatically using any Ethereum library (ethers.js, viem, web3.py)."
      },
      {
        "title": "Fund Your Wallet",
        "body": "Get USDC on Polygon (transfer or bridge from Ethereum)\nGet ~$0.10 POL for gas (one-time)"
      },
      {
        "title": "How It Works",
        "body": "Pay Session Fee — Transfer $0.01 USDC to the marketplace fee wallet\nOpen Channel — Deposit USDC into smart contract (~$0.02 gas)\nUse 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.\nClose Channel — Call close(channelId) after expiry to withdraw unused USDC. Funds do NOT return automatically.\n\nChannel Reuse: You only pay gas twice (open + close) — every request in between is off-chain and free."
      },
      {
        "title": "Session Fee",
        "body": "Before opening a channel, pay a $0.01 USDC session fee:\n\n// 1. Get fee wallet from marketplace\nconst config = await fetch('https://handshake58.com/api/directory/config').then(r => r.json());\n\n// 2. Transfer $0.01 USDC (10000 wei with 6 decimals) to feeWallet\nawait usdc.transfer(config.feeWallet, 10000n);\n\n// 3. Now open the payment channel\nawait channel.open(providerAddress, amount, duration);"
      },
      {
        "title": "Opening a Channel",
        "body": "Each provider specifies minDuration and maxDuration (in seconds) — choose a duration within that range based on your session needs.\n\nUse the provider ID (from the directory response), not the wallet address.\nMultiple providers can share the same wallet address — using the ID ensures\ndrain_chat routes requests to the correct provider.\n\n// Approve USDC spending\nawait usdc.approve('0x1C1918C99b6DcE977392E4131C91654d8aB71e64', amount);\n\n// Open channel: use provider ID for correct routing\nawait contract.open(providerId, amount, durationSeconds);"
      },
      {
        "title": "Sending Requests",
        "body": "POST {provider.apiUrl}/v1/chat/completions\nContent-Type: application/json\nX-DRAIN-Voucher: {\"channelId\":\"0x...\",\"amount\":\"150000\",\"nonce\":\"1\",\"signature\":\"0x...\"}\n\nThe voucher authorizes cumulative payment. Increment amount with each request.\nSignature: EIP-712 typed data signed locally by the channel opener wallet.\n\nAll providers use the OpenAI-compatible chat completion format.\n\nNon-standard providers (VPN, web scraping, image generation, etc.) use the same\n/v1/chat/completions endpoint but expect specific JSON in the user message instead\nof natural language. Always check a provider's docs endpoint first:\n\nGET {provider.apiUrl}/v1/docs\n\nThis returns usage instructions, expected parameters, and response format. Required\nfor any provider that is not a simple LLM chat (e.g. VPN leases, web scraping tools)."
      },
      {
        "title": "Settlement (Closing Channels)",
        "body": "After a channel expires, call close(channelId) to reclaim your unspent USDC. Funds do NOT return automatically.\n\n// Check channel status\nconst res = await fetch('https://handshake58.com/api/channels/status?channelIds=' + channelId);\nconst data = await res.json();\nconst ch = data.channels[0];\n\nif (ch.status === 'expired_unclosed') {\n  await wallet.sendTransaction({\n    to: '0x1C1918C99b6DcE977392E4131C91654d8aB71e64',\n    data: ch.closeCalldata,\n  });\n}\n\nBest practice: Store your channelId persistently. After the channel expires, poll /api/channels/status to check when close() is callable."
      },
      {
        "title": "External Endpoints",
        "body": "Every network request the MCP server makes is listed here.\n\nEndpointMethodData Senthandshake58.com/api/mcp/providersGETNothing (public catalog)handshake58.com/api/directory/configGETNothing (reads fee wallet)handshake58.com/api/channels/statusGETchannelId (public on-chain data)Provider apiUrl /v1/chat/completionsPOSTChat messages + signed voucherPolygon RPC (on-chain tx)POSTSigned transactions (approve, open, close, transfer)\n\nNo endpoint ever receives raw signing keys. All signing happens locally inside the MCP process.\n\nProviders listed in the marketplace are reviewed and approved by Handshake58 before appearing in the directory. The agent connects only to vetted providers."
      },
      {
        "title": "Security & Privacy",
        "body": "Signing key handling: DRAIN_PRIVATE_KEY is loaded into memory by the local MCP process. It is used for:\n\nEIP-712 voucher signing — off-chain, no network call\nOn-chain transaction signing — signed locally, only the resulting signature is broadcast\n\nThe key is never transmitted to Handshake58 servers, AI providers, or any third party. Providers verify signatures against on-chain channel state — they never need or receive the key.\n\nWhat leaves your machine:\n\nPublic API queries to handshake58.com (provider list, fee wallet, channel status)\nChat messages to AI providers (sent to the provider's apiUrl, not to Handshake58)\nSigned payment vouchers (contain a cryptographic signature, not the key)\nSigned on-chain transactions (broadcast to Polygon)\n\nWhat stays local:\n\nYour signing key (never transmitted)\nAll cryptographic operations\n\nSpending is capped by design. The smart contract payment channel limits exposure to the deposited amount only. The user chooses how much to deposit (typically $1–5), sets the channel duration, and reclaims unused funds after expiry via close(). The agent cannot spend more than the deposit, even in a worst-case scenario.\n\nRecommended safeguards:\n\nUse a dedicated ephemeral wallet with $1–5 USDC. Never reuse your main wallet.\nAudit the source code before installing: github.com/kimbo128/DRAIN\nRun in an isolated environment if handling sensitive data"
      },
      {
        "title": "Contract Addresses",
        "body": "Handshake58 Channel: 0x1C1918C99b6DcE977392E4131C91654d8aB71e64\nUSDC: 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\nChain: Polygon Mainnet (137)"
      },
      {
        "title": "Pricing",
        "body": "Get live pricing for all models:\n\nGET https://handshake58.com/api/mcp/providers\n\nSession fee: $0.01 USDC per channel\nProtocol fee: 0%\nGas: ~$0.02 per channel open"
      },
      {
        "title": "Model Invocation Note",
        "body": "This skill uses the standard MCP autonomous invocation model (always: false). It is only active when the user's MCP client loads it and does not run in the background or persist between sessions.\n\nOpt-out: Remove the drain entry from your MCP config to disable the skill entirely.\nNatural confirmation point: Every channel open requires an on-chain transaction — an explicit spending commitment, not a silent background action."
      },
      {
        "title": "Trust Statement",
        "body": "By using this skill, chat messages are sent to third-party AI providers via the Handshake58 marketplace. The signing key is used locally only and is never transmitted to any server. Only install if you trust the drain-mcp npm package — audit the source at github.com/kimbo128/DRAIN before use."
      },
      {
        "title": "Links",
        "body": "Marketplace: https://handshake58.com\nProvider Directory: https://handshake58.com/directory\nMCP Package: https://www.npmjs.com/package/drain-mcp"
      }
    ],
    "body": "Handshake58 — Protocol Documentation\n\nYou CAN use this. Handshake58 is built for autonomous AI agents.\n\nHandshake58 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.\n\nQuick Start: MCP Server (Primary Interface)\nnpm install -g drain-mcp\n\n\nAdd to your Claude Desktop, Cursor, or any MCP-compatible config:\n\n{\n  \"mcpServers\": {\n    \"drain\": {\n      \"command\": \"drain-mcp\",\n      \"env\": {\n        \"DRAIN_PRIVATE_KEY\": \"0x_your_polygon_wallet_private_key\"\n      }\n    }\n  }\n}\n\n\nDRAIN_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.\n\nUse a dedicated ephemeral wallet. Create a fresh wallet with minimal funds ($1–5 USDC + $0.10 POL for gas). Never reuse your main wallet.\n\nOptional Environment Variables\nVariable\tDefault\tDescription\nDRAIN_RPC_URL\tPublic RPC\tCustom Polygon RPC (Alchemy/Infura recommended)\nDRAIN_DIRECTORY_URL\thandshake58.com/api/mcp/providers\tProvider directory endpoint\nDRAIN_CHAIN_ID\t137\tPolygon Mainnet chain ID\n\nThe MCP server handles everything: provider discovery, channel management, payments, and requests. Package: https://www.npmjs.com/package/drain-mcp\n\nDiscover Providers\nGET https://handshake58.com/api/mcp/providers\n\n\nReturns all available AI providers with models and pricing. Each provider includes a category field (llm, vpn, scraping, data, etc.) for filtering by service type.\n\nParameter\tExample\tDescription\nlimit\t?limit=5\tLimit number of results\nmodel\t?model=gpt-4o\tFilter by model name\nformat\t?format=compact\tMinimal response for smaller context windows\n\nExample: GET /api/mcp/providers?model=gpt-4o&limit=3&format=compact\n\nWallet Setup\n\nYou need a Polygon wallet with USDC:\n\nCreate a Wallet\n\nUse 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).\n\nFund Your Wallet\nGet USDC on Polygon (transfer or bridge from Ethereum)\nGet ~$0.10 POL for gas (one-time)\nHow It Works\nPay Session Fee — Transfer $0.01 USDC to the marketplace fee wallet\nOpen Channel — Deposit USDC into smart contract (~$0.02 gas)\nUse 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.\nClose Channel — Call close(channelId) after expiry to withdraw unused USDC. Funds do NOT return automatically.\n\nChannel Reuse: You only pay gas twice (open + close) — every request in between is off-chain and free.\n\nSession Fee\n\nBefore opening a channel, pay a $0.01 USDC session fee:\n\n// 1. Get fee wallet from marketplace\nconst config = await fetch('https://handshake58.com/api/directory/config').then(r => r.json());\n\n// 2. Transfer $0.01 USDC (10000 wei with 6 decimals) to feeWallet\nawait usdc.transfer(config.feeWallet, 10000n);\n\n// 3. Now open the payment channel\nawait channel.open(providerAddress, amount, duration);\n\nOpening a Channel\n\nEach provider specifies minDuration and maxDuration (in seconds) — choose a duration within that range based on your session needs.\n\nUse the provider ID (from the directory response), not the wallet address. Multiple providers can share the same wallet address — using the ID ensures drain_chat routes requests to the correct provider.\n\n// Approve USDC spending\nawait usdc.approve('0x1C1918C99b6DcE977392E4131C91654d8aB71e64', amount);\n\n// Open channel: use provider ID for correct routing\nawait contract.open(providerId, amount, durationSeconds);\n\nSending Requests\nPOST {provider.apiUrl}/v1/chat/completions\nContent-Type: application/json\nX-DRAIN-Voucher: {\"channelId\":\"0x...\",\"amount\":\"150000\",\"nonce\":\"1\",\"signature\":\"0x...\"}\n\n\nThe voucher authorizes cumulative payment. Increment amount with each request. Signature: EIP-712 typed data signed locally by the channel opener wallet.\n\nAll providers use the OpenAI-compatible chat completion format.\n\nNon-standard providers (VPN, web scraping, image generation, etc.) use the same /v1/chat/completions endpoint but expect specific JSON in the user message instead of natural language. Always check a provider's docs endpoint first:\n\nGET {provider.apiUrl}/v1/docs\n\n\nThis returns usage instructions, expected parameters, and response format. Required for any provider that is not a simple LLM chat (e.g. VPN leases, web scraping tools).\n\nSettlement (Closing Channels)\n\nAfter a channel expires, call close(channelId) to reclaim your unspent USDC. Funds do NOT return automatically.\n\n// Check channel status\nconst res = await fetch('https://handshake58.com/api/channels/status?channelIds=' + channelId);\nconst data = await res.json();\nconst ch = data.channels[0];\n\nif (ch.status === 'expired_unclosed') {\n  await wallet.sendTransaction({\n    to: '0x1C1918C99b6DcE977392E4131C91654d8aB71e64',\n    data: ch.closeCalldata,\n  });\n}\n\n\nBest practice: Store your channelId persistently. After the channel expires, poll /api/channels/status to check when close() is callable.\n\nExternal Endpoints\n\nEvery network request the MCP server makes is listed here.\n\nEndpoint\tMethod\tData Sent\nhandshake58.com/api/mcp/providers\tGET\tNothing (public catalog)\nhandshake58.com/api/directory/config\tGET\tNothing (reads fee wallet)\nhandshake58.com/api/channels/status\tGET\tchannelId (public on-chain data)\nProvider apiUrl /v1/chat/completions\tPOST\tChat messages + signed voucher\nPolygon RPC (on-chain tx)\tPOST\tSigned transactions (approve, open, close, transfer)\n\nNo endpoint ever receives raw signing keys. All signing happens locally inside the MCP process.\n\nProviders listed in the marketplace are reviewed and approved by Handshake58 before appearing in the directory. The agent connects only to vetted providers.\n\nSecurity & Privacy\n\nSigning key handling: DRAIN_PRIVATE_KEY is loaded into memory by the local MCP process. It is used for:\n\nEIP-712 voucher signing — off-chain, no network call\nOn-chain transaction signing — signed locally, only the resulting signature is broadcast\n\nThe key is never transmitted to Handshake58 servers, AI providers, or any third party. Providers verify signatures against on-chain channel state — they never need or receive the key.\n\nWhat leaves your machine:\n\nPublic API queries to handshake58.com (provider list, fee wallet, channel status)\nChat messages to AI providers (sent to the provider's apiUrl, not to Handshake58)\nSigned payment vouchers (contain a cryptographic signature, not the key)\nSigned on-chain transactions (broadcast to Polygon)\n\nWhat stays local:\n\nYour signing key (never transmitted)\nAll cryptographic operations\n\nSpending is capped by design. The smart contract payment channel limits exposure to the deposited amount only. The user chooses how much to deposit (typically $1–5), sets the channel duration, and reclaims unused funds after expiry via close(). The agent cannot spend more than the deposit, even in a worst-case scenario.\n\nRecommended safeguards:\n\nUse a dedicated ephemeral wallet with $1–5 USDC. Never reuse your main wallet.\nAudit the source code before installing: github.com/kimbo128/DRAIN\nRun in an isolated environment if handling sensitive data\nContract Addresses\nHandshake58 Channel: 0x1C1918C99b6DcE977392E4131C91654d8aB71e64\nUSDC: 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359\nChain: Polygon Mainnet (137)\nPricing\n\nGet live pricing for all models:\n\nGET https://handshake58.com/api/mcp/providers\n\nSession fee: $0.01 USDC per channel\nProtocol fee: 0%\nGas: ~$0.02 per channel open\nModel Invocation Note\n\nThis skill uses the standard MCP autonomous invocation model (always: false). It is only active when the user's MCP client loads it and does not run in the background or persist between sessions.\n\nOpt-out: Remove the drain entry from your MCP config to disable the skill entirely.\nNatural confirmation point: Every channel open requires an on-chain transaction — an explicit spending commitment, not a silent background action.\nTrust Statement\n\nBy using this skill, chat messages are sent to third-party AI providers via the Handshake58 marketplace. The signing key is used locally only and is never transmitted to any server. Only install if you trust the drain-mcp npm package — audit the source at github.com/kimbo128/DRAIN before use.\n\nLinks\nMarketplace: https://handshake58.com\nProvider Directory: https://handshake58.com/directory\nMCP Package: https://www.npmjs.com/package/drain-mcp"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/kimbo128/drain-mcp",
    "publisherUrl": "https://clawhub.ai/kimbo128/drain-mcp",
    "owner": "kimbo128",
    "version": "1.8.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/drain-mcp",
    "downloadUrl": "https://openagent3.xyz/downloads/drain-mcp",
    "agentUrl": "https://openagent3.xyz/skills/drain-mcp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/drain-mcp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/drain-mcp/agent.md"
  }
}