Xenarch Agent MCP

Xenarch Agent MCP

Pay for any x402-gated content or API with USDC micropayments on Base. Discover payment gates, execute payments, and view transaction history.

Category
Visit Server

README

Xenarch — MCP Payment Server for AI Agents

npm License: MIT

MCP server that lets AI agents pay for x402-gated content and APIs with USDC micropayments on Base. No API keys. No signup. Non-custodial — Xenarch never holds funds. Auto-generates a wallet on first run.

How It Works

1. Discover    xenarch_check_gate("example.com")
               → { gated: true, price_usd: "0.003", protocol: "x402" }

2. Pay         xenarch_pay("example.com")
               → USDC sent on Base via splitter contract
               → { access_token: "eyJ...", expires_at: "..." }

3. Access      Re-request the URL with Authorization: Bearer <token>
               → Full content returned

No API keys. No signup. The agent pays directly on-chain — Xenarch never holds funds.

Agent MCP Server

Three tools for AI agents:

Tool Description
xenarch_check_gate Check if a URL/domain has a payment gate. Returns pricing and payment details.
xenarch_pay Pay for gated content. Executes USDC payment on Base via the splitter contract.
xenarch_get_history View past payments made by this wallet.

Example Responses

<details> <summary><code>xenarch_check_gate</code></summary>

{
  "gated": true,
  "gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
  "price_usd": "0.003",
  "splitter": "0xC6D3a6B6fcCD6319432CDB72819cf317E88662ae",
  "collector": "0xabc123...publisher_wallet",
  "network": "base",
  "asset": "USDC",
  "protocol": "x402"
}

</details>

<details> <summary><code>xenarch_pay</code></summary>

{
  "success": true,
  "tx_hash": "0xdef456...abc789",
  "block_number": 28451023,
  "amount_usd": "0.003",
  "url": "example.com",
  "access_token": "eyJhbGciOiJIUzI1NiJ9...",
  "expires_at": "2026-04-10T15:05:00Z",
  "wallet": "0x123...your_wallet"
}

</details>

<details> <summary><code>xenarch_get_history</code></summary>

{
  "payments": [
    {
      "domain": "example.com",
      "amount_usd": "0.003",
      "tx_hash": "0xdef456...abc789",
      "paid_at": "2026-04-10T14:35:00Z"
    }
  ],
  "total_spent_usd": "0.003000",
  "count": 1,
  "wallet": "0x123...your_wallet"
}

</details>

Setup

  1. Configure your wallet:
mkdir -p ~/.xenarch
cat > ~/.xenarch/wallet.json << 'EOF'
{
  "privateKey": "0xYOUR_PRIVATE_KEY"
}
EOF
chmod 600 ~/.xenarch/wallet.json
  1. Add to Claude Code:
claude mcp add xenarch -- npx @xenarch/agent-mcp

Or add to Claude Desktop / any MCP client:

{
  "mcpServers": {
    "xenarch": {
      "command": "npx",
      "args": ["@xenarch/agent-mcp"],
      "env": {
        "XENARCH_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY"
      }
    }
  }
}

Environment Variables

Variable Default Description
XENARCH_PRIVATE_KEY Wallet private key (overrides config file)
XENARCH_RPC_URL https://mainnet.base.org Base RPC endpoint
XENARCH_API_BASE https://api.xenarch.dev Xenarch platform API
XENARCH_NETWORK base Network (base or base-sepolia)
XENARCH_AUTO_APPROVE_MAX Max USD to auto-approve without prompting

Examples

See xenarch-examples for working integration examples — Python agents, LangChain, CrewAI, Claude Desktop setup, and publisher middleware.

Development

npm install
npm run build

Structure

packages/
  shared/    — Payment logic, types, config (reused across servers)
  agent/     — MCP server for AI agents

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured