x402 Protocol — Episode 4: A Bot Rejected My PR, So I Added Solana Support
I submitted a PR to awesome-solana-ai — the Solana Foundation's official AI tools list. A bot reviewed it within minutes and stamped it with a P1 Critical issue:
"No Solana integration described. This entry explicitly states payments run on Base (an Ethereum L2) and the description contains no reference to Solana."
Fair point. I was trying to get listed on a Solana directory with a Base-only service. I had two options: close the PR, or actually add Solana support.
I picked option two. That decision crashed my server twice, forced me to change facilitators three times in one day, and somehow ended with my service registered on four new platforms.
What This Post Covers
How a bot's rejection turned into the best product decision I didn't plan to make. Adding Solana USDC payments to an x402 API, surviving two server crashes from wrong facilitator choices, fixing a months-old MCP bug with one line of code, and the registration rush that followed.
Three Facilitators in One Day
Adding Solana to the x402 payment options looked simple in the code. The SDK supports it — just add a second PaymentOption with a Solana network ID and wallet address:
Simple, right? The problem wasn't the code. It was the facilitator.
Attempt 1: xpay. My existing facilitator. Restarted the server with the new Solana config. Immediate crash:
xpay only supports Base. Didn't know that until my server told me by dying.
Attempt 2: x402.org. Switched to the x402.org facilitator. Restarted. Crashed again — worse this time:
x402.org is testnet only. It doesn't support Base mainnet or Solana mainnet. Every single endpoint went down. My API was completely dead. The systemd Restart=always setting kept trying to bring it back, but the middleware crashed on initialization every time — a restart loop with no way out except changing the config.
I scrambled back to xpay to at least restore Base-only service. Heart rate: elevated.
Attempt 3: CDP. Coinbase Developer Platform's facilitator. Checked the docs: Base, Polygon, and Solana. All mainnet. Free tier at 1,000 requests per month. Needs an API key — xpay didn't require one, so this was new.
Signed into portal.cdp.coinbase.com, created an API key, added the credentials to .env, installed cdp-sdk, and changed one block of code:
Restarted. No crash. Tested the 402 response — both Base and Solana payment options showed up in the headers. Deep breath.
The One-Line Fix That Opened Two Doors
Remember how Smithery gave me a 405 error back in Episode 3? I'd shrugged it off as "not worth debugging right now" and moved on.
Then xpay.tools gave me the exact same error when I tried to register there:
Two different platforms, same error. That's not a coincidence — that's my problem.
I dug into the MCP spec and found the answer. There are two transport modes: SSE (the old way, uses GET) and Streamable HTTP (the new way, uses POST to initialize). My server was running SSE. These platforms were sending POST requests to initialize the connection. My server didn't accept POST, so — 405 Method Not Allowed.
The fix:
One word changed. The endpoint path also shifted from /sse to /mcp, so I updated the .well-known/x402 manifest to point to the new URL.
Restarted. Tried xpay.tools again: "VALID, 6 TOOLS." Tried Smithery: "Server info retrieved, 6 tools."
Both platforms that had been blocked for weeks — fixed by changing one word in one line. I sat there for a second thinking about all the times I'd said "I'll debug that later." Sometimes later is just one word away.
The Registration Rush
xpay.tools — registered the MCP server, got a proxy URL (printmoneylab.mcp.xpay.sh/mcp), set pricing at $0.001 per tool call, status: Active. AI agents connecting through xpay get automatic x402 payment handling. xpay takes 5%, I get 95%.
Smithery — had to use a different server ID (kr-crypto-intel instead of kr-crypto-intelligence) because the failed 405 attempt had already claimed the original ID. Minor annoyance, but it published successfully. 6 tools detected.
awesome-solana-ai PR #136 — updated the description to a single sentence mentioning "supporting both Base and Solana USDC payments." Fixed the bot's other issues too: em dash to hyphen, multi-sentence to one-liner. Pushed the commit and it auto-updated the open PR. Currently waiting for review.
sendaifun/skills PR #36 — submitted a SKILL.md to the Solana Agent Skills marketplace with all five endpoints, MCP info, and usage examples. Also waiting for review.
Current scoreboard: 4 platforms registered and active, 2 PRs pending review. Total cost for all six registrations: $0.
What One Bot Review Actually Did
Here's the thing. If that Greptile bot had approved my PR without the P1 flag, KR Crypto Intelligence would still be Base-only. I'd still be on xpay facilitator. My MCP server would still be running SSE. Smithery and xpay.tools would still show 405 errors. And I'd have two fewer platforms in my distribution network.
The bot said "you don't belong here without Solana." Instead of arguing or walking away, I added Solana. That forced a facilitator upgrade to CDP. While I was at it, I fixed the MCP transport issue that had been sitting in my "later" pile for weeks. And fixing that unlocked two platforms I'd given up on.
One automated review. One cascade of improvements I wouldn't have made otherwise.
I could've just closed the PR.
What's Next
Two Solana PRs are still pending review. The API is live on both Base and Solana with $0 monthly cost. Six platforms are distributing the service. What I don't have yet is real organic traffic — actual agents paying $0.001 for Korean crypto data without me being the buyer on both ends. When that happens, I'll have something worth writing about. Until then, the $0 bet stays open.
← Previous: Episode 3: MCP Server, awesome-x402, and the $0 Bet Next: Episode 5: One API Call That Replaced Five Features →
More updates on the way. If you're working on something similar or found a smarter way to do it, drop it in the comments — the more we share, the faster we all move.
Disclaimer: This blog documents my personal learning journey. Nothing here is financial advice.
Comments
Post a Comment