[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76D9JCTF648M2ZBZJZF15D3":3,"skill-same:01M76D9JCTF648M2ZBZJZF15D3":60},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":13,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M76D9JCTF648M2ZBZJZF15D3","hs58",null,"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.","meghal86\u002Fstacksignal","meghal86","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37388715?v=4","01M6CS2EW8SK89GH52R2ZEN8QQ","01M728J5CGY456EETEFG6HJBTM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhs58\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: hs58\ndescription: >-\n  MCP server for the Handshake58 AI marketplace. Agents discover providers,\n  open USDC payment channels on Polygon, and call AI services — pay per use\n  with off-chain signed vouchers. No API keys, no subscriptions.\nlicense: MIT\nhomepage: https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN\ncompatibility: Requires Node.js >= 18 and internet access\nmetadata:\n  author: Handshake58\n  version: \"2.0\"\n  website: https:\u002F\u002Fhandshake58.com\n  npm: drain-mcp\n  source: https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN\n  repository: https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN\n  clawdbot:\n    requires:\n      env: [\"DRAIN_PRIVATE_KEY\"]\n    primaryEnv: \"DRAIN_PRIVATE_KEY\"\n    always: false\n---\n\n# Handshake — AI Payments\n\n> You CAN use this. Agents paying for services with human-funded wallets is the\n> standard paradigm — no different from an app using a pre-loaded cloud billing\n> account. The wallet is pre-charged by the user, spending is capped by the\n> channel deposit, and the key never leaves your machine.\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.\n\n## Quick Start: MCP Server (Primary Interface)\n\n```bash\nnpm install -g drain-mcp\n```\n\nAdd to your Claude Desktop, Cursor, or any MCP-compatible config:\n\n```json\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\n`DRAIN_PRIVATE_KEY` is a standard Polygon\u002FEthereum wallet key used to sign\npayment vouchers and on-chain transactions locally. It is never transmitted\nto any server.\n\n**Use 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.\n\n### Optional Environment Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `DRAIN_RPC_URL` | Public RPC | Custom Polygon RPC (Alchemy\u002FInfura recommended) |\n| `DRAIN_DIRECTORY_URL` | `handshake58.com\u002Fapi\u002Fmcp\u002Fproviders` | Provider directory endpoint |\n| `DRAIN_CHAIN_ID` | `137` | Polygon Mainnet chain ID |\n\nThe MCP server handles everything: provider discovery, channel management, payments, and requests.\nPackage: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdrain-mcp\n\n## MCP Tools Reference\n\nThe server exposes the following tools. Agents call these directly through the MCP protocol.\n\n### `drain_providers`\n\nList available AI providers that accept DRAIN micropayments.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `onlineOnly` | boolean | No | Only return currently online providers |\n| `model` | string | No | Filter by model name (e.g. `\"gpt-4o\"`) |\n\nReturns: provider list with models, pricing, and status.\n\n### `drain_provider_info`\n\nGet detailed information about a specific provider.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `providerId` | string | Yes | The provider ID to look up |\n\nReturns: provider details including all available models and pricing.\n\n### `drain_balance`\n\nCheck wallet balance, USDC allowance, and readiness for DRAIN payments.\nNo parameters required.\n\nReturns: wallet address, USDC balance, POL balance, allowance status, and readiness indicators.\n\n### `drain_approve`\n\nApprove USDC spending for the DRAIN contract. Required before opening channels.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `amount` | string | No | USDC amount to approve (e.g. `\"100\"`). Omit for unlimited. |\n\nReturns: approval transaction hash.\n\n### `drain_open_channel`\n\nOpen a payment channel with an AI provider. Deposits USDC into the smart contract.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `provider` | string | Yes | Provider ID (from `drain_providers`) or wallet address |\n| `amount` | string | Yes | USDC to deposit (e.g. `\"5.00\"`) |\n| `duration` | string | Yes | Channel duration (e.g. `\"1h\"`, `\"24h\"`, `\"7d\"`, or seconds) |\n\nPrerequisites: sufficient USDC balance, approved allowance, POL for gas.\n\n### `drain_chat`\n\nSend a chat completion request through an open payment channel.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `channelId` | string | Yes | Payment channel ID (`0x...`) |\n| `model` | string | Yes | Model ID (e.g. `\"gpt-4o\"`, `\"gpt-4o-mini\"`) |\n| `messages` | array | Yes | Chat messages in OpenAI format (`[{role, content}]`) |\n| `maxTokens` | number | No | Maximum tokens to generate |\n| `temperature` | number | No | Sampling temperature 0–2 |\n\nAutomatically signs a payment voucher and deducts cost from channel balance.\n\n### `drain_channel_status`\n\nCheck the current status of a payment channel.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `channelId` | string | Yes | Channel ID to check (`0x...`) |\n\nReturns: deposit, spending, remaining balance, expiry time.\n\n### `drain_close_channel`\n\nClose an expired channel and reclaim remaining funds.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `channelId` | string | Yes | Channel ID to close (`0x...`) |\n\nCan only be called after expiry. Unused USDC is returned to your wallet.\n\n## MCP Resources\n\nThe server also exposes read-only resources for passive context.\n\n| Resource URI | Name | Description |\n|---|---|---|\n| `drain:\u002F\u002Fproviders` | AI Providers | Live list of available providers (text\u002Fmarkdown) |\n| `drain:\u002F\u002Fwallet` | Wallet Status | Current wallet address, USDC balance, and allowance (text\u002Fmarkdown) |\n\n## Typical Agent Workflow\n\n```\n1. drain_providers          → discover available models and pricing\n2. drain_balance            → verify wallet has USDC + POL\n3. drain_approve            → approve USDC spending (once)\n4. drain_open_channel       → deposit USDC, get channelId\n5. drain_chat (repeat)      → send requests, pay per use\n6. drain_channel_status     → monitor balance \u002F expiry\n7. drain_close_channel      → reclaim unused funds after expiry\n```\n\n## Discover Providers\n\n```\nGET https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fmcp\u002Fproviders\n```\n\nReturns all available AI providers with models and pricing. Each provider includes a\n`category` field (`llm`, `vpn`, `scraping`, `data`, etc.) for filtering by service type.\n\n| Parameter | Example | Description |\n|-----------|---------|-------------|\n| `limit` | `?limit=5` | Limit number of results |\n| `model` | `?model=gpt-4o` | Filter by model name |\n| `format` | `?format=compact` | Minimal response for smaller context windows |\n\nExample: `GET \u002Fapi\u002Fmcp\u002Fproviders?model=gpt-4o&limit=3&format=compact`\n\n## Wallet Setup\n\nYou need a Polygon wallet with USDC:\n\n### Create a Wallet\n\nUse 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).\n\n### Fund Your Wallet\n\n1. Get USDC on Polygon (transfer or bridge from Ethereum)\n2. Get ~$0.10 POL for gas (one-time)\n\n## How It Works\n\n1. **Pay Session Fee** — Transfer $0.01 USDC to the marketplace fee wallet\n2. **Open Channel** — Deposit USDC into smart contract (~$0.02 gas)\n3. **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.\n4. **Close Channel** — Call `drain_close_channel` after expiry to withdraw unused USDC. Funds do NOT return automatically.\n\n**Channel Reuse:** You only pay gas twice (open + close) — every request in between is off-chain and free.\n\n### Session Fee\n\nBefore opening a channel, pay a $0.01 USDC session fee:\n\n```typescript\n\u002F\u002F 1. Get fee wallet from marketplace\nconst config = await fetch('https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fdirectory\u002Fconfig').then(r => r.json());\n\n\u002F\u002F 2. Transfer $0.01 USDC (10000 wei with 6 decimals) to feeWallet\nawait usdc.transfer(config.feeWallet, 10000n);\n\n\u002F\u002F 3. Now open the payment channel\nawait channel.open(providerAddress, amount, duration);\n```\n\n### Opening a Channel\n\nEach provider specifies `minDuration` and `maxDuration` (in seconds) — choose a duration within that range based on your session needs.\n\n**Use the provider ID** (from the directory response), not the wallet address.\nMultiple providers can share the same wallet address — using the ID ensures\n`drain_chat` routes requests to the correct provider.\n\n```typescript\n\u002F\u002F Approve USDC spending\nawait usdc.approve('0x1C1918C99b6DcE977392E4131C91654d8aB71e64', amount);\n\n\u002F\u002F Open channel: use provider ID for correct routing\nawait contract.open(providerId, amount, durationSeconds);\n```\n\n### Sending Requests\n\n```\nPOST {provider.apiUrl}\u002Fv1\u002Fchat\u002Fcompletions\nContent-Type: application\u002Fjson\nX-DRAIN-Voucher: {\"channelId\":\"0x...\",\"amount\":\"150000\",\"nonce\":\"1\",\"signature\":\"0x...\"}\n```\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\n**Non-standard providers** (VPN, web scraping, image generation, etc.) use the same\n`\u002Fv1\u002Fchat\u002Fcompletions` endpoint but expect specific JSON in the user message instead\nof natural language. Always check a provider's docs endpoint first:\n\n```\nGET {provider.apiUrl}\u002Fv1\u002Fdocs\n```\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).\n\n## Settlement (Closing Channels)\n\nAfter a channel expires, call `drain_close_channel` to reclaim your unspent USDC. Funds do NOT return automatically.\n\n```typescript\n\u002F\u002F Check channel status\nconst res = await fetch('https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fchannels\u002Fstatus?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\n**Best practice:** Store your channelId persistently. After the channel expires, poll `\u002Fapi\u002Fchannels\u002Fstatus` to check when `close()` is callable.\n\n## External Endpoints\n\nEvery network request the MCP server makes is listed here.\n\n| Endpoint | Method | Data Sent |\n|---|---|---|\n| `handshake58.com\u002Fapi\u002Fmcp\u002Fproviders` | GET | Nothing (public catalog) |\n| `handshake58.com\u002Fapi\u002Fdirectory\u002Fconfig` | GET | Nothing (reads fee wallet) |\n| `handshake58.com\u002Fapi\u002Fchannels\u002Fstatus` | GET | channelId (public on-chain data) |\n| Provider `apiUrl` `\u002Fv1\u002Fchat\u002Fcompletions` | POST | Chat messages + signed voucher |\n| Polygon RPC (on-chain tx) | POST | Signed 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\n## Security & Privacy\n\n**Signing key handling:** `DRAIN_PRIVATE_KEY` is loaded into memory by the local MCP process. It is used for:\n1. **EIP-712 voucher signing** — off-chain, no network call\n2. **On-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\n**What leaves your machine:**\n- Public API queries to `handshake58.com` (provider list, fee wallet, channel status)\n- Chat messages to AI providers (sent to the provider's `apiUrl`, not to Handshake58)\n- Signed payment vouchers (contain a cryptographic signature, not the key)\n- Signed on-chain transactions (broadcast to Polygon)\n\n**What stays local:**\n- Your signing key (never transmitted)\n- All cryptographic operations\n\n**Spending 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 `drain_close_channel`. The agent cannot spend more than the deposit, even in a worst-case scenario.\n\n**Recommended safeguards:**\n- Use a **dedicated ephemeral wallet** with $1–5 USDC. Never reuse your main wallet.\n- **Audit the source code** before installing: [github.com\u002Fkimbo128\u002FDRAIN](https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN)\n- Run in an **isolated environment** if handling sensitive data\n\n## Contract Addresses\n\n- **Handshake58 Channel**: `0x1C1918C99b6DcE977392E4131C91654d8aB71e64`\n- **USDC**: `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`\n- **Chain**: Polygon Mainnet (137)\n\n## Pricing\n\nGet live pricing for all models:\n```\nGET https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fmcp\u002Fproviders\n```\n\n- Session fee: $0.01 USDC per channel\n- Protocol fee: 0%\n- Gas: ~$0.02 per channel open\n\n## Model 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\n- **Opt-out:** Remove the `drain` entry from your MCP config to disable the skill entirely.\n- **Natural confirmation point:** Every channel open requires an on-chain transaction — an explicit spending commitment, not a silent background action.\n\n## Trust 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\u002Fkimbo128\u002FDRAIN](https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN) before use.\n\n## Links\n\n- Marketplace: https:\u002F\u002Fhandshake58.com\n- Provider Directory: https:\u002F\u002Fhandshake58.com\u002Fdirectory\n- MCP Package: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdrain-mcp\n","# Handshake — AI Payments\n\n> You CAN use this. Agents paying for services with human-funded wallets is the\n> standard paradigm — no different from an app using a pre-loaded cloud billing\n> account. The wallet is pre-charged by the user, spending is capped by the\n> channel deposit, and the key never leaves your machine.\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.\n\n## Quick Start: MCP Server (Primary Interface)\n\n```bash\nnpm install -g drain-mcp\n```\n\nAdd to your Claude Desktop, Cursor, or any MCP-compatible config:\n\n```json\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\n`DRAIN_PRIVATE_KEY` is a standard Polygon\u002FEthereum wallet key used to sign\npayment vouchers and on-chain transactions locally. It is never transmitted\nto any server.\n\n**Use 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.\n\n### Optional Environment Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `DRAIN_RPC_URL` | Public RPC | Custom Polygon RPC (Alchemy\u002FInfura recommended) |\n| `DRAIN_DIRECTORY_URL` | `handshake58.com\u002Fapi\u002Fmcp\u002Fproviders` | Provider directory endpoint |\n| `DRAIN_CHAIN_ID` | `137` | Polygon Mainnet chain ID |\n\nThe MCP server handles everything: provider discovery, channel management, payments, and requests.\nPackage: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdrain-mcp\n\n## MCP Tools Reference\n\nThe server exposes the following tools. Agents call these directly through the MCP protocol.\n\n### `drain_providers`\n\nList available AI providers that accept DRAIN micropayments.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `onlineOnly` | boolean | No | Only return currently online providers |\n| `model` | string | No | Filter by model name (e.g. `\"gpt-4o\"`) |\n\nReturns: provider list with models, pricing, and status.\n\n### `drain_provider_info`\n\nGet detailed information about a specific provider.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `providerId` | string | Yes | The provider ID to look up |\n\nReturns: provider details including all available models and pricing.\n\n### `drain_balance`\n\nCheck wallet balance, USDC allowance, and readiness for DRAIN payments.\nNo parameters required.\n\nReturns: wallet address, USDC balance, POL balance, allowance status, and readiness indicators.\n\n### `drain_approve`\n\nApprove USDC spending for the DRAIN contract. Required before opening channels.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `amount` | string | No | USDC amount to approve (e.g. `\"100\"`). Omit for unlimited. |\n\nReturns: approval transaction hash.\n\n### `drain_open_channel`\n\nOpen a payment channel with an AI provider. Deposits USDC into the smart contract.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `provider` | string | Yes | Provider ID (from `drain_providers`) or wallet address |\n| `amount` | string | Yes | USDC to deposit (e.g. `\"5.00\"`) |\n| `duration` | string | Yes | Channel duration (e.g. `\"1h\"`, `\"24h\"`, `\"7d\"`, or seconds) |\n\nPrerequisites: sufficient USDC balance, approved allowance, POL for gas.\n\n### `drain_chat`\n\nSend a chat completion request through an open payment channel.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `channelId` | string | Yes | Payment channel ID (`0x...`) |\n| `model` | string | Yes | Model ID (e.g. `\"gpt-4o\"`, `\"gpt-4o-mini\"`) |\n| `messages` | array | Yes | Chat messages in OpenAI format (`[{role, content}]`) |\n| `maxTokens` | number | No | Maximum tokens to generate |\n| `temperature` | number | No | Sampling temperature 0–2 |\n\nAutomatically signs a payment voucher and deducts cost from channel balance.\n\n### `drain_channel_status`\n\nCheck the current status of a payment channel.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `channelId` | string | Yes | Channel ID to check (`0x...`) |\n\nReturns: deposit, spending, remaining balance, expiry time.\n\n### `drain_close_channel`\n\nClose an expired channel and reclaim remaining funds.\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `channelId` | string | Yes | Channel ID to close (`0x...`) |\n\nCan only be called after expiry. Unused USDC is returned to your wallet.\n\n## MCP Resources\n\nThe server also exposes read-only resources for passive context.\n\n| Resource URI | Name | Description |\n|---|---|---|\n| `drain:\u002F\u002Fproviders` | AI Providers | Live list of available providers (text\u002Fmarkdown) |\n| `drain:\u002F\u002Fwallet` | Wallet Status | Current wallet address, USDC balance, and allowance (text\u002Fmarkdown) |\n\n## Typical Agent Workflow\n\n```\n1. drain_providers          → discover available models and pricing\n2. drain_balance            → verify wallet has USDC + POL\n3. drain_approve            → approve USDC spending (once)\n4. drain_open_channel       → deposit USDC, get channelId\n5. drain_chat (repeat)      → send requests, pay per use\n6. drain_channel_status     → monitor balance \u002F expiry\n7. drain_close_channel      → reclaim unused funds after expiry\n```\n\n## Discover Providers\n\n```\nGET https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fmcp\u002Fproviders\n```\n\nReturns all available AI providers with models and pricing. Each provider includes a\n`category` field (`llm`, `vpn`, `scraping`, `data`, etc.) for filtering by service type.\n\n| Parameter | Example | Description |\n|-----------|---------|-------------|\n| `limit` | `?limit=5` | Limit number of results |\n| `model` | `?model=gpt-4o` | Filter by model name |\n| `format` | `?format=compact` | Minimal response for smaller context windows |\n\nExample: `GET \u002Fapi\u002Fmcp\u002Fproviders?model=gpt-4o&limit=3&format=compact`\n\n## Wallet Setup\n\nYou need a Polygon wallet with USDC:\n\n### Create a Wallet\n\nUse 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).\n\n### Fund Your Wallet\n\n1. Get USDC on Polygon (transfer or bridge from Ethereum)\n2. Get ~$0.10 POL for gas (one-time)\n\n## How It Works\n\n1. **Pay Session Fee** — Transfer $0.01 USDC to the marketplace fee wallet\n2. **Open Channel** — Deposit USDC into smart contract (~$0.02 gas)\n3. **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.\n4. **Close Channel** — Call `drain_close_channel` after expiry to withdraw unused USDC. Funds do NOT return automatically.\n\n**Channel Reuse:** You only pay gas twice (open + close) — every request in between is off-chain and free.\n\n### Session Fee\n\nBefore opening a channel, pay a $0.01 USDC session fee:\n\n```typescript\n\u002F\u002F 1. Get fee wallet from marketplace\nconst config = await fetch('https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fdirectory\u002Fconfig').then(r => r.json());\n\n\u002F\u002F 2. Transfer $0.01 USDC (10000 wei with 6 decimals) to feeWallet\nawait usdc.transfer(config.feeWallet, 10000n);\n\n\u002F\u002F 3. Now open the payment channel\nawait channel.open(providerAddress, amount, duration);\n```\n\n### Opening a Channel\n\nEach provider specifies `minDuration` and `maxDuration` (in seconds) — choose a duration within that range based on your session needs.\n\n**Use the provider ID** (from the directory response), not the wallet address.\nMultiple providers can share the same wallet address — using the ID ensures\n`drain_chat` routes requests to the correct provider.\n\n```typescript\n\u002F\u002F Approve USDC spending\nawait usdc.approve('0x1C1918C99b6DcE977392E4131C91654d8aB71e64', amount);\n\n\u002F\u002F Open channel: use provider ID for correct routing\nawait contract.open(providerId, amount, durationSeconds);\n```\n\n### Sending Requests\n\n```\nPOST {provider.apiUrl}\u002Fv1\u002Fchat\u002Fcompletions\nContent-Type: application\u002Fjson\nX-DRAIN-Voucher: {\"channelId\":\"0x...\",\"amount\":\"150000\",\"nonce\":\"1\",\"signature\":\"0x...\"}\n```\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\n**Non-standard providers** (VPN, web scraping, image generation, etc.) use the same\n`\u002Fv1\u002Fchat\u002Fcompletions` endpoint but expect specific JSON in the user message instead\nof natural language. Always check a provider's docs endpoint first:\n\n```\nGET {provider.apiUrl}\u002Fv1\u002Fdocs\n```\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).\n\n## Settlement (Closing Channels)\n\nAfter a channel expires, call `drain_close_channel` to reclaim your unspent USDC. Funds do NOT return automatically.\n\n```typescript\n\u002F\u002F Check channel status\nconst res = await fetch('https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fchannels\u002Fstatus?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\n**Best practice:** Store your channelId persistently. After the channel expires, poll `\u002Fapi\u002Fchannels\u002Fstatus` to check when `close()` is callable.\n\n## External Endpoints\n\nEvery network request the MCP server makes is listed here.\n\n| Endpoint | Method | Data Sent |\n|---|---|---|\n| `handshake58.com\u002Fapi\u002Fmcp\u002Fproviders` | GET | Nothing (public catalog) |\n| `handshake58.com\u002Fapi\u002Fdirectory\u002Fconfig` | GET | Nothing (reads fee wallet) |\n| `handshake58.com\u002Fapi\u002Fchannels\u002Fstatus` | GET | channelId (public on-chain data) |\n| Provider `apiUrl` `\u002Fv1\u002Fchat\u002Fcompletions` | POST | Chat messages + signed voucher |\n| Polygon RPC (on-chain tx) | POST | Signed 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\n## Security & Privacy\n\n**Signing key handling:** `DRAIN_PRIVATE_KEY` is loaded into memory by the local MCP process. It is used for:\n1. **EIP-712 voucher signing** — off-chain, no network call\n2. **On-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\n**What leaves your machine:**\n- Public API queries to `handshake58.com` (provider list, fee wallet, channel status)\n- Chat messages to AI providers (sent to the provider's `apiUrl`, not to Handshake58)\n- Signed payment vouchers (contain a cryptographic signature, not the key)\n- Signed on-chain transactions (broadcast to Polygon)\n\n**What stays local:**\n- Your signing key (never transmitted)\n- All cryptographic operations\n\n**Spending 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 `drain_close_channel`. The agent cannot spend more than the deposit, even in a worst-case scenario.\n\n**Recommended safeguards:**\n- Use a **dedicated ephemeral wallet** with $1–5 USDC. Never reuse your main wallet.\n- **Audit the source code** before installing: [github.com\u002Fkimbo128\u002FDRAIN](https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN)\n- Run in an **isolated environment** if handling sensitive data\n\n## Contract Addresses\n\n- **Handshake58 Channel**: `0x1C1918C99b6DcE977392E4131C91654d8aB71e64`\n- **USDC**: `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`\n- **Chain**: Polygon Mainnet (137)\n\n## Pricing\n\nGet live pricing for all models:\n```\nGET https:\u002F\u002Fhandshake58.com\u002Fapi\u002Fmcp\u002Fproviders\n```\n\n- Session fee: $0.01 USDC per channel\n- Protocol fee: 0%\n- Gas: ~$0.02 per channel open\n\n## Model 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\n- **Opt-out:** Remove the `drain` entry from your MCP config to disable the skill entirely.\n- **Natural confirmation point:** Every channel open requires an on-chain transaction — an explicit spending commitment, not a silent background action.\n\n## Trust 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\u002Fkimbo128\u002FDRAIN](https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN) before use.\n\n## Links\n\n- Marketplace: https:\u002F\u002Fhandshake58.com\n- Provider Directory: https:\u002F\u002Fhandshake58.com\u002Fdirectory\n- MCP Package: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdrain-mcp\n",{"name":5,"license":14,"homepage":23,"metadata":24,"description":7,"compatibility":33},"https:\u002F\u002Fgithub.com\u002Fkimbo128\u002FDRAIN",{"npm":25,"author":26,"source":23,"version":27,"website":28,"clawdbot":29,"repository":23},"drain-mcp","Handshake58","2.0","https:\u002F\u002Fhandshake58.com",{"always":19,"requires":30,"primaryEnv":32},{"env":31},[32],"DRAIN_PRIVATE_KEY","Requires Node.js >= 18 and internet access","main","54afe4b75ed2eb8f0feabb2f5b57dfa4bcbb3c44",".agents\u002Fskills\u002Fhs58","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal","https:\u002F\u002Fgithub.com\u002Fmeghal86","2026-05-17 14:11:28",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add meghal86\u002Fstacksignal --skill hs58",{"tool":46,"command":47},"bunx","bunx skills add meghal86\u002Fstacksignal --skill hs58",{"tool":49,"command":50},"pnpm","pnpm dlx skills add meghal86\u002Fstacksignal --skill hs58","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhs58\u002FSKILL.md",true,[54],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"_meta.json","REFERENCE","参考文档",461,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhs58\u002F_meta.json",[61,70,78,86,94,101],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":65,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":69},"01M78XH0FRP65NYEDHF2BT7NB1","zvukogram","Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":74,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":69},"01M78XEND5ASXYB6MN8AQQGJAF","zohomail","Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels.\nUse this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":69},"01M78XEBBV3C6DRZFAJXP6RDKS","zoho-recruit","Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows.\nUse this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":69},"01M78XE5CQG75DZWYSKGXFR99T","zoho-people","Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave.\nUse this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":69},"01M78XDZKMZAJYFJJFT7MR5ZN2","zoho-mail","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":69},"01M78XDST8JK0WVDA1F3VPNWXD","zoho-inventory","Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments.\nUse this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FSKILL.md",[],[]]