@xenarch/agent-mcp
MCP ServerFreex402 MCP server for AI agent payments. Lets Claude, Cursor, LangChain and CrewAI pay for HTTP 402–gated APIs with USDC micropayments on Base L2. Non-custodial, 0% fee. Unlike Cloudflare Pay-Per-Crawl, works on any host and settles directly on-chain.
Capabilities12 decomposed
http 402 payment-gated api request execution
Medium confidenceExecutes HTTP requests to APIs protected by HTTP 402 Payment Required status codes, automatically detecting payment requirements and routing requests through the MCP server's payment settlement layer. The server intercepts 402 responses, extracts payment metadata (amount, recipient, token), and initiates on-chain USDC micropayments on Base L2 before retrying the original request with proof-of-payment headers. This enables seamless agent-to-API interactions without manual payment handling or custodial intermediaries.
Implements transparent HTTP 402 payment interception at the MCP protocol layer, allowing any MCP-compatible agent (Claude, LangChain, CrewAI) to access paid APIs without SDK changes or wallet management code. Uses Base L2 for sub-cent settlement costs and non-custodial architecture where agents control their own signing keys rather than delegating to a payment processor.
Unlike Cloudflare Pay-Per-Crawl (proprietary, Cloudflare-only) or Tollbit (requires API provider integration), works on any host and settles directly on-chain with zero platform fees, giving agents true ownership of payment flows.
non-custodial usdc micropayment settlement on base l2
Medium confidenceManages cryptographic signing and submission of USDC transfers to Base L2 blockchain without holding agent private keys or funds in escrow. The server accepts payment requests with recipient address and amount, constructs ERC-20 transfer transactions, signs them using the agent's provided key material (or external signer), and broadcasts to Base L2 RPC. Settlement completes on-chain with full transparency and auditability, with no platform-controlled custody or fee extraction.
Implements non-custodial payment settlement where the MCP server never holds or controls agent funds — only constructs and signs transactions using agent-provided key material. Uses Base L2 instead of mainnet Ethereum to achieve sub-cent transaction costs (~$0.001 per transfer) while maintaining full on-chain settlement and auditability.
Eliminates counterparty risk vs custodial payment processors (Stripe, PayPal) by settling directly on-chain; cheaper than mainnet Ethereum by 100-1000x due to Base L2 rollup architecture; more transparent than traditional APIs with hidden fees.
transaction history and audit logging
Medium confidenceMaintains immutable transaction history of all USDC payments and API calls, logging transaction hash, timestamp, amount, recipient, and HTTP request/response details. The server stores logs in a queryable format (JSON, database) accessible through MCP tools, enabling agents and operators to audit spending, debug failed payments, and reconstruct payment flows. Logs include both on-chain transaction data and off-chain HTTP metadata.
Maintains unified transaction history combining on-chain USDC transfers with off-chain HTTP metadata, enabling full-stack audit trails. Logs are queryable through MCP tools, allowing agents to access their own transaction history without external tools.
More comprehensive than blockchain-only transaction history by including HTTP request/response details; more accessible than requiring manual blockchain queries.
configuration management for payment parameters and api endpoints
Medium confidenceProvides centralized configuration for payment parameters (USDC amount, recipient address, spending limits), API endpoint mappings, and RPC provider settings. Configuration is loaded from environment variables, JSON files, or environment-specific profiles, allowing operators to adjust payment rules without restarting the MCP server. Supports hot-reloading of configuration changes for zero-downtime updates.
Centralizes payment and RPC configuration in a single source of truth with support for environment-specific profiles and hot-reloading. Allows operators to adjust payment rules without code changes or server restarts.
More flexible than hardcoded payment parameters; simpler than requiring agents to manage configuration themselves.
mcp protocol integration for claude, cursor, langchain, and crewai
Medium confidenceExposes HTTP 402 payment handling and USDC settlement as MCP tools that Claude, Cursor, LangChain, and CrewAI can discover and invoke through the standard Model Context Protocol. The server implements MCP tool schema definitions for payment-gated requests and settlement operations, allowing agents to treat paid API access as first-class capabilities alongside native tools. Integration requires no agent-side SDK changes — agents interact via standard MCP tool-calling semantics.
Implements MCP as the primary integration surface, allowing agents to access paid APIs through standard tool-calling semantics without SDK-specific code. Supports multiple agent frameworks (Claude, Cursor, LangChain, CrewAI) through a single MCP server, reducing integration surface area and enabling cross-framework agent composition.
More flexible than framework-specific SDKs because MCP is protocol-agnostic; agents can switch frameworks without rewriting payment logic. Simpler than building custom API wrappers for each agent framework.
automatic http 402 response detection and payment metadata extraction
Medium confidenceIntercepts HTTP responses with 402 Payment Required status codes and extracts payment metadata from response headers (x402-amount, x402-recipient, x402-token) to determine payment requirements. The server parses metadata, validates format and values, and automatically initiates payment settlement without requiring the agent to manually inspect headers or construct payment requests. This enables transparent payment handling where agents see paid API access as a seamless extension of normal HTTP requests.
Implements automatic 402 detection at the HTTP layer with strict metadata parsing, allowing agents to treat payment-gated APIs identically to free APIs. Uses header-based metadata (x402-*) rather than response body parsing, enabling payment requirements to be communicated without changing API response schemas.
More transparent than requiring agents to check response status codes manually; more flexible than hardcoding payment amounts per API endpoint.
multi-framework agent orchestration with unified payment context
Medium confidenceManages payment state and context across multiple agent frameworks (Claude, LangChain, CrewAI) executing in the same workflow, ensuring consistent wallet management, balance tracking, and transaction history. The server maintains a unified payment ledger accessible to all agents, preventing double-spending and enabling cross-agent payment coordination. Agents can query remaining balance, transaction history, and payment status through MCP tools without framework-specific code.
Implements a unified payment ledger that abstracts away framework differences, allowing Claude, LangChain, and CrewAI agents to coordinate on shared payment budgets without framework-specific integration code. Maintains consistent state across heterogeneous agent types through a single MCP interface.
Simpler than building separate payment systems for each framework; enables true multi-agent coordination vs isolated per-framework payment handling.
proof-of-payment header generation and validation
Medium confidenceGenerates cryptographic proof-of-payment headers (e.g., transaction hash, signature) after successful USDC settlement and attaches them to retry requests, allowing target APIs to verify that payment was completed. The server constructs headers containing transaction hash, block number, and optional signature proof, which APIs can validate against Base L2 blockchain state. This enables APIs to trust that payment occurred without querying the blockchain themselves.
Generates lightweight proof-of-payment headers that APIs can validate without querying the blockchain, reducing latency for payment verification. Uses transaction hash and block number as proof, with optional cryptographic signatures for stronger guarantees.
Faster than requiring APIs to query blockchain for every payment; more trustworthy than relying on MCP server claims alone if signatures are included.
agent wallet balance tracking and spending limits
Medium confidenceMaintains real-time balance tracking for agent wallets by monitoring USDC transfers and caching balance state, allowing agents to query remaining funds and enforce spending limits before initiating payments. The server tracks balance changes from settlement transactions, updates cached state, and prevents payments that would exceed configured limits. Agents can query balance through MCP tools without blockchain queries, reducing latency.
Implements cached balance tracking with local spending limit enforcement, allowing agents to check budgets without blockchain queries. Maintains per-agent spending history and prevents overspending through pre-flight validation before payment initiation.
Faster than querying blockchain for balance on every request; more flexible than hardcoded per-API limits by allowing per-agent budget configuration.
http request retry with payment-aware backoff
Medium confidenceImplements intelligent retry logic that distinguishes between payment failures (402 responses) and transient errors (5xx, timeouts), applying different backoff strategies for each. After successful payment settlement, the server retries the original request with proof-of-payment headers; if retry fails, it applies exponential backoff without re-attempting payment. This prevents redundant payments while ensuring requests eventually succeed or fail cleanly.
Implements payment-aware retry logic that avoids redundant payments by distinguishing 402 responses from transient errors. Uses exponential backoff for retries after successful payment, preventing wasted payments on flaky APIs.
More efficient than naive retry-all approaches that might re-attempt payment; more sophisticated than fixed retry counts by using exponential backoff.
base l2 rpc endpoint abstraction and failover
Medium confidenceAbstracts Base L2 RPC interactions behind a configurable endpoint layer with automatic failover to secondary endpoints if primary fails. The server supports multiple RPC providers (Alchemy, Infura, public endpoints) and switches between them transparently on connection failures, ensuring payment settlement continues even if a single RPC provider is down. Implements connection pooling and health checks to detect failures quickly.
Implements transparent RPC failover with health checks, allowing agents to continue payment settlement even if a single RPC provider fails. Abstracts provider differences behind a common interface, enabling multi-provider redundancy without agent-side code changes.
More reliable than single-provider RPC setup; simpler than agents managing multiple RPC endpoints themselves.
transaction gas estimation and cost prediction
Medium confidenceEstimates gas costs for USDC transfers on Base L2 before submission, predicting total transaction cost (gas * gwei) and allowing agents to make informed payment decisions. The server calls eth_estimateGas with the constructed transaction, fetches current Base L2 gas price, and returns cost estimate in USDC equivalent. Agents can use estimates to decide whether to proceed with payment or seek alternative APIs.
Provides pre-flight gas cost estimation before payment submission, allowing agents to make cost-aware decisions about which APIs to call. Converts gas costs to USDC equivalent for easy comparison with API pricing.
More transparent than hidden gas costs; enables agents to optimize spending by comparing total cost (API + gas) across alternatives.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with @xenarch/agent-mcp, ranked by overlap. Discovered automatically through the match graph.
@nikhilraikwar/mcpay
The native monetization layer for MCP tool servers — x402 payment enforcement via OWS CLI
Franklin
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Fewsats
** - Enable AI Agents to purchase anything in a secure way using [Fewsats](https://fewsats.com)
Bindu
Bindu: Turn any AI agent into a living microservice - interoperable, observable, composable.
@delegare/mcp-tools
MCP tool registration for Delegare agent payment delegation
Soon
Soon is a fully automated crypto investing tool that takes the stress out of speculating by using dollar-cost averaging to invest in...
Best For
- ✓AI agent developers building multi-step workflows that require paid data access
- ✓Teams deploying autonomous agents that need to access premium APIs at scale
- ✓Builders creating agent-to-agent payment networks without custodial intermediaries
- ✓Enterprise teams requiring audit trails and non-repudiation for agent spending
- ✓Decentralized application builders integrating agent payments into blockchain workflows
- ✓Organizations with strict compliance requirements around financial transaction custody
- ✓Enterprise teams with compliance and audit requirements
- ✓Builders creating agent-as-a-service platforms with billing
Known Limitations
- ⚠Requires target API to implement HTTP 402 Payment Required status and x402 payment metadata headers
- ⚠Base L2 network dependency means settlement latency of 2-12 seconds per payment (vs instant local settlement)
- ⚠No built-in retry logic for failed on-chain transactions — requires external orchestration for reliability
- ⚠USDC only — no support for other stablecoins or native tokens without custom adapter implementation
- ⚠Requires agent to maintain private key or external signer integration — no passwordless/social recovery options
- ⚠Base L2 network congestion can cause 5-30 second settlement delays during peak usage
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Package Details
About
x402 MCP server for AI agent payments. Lets Claude, Cursor, LangChain and CrewAI pay for HTTP 402–gated APIs with USDC micropayments on Base L2. Non-custodial, 0% fee. Unlike Cloudflare Pay-Per-Crawl, works on any host and settles directly on-chain.
Categories
Alternatives to @xenarch/agent-mcp
Are you the builder of @xenarch/agent-mcp?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →