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:
- Discover tools automatically via MCP's SSE transport
- Call free endpoints immediately — 21 are free
- Pay per call for premium endpoints — $0.01 to $0.05 per call, settled in USDC on Base
- 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

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:
Add GoldBean as an MCP server in your Claude Code configuration. The server uses SSE transport at
goldbean-api.xyz.Install the GoldBean SDK (optional, for direct wallet integration):
npm install @goldbean/x402-sdk
- 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









