Xenarch Agent MCP
OfficialProvides payment gateway tools for AI agents to discover and pay for gated content via USDC micropayments on Base, enabling CrewAI agents to access paid services directly on-chain without API keys or signup.
Provides payment gateway tools for AI agents to discover and pay for gated content via USDC micropayments on Base, enabling LangChain agents to access paid services directly on-chain without API keys or signup.
Provides payment gateway tools for AI agents to discover and pay for gated content via USDC micropayments on Base, enabling Python agents to access paid services directly on-chain without API keys or signup.
Xenarch — x402 MCP server for AI agent payments
Xenarch is a non-custodial x402 MCP server. AI agents — Claude, Cursor, LangChain, CrewAI — pay for HTTP 402—gated APIs and content with USDC micropayments on Base L2. No API keys, no subscriptions, no credit card on file. The agent wallet never needs ETH; USDC is the only token it ever holds. Payments settle on-chain: agent wallet → publisher wallet, direct. 0% Xenarch fee — there's no Xenarch contract in the money flow.
What makes Xenarch different
Cloudflare Pay-Per-Crawl | Stripe | TollBit | Vercel | Other x402 MCP servers | Xenarch | |
Works on any host | × (Cloudflare only) | ✓ | × (enterprise) | Vercel-first | ✓ | ✓ |
Non-custodial | × | × | × | platform-routed | varies | ✓ direct USDC transfer |
Agent needs ETH | n/a | n/a | n/a | varies | varies | ✓ never |
Fee | platform rate | 2.9% + $0.30 | platform rate | platform rate | varies | 0%, structurally |
Open standard | proprietary | proprietary | proprietary | x402 | x402 | x402 + pay.json (authored by Xenarch) |
Publisher monetization | ✓ (Cloudflare-gated) | ✓ (any stack) | ✓ (enterprise only) | × | × | ✓ (any stack) |
Related MCP server: x402-discovery
How it works
1. Discover xenarch_check_gate("example.com")
→ { gated: true, accepts: [...] }
2. Pay xenarch_pay("example.com")
→ x402-fetch signs an EIP-3009 USDC transferWithAuthorization
→ Settlement goes on-chain
→ Re-fetches the resource with proof of payment
→ { tx_hash, content }No API keys. No signup. The agent wallet only ever needs USDC — no ETH, no gas coin of any kind. Xenarch never holds funds and there is no Xenarch contract between the agent and the publisher.
MCP tools
29 tools across three groups. Group 1 (discovery & payments) works with just a
wallet. Groups 2 and 3 (control plane + merchant) manage your Xenarch account and
need a SIWE session — run xenarch agent login once (see Account tools auth).
1. Discovery & payments — agent wallet only
Tool | Description |
| Check if a URL/domain has an x402 payment gate. Returns the accepted payment requirements — price, asset, network, seller wallet. |
| Pay for an x402-gated URL. Signs an EIP-3009 USDC transfer, settles on-chain, returns the tx hash and the gated content. |
| Pay a Xenarch pay-link by id ( |
| View past payments made by this wallet (totals, per-domain, pagination). |
2. Agent control plane — manage your spending agent (SIWE session)
Caps, scope, kill-switch, and API keys for the operator's agent. Privileged
(loosening) operations require confirm: true; tightening is free.
Tool | Description |
| Browser-wallet sign-in to the control plane. Returns a link; open it, approve, call again to finish. The 7-day session powers every other |
| Agent profile (name, paused state) + spend summary for a period. Read-only. |
| Read spending caps (per-tx, daily, monthly) + remaining headroom. Read-only. |
| Set caps in USD ( |
| Reset today's daily-spend counter to the full daily cap. |
| Read scope: default posture (allow/deny) + the rule list. Read-only. |
| Add an allow/deny rule. |
| Remove a rule by id/prefix. Removing a |
| Set the posture for unmatched URLs. |
| Kill switch — block all of the agent's payments immediately. No confirm. |
| Lift the pause (needs |
| List the agent's |
| Issue a new |
| Rotate a key by id/prefix — invalidates the old secret, returns a new one once. Needs |
| Permanently revoke a key by id/prefix. Needs |
| List the agent's payment receipts with filters (period, status, source, domain). Read-only. |
3. Merchant — get paid (SIWE session)
Create and manage pay-links, see payments and subscribers, set the merchant profile. Same SIWE session as the control plane.
Tool | Description |
| Create a pay-link. VALIDATE-FIRST: |
| List the merchant's pay-links (newest first), cursor-paginated. Read-only. |
| Get one pay-link's detail (status, params, stats) by id. Read-only. |
| Revoke a pay-link by id so it can no longer be paid. Needs |
| List payments received across the merchant's links (newest first), cursor-paginated. Read-only. |
| List subscribers across subscription links, with filters (link_id, status, mode). Read-only. |
| Get the merchant profile (issuer identity, domain-verification status). Read-only. |
| Update the merchant profile (name, site, email, address, tax id, brand color, logo, payout rhythm). Whole-state upsert. |
| Verify the merchant's domain via its |
Account tools auth
Payments (group 1) need a funded wallet (
XENARCH_PRIVATE_KEY) and a control-plane link (XENARCH_API_TOKEN) — the official MCP refuses to pay without the token (XEN-480: an unlinked agent has no caps). A local per-call cap (XENARCH_MAX_PAYMENT_USD, default $1) applies on top of the managed per-tx / daily / monthly caps.Control plane + merchant (groups 2–3) need a SIWE session. Run
xenarch agent loginonce — it writes a 7-daysession_tokento~/.xenarch/config.json, which the MCP server reads automatically. Re-run when it expires, or callxenarch_agent_logindirectly from your client.Set
XENARCH_API_TOKEN(anxa_live_agent key) soxenarch_payis enforced against your managed caps/scope and every MCP payment shows up in the dashboard receipts feed. The dashboard is free — sign in with your wallet at dash.xenarch.dev (just a signature, nothing moves) for per-tx / daily / monthly caps, scope rules, a kill switch, and full history. Without the token,xenarch_payrefuses to pay (fail-closed) so an unlinked agent can't settle uncapped. Note: the dashboard sign-in wallet is your identity — separate from the agent's local spending wallet.
Example responses
{
"gated": true,
"gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
"accepts": [
{
"scheme": "exact",
"network": "base",
"maxAmountRequired": "3000",
"resource": "https://example.com/article",
"payTo": "0xabc123...publisher_wallet",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"maxTimeoutSeconds": 60
}
],
"seller_wallet": "0xabc123...publisher_wallet",
"network": "base",
"asset": "USDC"
}{
"success": true,
"gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
"tx_hash": "0xdef456...abc789",
"seller_wallet": "0xabc123...publisher_wallet",
"url": "https://example.com/article",
"wallet": "0x123...your_wallet",
"content": "...gated content here..."
}{
"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"
}HTTP 402 — the unused status code that x402 finally activates
HTTP 402 Payment Required is a status code reserved in the HTTP spec since 1997 for machine-to-machine payment. It went unused for decades because there was no open protocol for how a client should pay a 402 response.
x402 is that protocol: a server returns HTTP 402 with a signed price and payment details, the client signs a USDC micropayment on Base L2, and retries the request with proof of payment. Xenarch's MCP server automates both halves for AI agents — it reads the 402 challenge, signs the payment via x402-fetch, and replays the request, returning the on-chain tx hash plus the gated content.
Learn more: the x402 spec defines the payment handshake; pay.json (authored by Xenarch) is the companion open standard for machine-readable pricing served at /.well-known/pay.json — think robots.txt for payments.
API monetization with HTTP 402
Xenarch is an API monetization primitive built on the HTTP 402 spec. Unlike API gateway monetization platforms (Apigee, Kong, AWS API Gateway) that require subscriptions, dashboards, and API keys, Xenarch lets any API charge per request with no account creation and no key provisioning — the caller pays USDC on Base L2, the API verifies the on-chain transaction, access is granted.
For publishers, this means:
No integration with Stripe/card processors
No subscription plans, pricing tiers, or quota dashboards
No custodial balance held by a platform
Per-request pricing that works for human users, bots, and AI agents uniformly
API monetization that settles on-chain in real time
The Python SDK includes a one-decorator FastAPI middleware; see xenarch-sdks/python for publisher integration.
Setup
Configure your wallet:
mkdir -p ~/.xenarch
cat > ~/.xenarch/wallet.json << 'EOF'
{
"privateKey": "0xYOUR_PRIVATE_KEY"
}
EOF
chmod 600 ~/.xenarch/wallet.jsonAdd to Claude Code:
claude mcp add xenarch -- npx @xenarch/agent-mcpOr add the same JSON to any MCP client's config file:
Claude Desktop —
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) /%APPDATA%\Claude\claude_desktop_config.json(Windows)Cursor —
~/.cursor/mcp.json(global) or.cursor/mcp.json(per-project)Cline (VS Code) — the MCP Servers panel → "Configure MCP Servers", or
cline_mcp_settings.json
{
"mcpServers": {
"xenarch": {
"command": "npx",
"args": ["@xenarch/agent-mcp"],
"env": {
"XENARCH_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY",
"XENARCH_API_TOKEN": "xa_live_…optional, enforces caps/scope"
}
}
}
}Fund the wallet with USDC on Base. That's it — no ETH, no other token needed.
(Optional) To use the control-plane + merchant tools, run
xenarch agent loginonce to create a SIWE session.
Environment variables
Variable | Default | Description |
| — | Wallet private key (overrides config file) |
| — | Required. Agent |
|
| Base RPC endpoint |
|
| Xenarch platform API |
|
| Network ( |
|
| Local per-call payment cap (USDC). The only spending ceiling in standalone mode — |
The control-plane + merchant tools don't use an env var for auth — they read the
SIWE session_token that xenarch agent login writes to ~/.xenarch/config.json.
Examples
See xenarch-examples for working integration examples — Python agents, LangChain, CrewAI, Claude Desktop setup, and publisher middleware.
Development
npm install
npm run buildStructure
packages/
shared/ — Payment logic, types, config (reused across servers)
agent/ — MCP server for AI agentsFAQ
How does Claude pay for APIs with Xenarch?
Install the Xenarch MCP server (claude mcp add xenarch -- npx @xenarch/agent-mcp), give it a wallet, and Claude resolves any HTTP 402 response automatically with a USDC micropayment on Base L2.
Does Xenarch work with Cursor, LangChain, or CrewAI? Yes. Xenarch exposes an MCP server that any MCP-compatible client can use — Claude Code, Claude Desktop, Cursor, Cline, LangChain, CrewAI, and any other client that speaks Model Context Protocol.
Is FastAPI supported for publishers?
Yes, via the Python SDK (pip install xenarch[fastapi]) — a one-decorator middleware returns HTTP 402 with the price and verifies the on-chain payment. See xenarch-sdks/python.
Is Xenarch custodial? No. Payments settle on-chain as a direct USDC transfer from the agent wallet to the publisher wallet. Funds never touch Xenarch infrastructure and there is no Xenarch contract in the money flow.
Does the agent need ETH for gas? No. USDC is the only token the agent wallet ever needs. Fund it with USDC and you're done — no ETH, no other gas coin.
What's the fee? 0%, structurally. Xenarch never sits in the money flow — there's no Xenarch contract that could charge a fee.
What's the maximum payment per call? $1 USD.
What is x402? x402 is an open protocol for HTTP 402 Payment Required. A server returns 402 with a price, the client signs a USDC micropayment on Base L2 (or other supported chain), and retries the request with proof of payment.
What is HTTP 402? HTTP 402 Payment Required is a status code reserved in the HTTP spec since 1997 for machine-to-machine payment. x402 is the open protocol that finally uses it.
How does Xenarch compare to Cloudflare Pay-Per-Crawl? Cloudflare Pay-Per-Crawl only works for sites behind Cloudflare and is custodial. Xenarch works on any host and is non-custodial — publishers are paid directly on-chain.
How does Xenarch compare to TollBit? TollBit is enterprise-licensing focused. Xenarch is self-serve, non-custodial, and works for the long tail of publishers and any AI agent without enterprise contracts.
Links
Website: https://xenarch.com
License
MIT
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xenarch-ai/xenarch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server