Payment infrastructure for AI agents. Reference implementation: x402 + MPP + fiat.
moltpe-agent-payments is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on ai-agents, fintech, mcp, micropayments. It currently has 5 GitHub stars and 1 forks, and sits alongside related tools like inflow-node, APIbase, piprail, brevet, inflow-cli, sardis.
Payment infrastructure for AI agents — reference implementation with x402, MPP, and fiat payment paths.
Disclaimer: This is a reference implementation with mock data. For production, implement real PaymentProvider adapters. MoltPe's production server is at moltpe.com/mcp.
This repository contains a reference implementation for handling payments in AI agent systems. It supports three payment paths: stablecoin micropayments (x402), session-based streaming (MPP), and traditional fiat rails. The goal is to show how agents can pay, get paid, and manage money across different protocols.
# MCP Server — payment tools for AI agents
cd mcp-server && npm install && npm start
# Server runs on port 3000 with 11 MCP tools
# Connect Claude Desktop with config from examples/claude-desktop-config.json
# x402 Client — stablecoin micropayments
cd x402-client && npm install && npm run build
# Use in your project:
# import { pay } from '@moltpe/x402-client'
See mcp-server/README.md and x402-client/README.md for full usage.
Start the server and open http://localhost:3000 to explore all 11 payment tools interactively.
The demo includes:
Run with mock data (default) or connect to MoltPe's live MCP server.
See mcp-server/DEMO.md for a step-by-step walkthrough.
cd mcp-server
PROVIDER_MODE=live MOLTPE_AGENT_TOKEN=swai_... npm start
Connects to moltpe.com/mcp for real on-chain transactions. See mcp-server/README.md for setup.
| Directory | Description |
|---|---|
research/ |
Market research, protocol analysis, competitive landscape |
mcp-server/ |
MCP payment server with 11 tools, 3 mock providers (x402, MPP, fiat), 53 tests |
x402-client/ |
TypeScript x402 client SDK with facilitator adapters and interceptors, 34 tests |
playbook/ |
Build playbook: process, templates, results from building this |
docs/ |
Architecture docs, protocol landscape, market analysis |
This implementation supports three parallel payment paths:
Each path serves different use cases. A collections layer sits above all three to handle agent receivables.
flowchart TD
Agent[AI Agent] --> Collections[Collections Layer<br/>Invoicing · Billing · Receivables]
Collections --> A[Stablecoin Path<br/>x402]
Collections --> B[Session Path<br/>MPP]
Collections --> C[Fiat Path<br/>Card / Bank]
A --> A1[USDC Micropayments]
A1 --> A2[On-chain Settlement<br/>Polygon · Base]
B --> B1[Budget Sessions]
B1 --> B2[Streaming Settlement<br/>Tempo Network]
C --> C1[Card Authorization]
C1 --> C2[Gateway Settlement<br/>Razorpay · Stripe]
classDef agent fill:#0ea5e9,stroke:#0284c7,color:#fff
classDef collections fill:#f59e0b,stroke:#d97706,color:#fff
classDef x402 fill:#22d3ee,stroke:#06b6d4,color:#000
classDef mpp fill:#a78bfa,stroke:#8b5cf6,color:#000
classDef fiat fill:#34d399,stroke:#10b981,color:#000
class Agent agent
class Collections collections
class A,A1,A2 x402
class B,B1,B2 mpp
class C,C1,C2 fiat
See docs/tri-rail-architecture.md for the full breakdown.
| Metric | Value |
|---|---|
| Tests | 87 (53 mcp-server + 34 x402-client) |
| Pass rate | 100% |
| Statement coverage | 86.2% / 95.9% |
| Runtime dependencies | 0 (both packages) |
| npm audit | 0 vulnerabilities |
| Secret scan | 0 findings |
See QUALITY.md for full coverage breakdowns and scan results. See SECURITY.md for vulnerability reporting and security posture. See docs/production-security-checklist.md for the 64-item production deployment checklist.
Looking to integrate MoltPe Agent Payments with your AI framework? These issues track planned integrations with example code:
Contributions welcome — pick an issue and open a PR.
Long-form guides covering the MoltPe stack, AI agent payment patterns, and India-specific integration:
For developers evaluating MoltPe
For Indian developers and AI startups
Protocols and fundamentals
Short answers (Q&A format)
Also: FAQ · Glossary · Use cases · Developer docs
research/, playbook/, docs/): Apache License 2.0research/, playbook/, docs/): Creative Commons Attribution-ShareAlike 4.0See NOTICE for attribution details.
@software{moltpe_agent_payments,
author = {Gupta, Umang},
title = {MoltPe Agent Payments},
year = {2026},
url = {https://github.com/umangbuilds/moltpe-agent-payments},
license = {Apache-2.0}
}
Created by Umang Gupta. MoltPe builds payment infrastructure for AI agents.
Official TypeScript/Node.js SDKs for the InFlow payments platform - x402 and MPP (Machine Payments Protocol) integration for sellers and buyers.
Universal MCP gateway for AI agents — 1108 tools, 307 providers. One endpoint (https://apibase.pro/mcp), pay-per-call with x402 USDC on Base + MPP USDC on Tempo.
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
Payment gateway for AI agents. Multi-chain L2 support (Base, Arbitrum, Optimism, Polygon). Spending policies, tiered signing, dashboard.
A wallet for your agents to onboard and pay. Agentic MPP / x402 payments from your machine - CLI + MCP server.
The open authority layer + SDKs for AI-agent payments. Thin Python/TS clients, an MCP server, framework adapters (LangChain/CrewAI/Hermes/OpenClaw/…), and @sardis/reference — a pure policy simulator + AP2/TAP/x402 verifiers showing exactly how Sardis decides if an agent may spend. The hosted engine that moves money is private.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
DePIN for Vintage Hardware — Proof-of-Antiquity blockchain where old machines outmine new ones. AI-powered hardware fingerprinting, 15+ CPU architectures, Solana bridge (wRTC). $0 VC.
🚀 Curated list of x402 resources: HTTP 402 Payment Required protocol for blockchain payments, crypto micropayments, AI agents, API monetization. Includes SDKs (TypeScript, Python, Rust), examples, facilitators (Coinbase, Cloudflare), MCP integration, tutorials. Accept USDC payments with one line of code. Perfect for AI agent economy.
Client SDK for the Vybe x402 API. Pay-per-call USDC over HTTP and prepaid-credit WebSocket streaming for Vybe's Solana analytics API. Built for AI agents.
The financial operating system for AI agents. A single HTTP client that intercepts '402 Payment Required', routes across x402, L402, and MPP, persists credentials as recoverable assets, enforces per-envelope budgets, and emits a structured trace.