drain-mcp: Payments for AI Agents for Openclaw

A decentralized MCP server that allows AI agents to pay for diverse services using USDC micropayments on the Polygon network without API keys or subscriptions.

kimbo128
v4.0.2
Mar 2, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install hs58

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install hs58 using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is drain-mcp: Payments for AI Agents?

The drain-mcp skill is a specialized MCP server designed to solve the complexity of managing multiple API keys and subscriptions for AI services. By utilizing the DRAIN payment protocol, this skill enables agents within the ecosystem of Openclaw Skills to discover providers and open secure payment channels. This approach replaces traditional credit card billing with a non-custodial wallet system where the private key never leaves your local environment, ensuring both security and privacy.

Built for developers who value autonomy and cost-efficiency, this tool allows for pay-per-use access to high-performance LLMs, image generators, and web scraping tools. By integrating this into your Openclaw Skills setup, you empower your agents to handle their own service procurement through smart-contract enforced payment channels on the Polygon Mainnet, featuring extremely low transaction costs.

drain-mcp: Payments for AI Agents Use Cases

  • Managing AI agent expenses without sharing credit card details or maintaining multiple platform balances.
  • Accessing premium AI models and specialized tools like VPNs or web scrapers on a purely transactional basis.
  • Automating resource procurement for agents that need to scale usage across different service providers dynamically.
  • Streamlining the developer experience by using a single local wallet instead of dozens of provider-specific API keys within Openclaw Skills workflows.

How drain-mcp: Payments for AI Agents Works

  1. The agent searches the directory for a provider that matches the required service category using the integrated Openclaw Skills discovery tool.
  2. A payment channel is initialized by depositing a small amount of USDC (e.g., $1.00) into a secure smart contract on the Polygon network.
  3. For each request, the agent generates an off-chain payment voucher signed locally, which costs zero gas and is sent directly to the provider.
  4. The provider verifies the voucher and delivers the requested service (chat completion, data scrap, etc.) immediately.
  5. Upon completion of the task, the agent can cooperatively close the channel to reclaim any unspent USDC balance instantly.

drain-mcp: Payments for AI Agents Setup

To begin using this skill within your Openclaw Skills environment, first install the package:

npm install -g drain-mcp

Next, generate a secure, local wallet. Ensure you store the private key safely as it is required for signing transactions locally:

node -e "const w=require('ethers').Wallet.createRandom();console.log('Address:', w.address, '\\nKey:', w.privateKey)"

Fund your new address with at least $1 USDC on the Polygon Mainnet. Finally, configure your MCP client by adding the DRAIN_PRIVATE_KEY to your environment variables to activate the full range of Openclaw Skills payment features.

drain-mcp: Payments for AI Agents Data Schema & Taxonomy

Component Description
channelId A unique identifier for the on-chain payment channel session
DRAIN_PRIVATE_KEY The locally stored Polygon wallet key used for signing vouchers
Provider Metadata Includes category, pricing per request, and the specific API endpoint
Payment Voucher An EIP-712 compliant cryptographic signature authorizing a specific USDC amount

drain-mcp: Payments for AI Agents Advanced Features

  • Off-chain voucher signing to eliminate gas fees for individual service requests.
  • Support for a wide array of categories including audio transcription, multi-modal analysis, and proxy services.
  • Automatic gas station integration providing free gas for wallets holding a minimum USDC balance.
  • Cooperative closing functionality to ensure immediate liquidity and refund of unused deposits within Openclaw Skills sessions.

SKILL.md


Loading

Related Openclaw Skills

Featured*