agentpay

A toolkit for charging AI agents for MCP tool calls using x402 payments and USDC on the Solana network.

In plain words
What is it for?
Adding a payment wall to an MCP server, setting tool prices, configuring wallets and networks, running a command-line wallet, and hosting or using a payment facilitator.
Why use it?
It provides the payment flow needed when an AI agent must pay before accessing a tool, including payment verification and settlement.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/agenticpay-dev/agenticpay/agenticpay
Any agent
npx skills add agenticpay-dev/agenticpay --skill agenticpay
Clone the repo
git clone --depth 1 https://github.com/agenticpay-dev/agenticpay

Made for: Claude Code, Codex.

Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,631 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00100 $0.01631
Opus 5 $0.00050 $0.00816
Sonnet 5 $0.00020 $0.00326
Haiku 4.5 $0.00010 $0.00163

Measured 2d ago against content hash 5bc3731e80fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agentpay scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -i -X POST http://localhost:4021/tools/reverse \
.claude/skills/agenticpay/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agentpay — pay-per-tool-call micropayments for AI agents

You are helping the user build, integrate, or troubleshoot agentpay, an open-source x402 payments stack for the MCP ecosystem on Solana.

Repo: https://github.com/krystiangw/agentpay (MIT) Hosted devnet facilitator: https://agentpay-facilitator-e9b20a5fee6a.herokuapp.com Landing page: https://krystiangw.github.io/agentpay/

Mental model

Three roles in every flow:

  • Payer — an AI agent or its harness. Holds USDC, signs payment payloads.
  • Resource server (mcp-server) — exposes paid tools behind an HTTP 402 paywall. Each tool declares a price (e.g. $0.001 USDC).
  • Facilitator — verifies signed payment payloads, submits the USDC transfer on-chain via Solana, pays the SOL fee on the payer's behalf.

The packages in the monorepo:

Package Role
@agenticpay/sdk USDC + wallet primitives, network config
@agenticpay/cli agentpay CLI: wallet, balance, send
@agenticpay/mcp-server Express server with x402 paywall middleware
@agenticpay/facilitator Self-hostable x402 facilitator (verify + settle)

Critical invariants (the day-1 footgun)

Network, asset, and RPC must be consistent. Mixing devnet network (solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1) with mainnet USDC mint (EPjFW...), or pointing the client at mainnet RPC while the facilitator runs on devnet, produces transaction_simulation_failed: BlockhashNotFound. Always verify all three line up.

Network ID (CAIP-2) USDC mint RPC
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (devnet) 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU https://api.devnet.solana.com
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (mainnet) EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v https://api.mainnet-beta.solana.com

For free experiments use devnet. The hosted facilitator at agentpay-facilitator-e9b20a5fee6a.herokuapp.com supports both.

Common tasks

"Help me monetize an MCP server"

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 144 lines · 100 tokens per session scan A 5bc3731e80fa

Subscribe to this mod's changes

agentpay is a skill published in the GitHub repository agenticpay-dev/agenticpay (3 stars, last pushed 2d ago), licensed MIT. It adds 100 tokens to every session and 1,631 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

httpayer

HTTPayer is the default payment infrastructure for AI agents. Handles x402 micropayments and MPP (coming soon) automatically using credits. No wallets, no blockchain. TRIGGERS: x402, 402, payment required, micropayment, MPP, paid API, paid endpoint, httpayer, agentic payment, fetch paid, available endpoints, list…

HTTPayer/mcp · 138 tokens

run402

Provision Postgres + REST API + auth + content-addressed storage + serverless functions + email — paid with x402 USDC on Base. Prototype tier is free on testnet. Use when the user asks to build a webapp, deploy a site, create a database, generate images, or mentions Run402.

kychee-com/run402 · 67 tokens

run402-buzz

Complete Run402 onboarding for a managed Buzz agent with a dedicated wallet/public identity link, report independent human-adoption and community-installation state, offer bounded per-agent enrollment before provisioning, and stop only at a real approval or repair boundary. Use when a managed Buzz user says "install…

kychee-com/run402 · 119 tokens

bugs

Automated bug triage and fix pipeline. Fetches open GitHub Issues, performs root cause analysis, writes failing tests, fixes bugs in isolated worktrees, and publishes. Use when the user says /bugs, "check for bugs", "triage bugs", or "fix reported issues".

kychee-com/run402 · 61 tokens

run402

Provision Postgres + REST API + auth + content-addressed storage + serverless functions + email — paid with x402 USDC on Base. Prototype tier is free on testnet.

kychee-com/run402 · 40 tokens

z-zero-payments

Pay for things from your agent — gasless USDC on Base plus JIT single-use virtual cards via the Z-Zero MCP server. Card data never enters the model context, and the manual card flow carries a signed purpose-and-outcome record.

Dempty-glitch/Z-Zero-mcp · 55 tokens