New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@bitbooth/mcp-fetch

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitbooth/mcp-fetch

MCP server for pay-per-fetch via x402. Exposes a fetch(url, mode) tool that pays with USDC on Base and returns markdown.

next
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
293
-25.06%
Maintainers
1
Weekly downloads
 
Created
Source

@bitbooth/mcp-fetch

MCP server that fetches any URL and returns clean markdown. Payments handled automatically via the x402 protocol — your agent wallet pays 0.005 USDC per fetch.

Zero signup. No API keys. No accounts. The agent's wallet pays per call.

Testnet by default. Defaults to Base Sepolia so a fresh install spends free testnet USDC, not real money. Opt into mainnet explicitly (see below).

Install

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "bitbooth-fetch": {
      "command": "npx",
      "args": ["-y", "@bitbooth/mcp-fetch"],
      "env": {
        "BITBOOTH_AGENT_KEY": "0x<your-testnet-wallet-private-key>"
      }
    }
  }
}

Claude Code

claude mcp add bitbooth-fetch -- npx -y @bitbooth/mcp-fetch

Set your agent wallet key:

export BITBOOTH_AGENT_KEY="0x<your-testnet-wallet-private-key>"

Global install

npm install -g @bitbooth/mcp-fetch
mcp-fetch   # runs on stdio

Get a testnet wallet + USDC (free, 2 minutes)

  • Generate an EVM wallet or use an existing one you control
  • Fund it with Base Sepolia ETH (gas): https://www.alchemy.com/faucets/base-sepolia
  • Fund it with Base Sepolia USDC: https://faucet.circle.com (select Base Sepolia)
  • Set BITBOOTH_AGENT_KEY to the wallet's private key (0x...)

Usage

Once installed, your agent gets a fetch tool:

fetch(url: "https://example.com", mode: "fast")

Modes:

ModeDescriptionBest for
fastRaw HTML converted to markdownQuick lookups
fullArticle extraction then markdownBlog posts, docs

Returns markdown with title, body, and metadata (URL, timestamp, content length, truncation status).

Pricing

ItemCost
Per fetch0.005 USDC (testnet: free Circle Sepolia USDC)
Gas~$0.0001 per tx on Base (mainnet) / free (testnet)
Default chainBase Sepolia (testnet). Explicit opt-in for mainnet.

Configuration

Env varDescriptionDefault
BITBOOTH_AGENT_KEYAgent wallet private key (required, 0x-prefixed hex)
BITBOOTH_CHAIN_ID84532 = Base Sepolia (default, free testnet). 8453 = Base mainnet (real USDC — opt-in).84532
BITBOOTH_API_URLBitBooth gateway URLstaging endpoint (Base Sepolia)
BITBOOTH_RPC_URLEVM RPC endpointhttps://base-sepolia-rpc.publicnode.com
BITBOOTH_CONFIRMATIONSTx confirmations to wait before retry1
BITBOOTH_API_KEYOptional tenant API key (for higher rate limits)

Mainnet opt-in

When you've tested against Sepolia and want to run against real Base mainnet:

export BITBOOTH_CHAIN_ID=8453
export BITBOOTH_API_URL=https://<production-url>  # ask maintainer for current
export BITBOOTH_RPC_URL=https://base-rpc.publicnode.com   # or your own RPC
export BITBOOTH_AGENT_KEY=0x<mainnet-wallet-with-real-USDC>

The package prints a warning banner to stderr whenever mainnet is active so a misconfig can't silently drain a real wallet.

Programmatic use

import { createX402Client } from '@bitbooth/mcp-fetch/x402-client';

const client = createX402Client({ agentKey: process.env.AGENT_KEY });
const result = await client.fetchWithPayment('https://example.com', 'fast');
console.log(result.markdown);

How it works

  • Your agent calls fetch(url) via MCP
  • The server POST /v1/fetchs to BitBooth
  • BitBooth returns HTTP 402 with a payment challenge { nonce, payTo, amountWei }
  • The server transfers USDC on Base to payTo
  • Waits for 1 confirmation, retries with the x-payment header
  • Returns the fetched content as markdown

Zero human in the loop. Zero signup. Just pay-per-call via x402.

Security notes

  • BITBOOTH_AGENT_KEY is a private key — treat it like a password. Use a dedicated wallet for this agent, not your personal wallet.
  • Default config uses testnet. Never set mainnet keys in a testnet config.
  • The package makes an outbound payment transaction to the BitBooth payTo address on every successful fetch. If the service is unavailable, the retry request fails but the payment was still sent on-chain — refunds require contacting the operator.

License

MIT

Keywords

mcp

FAQs

Package last updated on 17 Apr 2026

Related posts