# xenarch-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/xenarch-ai/xenarch-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 461  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/xenarch-mcp

## Description
Pay for any x402-gated content or API with USDC micropayments on Base.

## Tools
Capabilities this server exposes over MCP:

- **xenarch_check_gate** — Check if a URL/domain has an x402 payment gate. Returns the accepted payment requirements — price, asset, network, seller wallet.
- **xenarch_pay** — Pay for an x402-gated URL. Signs an EIP-3009 USDC transfer, settles on-chain, returns the tx hash and the gated content.
- **xenarch_pay_link** — Pay a Xenarch pay-link by id (`pay.xenarch.com/l/<id>`): fetches the envelope, settles USDC on Base, confirms with the link.
- **xenarch_get_history** — View past payments made by this wallet (totals, per-domain, pagination).
- **xenarch_agent_login** — 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 `xenarch_agent_*` tool.
- **xenarch_agent_status** — Agent profile (name, paused state) + spend summary for a period. Read-only.
- **xenarch_agent_get_caps** — Read spending caps (per-tx, daily, monthly) + remaining headroom. Read-only.
- **xenarch_agent_set_caps** — Set caps in USD (`none` disables an axis). Raising/removing a cap needs `confirm: true`; tightening is free.
- **xenarch_agent_reset_day_cap** — Reset today's daily-spend counter to the full daily cap.
- **xenarch_agent_get_scope** — Read scope: default posture (allow/deny) + the rule list. Read-only.
- **xenarch_agent_add_scope_rule** — Add an allow/deny rule. `deny` tightens (free); `allow` loosens (needs `confirm`).
- **xenarch_agent_remove_scope_rule** — Remove a rule by id/prefix. Removing a `deny` loosens scope (needs `confirm`).
- **xenarch_agent_set_default_scope** — Set the posture for unmatched URLs. `deny` tightens; `allow` loosens (needs `confirm`).
- **xenarch_agent_pause** — Kill switch — block all of the agent's payments immediately. No confirm.
- **xenarch_agent_resume** — Lift the pause (needs `confirm`).
- **xenarch_agent_list_keys** — List the agent's `xa_live_` API keys (id, label, last-used, revoked). Never returns plaintext. Read-only.
- **xenarch_agent_create_key** — Issue a new `xa_live_` key (plaintext returned once). Needs `confirm`.
- **xenarch_agent_rotate_key** — Rotate a key by id/prefix — invalidates the old secret, returns a new one once. Needs `confirm`.
- **xenarch_agent_revoke_key** — Permanently revoke a key by id/prefix. Needs `confirm`.
- **xenarch_agent_get_receipts** — List the agent's payment receipts with filters (period, status, source, domain). Read-only.
- **xenarch_create_link** — Create a pay-link. VALIDATE-FIRST: `mode:'validate'` reports missing fields; then `mode:'create'` + `confirm:true` signs + creates. Amount is USDC (max 1.00).
- **xenarch_list_links** — List the merchant's pay-links (newest first), cursor-paginated. Read-only.
- **xenarch_get_link** — Get one pay-link's detail (status, params, stats) by id. Read-only.
- **xenarch_revoke_link** — Revoke a pay-link by id so it can no longer be paid. Needs `confirm`.
- **xenarch_list_payments** — List payments received across the merchant's links (newest first), cursor-paginated. Read-only.
- **xenarch_list_subscribers** — List subscribers across subscription links, with filters (link_id, status, mode). Read-only.
- **xenarch_get_merchant_profile** — Get the merchant profile (issuer identity, domain-verification status). Read-only.
- **xenarch_update_merchant_profile** — Update the merchant profile (name, site, email, address, tax id, brand color, logo, payout rhythm). Whole-state upsert.
- **xenarch_verify_domain** — Verify the merchant's domain via its `_xenarch.<site>` DNS TXT record. Set the site first via `xenarch_update_merchant_profile`.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "xenarch-mcp": {
    "command": "npx",
    "args": ["-y","@xenarch/agent-mcp"],
    "env": {
      "XENARCH_PRIVATE_KEY": "",
      "XENARCH_API_TOKEN": "",
      "XENARCH_MAX_PAYMENT_USD": ""
    }
  }
}
```

**Requires environment variables:** `XENARCH_PRIVATE_KEY`, `XENARCH_API_TOKEN`, `XENARCH_MAX_PAYMENT_USD` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What xenarch-mcp does

xenarch-mcp connects MCP-compatible agents to x402 payment gates and the Xenarch control plane. Agents can inspect a URL or domain before paying, review the accepted price and payment details, and settle an eligible request with USDC on Base. After settlement, the payment tool fetches the gated resource and returns its content together with the transaction hash.

The payment flow is non-custodial: funds move directly from the agent wallet to the seller wallet. The wallet uses USDC and does not need ETH or another gas token. Payment history includes totals, domains, pagination, and transaction details.

A second group of tools manages an agent account. Operators can inspect or change per-transaction, daily, and monthly caps; define allow and deny rules; pause payments; manage `xa_live_` keys; and query receipts. A third group supports merchants by creating, listing, inspecting, and revoking pay-links, as well as reviewing received payments and subscribers.

## How it works

For a gated resource, call `xenarch_check_gate` to receive the payment requirements, including price, asset, network, and seller wallet. `xenarch_pay` then signs an EIP-3009 USDC transfer authorization, settles it on Base, and retries the resource with proof of payment. `xenarch_pay_link` handles Xenarch links by fetching the payment envelope, settling USDC, and confirming the payment with the link.

The discovery and payment tools use the agent wallet. The official MCP payment flow also requires an `XENARCH_API_TOKEN`; payments fail closed without it so they remain subject to managed caps and scope rules. Control-plane and merchant operations use a SIWE session. `xenarch_agent_login` provides a browser-wallet sign-in link, and the resulting seven-day session is stored in `~/.xenarch/config.json` for automatic use.

Operations that loosen spending or access generally require `confirm: true`, while tightening caps or scope does not. Payment pausing is available as an immediate kill switch.

## Setup and configuration

Provide a funded wallet through `XENARCH_PRIVATE_KEY` and an `xa_live_` agent key through `XENARCH_API_TOKEN`. Set `XENARCH_MAX_PAYMENT_USD` to add a local per-call payment ceiling; its default is $1. The wallet must hold USDC on Base. The control-plane token links payments to managed caps, scope rules, and dashboard receipts.

After starting the MCP server, complete the browser-wallet login once with `xenarch_agent_login`, or use the Xenarch agent login flow. The session token is saved locally and must be renewed after seven days. The dashboard identity wallet is separate from the local spending wallet.

Merchant setup begins with `xenarch_update_merchant_profile`. To verify a site, set the merchant site first, then publish the required `_xenarch.<site>` DNS TXT record and call `xenarch_verify_domain`.

## Tools and capabilities

- Inspect x402 gates and accepted payment requirements.
- Pay gated URLs or Xenarch pay-links with USDC on Base.
- Review wallet payment history and filtered agent receipts.
- Read and change spending caps, scope posture, and URL rules.
- Pause or resume agent payments.
- Create, rotate, list, and revoke `xa_live_` API keys.
- Create and manage merchant pay-links, received payments, and subscribers.
- Read or update merchant profile data and verify a domain.

Pay-link creation uses a validation step before creation, and the amount is limited to 1.00 USDC. Read-only tools are available for account status, caps, scope, keys, receipts, links, payments, subscribers, and merchant profile data.

_Full upstream README: https://allmcps.com/mcp/xenarch-mcp/readme_

