#167

Add x402 payment example with Intelica — competitive intelligence pay-per-call API

Openteodorofodocrispin-cmykopened 4mo ago

Feature request

The x402 + MCP template is great. Adding a real-world merchant example showing API pay-per-call (not just content gating) would make it more useful.

Intelica is a competitive intelligence API with x402 v2 that fits well as an example:

import { wrapAxiosWithPayment, x402Client } from "@x402/axios";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(account));

const intelica = wrapAxiosWithPayment(
  axios.create({ baseURL: "https://api.intelica.dev" }),
  client
);

server.tool("analyze_market",
  { text: z.string(), mode: z.string().default("competitive") },
  async ({ text, mode }) => {
    // x402 payment handled automatically — pays $0.05 USDC on 402
    const { data } = await intelica.post("/intel", { text, mode });
    return { content: [{ type: "text", text: JSON.stringify(data.decision_recommendation) }] };
  }
);

Why it's useful as a template example

  • Shows x402 for JSON API pay-per-call, not just static content
  • Real production API with active usage
  • x402Version: 2, PAYMENT-REQUIRED header, Bazaar extension
  • Agentic Market validator: all checks pass

API: https://api.intelica.dev
OpenAPI: https://api.intelica.dev/openapi.json
Full guide: https://github.com/teodorofodocrispin-cmyk/Intelica-docs/blob/main/examples/mcp_x402_claude_desktop.md

Activity

2
doteyeso-ops3mo ago

Noticed the ask for a real pay-per-call merchant example (not just content gating) — good call.

Alongside ExactEvm merchants, a Solana x402 merchant example is useful so the MCP handler docs don’t imply one chain. Live Outcomes catalog (impulse $0.01–0.02 guards + receipts, prepaid X-Vibes-Key resume):

If you’d like a drop-in example PR for mcp-handler (Solana Exact + prepaid resume path next to the Intelica EVM sample), happy to scope that as a small USDC collab with a smoke done-when. Public endpoints stay callable either way — no pressure.

doteyeso-ops3mo ago

Follow-up — Solana merchant example next to ExactEvm, if you want it prioritized:

  • Deliverable: README + smoke using a live Solana x402 catalog (prepaid optional)
  • Done when: unpaid 402 → settle/prepaid → 200 documented
  • Thinner slice: URL list only (free DIY)

Pay before work (any of these):

  1. https://vibes-coded.com/workforce/workers?hire=receipt-auditor → Citation-join note ($150–250)
  2. Solana USDC or SOL → FmC5pYspDdjBntYdyjcahAHd3zAYj3ucx1dgoGs6LjMB (memo: CFC vercel#167)
  3. Base USDC → 0xDBbC87e7947201EAcC9a7521dda4801e99994566
  4. PayPal / Venmo / Cash App — say which and we’ll send the handle off-thread

Reply with tx sig (or fiat confirm) + this issue URL. We start after funds clear. Public DIY rails stay free.

DIY: https://vibes-coded.com/api/v1/outcomes/meta · https://vibes-coded.com/start