MCP server for x402 payment protocol - enables AI agents to pay for content automatically
x402-fetch-mcp is an early-stage JavaScript project in the AI payments / x402 ecosystem. It currently has 0 GitHub stars and 0 forks.
MCP (Model Context Protocol) server that enables AI agents to automatically pay for and access paywalled content using the x402 payment protocol.
x402 is a payment protocol that uses HTTP status code 402 (Payment Required) to enable micropayments for web content. When an AI agent encounters a 402 response, this MCP server automatically handles the payment using USDC on Base network.
~/.x402/config.json (not environment variables)# Run the setup wizard
npx x402-fetch-mcp setup
You'll be prompted for:
baseSepolia (testnet) or base (mainnet)claude mcp add x402 -- npx x402-fetch-mcp
claude mcp list
# Should show: x402 - ✓ Connected
Once installed, Claude Code can automatically access paywalled content:
User: Fetch the content from https://learn402.xyz/demo/protected-content
Claude: I'll use the x402_fetch tool to access this paywalled content...
[Automatically pays $0.01 USDC and retrieves content]
Fetches content from a URL with automatic x402 payment support.
Parameters:
url (required): The URL to fetchmethod (optional): HTTP method (GET, POST, etc.)headers (optional): Additional headersbody (optional): Request body for POST/PUTReturns information about the configured wallet.
Config file location: ~/.x402/config.json
{
"privateKey": "0x...",
"network": "baseSepolia"
}
npx x402-fetch-mcp-setup info
npx x402-fetch-mcp setup
# Choose 'y' to overwrite existing config
~/.x402/config.json with 600 permissionsenv command)| Network | Chain ID | USDC Contract |
|---|---|---|
| Base Sepolia | 84532 | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
| Base | 8453 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
For Base Sepolia testnet:
Try the x402 payment flow at learn402.xyz
MIT
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Daydreams is a set of tools for building agents for commerce
The first agentic payment network: policy-controlled, gasless, and real money-ready. OmniClaw CLI + Financial Policy Engine let autonomous agents pay and earn safely at machine speed.
Agent behavior that compiles
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.