Chuyển đến nội dung
Skillpedia
Agent260k · #531

mpp-agent

Skill này làm gì

Skill này cho phép AI của bạn trả các khoản phí nhỏ để truy cập các dịch vụ trực tuyến tính phí theo từng yêu cầu. Phù hợp với người muốn AI dùng các API trả phí mà không phải tự đọc và thanh toán thủ công.

Khi nào nên dùng

  • ✓Khi một dịch vụ web trả về thông báo HTTP 402 Payment Required và bạn muốn AI thanh toán.
  • ✓Khi bạn muốn AI thiết lập một ví để thanh toán theo từng yêu cầu.
  • ✓Khi bạn muốn tìm các dịch vụ chấp nhận thanh toán theo từng yêu cầu.

Liên kết skill

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/payments/mpp-agent/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/payments/mpp-agent/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể thiết lập một ví và thanh toán cho API tính phí theo yêu cầu đã trả về lỗi 402 không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill giúp AI của bạn chọn một trong nhiều công cụ thanh toán, như Tempo, Privy, AgentCash hoặc mppx, tùy nhu cầu của bạn, rồi dùng công cụ đó để hoàn tất thanh toán.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

MPP Agent Skill

Wraps the Machine Payments Protocol (MPP, https://mpp.dev) clients so Hermes can pay for per-request API access against servers that respond with HTTP 402 Payment Required.

Three client options, all distributed via npm. Pick the lightest one that solves the user's need. Gated [linux, macos] while the broader payments tooling matures on Windows.

When to Use

  • A merchant API returns HTTP 402 with a www-authenticate header — and the user wants to actually pay it, not just log the response.
  • The user asks to "pay per request", "set up an agent wallet", "use Tempo / Privy / AgentCash", or wants to discover MPP-priced services.
  • A Stripe Link spend has produced a Shared Payment Token (SPT) and the agent needs to attach it to the 402 challenge — in that flow, prefer link-cli mpp pay (see the stripe-link-cli skill).

Choosing a client

Tool When Setup
link-cli User already has Stripe Link set up, or the 402 challenge advertises method="stripe" see the stripe-link-cli skill
Tempo Wallet MPP services with spend controls, service discovery tempo wallet login
Privy Agent CLI Multi-chain wallets, browser-based funding privy-agent-wallets login
AgentCash 300+ pre-priced APIs via one USDC.e balance npx agentcash onboard
mppx Dev + debugging, smallest dep surface npm install -g mppx then mppx account create

Default: if the user already has Stripe Link configured or the 402 challenge specifies method="stripe", use link-cli mpp pay (the stripe-link-cli skill). Otherwise mppx for one-off paid calls and debugging, and Tempo Wallet when the user wants persistent spend controls.

Prerequisites

  • Node.js 20+ on PATH
  • A funded wallet (Tempo / Privy / AgentCash) OR an mppx account
  • For Tempo / Privy / AgentCash: follow their respective onboarding skills:
    • https://tempo.xyz/SKILL.md
    • https://agents.privy.io/skill.md
    • https://agentcash.dev/skill.md

Use web_extract to fetch any of those SKILL.md files if the user picks one.

Procedure (mppx, fastest path)

Run all commands through the terminal tool.

1. Install + create an account

npm install -g mppx
mppx account create

Store the resulting account credentials wherever the CLI tells you (the CLI writes them under its own config — do not paste them into the agent transcript).

2. Inspect the merchant's 402 challenge

If the user gives you a URL, probe it first to confirm it actually speaks MPP:

curl -i <url>

A real MPP 402 looks like:

HTTP/1.1 402 Payment Required
www-authenticate: tempo amount=0.1 currency=...

3. Pay the request

mppx <url>

For non-GET methods or request bodies:

mppx <url> --method POST --data '<json>'

mppx handles the 402 challenge/credential dance automatically and prints the merchant's actual response on success.

4. Verify the receipt

mppx attaches the receipt header automatically. To inspect:

mppx <url> -v

Procedure (Tempo Wallet)

The Tempo Wallet skill at https://tempo.xyz/SKILL.md is the canonical reference; fetch it with web_extract and follow it. Headline:

tempo wallet login
tempo wallet pay <url>

Spend controls and service discovery live in the wallet UI at https://wallet.tempo.xyz.

Pitfalls

  • HTTP 402 without method="stripe" cannot be paid by Stripe Link. If the challenge advertises only Tempo / other methods, use mppx (or whichever wallet matches) — Link will reject it. Conversely, if it advertises method="stripe", prefer Link via the stripe-link-cli skill so the spend goes through the user's approved card.
  • Multiple challenges in one header. www-authenticate may list several methods (e.g. tempo, stripe). The Link CLI's mpp decode will pick the Stripe one; mppx will pick Tempo. There's no single "right" client — pick by which wallet the user has funded.
  • Zero-amount challenges. Some MPP endpoints charge $0.00 and just want a proof credential. These work without a funded wallet. Don't refuse them as "broken."
  • Wallet keys never enter agent context. All four clients store keys under their own config dirs (or generate per-session ephemeral keypairs, in Privy's case). Do not cat/read_file them.
  • Server-side MPP is a different skill. If the user wants to ADD 402 to their own API, this skill is wrong — point them at https://mpp.dev/quickstart/server and the `mppx/ne
Câu hỏi thường gặp

Skill hỗ trợ những công cụ thanh toán nào?

Skill liệt kê link-cli, Tempo Wallet, Privy Agent CLI, AgentCash và mppx, và khuyên chọn công cụ nhẹ nhất giải quyết được nhu cầu của bạn.

Nó có chạy trên Windows không?

Skill chỉ giới hạn trên Linux và macOS, trong khi các công cụ thanh toán rộng hơn còn đang hoàn thiện trên Windows, theo mô tả của nó.

AI có trả tiền mà không hỏi tôi không?

Skill mô tả việc trả tiền cho các yêu cầu thật, nên bạn nên kiểm tra AI định trả cho cái gì trước khi phê duyệt.

Chi tiết

Mô tả gốc của tác giả

Pay HTTP 402 APIs via Machine Payments Protocol (MPP).

repo: NousResearch/hermes-agent

Độ phổ biến

Sao GitHub
260k
Vị trí xếp hạng
#531
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự