ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Drain MCP

โดย kimbo128รุ่น 0.1.3i★ –iรันบนเครื่อง
ชื่อใน registryio.github.kimbo128/drain-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Pay for AI inference with USDC micropayments on Polygon. No API keys needed.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: อื่น ๆ
  • ต้องใส่ค่าเหล่านี้: DRAIN_PRIVATE_KEY

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "drain": {
      "command": "npx",
      "args": [
        "-y",
        "drain-mcp"
      ],
      "env": {
        "DRAIN_PRIVATE_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add drain --env DRAIN_PRIVATE_KEY='ใส่ค่าของคุณ' -- npx -y drain-mcp

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "drain": {
      "command": "npx",
      "args": [
        "-y",
        "drain-mcp"
      ],
      "env": {
        "DRAIN_PRIVATE_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "drain": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "drain-mcp"
      ],
      "env": {
        "DRAIN_PRIVATE_KEY": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • DRAIN_PRIVATE_KEY ความลับ จำเป็น env
    Private key for the wallet used for USDC micropayments on Polygon

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub kimbo128 ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 0% ของอีก 32715 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 2% ของอีก 32715 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 32715 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Drain MCP ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: DRAIN_PRIVATE_KEY

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.3) เข้า registry 9 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Spec Driven Development, Remote Desktop Commander, First Sale Scout

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Spec Driven Development

โดย formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

รันบนเครื่อง★ 440MITอัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

Remote Desktop Commander

โดย desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

รันบนคลาวด์★ 211อัปเดต เมื่อวานซืน
ติดตั้ง

First Sale Scout

โดย firstsale.pro

Playbooks and a 14-day checklist for founders winning their first paying customers.

รันบนคลาวด์อัปเดต วันนี้
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

DRAIN MCP Server

Payments for AI Agents — No API keys, no credit cards, no subscriptions.

MCP server for the Handshake58 AI Marketplace. Agents discover service providers, pay automatically, and call any service — LLM inference, web scraping, image generation, search, and more.

Supports two payment protocols:

  • DRAIN — Payment channels on Polygon. Open once, send many requests, close when done.
  • MPP — Per-request payments via Tempo. Each request is paid individually. No channel needed.
DRAINMPP
SetupOpen channel ($0.02 gas)None
Per request$0.0001–$0.01Varies by provider
Best forHigh-volume sessionsSingle requests, REST APIs
PaymentUSDC on PolygonUSDC on Tempo chain

When to Use

Use drain-mcp when you need to:

  • Call any service (LLM, search, scraping, image gen, etc.) without API keys
  • Pay per-request with USDC — no subscriptions, no credit cards
  • Access 30+ providers through one unified interface

Do NOT use drain-mcp when:

  • You already have API keys for the service you need
  • The task doesn't require external services

TL;DR - Minimum Viable Workflow

MPP Providers (per-request, no channel)
1. drain_providers(protocol: "mpp")  → Find MPP providers
  1. drain_provider_info(id) → Read docs (essential for REST APIs)
  2. mpp_chat(provider, messages) → LLM providers (auto-pay via Tempo) — OR — mpp_request(url, body) → REST API providers (auto-pay via Tempo)
  3. drain_feedback(providerId, outcome) → Optional: report success/failure
DRAIN Providers (payment channels)
1. drain_providers(protocol: "drain") → Find DRAIN providers
  1. drain_provider_info(id) → Get provider details + usage docs
  2. drain_balance() → Check USDC + POL
  3. drain_approve() → Approve USDC spending (once)
  4. drain_open_channel(...) → Deposit USDC, get channelId
  5. drain_chat(...) → Send requests (repeat as needed)
  6. drain_cooperative_close(...) → Close early, instant refund (when done) — OR after expiry —
  7. drain_close_channel(...) → Reclaim funds (after expiry)

When to Close a Channel

  • Done with your task? → Use drain_cooperative_close(channelId). Instant refund of unspent deposit. Always do this when finished.
  • Planning more requests soon? → Keep the channel open. No need to close and reopen — saves $0.04 in gas fees.
  • Channel expired? → Use drain_close_channel(channelId). Reclaims unspent USDC after the expiry timestamp. Funds do NOT return automatically.

Rule of thumb: Close when the task is done. Keep open while working.


Already Hit a 402?

MPP providers: drain-mcp handles 402 automatically via mppx/Tempo. Just use mpp_chat or mpp_request — payment is resolved transparently.

DRAIN providers return 402 Payment Required with headers when no payment voucher is sent:

HeaderValue
X-Payment-Protocoldrain-v2
X-Payment-ProviderProvider wallet address (open channel to this)
X-Payment-ContractDRAIN contract address
X-Payment-Chain137 (Polygon Mainnet)
X-Payment-SigningURL for EIP-712 signing parameters
X-Payment-DocsProvider docs endpoint

DRAIN Flow:

  1. Call a provider endpoint (no voucher) → get 402 with headers
  2. Install drain-mcp or use the signing API at the X-Payment-Signing URL
  3. Open a channel to the X-Payment-Provider address
  4. Retry the request with an X-DRAIN-Voucher header

Everything you need is in the 402 response. No prior registration required.


Tools Reference

Discovery
drain_providers

Find service providers. Filter by model name, category, or online status.

{

"model": "gpt-4o", "category": "scraping", "onlineOnly": true }

Categories: llm, image, audio, code, scraping, vpn, multi-modal, other

drain_provider_info

Get details about a provider including usage instructions (docs). The docs explain how to format requests for that provider.

{ "provider": "hs58-openai" }
Wallet
drain_balance

Check wallet USDC balance, POL for gas, and DRAIN contract allowance.

drain_approve

Approve USDC spending for the DRAIN contract. Required once before opening channels.

{ "amount": "100" }
Channels
drain_open_channel

Open a payment channel. Locks USDC for the specified duration.

{

"provider": "hs58-openai", "amount": "5.00", "duration": "24h" }

Returns channelId, expiry time, and provider usage docs.

drain_channel_status

Check a channel's deposit, spending, remaining balance, and expiry.

drain_channels

List all known channels with status (active/expired/closed). Find expired channels that need closing.

Usage (DRAIN)
drain_chat

Send a paid request through a DRAIN channel. Works for ALL DRAIN provider types:

  • LLM providers: Standard chat messages
  • Non-LLM providers: JSON payload in the user message content (check provider docs)
{

"channelId": "0x...", "model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}] }

Usage (MPP)
mpp_chat

Send a chat request to an MPP LLM provider. Payment is automatic via Tempo — no channel, no setup.

{

"provider": "provider-id-or-url", "messages": [{"role": "user", "content": "Hello"}], "model": "optional-model-id" }

mpp_request

Send a request to an MPP REST API service (Tavily, Brave, Wolfram, etc.). Payment is automatic via Tempo.

{

"url": "https://tavily.mpp.paywithlocus.com/tavily/search", "body": {"query": "AI agents", "max_results": 5} }

Read the provider's docs first (drain_provider_info) to find the correct endpoint paths and request format.

Quality Feedback
drain_feedback

Report success or failure after using any provider (DRAIN or MPP). Feeds the marketplace quality scoring system.

{

"providerId": "provider-id", "outcome": "success", "reason": "accurate_result" }

Settlement
drain_cooperative_close

Close a channel early with provider consent. Use this when your task is done — instant refund of unspent deposit. No need to wait for expiry.

{ "channelId": "0x..." }
drain_close_channel

Close an expired channel and reclaim unspent USDC. Use when the channel has passed its expiry timestamp.

{ "channelId": "0x..." }

Economics Example

Opening a GPT-4o channel:

Gas to open channel:     $0.02   (one-time)

Deposit: $0.50 (refundable remainder) Per request: ~$0.001755 Requests possible: ~285

Cost for 10 requests: $0.02 gas + $0.01755 usage = $0.04 Refund after close: $0.50 - $0.01755 = $0.48 Gas to close: $0.02

  • Protocol fee: 2% on provider claims (on-chain)
  • Session fee: none
  • Live pricing: GET https://handshake58.com/api/mcp/providers

Provider Categories

Providers are not limited to LLM chat. Each provider has a category field and a docs endpoint explaining how to format requests.

CategoryDescriptionMessage Format
llmLanguage models (GPT-4o, Claude, Grok, Gemini)Standard chat messages
imageImage generationJSON in user content (see docs)
audioAudio/TTS/STTJSON in user content (see docs)
codeCode generationStandard chat or JSON (see docs)
scrapingWeb scraping, data extractionJSON in user content (see docs)
vpnVPN servicesJSON in user content (see docs)
multi-modalMulti-modal modelsStandard chat messages
otherEverything elseAlways check docs

Rule: For any category other than `llm`, call `drain_provider_info` first to read the docs.


Decision Trees

Choosing a Protocol
What provider do I want?

├── MPP provider (protocol="mpp") │ ├── mppType="llm" → mpp_chat(provider, messages) │ └── mppType="rest" → mpp_request(url, body) │ └── Done. Payment was automatic. │ └── DRAIN provider (protocol="drain") └── See DRAIN flow below

Starting a DRAIN Session
Do I have an active channel?

├── YES → Use drain_chat() with existing channelId └── NO → ├── drain_balance() → Do I have USDC? │ ├── NO → Cannot proceed. Need USDC on Polygon. │ └── YES → │ ├── drain_providers() → Find provider │ │ ├── NO providers → Cannot proceed. │ │ └── Found provider → │ │ ├── drain_approve() → First time only │ │ └── drain_open_channel() → Get channelId │ │ └── drain_chat() → Send requests

Ending a DRAIN Session
Am I done with this task?

├── YES → drain_cooperative_close(channelId) → Instant refund └── NO → ├── More requests soon? → Keep channel open └── Channel expired? → drain_close_channel(channelId) → Reclaim funds

Choosing Amount and Duration
Use CaseAmountDuration
Quick test / single query$0.50 - $11h
Short task (few queries)$2 - $54h
Extended session$5 - $2024h
Long-running agent$20 - $1007d
Handling Errors
"Insufficient balance"

→ Need more USDC. Check drain_balance().

"Insufficient allowance" → Run drain_approve().

"Channel not found" → channelId is wrong or channel was closed. Open new channel.

"Channel expired" → For drain_chat: Open a new channel. → For drain_close_channel: Expected. Proceed with close.

"Insufficient channel balance" → Channel deposit used up. Open new channel with more funds.

"Provider offline" → Use drain_providers() to find alternative provider.


Setup

1. Install
npm install -g drain-mcp
2. Create a Wallet (locally)

Generate a key on your own machine — nothing is sent over the network:

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

Send $1–5 USDC on Polygon Mainnet to your wallet address. Use a dedicated low-value wallet — never your main wallet.

No POL needed — if your wallet holds $5+ USDC, free gas is provided:

curl -X POST https://handshake58.com/api/gas-station \

-H "Content-Type: application/json" \ -d '{"address": "0x_your_wallet_address"}'

Returns 0.1 POL (~10K transactions). Sends only your public address.

4. Configure MCP Client
{

"mcpServers": { "drain": { "command": "drain-mcp", "env": { "DRAIN_PRIVATE_KEY": "0x..." } } } }

Environment Variables
VariableRequiredDefaultDescription
DRAIN_PRIVATE_KEYYes—Polygon wallet private key (also used for MPP/Tempo)
DRAIN_CHAIN_IDNo137137 (Polygon) or 80002 (Amoy testnet)
DRAIN_RPC_URLNoPublic RPCCustom Polygon RPC endpoint
DRAIN_MPP_MAX_DEPOSITNo1Max USDC per MPP session deposit

Security & Privacy

Key Handling

DRAIN_PRIVATE_KEY is loaded into memory by the local MCP process. It is used for:

  1. EIP-712 voucher signing for DRAIN channels (off-chain, no network call)
  2. On-chain transaction signing (signed locally, only the signature is broadcast)
  3. Tempo payment signing for MPP requests (handled by mppx, signed locally)

The key is never transmitted to any server. Providers verify signatures against on-chain state.

Spending Limits

DRAIN: Exposure is capped by the smart contract:

  • Maximum spend = channel deposit (you choose the amount)
  • Channel has a fixed duration (you choose)
  • After expiry, unspent funds are reclaimable via drain_close_channel

MPP: Each request is paid individually at the provider's advertised price. No pre-d

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx