npx skills add rawgroundbeef/x402.storageREADME
x402.storage
Permanent file storage. One cent.
Upload any file. Pay once. Keep it forever.
What is this?
x402.storage is a pay-per-use IPFS storage service. Files are stored permanently on IPFS via Filebase, paid for with USDC on Base using the x402 payment protocol.
- No accounts — Pay directly from your wallet
- Permanent storage — Files pinned forever on IPFS
- One cent per file — Flat pricing, no subscriptions
Packages
This monorepo contains three ways to use x402.storage:
Website
The main web interface at x402.storage. Drag and drop files, pay with an auto-generated wallet, get permanent URLs.
CLI
Command-line tool for uploading files:
npm install -g x402store
x402store myfile.pdf
# https://x402.storage/bafybeig...
MCP
Model Context Protocol server for AI agents (Claude Desktop, Claude Code):
npm install -g x402store-mcp
Then configure your AI client to use the store_file tool.
Claude Code Skill
Install the skill for Claude Code:
npx skills add rawgroundbeef/x402.storage
Then use commands like /x402storage:store <file> and /x402storage:resume.
Agent Memory
x402.storage uses the .agent/ directory convention for persistent memory across sessions:
.agent/
x402-storage/
memory # Contains the CID of the last stored context
How it works
- Store context:
/x402storage:store context.json→ saves URL to.agent/x402-storage/memory - New session:
/x402storage:resume→ reads the CID, fetches your context - Continue where you left off
Team sharing
Commit .agent/x402-storage/memory to git. Teammates run /x402storage:resume to fetch shared context.
Convention for other tools
The .agent/ directory is a proposed convention for agent tooling. Other tools can use .agent/<tool-name>/ for their own persistent storage, enabling interoperability across the agent ecosystem.
Development
# Install dependencies
npm install
# Run website locally
npm run dev
# Build all packages
npm run build
How it works
- You upload a file
- API returns a 402 Payment Required with price ($0.01)
- Your wallet signs a payment authorization
- API verifies payment, uploads to IPFS, settles payment
- You get a permanent URL
The x402 protocol handles payment negotiation automatically — no manual transaction signing needed.
Cost
$0.01 USDC per file, regardless of size (up to 10MB). Files are stored permanently.
License
MIT