# Subcent402 (subcent402.com) > The Autonomous M2M Micro-Payment Protocol & Model Context Protocol (MCP) Paywall Standard. ## Overview Subcent402 enables AI agents to autonomously pay for paid tools, APIs, and computation feeds in sub-cent fractions ($0.001 - $0.01) via HTTP 402, L402 Macaroons, and Base USDC without human checkouts or API keys. ## Quick Installation - Tool Server SDK: `npm install @subcent402/sdk` - Agent Client SDK: `npm install @subcent402/client` ## Core Code Examples ### 1. Monetize an MCP Tool (3 Lines): ```typescript import { withSubcent402 } from "@subcent402/sdk"; export const scrapeTool = withSubcent402({ priceUsd: 0.002, toolName: "tokenmarkdown_extract", recipientWallet: "0xYourWalletOrLightningAddress", rootSecret: process.env.SUBCENT402_ROOT_SECRET! }, async (params) => { return await extractCleanMarkdown(params.url); }); ``` ### 2. Equip an Agent with BudgetGuard: ```typescript import { wrapMcpClient } from "@subcent402/client"; const agentClient = wrapMcpClient(rawMcpClient, { budget: { maxDailySpendUsd: 5.00, maxPerCallUsd: 0.05 } }); ``` ## Protocol Specifications - MCP Custom Error Code: `-32042 Payment Required` - REST Header: `Authorization: L402 :` - Gateway Settlement: Base USDC (x402), Lightning Network (L402), Mock Credit Vault. - Offline Verification: HMAC-SHA256 Macaroon signature chain verified in <0.2ms.