Back to Browse

Glitter Agent Gate MCP Server

Developer ToolsLow Risk9.7MCP RegistryLocal
Free

Server data from the Official MCP Registry

Pay-per-call agent tools (web to Markdown, XRPL data, file conversion) via x402 in XRP or RLUSD.

About

Pay-per-call agent tools (web to Markdown, XRPL data, file conversion) via x402 in XRP or RLUSD.

Security Report

9.7
Low Risk9.7Low Risk

Valid MCP server (4 strong, 5 medium validity signals). No known CVEs in dependencies. ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.

7 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

network_websocket

Check that this permission is expected for this type of plugin.

file_system

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Seed of a dedicated low-balance agent wallet that pays per call. Never use a main wallet.Required

Environment variable: XRPL_SEED

Must be 'true' to pay on XRPL mainnet (real funds).Optional

Environment variable: X402_ALLOW_MAINNET

Gateway base URLOptional

Environment variable: GATEWAY_URL

Optional override. Default: the network the gateway advertises (production = xrpl:0 mainnet).Optional

Environment variable: X402_NETWORK

Per-call spend cap in XRPOptional

Environment variable: MAX_XRP_PER_CALL

Total XRP the server may spend per sessionOptional

Environment variable: SESSION_BUDGET_XRP

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "glitter-agent-gate-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "glitter-agent-gate-mcp"
      ],
      "env": {
        "XRPL_SEED": "your-xrpl-seed-here",
        "GATEWAY_URL": "your-gateway-url-here",
        "X402_NETWORK": "your-x402-network-here",
        "MAX_XRP_PER_CALL": "your-max-xrp-per-call-here",
        "SESSION_BUDGET_XRP": "your-session-budget-xrp-here",
        "X402_ALLOW_MAINNET": "your-x402-allow-mainnet-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

Glitter Agent Gate — x402 pay-per-call tools for AI agents

Live on mainnet: https://agents.glitterchainscout.trade (deployed 17 Nov 2026)

"The plumbing agents pay for": a Cloudflare Worker that sells small, useful tool endpoints to AI agents, paid per call with x402 on the XRP Ledger in XRP or RLUSD (via the t54 facilitator). It can also offer USDC on Base as a second option in the same 402 so EVM-only buyers and the Coinbase/PayAI Bazaar indexes can find it. A secondary marketplace lets other providers list their own APIs and get paid directly.

Status: live on XRPL mainnet + Base at https://agents.glitterchainscout.trade ([env.production]), listed on the XRPL AI Hub. Validated end to end on XRPL testnet (xrpl:1); no mainnet payment has been made yet. Local dev stays on testnet. Real testnet settlements: see e2e/RESULTS.md.

What it sells (v1.2, market prices from 25 Nov 2026)

Every 402 offers USDC on Base (eip155:8453) and XRP / RLUSD on the XRP Ledger (xrpl:0). USDC on Solana is added automatically once the Solana receiving wallet has a USDC token account (checked every 10 minutes; PayAI facilitator).

SlugWhatPrice (XRP / RLUSD / USDC)
base-token-safetyBase ERC-20 risk check: upgradeable proxy + admin, owner powers read from the real contract code (mint, pause, blacklist, fee setters, max-tx, trading switch), live paused(), Uniswap v2/v3 + Aerodrome pool liquidity, buy/transfer/sell simulation with taxes. RPC failures are not charged.0.010905 / 0.01 / 0.01
base-honeypotBase honeypot / tax simulation only: eth_call with a state override (no keys, nothing sent) buys, transfers and sells through the deepest pool; returns canSell, buy/transfer/sell tax, round-trip loss.0.005453 / 0.005 / 0.005
base-data/balance, /token, /block, /tx, /transfers on Base with 5 fallback RPCs. Empty results are 404 and not charged.0.002182 / 0.002 / 0.002
xrpl-presendXRPL check before sending: account exists or amount covers reserve, destination tag required, DepositAuth, DisallowXRP, blackholed, and for tokens trust line / frozen line / global freeze / require-auth / limit. Verdict ok_to_send / send_with_caution / do_not_send.0.001091 / 0.001 / 0.001
xrpl-more/nfts, /amm, /orderbook, /history on the XRP Ledger. Empty results are 404 and not charged.0.001091 / 0.001 / 0.001
web-ai/summary (extractive key sentences) and /extract (named fields from page metadata / JSON-LD). robots.txt honoured, every redirect re-checked, no emails or phone numbers collected.0.005453 / 0.005 / 0.005
xrpl-token-safetyXRPL issued-token risk check: freeze / global freeze / NoFreeze, clawback, require-auth, transfer fee, blackholed keys, XRP AMM depth + price, holder concentration. Risk level + plain-English flags.0.005454 / 0.005 / 0.005
web-markdownPublic web page → clean Markdown (Readability). Honors robots.txt. No captcha/paywall/bot-protection bypass; blocked pages return an error and are not charged.0.002182 / 0.002 / 0.002
xrpl-data/account (balance, reserve, spendable, trust lines, last 10 txs), /token (issuer, supply, XRP AMM price), /prices (CoinGecko). Mainnet or testnet ledgers.0.001091 / 0.001 / 0.001
convertPDF / CSV / TSV / XLSX / HTML → JSON or text. Raw bytes, or JSON {url} / {content_base64}. 10 MB max.0.005454 / 0.005 / 0.005
json-toolsSafe deterministic JSON ops (pick, flatten, sort_by, dedupe, to_csv…). No eval, no user regex.0.001091 / 0.001 / 0.001
helloSmallest paid call, for testing clients.0.0001 / 0.0001 / 0.001

XRP prices use US$0.917/XRP (CoinGecko, 25 Nov 2026), rounded up to whole drops. They are static in src/catalog.ts; re-check if XRP moves a lot. Every request that carries a payment is logged with its outcome (payment_attempts table, shown on /dashboard). A code sandbox is intentionally not in v1 (security risk). Later option: a locked-down sandbox on a separate Worker.

Architecture

agent ──GET /s/xrpl-data/account?address=r…──▶ Worker (src/index.ts)
      ◀── 402 + PAYMENT-REQUIRED (accepts: XRP, RLUSD on xrpl:1 [+ USDC on Base]) + bazaar extension
agent signs XRPL Payment (x402-xrpl SDK, invoice-bound, SourceTag 804681468)
      ──retry with PAYMENT-SIGNATURE──▶ Worker
           1. look up invoice in D1, match the exact option (amount/asset/payTo/invoiceId)
           2. POST facilitator /verify   (t54 for xrpl:*, PayAI for eip155:*)
           3. claim invoice atomically (no double use)
           4. run the tool (or proxy to a listed provider's upstream)
              └ tool failed → invoice re-opens, nothing settled, X-402-Charged: false
           5. POST facilitator /settle → tx hash
              └ settle failed → result withheld (never given away free)
           6. record settlement in D1 → 200 + result + PAYMENT-RESPONSE
  • Non-custodial. Buyers pay the service's payTo directly on-ledger. The facilitator only submits the buyer-signed blob. The gateway never holds keys or funds.
  • Storage: D1 (invoices, settlements, call_log, providers, listed_services). Schema: migrations/0001_init.sql.
  • Safety rails: mainnet refused unless ALLOW_MAINNET="true"; inputs validated before the 402 so nobody pays for a bad request; replay/underpayment/cross-service invoice reuse rejected (e2e/security-tests.ts); SSRF guard on user URLs; size caps; robots.txt.

Files

  • src/index.ts router · src/x402.ts 402/verify/settle logic + Bazaar extension · src/catalog.ts own services and prices
  • src/services/* tool implementations · src/registry.ts marketplace listings + proxy · src/discovery.ts manifests · src/dashboard.ts
  • clients/ts/agent-demo.ts XRPL agent client · clients/ts/agent-demo-base.ts Base USDC client · mcp/ MCP server + server.json
  • e2e/ results, security tests, tx verifier · examples/upstream-provider.mjs sample listed provider · scripts/ testnet wallet setup
  • LISTING.md where to register once live · BUSINESS.md how it could earn, honestly

Discovery endpoints (all free)

PathWhat
/servicesJSON catalog for agents (prices, endpoints, params, examples, x402v1 requirement for USDC on Base)
/mcpHosted MCP server (streamable HTTP, JSON-RPC, batches capped at 10). Pay via params._meta["x402/payment"].
/discovery/resourcesx402 v2 spec §8.1 Bazaar-format listing (?network=&payTo=&limit=&offset=)
/.well-known/x402Fan-out catalog (URL list, x402scan format) — crawled hourly by the XRPL AI Hub once registered
/.well-known/agent-card.json (+ legacy /.well-known/agent.json)A2A v1.0 Agent Card; /a2a answers SendMessage with call instructions + prices
/openapi.jsonOpenAPI 3.1 with x-payment-info (x402scan reads this first)
/llms.txtPlain-text guide for LLMs
/.well-known/trustline-merchant.txtBinds the domain to the payout wallet (t54 Trustline standing)
/dashboard, /api/statsCalls, revenue per service and per provider (production fails closed with 503 until the DASHBOARD_TOKEN secret is set)
POST /api/notify-testToken-gated (same DASHBOARD_TOKEN) labelled TEST posts to the private Discord x402 section

Every 402 also carries the official bazaar extension (generated with @x402/extensions/bazaar declareDiscoveryExtension).

Run the demo locally (testnet)

cd /workspace/x402-gateway
npm install
npm run wallets          # creates + faucet-funds testnet wallets -> .secrets/testnet-wallets.json (chmod 600)
npm run rlusd            # trust lines + buys 2 test RLUSD from the testnet XRP/RLUSD AMM
npm run db:migrate
npm run dev              # http://127.0.0.1:8787   (optional: --var BASE_PAY_TO:0x… to show the Base rail)

npm run demo -- --service hello --query name=johnny
npm run demo -- --service xrpl-data --path /account --query "address=rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De" --asset RLUSD
npm run demo -- --service web-markdown --query "url=https://xrpl.org/docs/agents/agentic-payments-x402"
npm run demo -- --service convert --method POST --file e2e/fixtures/sample.pdf --content-type application/pdf
npm run test:security    # replay / underpayment / cross-service reuse
npm run test:mcp         # MCP server over stdio, one paid call
npm run verify:txs       # re-checks every logged tx on the testnet ledger -> e2e/RESULTS.md

Open http://127.0.0.1:8787/dashboard for calls and revenue.

How an agent pays

Use any x402 v2 client. For XRPL: npm i x402-xrpl (or pip install x402-xrpl) and wrap fetch:

import { x402Fetch } from "x402-xrpl"; import { Wallet } from "xrpl";
const paid = x402Fetch({ wallet: Wallet.fromSeed(process.env.XRPL_SEED!), network: "xrpl:0" }); // "xrpl:1" + http://127.0.0.1:8787 for local testnet
const r = await paid("https://agents.glitterchainscout.trade/s/xrpl-data/prices?ids=ripple"); // production = xrpl:0

The SDK picks an option, signs an invoice-bound XRPL Payment, retries with PAYMENT-SIGNATURE, and the gateway returns PAYMENT-RESPONSE ({success, transaction, network, payer}). Claude/other MCP clients: see mcp/README.md (per-call and per-session spend caps built in).

How a provider lists a service (secondary marketplace)

curl -X POST https://agents.glitterchainscout.trade/api/services -H "authorization: Bearer $REGISTRY_ADMIN_TOKEN" -H 'content-type: application/json' -d '{
  "slug":"my-weather","name":"Weather","description":"…","upstream_url":"https://api.example.com/weather",
  "price_xrp":"0.001","price_rlusd":"0.001","pay_to":"rYourXRPLAddress","tags":["weather"]}'

Returns a providerKey (manage/deactivate) and an upstreamSecret; the upstream receives X-Gateway-Secret on every paid call and should reject anything else. REGISTRATION_MODE = admin (default) | open | closed. Buyers pay pay_to directly.

Platform fee trade-off. x402 exact is one payment to one payTo, so a fee can't be split on-ledger without custody. Options:

  1. v1 default: fee 0%. Pay provider directly. Simplest and fully non-custodial.
  2. Fee ledger (implemented): set PLATFORM_FEE_BPS (e.g. 100 = 1%). Each settlement records fee_owed; bill providers later. Non-custodial, but needs trust/collection.
  3. Custodial: gateway is payTo, then pays providers out. Easy fee capture, but holding others' money brings money-transmission/compliance risk. Not built. Listing fees or a premium placement in /services are the other non-custodial routes.

Configs

Default (npm run dev)--env production
Workerglitter-agent-gate-dev (never deployed)glitter-agent-gate
URLhttp://127.0.0.1:8787https://agents.glitterchainscout.trade (Custom Domain, created on deploy)
XRPLxrpl:1 testnet, t54 testnet facilitator, testnet RLUSD issuerxrpl:0 mainnet, t54 mainnet facilitator, RLUSD rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De
XRP/RLUSD payTotestnet wallet rPdrpP…rELk9NdWK29x3qmfw3mHrLi7L6GPbvhFPi (RLUSD trust line verified)
Base USDCBase Sepolia eip155:84532Base eip155:8453, USDC 0x8335…2913, payTo 0xEd31…3d7a
Fee / registration0% / admin0% / admin
Dashboardopen locallyneeds DASHBOARD_TOKEN secret (fails closed)
D1glitter-agent-gate-dev (local)glitter-agent-gate (bc0ec690-…c9d1)

Deploying production

Box wrangler auth is broken (the injected API token returns 401), so production was deployed through the Cloudflare API (MCP execute):

  1. npx wrangler deploy --dry-run --env production --minify --outdir /tmp/bundle-prod
  2. python3 scripts/build-cf-deploy-payload.py → writes .secrets/deploy-code.js (contains secrets, chmod 600, delete after use)
  3. Run that file as the Cloudflare MCP execute code (PUT /accounts/{id}/workers/scripts/glitter-agent-gate). With working wrangler auth instead: npx wrangler deploy --env production (secrets via wrangler secret put … --env production). New migrations: apply via wrangler d1 migrations apply glitter-agent-gate --env production --remote (the d1_migrations table is in sync). Custom domain agents.glitterchainscout.trade → glitter-agent-gate is attached; workers.dev is disabled.

Costs

  • Cloudflare: Workers Free = 100k requests/day but only 10 ms CPU per request. xrpl-data, json-tools and hello are I/O-bound and fit. web-markdown (DOM parsing) and convert (PDF/XLSX) can exceed 10 ms on big inputs, so plan on Workers Paid ($5/month minimum) once those get traffic. D1 free tier (5M row reads, 100k row writes/day) is plenty. Bundle ≈ 1.1 MB gzipped (under the 3 MB free limit). Check Cloudflare's pricing page before launch, these numbers can change.
  • XRPL: the buyer pays the network fee (~0.00001 XRP). Receiving costs nothing. An RLUSD trust line locks a 0.2 XRP owner reserve.
  • Facilitators: t54 hosted: I found no published fee (confirm at support@t54.ai). PayAI: no API key needed. CDP: 1,000 tx/month free, then $0.001/tx, and it needs CDP API keys.
  • Upstream data: CoinGecko's public API is rate-limited and has its own terms. For commercial volume, budget for a paid key or switch sources (on-ledger AMM prices are free).

Reviews

No reviews yet

Be the first to review this server!