Building 6 B2B APIs in 6 Days: A Cloudflare Workers + MCP + x402 Post-Mortem

One person, 6 days, 6 B2B APIs on Cloudflare with programmatic SEO and MCP distribution.
This post-mortem details a developer's 6-day solo build of 6 B2B API products (HS code classification, compliance screening, docs-to-JSON, financial validation, rate monitoring, contract extraction), 2 MCP servers, and 914 SEO pages. The stack runs entirely on Cloudflare (Workers + D1 + KV + Pages), with x402 USDC pay-per-use payments and MCP protocol for AI Agent discovery. Growth came from programmatic SEO (3 templates → 914 pages), MCP marketplace distribution, and IndexNow — while paid ads and cold outreach failed. The HS classifier benchmarks 24.5% exact 6-digit accuracy and 86% at chapter level.
In just 6 days, one person built 6 B2B API products, 2 MCP servers, and 914 SEO pages from scratch. This isn't marketing spin — it's an engineering post-mortem complete with real benchmark data and failure logs. The author has open-sourced the full tech stack, product matrix, and lessons learned, making it highly valuable for developers looking to build side hustles or SaaS products with AI Agents.

Product Matrix: What Problems Do These 6 APIs Solve?
What these products share in common: clear inputs and outputs, programmatically callable, and suited for pay-per-use pricing.
HS Codes Classifier: Converts product names into customs HS codes — for example, "iPhone 15 Pro" → 8517.13. This is a critical need in cross-border trade, where customs clearance and tariff calculations depend on accurate HS codes.
Compliance Engine: Sanctions list screening + PEP (Politically Exposed Persons) + entity resolution. Data covers OFAC SDN (19,417 records), UK OFSI (6,408), EU CONS (6,241), UN CONS (956, auto-scraped daily via GitHub Actions), PEP (11,751, covering 15 occupations from Wikidata), and GLEIF entities (19,984) — roughly 65,000 records total. Exposes three query endpoints: /check/sanctions, /check/pep, and /check/entity.
Docs-to-JSON: Invoices, receipts, contracts → structured JSON. Also listed as an MCP server on the MCPize marketplace.
Finance Validators: IBAN, VAT, SWIFT, LEI, and bank card number validation — all in one REST API.
Watch Engine: Monitors changes in exchange rates (ECB Frankfurter + NBU), VAT (EU Commission TEDB), and tariffs (USITC + EU TARIC). Also an MCP server on the MCPize marketplace.
Creator Engine: Extracts commitment clauses from contracts. MCP-ready.
The design philosophy behind these 6 products is worth studying: each is simple enough (single responsibility), but together they cover the full chain of cross-border trade + compliance + document processing + financial validation. The products funnel traffic to each other, with each landing page linking back to its 5 sibling products.
HS Code (Harmonized System Code) is an international product classification system developed by the World Customs Organization (WCO), using 6-digit numbers to uniformly identify product categories globally. Countries extend this into finer national codes of 8 or 10 digits (e.g., US HTS uses 10 digits). The first 2 digits represent the "Chapter," the first 4 the "Heading," and the first 6 the "Subheading." In cross-border trade, HS codes directly determine tariff rates, regulatory conditions, and customs clearance procedures. Errors can lead to shipment delays or fines, making accurate lookup a critical need.
Sanctions list screening is a core component of anti-money laundering (AML) and Know Your Customer (KYC) compliance. The OFAC SDN (Specially Designated Nationals list from the US Treasury's Office of Foreign Assets Control) is the world's most impactful sanctions list — transacting with listed entities can result in frozen assets or even criminal penalties. PEP (Politically Exposed Persons) screening targets officials and their relatives who may pose corruption risks. GLEIF (Global Legal Entity Identifier Foundation) provides LEI entity data for uniquely identifying legal entities. These lists require continuous updates and entity disambiguation (the same person may have multiple spellings), making this a classic "data + algorithm" composite API scenario.
AI Classifier Benchmark: The Real Trade-offs Behind 24.5% Accuracy
The author tested 100 cases on Alibaba's HSCodeComp dataset (632 products), running two rounds with fluctuations stable within ±1%:
| Metric | Accuracy |
|---|---|
| 6-digit exact match | 24.5% |
| 4-digit match | 52.5% |
| 2-digit (chapter) match | 86.0% |
| Average latency | 1.3 seconds |
This data needs to be viewed in context. GPT-4o-mini scores only about 18% on the same benchmark; the best AI Agent with web search reaches 46.8%, but at $1-10 per call and 10-30 seconds per query; human experts achieve roughly 95%. The author's API is priced at $0.01 per call with 1.3-second latency.
In other words, this trades accuracy for speed and cost. A 24.5% exact 6-digit match may sound low, but if your use case only needs rough classification (86% at the 2-digit chapter level), this API has real value. The author also candidly notes that HSCodeComp expects 10-digit US codes, while they only compared the first 6 digits (international HS level) — a reasonable but score-affecting comparison approach.
Tech Stack: Cloudflare All-in-One + Minimal Deployment
The entire infrastructure runs almost entirely on Cloudflare:
- Compute: 8 Cloudflare Workers
- Database: Cloudflare D1 (65,000 records), free tier offers 5 million reads per day
- Cache: Cloudflare KV (5 namespaces, free tier) — but the author learned one thing: for hot paths like sanctions screening, you should use the Cache API instead of KV, because KV's free tier only allows 1,000 writes per day and is globally shared
- Hosting: Cloudflare Pages
- Payments: x402 protocol (USDC on Base chain)
- AI Distribution: MCP protocol, 2 servers listed on the MCPize marketplace
- SEO: 914 programmatically generated pages
- Deployment: git push to deploy — no CI/CD, Docker, or Kubernetes
Sanctions list ingestion is handled by GitHub Actions: OFAC is updated manually, while the UN list is auto-scraped daily at 03:30 UTC via Playwright.
The core advantage of this architecture is near-zero operational cost. No servers to maintain, no containers to orchestrate, and free tiers are more than sufficient for early-stage products. The x402 payment integration means AI Agents can call the API without registration or API keys, paying per use directly with USDC — a natural payment method for the agent economy.
Cloudflare Workers is an edge computing platform based on V8 isolate sandboxes. Code is deployed across 300+ nodes worldwide with near-zero cold start times. The free tier offers 100,000 requests per day; paid plans start at $5/month with 10 million requests. D1 is an edge relational database based on SQLite, suited for small-to-medium read-heavy or low-frequency write scenarios; KV is a global key-value store with extremely fast reads but delayed writes (eventual consistency), limited to 1,000 writes per day on the free tier. The Cache API is a CDN-cache-like interface that caches responses by URL, ideal for high-frequency read, per-request-update hot paths — exactly why the author recommends switching sanctions screening to the Cache API.
The x402 protocol is a payment standard proposed by Coinbase based on the HTTP 402 status code, allowing clients to include USDC stablecoin payment credentials directly in requests, with the server verifying before returning data. Compared to traditional API key + subscription models, x402 lets AI Agents complete pay-per-use transactions without accounts, credit cards, or human approval — naturally fitting agent-automated calling scenarios.
Three Growth Levers: Programmatic SEO, MCP Distribution, Internal Link Network
The author validated three effective customer acquisition channels:
Programmatic SEO: 914 pages generated from 3 templates, with a single generator.js script creating all pages and the sitemap. The "HS code for [product]" template alone generated 498 pages. Each page is a real product landing page, not an empty SEO farm.
MCP Marketplace Distribution: Wrapping APIs as MCP servers listed on the MCPize marketplace, where AI Agents can directly discover and call them. Priced at $0.01 per call in USDC, with zero registration and zero API keys, reducing friction for agent calls.
IndexNow Auto-Submission: A GitHub Action pings Bing and Yandex on every push, automatically submitting a sitemap of 814+ URLs.
Combined with cross-promotion between products (each landing page links back to 5 sibling products), this forms an internal link graph. The essence of this playbook: use programmatic methods to lower content production costs, use the MCP protocol to lower distribution costs, and use internal links to improve indexing efficiency.
MCP (Model Context Protocol) is a protocol open-sourced by Anthropic in late 2024, providing AI models with a standardized way to connect to external tools and data sources. An MCP server exposes a set of tools, resources, and prompts that Clients (such as Claude Desktop, Cursor) can automatically discover and invoke. Compared to the traditional "write docs and let developers manually integrate" approach, MCP lets Agents autonomously discover and call APIs at runtime — essentially turning APIs into a "service shelf" that Agents can procure from independently. MCPize is a third-party MCP server marketplace, positioned like an early App Store.
IndexNow is an instant indexing protocol jointly launched by Microsoft and Yandex. Sites ping search engines via simple HTTP requests when content is updated, without waiting for periodic crawler visits. This is especially critical for programmatic SEO — 914 pages might take weeks to be fully indexed through natural crawling, but IndexNow can compress indexing to hours.
What Didn't Work: Paid Ads and the Cold Start Dilemma
The failures are equally instructive.
The author tried paid ads on platforms like Hermoso, Markifact, and Merlin. The result: B2B APIs simply don't convert on these channels — $0 spent, $0 earned. Email marketing couldn't launch due to a lack of contact lists, and cold emails got banned by Gmail. Automated SDR tools are nominally automated, but in practice every message requires human review — not truly automated.
This reflects a structural problem: early-stage B2B API customer acquisition is hard to solve through traditional marketing channels. Programmatic SEO and MCP distribution work precisely because they bypass traditional channels that require connections and budgets, directly reaching two types of high-intent traffic: people actively searching for solutions and AI Agents automatically discovering tools.
For developers looking to replicate this path, the author's experience points in a clear direction: build a minimum viable product with Cloudflare Workers + MCP + x402, acquire customers through programmatic SEO, and reach Agent users through MCP marketplaces. The rest is left to the product itself to speak for.
B2B API buyer decision chains are completely different from B2C: demand is typically triggered by specific technical problems ("I need sanctions screening"), and decision-makers search directly on search engines or developer communities rather than passively accepting ads. This is why "search intent traffic" (SEO) and "Agent auto-discovery" (MCP) far outperform display advertising. The cold email ban reflects anti-spam policies on platforms like Gmail — low domain reputation plus bulk sending almost certainly lands in spam, and B2B cold starts have few low-cost shortcuts when lacking brand recognition and a contact database.
One-line Summary
A solo developer built 6 B2B APIs in 6 days using the full Cloudflare stack, growing through programmatic SEO and MCP distribution.
Paragraph Summary
This post-mortem covers a developer's 6-day solo effort to build 6 B2B API products (HS code classification, compliance screening, docs-to-JSON, financial validation, rate monitoring, contract commitment extraction), 2 MCP servers, and 914 SEO pages. The stack runs almost entirely on Cloudflare (Workers + D1 + KV + Pages), with x402 protocol USDC pay-per-use payments, and MCP protocol enabling AI Agents to directly discover and call the APIs. Core growth levers are programmatic SEO (914 pages from 3 templates), MCP marketplace distribution, and IndexNow auto-submission; traditional channels like paid ads, email marketing, and cold emails completely failed. The HS code classifier achieves 24.5% exact 6-digit match, 86% at the 2-digit chapter level, 1.3-second latency, and $0.01 per call — a clear differentiation trading accuracy for speed and cost.
Related articles

Low-Cost Abstention Strategy: How LLM Ticket Classification Reduces Misrouting Costs
Cost-aware abstention framework cuts ticket routing costs by 38.1%, reduces misrouting from 15.3% to 3.5% on 47,837 IT tickets, outperforming LLMs.

METTA: Memory-Enhanced Meta-Reinforcement Learning for Test-Time Adaptation
METTA proposes dual-timescale memory decomposition for efficient test-time adaptation in meta-RL with linear complexity, exceeding 50% success on Meta-World ML10/45 and outperforming Transformer baselines on PointMaze.

Two Major Numerical Bugs in Softmax and Cross-Entropy and Their Fixes
Standard softmax and cross-entropy have two numerical bugs: Softmax Collapse causes non-zero-sum gradients, and Softmax Cancellation produces spurious gradients in distillation. This article presents fixes and their effects on grokking, accuracy stability, and knowledge distillation.