Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xenarch.com/llms.txt

Use this file to discover all available pages before exploring further.

The Xenarch MCP server (@xenarch/agent-mcp) gives AI agents three tools to discover, pay for, and track x402-gated content. It handles wallet management, on-chain USDC payments, and access token retrieval.

What is an MCP server?

The Model Context Protocol (MCP) is an open standard from Anthropic that lets AI agents access external tools. An MCP server exposes a set of tools over stdio or HTTP; agents (like Claude Desktop and Claude Code) call them as needed. The Xenarch MCP server exposes x402 payment tools — check a gate, pay in USDC on Base, retrieve payment history — so any MCP-compatible agent can autonomously pay for gated APIs and content.

What it does

ToolDescription
xenarch_check_gateCheck if a URL or domain has a payment gate. Returns price, contract details, and payment instructions.
xenarch_payExecute a USDC micropayment on Base L2 and return a Bearer access token.
xenarch_get_historyList past payments with tx hashes, amounts, and timestamps.

Supported MCP clients

  • Claude Desktop
  • Claude Code
  • Any MCP-compatible client (Cursor, Cline, etc.)

Quick setup

claude mcp add xenarch -- npx @xenarch/agent-mcp
That’s it for Claude Code. See Installation for Claude Desktop and other clients.

How agents use it

An agent with the Xenarch MCP server can:
  1. Discover: “Check if example.com has a paywall” → calls xenarch_check_gate
  2. Pay: “Pay for access” → calls xenarch_pay, sends USDC on Base
  3. Access: Uses the returned Bearer token to fetch gated content
  4. Review: “Show my payment history” → calls xenarch_get_history
The agent decides when to pay based on the task context. No hardcoded payment logic needed.