Drain MCP logo

Drain MCP

Pay for AI inference through Handshake58 using USDC micropayments on Polygon, without API keys.

Install Drain MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "drain-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "drain-mcp"
      ],
      "env": {
        "DRAIN_PRIVATE_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The drain-mcp MCP server connects AI agents to AI inference providers discovered through Handshake58. It uses a Polygon wallet and USDC payment channels, sending signed off-chain vouchers for requests while opening and closing channels on-chain. Reach for it when an agent needs programmatic, pay-per-use inference without provider API keys.

Use cases

  • Discover AI inference providers from Handshake58
  • Pay for agent inference with USDC
  • Run MCP-based inference without API keys
  • Stream cumulative micropayment vouchers across requests

Key features

  • Handshake58 provider discovery
  • USDC payments on Polygon
  • Signed off-chain payment vouchers
  • On-chain payment channels
  • Automatic provider discovery

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

7/7 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 13d ago via OSV.dev · drain-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads192Package downloads in the last 30 days.
Last commit7mo agoMost recent push to the default branch.

How Drain MCP works

What drain-mcp MCP server does

drain-mcp MCP server lets an AI agent discover compatible inference providers and pay for their services with USDC on Polygon. Provider discovery comes from Handshake58, the official DRAIN marketplace and provider directory. The payment model is based on prepaid channels: the consumer deposits USDC for a provider, uses the balance across requests, and later closes the channel to recover unused funds.

The server is intended for agents that need to use paid AI services programmatically. It does not require provider API keys; authentication and payment use cryptographic wallet signatures and signed vouchers instead.

How it works

The consumer supplies a Polygon wallet private key through configuration. To begin using a provider, DRAIN opens a payment channel and locks the chosen USDC amount in the DRAIN contract. Requests then travel off-chain with cumulative signed vouchers. Each voucher records the total amount spent so far rather than only the latest request charge.

The provider can validate the voucher, return an inference response, and later submit the highest voucher to claim the accumulated payment. When the consumer is finished, closing the channel settles the remainder and returns unused USDC. Opening and closing require blockchain transactions; ordinary requests use the off-chain voucher flow.

DRAIN uses USDC on Polygon. The README identifies the protocol with ERC-8190, which specifies payment channels using EIP-712 signed vouchers. The channel is associated with a particular provider and a duration selected by the consumer.

Setup and configuration

Install the package globally with npm:

Terminal
npm install -g drain-mcp

Configure the command as an MCP server in a compatible client. The documented configuration uses the drain-mcp executable and the DRAIN_PRIVATE_KEY environment variable:

config.json
{
  "mcpServers": {
    "drain": {
      "command": "drain-mcp",
      "env": {
        "DRAIN_PRIVATE_KEY": "your-polygon-wallet-key"
      }
    }
  }
}

The supplied key must correspond to a Polygon wallet used for payments. After installation, the server automatically discovers providers from Handshake58.

Tools and capabilities

The documented capabilities include:

  • Discovering AI inference providers through Handshake58.
  • Sending requests to compatible providers with paid, signed vouchers.
  • Using USDC micropayments on Polygon instead of provider API keys.
  • Opening payment channels and depositing funds.
  • Closing channels and withdrawing unused funds.
  • Supporting provider settlement through cumulative voucher claims.

The marketplace exposes agent-oriented resources, including a provider discovery API at https://www.handshake58.com/api/mcp/providers and an agent quick-start page at /for-agents.

Limitations and notes

The drain-mcp MCP server requires USDC on Polygon and a funded wallet. Blockchain operations are not free: the README estimates roughly $0.02 per transaction, with actual costs varying. Opening and closing also involve transaction confirmation time.

Channel funds are not returned automatically when a channel expires. The consumer must actively close the channel, and a provider may claim a valid voucher before that happens. Providers can also require or recommend a minimum channel duration.

The available provider set depends on Handshake58 and provider compatibility. Treat the private key as sensitive wallet material and avoid exposing it in client logs or shared configuration.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Drain MCP

drain-mcp is an MCP server that connects AI agents to inference providers discovered through Handshake58. Its main capabilities are provider discovery and sending paid inference requests using USDC on Polygon, with payment channels and signed off-chain vouchers instead of provider API keys.

Install it globally with `npm install -g drain-mcp`. Then add the `drain-mcp` command to your MCP client configuration and provide a Polygon wallet private key through `DRAIN_PRIVATE_KEY`.

Add `drain-mcp` as an MCP server command in Cursor and set `DRAIN_PRIVATE_KEY` to the key for the Polygon wallet used to pay for inference.

drain-mcp uses USDC on Polygon. The consumer deposits USDC into a payment channel, sends requests with signed cumulative vouchers, and closes the channel to recover unused funds.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDrain MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/drain-mcp?style=directory)](https://allmcps.com/mcp/drain-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/drain-mcp"><img src="https://allmcps.com/api/badge/drain-mcp?style=directory" alt="Drain MCP on AllMCPs" /></a>