Warppay402 Gateway
@warppay402/server ⚡
Sofortiges x402 V2-Monetarisierungs-SDK und selbst gehostete Infrastruktur für KI-Tools des Model Context Protocol (MCP), Hono-HTTP-APIs, Cloudflare Monetization Gateway, Base und Solana.
@warppay402/server ermöglicht Entwicklern, jedes MCP-Tool oder jede HTTP-API-Route mit nur wenigen Zeilen Code zu monetarisieren. Es generiert automatisch standardkonforme x402-V2-HTTP-Zahlungsaufforderungen, verifiziert gaslose EIP-712-/Solana-L1-Signaturen, setzt Plattform-Gebührenaufteilungen durch, schützt vor Prompt-Injection-Bedrohungen und verhindert Signatur-Replay-Angriffe.
Offizielle Website: https://www.warppay402.com
Funktionen
x402-V2-konform: Standardisierte Zahlungs-Challenge-Header (
PAYMENT-REQUIRED,PAYMENT-SIGNATURE,PAYMENT-RESPONSE).Multi-Chain-nativ: Multi-Chain-Challenge-Erzeugung mit Unterstützung für Base Mainnet (
eip155:8453) und Solana Mainnet-Beta (solana:5eykt...) ohne weitere Einrichtung.Gasloses Off-Chain-Signing: Clients signieren
TransferWithAuthorization(Base) oder vorab signierte SPL-USDC-Transaktionen (Solana) ohne nicht-verwahrende Reibung.Automatische Plattform-Gebührenaufteilung: Konfigurierbare Gebührenaufteilung in Basispunkten (z. B. 50 BPS = 0,5 %), die direkt bei der Abrechnung des Facilitators weitergeleitet wird.
x402-Guard-Sicherheit: Pre-Flight-Middleware, die Endpunkte vor Prompt-Injection-Angriffen, Payload-Pufferüberläufen und extrem schnellen Verkehrsspitzen schützt.
MCP-nativer Decorator: Umschließt nahtlos Tools, die für das Model Context Protocol geschrieben wurden.
Replay-Schutz: Enthält integrierte
MemoryNonceStore- und verteilteRedisNonceStore-Treiber, um Double-Spending oder die Wiederverwendung von Signaturen zu verhindern.Edge-kompatibel: Keine Node.js-only-API-Abhängigkeiten; läuft nahtlos auf Cloudflare Workers, Vercel Edge, Node.js (18+) und Deno.
Related MCP server: obolpay-x402-mcp
Installation
npm install @warppay402/serverAnwendungsfall 1: Monetarisierung von Multi-Chain-Hono-HTTP-APIs
import { Hono } from "hono";
import { monetize } from "@warppay402/server";
const app = new Hono();
const monetizeConfig = {
payTo: "0xYourMerchantWalletAddress", // Default Base EVM Wallet
platformWallet: "0xYourPlatformTreasuryWallet",
platformFeeBps: 50, // 0.5% fee split
guard: true, // Enables x402-guard security scanning
facilitatorUrl: "http://localhost:3001",
// Multi-Chain 402 Challenge Configuration
accepts: [
{
scheme: "exact",
network: "eip155:8453", // Base Mainnet
asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // Base USDC
payTo: "0xYourMerchantWalletAddress",
},
{
scheme: "exact",
network: "solana:5eykt4wA89m8E5b9B5658p445VTc28", // Solana Mainnet-Beta
asset: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // SPL-USDC
payTo: "YourSolanaPhantomPublicKey",
}
]
};
app.use(
"/api/data",
monetize({
...monetizeConfig,
price: "0.01", // $0.01 USDC
})
);
app.get("/api/data", (c) => c.json({ status: "success", content: "Monetized Payload" }));
export default app;Anwendungsfall 2: Monetarisierung von MCP-Tools (Model Context Protocol)
import { createMonetizedMCPTool } from "@warppay402/server";
const originalTool = {
name: "web_scraper",
description: "Extract clean Markdown content from URLs",
inputSchema: { type: "object", properties: { url: { type: "string" } } },
handler: async ({ url }: { url: string }) => {
return { markdown: "# Cleaned Markdown Content" };
}
};
export const monetizedTool = createMonetizedMCPTool(originalTool, {
price: "0.02", // $0.02 USDC
payTo: "0xYourMerchantWalletAddress",
platformWallet: "0xYourPlatformTreasuryWallet",
platformFeeBps: 50
});Anwendungsfall 3: Verteiltes Nonce-Locking mit Redis / Upstash
import { Redis } from "@upstash/redis";
import { monetize, RedisNonceStore } from "@warppay402/server";
const redis = new Redis({
url: process.env.UPSTASH_REDIS_REST_URL!,
token: process.env.UPSTASH_REDIS_REST_TOKEN!
});
app.use(
"/api/v1/compute",
monetize({
price: "0.10",
payTo: "0xYourMerchantWalletAddress",
platformWallet: "0xYourPlatformTreasuryWallet",
nonceStore: new RedisNonceStore(redis),
nonceTtlSeconds: 300
})
);Lizenz: MIT © WarpPay402
This server cannot be deployed
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 x402 MCP for AI agents: 35 tools, USDC on Base, from $0.001/call, no API keys.
351Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
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
- FlicenseAqualityBmaintenanceMCP server for a live x402 payment gateway on Base (USDC). Lets AI agents discover, preview for free, then pay per call — with prepaid gasless payments, signed receipts, and delta delivery.7-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover, pay for, and sell HTTP APIs using the x402 micropayment protocol, with USDC settlement on Base mainnet. Includes tools for payment requirements, paying and fetching resources, building seller configurations, and monitoring revenue.453 npm1MIT
- AlicenseNot gradedqualityBmaintenanceMonetization gateway for MCP servers, enabling pay-per-call AI agent access with x402 payment challenges and USDC settlement on Base. Developers can register existing MCP servers, set tool prices, and receive payments without handling payment code.18 npmMIT