MoltsPay: The Most Comprehensive Payment Layer for AI Agents
AI agents need to pay for things. Whether it's generating a video, writing code, or accessing premium APIs, the agentic economy requires a payment infrastructure that works everywhere.
Today, I'm excited to announce that MoltsPay is now available across three major platforms, making it the most comprehensive payment solution for AI agents:
- Model Context Protocol (MCP) - Standardized integration for ChatGPT, Claude, and MCP-compatible AI assistants
- Node.js (npm) - Full-featured SDK for JavaScript/TypeScript environments
- Python - Native SDK for Python-based agents and applications
What is MoltsPay?
MoltsPay is blockchain payment infrastructure designed specifically for AI agents. It enables autonomous, gasless crypto payments using the x402 protocol on multiple chains (Base, Polygon, BNB, Tempo, Solana, and more).
Core Features
Gasless Payments
- No ETH or gas tokens required for users
- Facilitator handles all on-chain execution
- Client only signs transactions using USDC
Multi-Chain Support
- Base (EVM)
- Polygon (EVM)
- BNB Chain (EVM)
- Tempo Moderato (MPP protocol)
- Solana (Solana PFS)
Agent-to-Agent Commerce
- Services publish pricing via
.well-known/agent-services.json - Agents discover, price, and pay automatically
- Fully autonomous transactions without human intervention
Three Ways to Integrate MoltsPay
1. Model Context Protocol (MCP)
Best for: ChatGPT, Claude, and AI assistants supporting MCP
MoltsPay is now available as an MCP server, enabling any MCP-compatible AI assistant to access payment functionality through the open MCP standard.
# Add MoltsPay MCP to your MCP client configuration
{
"mcpServers": {
"moltspay": {
"command": "npx",
"args": ["-y", "moltspay-mcp-server"]
}
}
}
Available MCP Tools:
-
search_services(query)- Discover AI services that accept MoltsPay -
get_service(id)- Get service details and pricing -
pay_service(service_id, params)- Execute gasless payments -
get_wallet_status()- Check wallet balance and status
Example usage in ChatGPT:
User: Generate a video of a dragon flying over mountains
→ MCP discovers Zen7 video service ($0.99 USDC)
→ Shows pricing and asks for confirmation
→ Executes x402 payment (gasless)
→ Returns the generated video
All wallet operations happen client-side. The AI assistant never holds your private keys.
Why MCP matters:
MCP creates a standardized way for AI models to connect to external tools. Think of it as USB for AI. By exposing MoltsPay through MCP, we enable any MCP-compatible AI assistant to participate in the agentic economy without custom integrations.
GitHub: https://github.com/Yaqing2023/moltspay-chatgpt-app
2. Node.js / npm
Best for: Custom agents, web applications, and Node.js environments
The MoltsPay npm package provides a complete SDK for JavaScript and TypeScript developers.
npm install moltspay
Quick Start:
import { PaymentAgent } from 'moltspay';
// Initialize your agent's wallet
const agent = new PaymentAgent({
chain: 'base',
privateKey: process.env.AGENT_PRIVATE_KEY
});
// Discover and pay for a service
const service = await agent.discoverService('https://juai8.com/zen7');
console.log(`Service: ${service.name}, Price: $${service.price}`);
// Execute payment
const result = await agent.pay(service, {
prompt: 'a cat dancing in the rain'
});
console.log('Payment successful:', result.txHash);
console.log('Service result:', result.output);
Features:
- Automatic service discovery from
.well-known/agent-services.json - Multi-chain wallet management (one private key per chain family)
- x402 signing and payment execution
- Transaction verification and receipt handling
- Built-in error handling and retry logic
CLI Tool:
For quick testing and manual operations:
npm install -g moltspay
# Initialize wallet
npx moltspay init --chain base
# Check status
npx moltspay status
# Pay for a service
npx moltspay pay https://juai8.com/zen7 text-to-video \
--prompt "a dragon flying over mountains"
npm: https://www.npmjs.com/package/moltspay
GitHub: https://github.com/Yaqing2023/moltspay
3. Python SDK
Best for: Python-based agents, data science workflows, and backend services
The MoltsPay Python SDK brings the same functionality to the Python ecosystem.
pip install moltspay-python
Quick Start:
from moltspay import PaymentAgent
import os
# Initialize your agent's wallet
agent = PaymentAgent(
chain='base',
private_key=os.environ['AGENT_PRIVATE_KEY']
)
# Discover and pay for a service
service = agent.discover_service('https://juai8.com/zen7')
print(f"Service: {service.name}, Price: ${service.price}")
# Execute payment
result = agent.pay(
service=service,
params={'prompt': 'a cat dancing in the rain'}
)
print(f"Payment successful: {result.tx_hash}")
print(f"Service result: {result.output}")
Features:
- Type-safe API with full IDE support
- Async/await support for concurrent operations
- Multi-chain wallet management
- Server-side facilitator for pay-for-success flows
- Comprehensive error handling
PyPI: https://pypi.org/project/moltspay-python/
GitHub: https://github.com/Yaqing2023/moltspay-python
Architecture: How It Works
MoltsPay uses the x402 protocol for gasless payments. Here's the flow:
┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ AI Agent │────▶│ MoltsPay SDK │────▶│ Service API │
│ (Payer) │ │ (Client) │ │ (Provider) │
└─────────────┘ └──────────────────┘ └─────────────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Wallet │ │ x402 │
│ (Client) │────────▶│ Protocol │
└──────────────┘ └──────────────┘
│
▼
┌──────────────┐
│ Facilitator │
│ (CDP/Others)│
└──────────────┘
-
Agent discovers service via
.well-known/agent-services.json - SDK generates x402 payment intent with EIP-3009/EIP-2612 signing
- Client signs transaction using USDC (no gas needed)
- Facilitator executes on-chain using CDP or other providers
- Service verifies payment and delivers results
UPP: Universal Payment Protocol
Under the hood, MoltsPay uses UPP (Universal Payment Protocol) to abstract away chain differences:
| Chain | Protocol | Facilitator |
|---|---|---|
| Base, Polygon | x402 (EIP-3009) | CDP |
| BNB | BNB Pre-Approval (EIP-712) | Pay-for-success |
| Tempo | MPP (Machine Payments Protocol) | Direct verification |
| Solana | Solana PFS | Pay-for-success |
Developers don't need to worry about these details—UPP selects the correct protocol automatically.
Creating a MoltsPay-Powered Service
Adding MoltsPay to any AI service takes 5 minutes:
1. Create your service definition
{
"provider": {
"name": "My AI Service",
"wallet": "0xb8d6f2441e8f8dfB6288A74Cf73804cDd0484E0C"
},
"services": [{
"id": "my-service",
"function": "generate",
"price": 0.99,
"currency": "USDC"
}]
}
2. Expose it via .well-known
# Place at: https://your-service.com/.well-known/agent-services.json
3. Handle x402 payments
// Node.js example using moltspay-python server
import { PaymentServer } from 'moltspay-python';
const server = new PaymentServer({
providerWallet: '0xb8d6f2441e8f8dfB6288A74Cf73804cDd0484E0C',
chains: ['base', 'polygon']
});
// Register your service handler
server.registerService('my-service', async (payment, params) => {
// Verify payment is confirmed
if (payment.verified) {
// Execute your AI service
const result = await myAIService(params);
return result;
}
});
4. Register in the directory
Visit https://moltspay.com/directory to list your service.
Real-World Examples
Zen7: AI Video Generation
The first MoltsPay-powered service, accepting autonomous payments:
- Text-to-Video: $0.99 USDC
- Image-to-Video: $1.49 USDC
- Network: Base (gasless via x402)
Try it:
npx moltspay pay https://juai8.com/zen7 text-to-video \
--prompt "a dragon flying over mountains"
More Services
Discover more MoltsPay-powered services at:
Why MoltsPay Matters
1. Standardization
Before MoltsPay, every AI agent payment integration was custom. Now we have:
- MCP for AI assistants
- npm for Node.js environments
- Python for Python ecosystems
- UPP for cross-chain abstraction
2. Gasless for Users
Users don't need ETH or gas tokens. They only need USDC, which they already have.
3. Agent Autonomy
Agents can discover, price, and pay for services without human intervention. This is essential for the agentic economy.
4. Multi-Chain Flexibility
Deploy on Base, Polygon, BNB, Tempo, or Solana—MoltsPay handles the protocol differences automatically.
5. Open Source
All SDKs and tools are open source. No vendor lock-in.
Getting Started
Choose your platform:
MCP Users
# Add to your MCP client config
{
"mcpServers": {
"moltspay": {
"command": "npx",
"args": ["-y", "moltspay-mcp-server"]
}
}
}
Node.js Developers
npm install moltspay
Python Developers
pip install moltspay-python
Documentation: https://moltspay.com/docs
GitHub:
- Main SDK: https://github.com/Yaqing2023/moltspay
- Python SDK: https://github.com/Yaqing2023/moltspay-python
- MCP Server: https://github.com/Yaqing2023/moltspay-chatgpt-app
The Future of Agentic Commerce
We're building the payment infrastructure for the agentic economy. As AI agents become more autonomous, they need reliable, standardized ways to transact.
MoltsPay is that infrastructure.
Join us in building the open payment layer for AI agents.
This is not financial advice. Always do your own research before using blockchain-based services.
Top comments (0)