
Xenarch Mcp
io.github.xenarch-aiPublished by GitHub account xenarch-aiv1.3.1Updated Oct 24, 2026
Xenarch — x402 MCP server for AI agent payments. Non-custodial, USDC on Base L2.
Overview
A local MCP server that lets an AI assistant detect x402 payment gates and pay for gated web content with USDC micropayments on Base.
- What you can do
- Check whether a URL or domain has an x402 payment gate and read its price, asset, network and seller wallet; pay a gated URL or a Xenarch pay-link in USDC and get back the transaction hash and content; review past payments and totals for the wallet; manage the spending agent's caps, scope rules, pause switch and API keys; create, list and revoke merchant pay-links, view payments and subscribers, and update the merchant profile and domain verification.
- When to use it
- Use it when an assistant needs to fetch content or APIs that answer with HTTP 402 and you are willing to pay small USDC amounts per request, or when you operate a Xenarch agent or merchant account and want to manage caps, scope and pay-links from the chat client.
- Requirements
- Runs locally via npx as a Node.js package. Needs a funded wallet: XENARCH_PRIVATE_KEY (a hex wallet private key, auto-generated on first run if omitted) holding USDC on Base. Payments also require XENARCH_API_TOKEN, an xa_live_ agent key; without it payments are refused. Optional: XENARCH_MAX_PAYMENT_USD, XENARCH_NETWORK, XENARCH_RPC_URL, PORT, TRANSPORT. Control-plane and merchant tools need a SIWE session created with the xenarch agent login command.
Installation
In SourceWeft
- Open Xenarch Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
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
How it works
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
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.
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.
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
xenarch_check_gate
xenarch_pay
xenarch_get_history
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:
- Add to Claude Code:
Or 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
-
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
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
Structure
FAQ
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
- npm: https://www.npmjs.com/package/@xenarch/agent-mcp
- PyPI: https://pypi.org/project/xenarch/
- Smithery: https://smithery.ai/servers/xenarch/xenarch-mcp
- GitHub: https://github.com/xenarch-ai/xenarch-mcp
License
MIT
Source: README.md at commit 68cbdf1
Tools
0Version history
1- v1.3.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts