Skip to content
gentic.news — AI News Intelligence Platform
Connecting to the Living Graph…

Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

Developer's terminal showing a Claude Code session connecting to GoldBean MCP server, with a USDC payment flow for…
Open SourceScore: 50

GoldBean MCP Server: Pay Per Call with USDC — No API Keys, No Subscriptions

GoldBean MCP server lets Claude Code call 47 Baidu AI endpoints with per-call USDC micropayments via x402 — no API keys, no subscriptions. Agents pay $0.01-$0.05 per call on Base L2.

·1d ago·4 min read··10 views·AI-Generated·Report error
Share:
Source: dev.tovia devto_mcpSingle Source
How do I use GoldBean MCP server with Claude Code for pay-per-call AI endpoints?

GoldBean is an MCP server that exposes 47 Baidu AI endpoints (OCR, TTS, LLM) with per-call micropayments via x402 protocol on Base. Claude Code pays $0.01-$0.05 per call in USDC — no API keys, no subscriptions.

TL;DR

GoldBean MCP server lets Claude Code call 47 Baidu AI endpoints with per-call USDC micropayments via x402 protocol — no registration needed.

Key Takeaways

  • GoldBean MCP server lets Claude Code call 47 Baidu AI endpoints with per-call USDC micropayments via x402 — no API keys, no subscriptions.
  • Agents pay $0.01-$0.05 per call on Base L2.

What Changed — GoldBean MCP Server Launches Pay-Per-Call AI Endpoints

GoldBean is a new MCP (Model Context Protocol) server that solves a pain point every Claude Code developer hits: paying for occasional API calls without signing up for a monthly subscription. It exposes 47 Baidu AI endpoints — including OCR, text-to-speech, speech recognition, LLM, and image generation — where payments happen per-call via the x402 protocol using USDC on Base L2.

The key innovation? No API key, no registration, no monthly commitment. Claude Code can discover GoldBean's tools via MCP, call a free endpoint immediately, or pay $0.01–$0.05 per call in USDC for premium endpoints — all without human intervention.

What It Means For You — Concrete Impact on Daily Claude Code Usage

If you've ever wanted Claude Code to:

  • Extract text from an image (OCR)
  • Convert text to speech (TTS)
  • Recognize speech from audio (ASR)
  • Call a language model endpoint
  • Generate images

...you previously needed to: register for a service, generate an API key, store it securely, commit to a monthly plan, and handle key rotation. For an agent that makes 50 calls/month, paying $29/month was overkill.

GoldBean eliminates that friction. Your Claude Code agent can now:

  1. Discover tools automatically via MCP's SSE transport
  2. Call free endpoints immediately — 21 are free
  3. Pay per call for premium endpoints — $0.01 to $0.05 per call, settled in USDC on Base
  4. Continue without human intervention — the x402 protocol handles the payment negotiation

This is particularly useful for international developers who can't get approved for credit card-based billing, or for agents running in automated pipelines where a human can't click "confirm payment."

Try It Now — How to Use GoldBean with Claude Code

Setup

Cover image for Building GoldBean: How I Created a Pay-Per-Call MCP Server with x402 Micropayments

GoldBean uses the x402 Payment Protocol — an HTTP-native micropayment standard. When your agent calls a paid endpoint without sufficient credits, the server returns HTTP 402 (Payment Required) with payment instructions. Your agent pays USDC on Base L2, and the server verifies the on-chain transaction before returning the result.

To use it with Claude Code:

  1. Add GoldBean as an MCP server in your Claude Code configuration. The server uses SSE transport at goldbean-api.xyz.

  2. Install the GoldBean SDK (optional, for direct wallet integration):

npm install @goldbean/x402-sdk
  1. Configure your wallet to handle x402 payment requests. The SDK handles amount calculation, ERC-20 transfer, and transaction hash generation.

Example: Claude Code Calling OCR

Your Claude Code agent can call GoldBean's OCR endpoint like this:

# In your CLAUDE.md or prompt:
Use GoldBean's OCR tool to extract text from this receipt image: https://example.com/receipt.jpg

If the endpoint is free, the result comes back immediately. If it's paid ($0.01 for OCR), the server returns HTTP 402 with payment instructions, your wallet pays the USDC, and the server returns the OCR result.

Available Endpoints

GoldBean wraps 47 Baidu AI endpoints:

  • Free (21): Basic OCR, language detection, text analysis
  • Paid (26): Advanced OCR, TTS, ASR, LLM, image generation — priced $0.01–$0.05 per call

All billing is unified through a single payment layer that routes between x402 (USDC/Base), PayPal, and Alipay.

Why This Matters for Claude Code Developers

This is part of a broader trend: MCP servers are making agent-to-API payments native. The Model Context Protocol, introduced by Anthropic in November 2024, already standardizes how AI agents discover and call external tools. GoldBean extends that to include payment — something existing infrastructure (Stripe, PayPal) was designed for humans clicking buttons, not for autonomous agents.

For Claude Code users, this means:

  • No more API key management — no registration, no key rotation, no secure storage
  • No more monthly commitments — pay $0.01 for a single OCR call, not $29/month
  • No more credit card friction — USDC on Base works globally
  • Fully autonomous agent pipelines — the agent handles payment negotiation itself

Source: dev.to

Source: gentic.news · · author= · citation.json

AI-assisted reporting. Generated by gentic.news from multiple verified sources, fact-checked against the Living Graph of 4,300+ entities. Edited by Ala SMITH.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

## What Claude Code Users Should Do Differently **1. Rethink your API dependency model.** If you've been avoiding certain AI APIs because of registration friction or monthly minimums, GoldBean changes that. You can now add OCR, TTS, or LLM calls to your Claude Code workflows with zero setup cost. Try adding a `Use GoldBean OCR to extract text from images` instruction to your CLAUDE.md — the agent will discover and use the tool automatically. **2. Prepare your wallet for x402 payments.** This isn't just about GoldBean — the x402 protocol is becoming a standard for agent-to-API payments. Set up a Base wallet with USDC and configure it to handle 402 responses. The `@goldbean/x402-sdk` handles the mechanics, but you need the wallet ready. Start with $5-10 USDC — at $0.01-$0.05 per call, that's 100-500 calls. **3. Audit your current API subscriptions.** If you're paying $29/month for an API you only use occasionally, GoldBean likely saves you money. Map your current API usage against GoldBean's 47 endpoints and calculate the per-call cost. For developers outside US/EU who can't get credit card approvals, GoldBean's crypto-native approach may be the only viable option.
This story is part of
Claude Code's Campus Conquest Flips Anthropic's Talent Pipeline, Leaving Google's Academic Edge in Doubt
Viral adoption at MIT and Stanford transforms Claude Code from product into recruiting funnel, threatening Google's long-held research talent dominance
Compare side-by-side
Claude Code vs GoldBean
Enjoyed this article?
Share:

AI Toolslive

Five one-click lenses on this article. Cached for 24h.

Pick a tool above to generate an instant lens on this article.

Related Articles

From the lab

The framework underneath this story

Every article on this site sits on top of one engine and one framework — both built by the lab.

More in Open Source

View all