Skip to main content
Glama

payclaw

Englisch | Traditionelles Chinesisch

ko-fi


Drop-in x402-Zahlungs-Middleware für MCP-Server. Berechnen Sie KI-Agenten pro Tool-Aufruf mit USDC auf der Base-Chain – 10 Zeilen Code, kein Zahlungsabwickler, kein KYC.

Das Geld fließt direkt: Agent-Wallet → Ihr Wallet. payclaw verwahrt zu keinem Zeitpunkt Gelder.


Schnellstart

Python

pip install payclaw
from fastapi import FastAPI, Request
from payclaw import require_payment, PayclawConfig

app = FastAPI()
config = PayclawConfig(price_usdc=0.001, wallet_address="0xYourWallet")

@app.post("/tool")
@require_payment(config)
async def my_tool(request: Request):
    return {"result": "tool output"}

JavaScript / TypeScript

npm install payclaw-x402
import { requirePayment } from "payclaw-x402";

const gate = requirePayment({ priceUsdc: 0.001, walletAddress: "0xYourWallet" });

export default { fetch: gate.wrapFetch(async (req) => {
  return Response.json({ result: "tool output" });
})};

Related MCP server: @true402.dev/mcp-server

Funktionsweise

  1. Der Agent ruft Ihren Tool-Endpunkt auf

  2. Keine gültige Zahlung → Server antwortet mit HTTP 402 inklusive Preis und Wallet-Adresse

  3. Der Agent zahlt USDC auf der Base-Chain und erhält einen Transaktions-Hash (tx hash)

  4. Der Agent wiederholt den Aufruf mit dem Header X-Payment: <tx_hash>

  5. payclaw verifiziert die Transaktion on-chain → führt Ihr Tool aus


Pakete

Paket

Installation

Dokumentation

Python SDK

pip install payclaw

sdk/python

JavaScript SDK

npm install payclaw-x402

sdk/js

payclaw Search MCP

demo-mcp-server

Live-Endpunkt: https://payclaw-mcp.vercel.app/api/mcp

Verbindung mit Claude Desktop herstellen:

{
  "mcpServers": {
    "payclaw": {
      "command": "npx",
      "args": ["mcp-remote", "https://payclaw-mcp.vercel.app/api/mcp"]
    }
  }
}

Base Mainnet

from payclaw import mainnet_config
config = mainnet_config(price_usdc=0.001, wallet_address="0xYourWallet")
const gate = requirePayment({
  priceUsdc: 0.001, walletAddress: "0xYourWallet",
  network: "base", chainId: 8453,
  usdcAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  rpcUrl: "https://mainnet.base.org",
});

Sicherheit

  • Replay-Schutz via SQLite (Python) oder Redis/KV (JS)

  • Verifizierung von ERC-20 Transfer-Events (nicht tx.value)

  • Chain-ID-Verifizierung (verhindert Replay-Angriffe im Testnetz)

  • Überprüfung des Empfangsstatus (lehnt fehlgeschlagene Transaktionen ab)

  • Ganzzahl-Mathematik für USDC-Beträge (keine Fließkommazahlen)


Rechtliches

MIT-Lizenz. payclaw ist ausschließlich Infrastruktur-Software. Es handelt sich nicht um einen Zahlungsabwickler, Geldübermittler oder Finanzdienstleister. Es verwahrt keine Gelder. IP-Adressen können vorübergehend ausschließlich zur Ratenbegrenzung (Rate Limiting) gespeichert werden. Nutzung auf eigene Gefahr. Die Einhaltung von Sanktionen (OFAC) und geltenden Vorschriften liegt in der Verantwortung der bereitstellenden Partei.


payclaw (Traditionelles Chinesisch)

ko-fi

Eine x402-Zahlungs-Middleware für MCP-Server. Ermöglichen Sie es KI-Agenten, pro Tool-Aufruf mit USDC auf der Base-Chain zu bezahlen – 10 Zeilen Code, kein Zahlungsabwickler, kein KYC.

Das Geld fließt direkt: Agent-Wallet → Ihr Wallet. payclaw verwahrt zu keinem Zeitpunkt Gelder.


Schnellstart

Python

pip install payclaw
from fastapi import FastAPI, Request
from payclaw import require_payment, PayclawConfig

app = FastAPI()
config = PayclawConfig(price_usdc=0.001, wallet_address="0x你的錢包")

@app.post("/tool")
@require_payment(config)
async def my_tool(request: Request):
    return {"result": "工具輸出"}

JavaScript / TypeScript

npm install payclaw-x402
import { requirePayment } from "payclaw-x402";

const gate = requirePayment({ priceUsdc: 0.001, walletAddress: "0x你的錢包" });

export default { fetch: gate.wrapFetch(async (req) => {
  return Response.json({ result: "工具輸出" });
})};

Funktionsweise

  1. Der Agent ruft Ihren Tool-Endpunkt auf

  2. Keine gültige Zahlung → Server antwortet mit HTTP 402 inklusive Preis und Wallet-Adresse

  3. Der Agent zahlt USDC auf der Base-Chain und erhält einen Transaktions-Hash (tx hash)

  4. Der Agent wiederholt den Aufruf mit dem Header X-Payment: <tx_hash>

  5. payclaw verifiziert die Transaktion on-chain → führt Ihr Tool aus


Pakete

Paket

Installation

Dokumentation

Python SDK

pip install payclaw

sdk/python

JavaScript SDK

npm install payclaw-x402

sdk/js

payclaw Search MCP

demo-mcp-server

Live-Endpunkt: https://payclaw-mcp.vercel.app/api/mcp


Rechtliche Hinweise

MIT-Lizenz. payclaw ist ausschließlich Infrastruktur-Software und kein Zahlungsabwickler, Geldübermittler oder Finanzdienstleister. Diese Software verwahrt keine Gelder. Die Nutzung erfolgt auf eigenes Risiko. Die Einhaltung von Sanktionen (OFAC) und geltenden Vorschriften liegt in der Verantwortung der bereitstellenden Partei.

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
9hResponse time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TeaBay/payclaw'

If you have feedback or need assistance with the MCP directory API, please join our Discord server