agenticpay
agenticpay
Lass dich von KI-Agenten bezahlen. Open-Source-Zahlungsinfrastruktur für das MCP-Ökosystem — lege einen Preis für jedes Tool fest, Agenten zahlen in USDC über x402, die Abwicklung erfolgt auf Solana in ca. 1,5 Sekunden.
Kein Stripe. Keine Konten. Keine API-Schlüssel.
Der gesamte Stack ist hier enthalten — SDK, CLI, Paywall-Middleware, selbst gehosteter x402-Facilitator und eine Live-LLM-Agenten-Demo. Alles in TypeScript, MIT-lizenziert.
Willst du es nur testen? Verweise deinen
mcp-serverauf unseren gehosteten Devnet-Facilitator:FACILITATOR_URL=https://agentpay-facilitator-e9b20a5fee6a.herokuapp.com— keine Einrichtung erforderlich.
Live-Demo
Ein echter Claude Opus-Agent erhält eine Aufgabe, entscheidet, welche kostenpflichtigen Tools er verwenden möchte, zahlt autonom über x402-Mikrozahlungen auf Solana und antwortet dem Benutzer.
$ pnpm --filter @agenticpay/two-agent-demo agent
Agent wallet: 3rHoEumCpH8EGrr6Lq2vBKeyec6h3yPRGj2nGG2FzEfX
Server: http://localhost:4021
Facilitator: http://localhost:4022 ← our own
Model: claude-opus-4-7
Task: Reverse the string 'agentpay rocks' and tell me how many words
are in 'The quick brown fox jumps over the lazy dog'.
[turn 1] tool_use: reverse_string({"text":"agenticpay rocks"}) → paying $0.001 USDC ...
✓ paid + got result in 1596ms: {"result":"skcor yaptnega"}
[turn 1] tool_use: word_count({"text":"The quick..."}) → paying $0.0005 USDC ...
✓ paid + got result in 1286ms: {"count":9}
Agent final answer:
1. Reversed string: skcor yaptnega
2. Word count: 9 words
=== payments summary ===
reverse_string $0.0010 USDC 1596ms
word_count $0.0005 USDC 1286ms
TOTAL $0.0015 USDC 2 callsOn-Chain-Nachweis (Solana Devnet):
Abgewickelt durch unseren selbst gehosteten Facilitator:
EsqzTG8id...BnkuFrühere Abwicklung über x402.org:
2d2HcefgJ...vkqY
Related MCP server: x402 Payment Gateway MCP Server
Warum
Der aktuelle KI-Agenten-Stack geht davon aus, dass Menschen die Kreditkarte halten. Das bricht zusammen, sobald Agenten aus eigener Initiative handeln — APIs aufrufen, Sub-Agenten beauftragen, Rechenleistung bezahlen. Das lässt sich nicht über OAuth lösen.
Stablecoin-Mikrozahlungen über HTTP lösen das Problem. agenticpay bündelt die fehlende Ergonomie speziell für das MCP-Ökosystem: Jedes Tool kann einen Preis festlegen, jeder Agent kann ihn bezahlen, und die gesamte Pipeline — einschließlich des Facilitators, der die On-Chain-Abwicklung tatsächlich einreicht — ist Open Source und selbst hostbar.
Architektur
┌──────────────┐ 1) HTTP request ┌─────────────┐
│ Claude / │ ────────────────────────────────────▶ │ mcp-server │
│ GPT agent │ 2) HTTP 402 + payment requirements │ (yours) │
│ │ ◀──────────────────────────────────── │ │
│ │ 3) signed USDC payload │ │
│ │ ────────────────────────────────────▶ │ │
└──────────────┘ └─────┬───────┘
│ verify+settle
▼
┌──────────────────────┐
│ agenticpay facilitator │
│ (also yours, this │
│ repo, port 4022) │
└──────────┬───────────┘
│ submit
▼
Solana
(USDC SPL,
sub-cent fees)Du kannst mcp-server auch auf den öffentlichen x402.org/facilitator für Testnet/Devnet oder auf Coinbase CDP für Mainnet verweisen. Wir haben den selbst gehosteten Weg einfach gemacht.
Pakete
Paket | Was es tut |
| TypeScript-Primitive: USDC-Transfers, Wallet-Management, Netzwerkkonfiguration |
|
|
| HTTP-Server mit x402-Paywall-Middleware. Jedes Tool hat einen Preis. |
| Selbst gehosteter x402-Facilitator — verifiziert + wickelt USDC-Zahlungen auf Solana ab. Zahlt SOL-Gebühren im Namen der Agenten. |
| Eliza-Plugin — kapselt kostenpflichtige HTTP-Endpunkte als native Eliza-Actions. Solana-native KI-Agenten zahlen pro Tool-Aufruf. |
| Vercel AI SDK-Helfer — binde kostenpflichtige Tools direkt in |
| Echter MCP-Server (stdio + |
| Echter Claude Opus-Agent, der für Tool-Aufrufe bezahlt |
Installation
npm install @agenticpay/sdk # Solana + USDC primitives
npm install -g @agenticpay/cli # `agenticpay` command
npm install @agenticpay/mcp-server # paywalled HTTP server
npm install @agenticpay/facilitator # self-hosted x402 facilitator
npm install @agenticpay/eliza-plugin # Eliza plugin (Solana-native agents)
npm install @agenticpay/ai-sdk # Vercel AI SDK paid tools
npm install -g @agenticpay/mcp-bridge # MCP server for Claude Desktop / CursorOder klone das Monorepo, um die Live-Zwei-Agenten-Demo und bearbeitungsfreundliche Vorlagen zu erhalten (empfohlen für den ersten Durchlauf — siehe Quickstart unten).
Verwendung mit Claude Code
Dieses Repo enthält ein Anthropic Skill unter .claude/skills/agenticpay/SKILL.md. Kopiere es in dein ~/.claude/skills/-Verzeichnis, um Claude Code erstklassigen Kontext über agenticpay zu geben — es führt dich dann durch die Monetarisierung eines MCP-Servers, das Generieren von Tool-Routen und das Verifizieren von On-Chain-Abwicklungen, ohne jedes Mal die README lesen zu müssen.
mkdir -p ~/.claude/skills
cp -r .claude/skills/agenticpay ~/.claude/skills/Quickstart (Devnet, ~5 Minuten, kostenlos)
# 1. Install
pnpm install
pnpm -r build
# 2. Generate a payer wallet, fund it on devnet
node packages/cli/dist/index.js wallet new
node packages/cli/dist/index.js wallet show
# → fund SOL at https://faucet.solana.com (paste pubkey)
# → fund USDC at https://faucet.circle.com (Solana Devnet, same pubkey)
# 3. (option A — fastest) Use our hosted devnet facilitator. Skip step 4.
export FACILITATOR_URL=https://agentpay-facilitator-e9b20a5fee6a.herokuapp.com
# 3. (option B — fully self-hosted) Start your own facilitator (terminal 1)
pnpm --filter @agenticpay/facilitator dev
# Note the printed feePayer address. It needs ~0.05 SOL devnet to cover fees.
# Either airdrop or use the helper:
pnpm --filter @agenticpay/facilitator fund
export FACILITATOR_URL=http://localhost:4022
# 4. Start the paywalled mcp-server (terminal 2)
PAY_TO=<recipient pubkey> pnpm --filter @agenticpay/mcp-server dev
# 5. Run the live LLM agent demo (terminal 3, needs ANTHROPIC_API_KEY in .env)
pnpm --filter @agenticpay/two-agent-demo agentFramework-Integrationen
Drop-in-Vorlagen für die gängigsten KI-Agenten-Stacks befinden sich unter examples/:
Framework | Datei |
Anthropic SDK (kanonisch) |
|
Vorlage für einen kostenpflichtigen Server (Claude-gestützte Tools) |
|
LangChain.js |
|
LangChain Python |
|
Eliza (Solana-nativ) |
|
Mastra |
|
Vercel AI SDK |
|
OpenAI Custom GPT |
|
Siehe examples/README.md für die Integrationsmatrix.
Status
Pre-Alpha. Devnet durchgängig validiert. Mainnet-Konfiguration wird unterstützt, erfordert jedoch die Finanzierung des Facilitators mit echtem SOL und den Verweis auf einen Mainnet-fähigen RPC (Helius, QuickNode, etc.).
Roadmap
[x] Devnet End-to-End-Demo (Smoke + LLM-Agent)
[x] Selbst gehosteter x402-Facilitator (Verifizierung + Abwicklung, fee_payer-Abstraktion)
[ ] Echter MCP-Server-Template (Suchen, Abrufen, Zusammenfassen, Extrahieren — statt Spielerei
reverse_string)[ ] On-Chain-Treuhandkonto für lang laufende Aufgaben (Anchor-Programm)
[ ] On-Chain-Reputationsregister für Agenten
[ ] Gehosteter Facilitator-Dienst (
agenticpay.com)
Was ist ein Facilitator?
Falls du x402 noch nie gesehen hast: Der Facilitator ist der vertrauenswürdige Mittelsmann, der (1) das signierte Zahlungs-Payload eines Agenten verifiziert, (2) den USDC-Transfer on-chain einreicht und (3) die SOL-Gasgebühren bezahlt, sodass der Agent kein SOL benötigt — nur USDC. Die meisten MCP-Entwickler möchten keinen eigenen betreiben; sie verweisen auf einen gehosteten.
Dieses Repo enthält eine vollständige Facilitator-Implementierung. Du kannst sie selbst hosten, forken, prüfen oder als Dienst für deine eigenen Benutzer bereitstellen.
Lizenz
MIT
Available Tools
1 toolagenticpay_infoB
Placeholder tool for Glama introspection handshake.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It describes itself as a 'placeholder,' implying no significant side effects, but fails to explicitly state whether it is read-only, what it returns, or any other behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is both concise and front-loaded. Every word serves a purpose, and there is no unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description is adequately complete for its placeholder role. It explains the tool's purpose without missing essential details for a minimal introspection handshake.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the baseline score is 4 per the rubric. The description adds no parameter information, but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool is a placeholder for 'Glama introspection handshake,' which is a specific purpose. The verb 'handshake' is implied, and the resource 'introspection' is named, distinguishing it from typical functional tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. As a placeholder, it likely serves a specific introspective role, but the description does not explain its usage context or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
agenticpay_info
TDQS
Scored across 1 tool
Only one tool exists, so there is no ambiguity between tools.
With a single tool, naming is trivially consistent; the name uses a clear verb_noun pattern.
One placeholder tool is far too few for a server named 'agenticpay', which implies a payment domain requiring multiple operations.
The server lacks any functional tools; a payment server should have tools for transactions, balances, etc., but there is only a placeholder.
Maintenance
Related MCP Connectors
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
x402 pay-per-call APIs over MCP, settled in USDC on Base for autonomous agents and developers.
Pay-per-call MCP tools over x402 (USDC/Solana): LLM, utilities, x402 market and model prices.
15 paid AI agent primitives via x402 (USDC on Base). Pay-per-call MCP server.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceDrop-in x402 payment middleware for MCP servers. Charge AI agents per tool call using USDC on Base chain — Python and JavaScript SDKs, no payment processor, no KYC.MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.MIT
- AlicenseAqualityAmaintenanceAgentic payments on Solana: an agent can pay x402 / HTTP 402 paywalls in USDC, hold a pre-paid balance or a subscription, and buy datasets or settle store checkouts. All 15 tools run behind fail-closed spending caps ($1 per payment, $10 per day by default), and settlement is non-custodial through a program-owned escrow that releases 99% to the creator.1879 npmMIT
- AlicenseBqualityDmaintenanceAn MCP server providing 22 pay-per-call utility tools for AI agents (scrape, validate, embed, store, moderate, notify, convert, prevent loops) without accounts or API keys, using USDC payments via the x402 protocol.1777 npm1MIT