AgentGate
Processes ACP/UCP checkout payments using Stripe Shared Payment Tokens and restricted keys, with order-first checkout, order webhooks, and refund tracking.
Integrates with WooCommerce via the Store API and REST v3 for product catalogs, checkout sessions, and order webhooks, enabling agentic commerce.
Adds agent-facing content and MCP endpoints to a WordPress site, indexing pages and serving Markdown/llms.txt without modifying the origin backend.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
AgentGate
AgentGate is an open-source gateway for the agentic web. It is a single static
Caddy v2 binary that sits in front of an existing
website, store or REST API — or next to an existing Nginx, Apache or LiteSpeed in
sidecar mode — and exposes five standard agent-facing interfaces with zero changes
to your origin backend and zero LLM calls:
AI Agents (Claude, ChatGPT, Codex, x402 & UCP clients)
│
▼
┌──────────────────────────────────────────────────────┐
│ AgentGate (Caddy v2) │
│ /llms.txt · *.md · /mcp · x402 · /acp/* · /ucp/* │
└──────────────────────────┬───────────────────────────┘
│ front_proxy (HTTP / php_fastcgi)
│ or sidecar (Nginx / Apache / LiteSpeed)
▼
Your existing website, WooCommerce store, or REST APIContent —
/llms.txt,/llms-full.txt, per-section/llms-{section}.txt,.mdmirrors of indexed pages and safeAccept: text/markdownnegotiation, with offline token estimates.Tools — an MCP server (Streamable HTTP, official Go SDK) with site and catalog search and tools generated from OpenAPI 3.0/3.1.
Payments — a non-custodial x402 paywall (v2, v1 compatible) for EVM networks on HTTP routes and individual MCP tools.
ACP — Agentic Commerce Protocol: product feed, checkout sessions with Stripe Shared Payment Tokens, order webhooks.
UCP — Universal Commerce Protocol: discovery, JWKS, signed checkout with 3DS browser escalation, order webhooks.
Commerce works with WooCommerce (Store API + REST v3), schema.org JSON-LD stores (browser hand-off), digital catalogs and any backend through a signed webhook protocol. Checkout follows an Order-First saga: the order exists in your store before the card is charged, and every step is journaled so a crash never loses money or orders.
Install
Homebrew (macOS / Linux):
brew install ronskii2/tap/agentgateDocker (distroless multi-arch OCI image):
docker pull ghcr.io/ronskii2/agentgate:latestPrebuilt binaries: download linux/darwin (amd64/arm64) static archives and
checksums.txt from GitHub Releases.
Build from source (Go 1.26.10+):
git clone https://github.com/ronskii2/agentgate.git
cd agentgate
make build # produces CGO-free static binary at bin/agentgateRelated MCP server: x402-mcp-commerce
Modular by design — start read-only, enable more later
Every layer (content, mcp, x402, commerce) is toggled independently in
agentgate.yaml. You do not have to adopt payments or commerce to use AgentGate:
What you want to do | Modules to enable | Risk to existing traffic |
Add |
| None — browsers stay on your origin |
Expose an OpenAPI REST API as paid MCP tools & HTTP x402 endpoints (USDC) |
| None — paywall applies only to configured rules |
Add ACP (ChatGPT) & UCP (Google) checkout with Stripe SPT to WooCommerce or a custom backend |
| Isolated under |
Sell digital downloads directly to agents with Stripe or x402 |
| Isolated endpoints; 0% marketplace fees |
Live demo & 5-second site audit
Live in production (read-only content + mcp sidecar behind Nginx + Cloudflare):
https://x-mathai.com/llms.txt— 197 pages indexed in 0.8 s,100/100docs readiness (up from38/100)https://x-mathai.com/riemann-hypothesis.md—text/markdownmirror with offlineo200k_basetoken estimate (1,349tokens vs21.4 KBHTML)https://x-mathai.com/mcp— live Streamable HTTP MCP server (search_docs,get_doc)
Before changing any config on your own site, run agentgate audit (human output or --json for agents):
agentgate audit https://yoursite.com --profile docs # or: api | store | wordpress
agentgate audit https://yoursite.com --profile docs --jsonSample run against https://caddyserver.com/ (docs profile):
Audit result:
26/100— HTTPS passes, while/llms.txt,Accept: text/markdown, and/mcpreturn404(commerce checks are markedn/aand not penalized).HTML → Markdown conversion on
https://caddyserver.com/docs/quick-starts/caddyfile(deterministic Readability + CommonMark, zero LLM calls):37,258 bytes (14,039 tokens)→1,772 bytes (454 tokens)— 96.8% fewer tokens, with navigation, sidebars, scripts, and footers stripped while preserving prose, links, and code blocks.
Quick start
agentgate init --domain shop.example.com --profile docs --mode sidecar --server nginx
agentgate validate --config agentgate.yaml
agentgate run --config agentgate.yaml
agentgate audit https://shop.example.com --profile docsOperator guides: front_proxy mode (AgentGate is the
web server) and sidecar mode (behind an existing
Nginx, Apache or LiteSpeed). Ready-made test beds live in examples/.
Set up with your AI coding agent
Every AgentGate command is non-interactive with deterministic exit codes and --json
audit output. This repository also ships an agent index (llms.txt) and a
ready-to-use Agent Skill (skills/agentgate/SKILL.md).
To let Claude Code, Codex, Cursor, or another agent set it up for you, edit only the first two lines below and paste the block:
My site: https://YOUR-DOMAIN.com
Modules I want: read-only content + MCP (or add: x402, commerce/woocommerce, commerce/digital)
Use AgentGate (https://github.com/ronskii2/agentgate) and follow skills/agentgate/SKILL.md to set it up for my site above:
1. Run `agentgate audit <my site> --json` and summarize what is missing.
2. Only enable the modules I listed above (keep unused modules disabled; start in `sidecar` mode if Nginx/Apache/LiteSpeed already serves my site so human browser traffic is untouched).
3. Generate `agentgate.yaml` and any web-server snippets with `agentgate init`, keep all secrets strictly in environment variables (never in YAML or git), and run `agentgate validate` until there are zero errors.
4. Start AgentGate, run `agentgate sync`, verify locally before reloading the web server, and confirm the live endpoints (`/llms.txt`, `.md`, `Accept: text/markdown`, `/mcp`).
5. Only if I enabled payments or commerce, walk me step-by-step through the external account steps I need to complete (Stripe restricted key permissions, OpenAI/Stripe ACP feed submission, Google Merchant Center UCP link, or x402 `pay_to` wallet).Commands
Command | Purpose |
| Generate |
| Check the configuration; refuse placeholder wallets, non-restricted Stripe keys, missing merchant data; |
| Run the server (Caddy commands, with the AgentGate config adapter) |
| Score what agents see on a site, per profile, without manipulative penalties |
| Re-index content, reload the catalog, push the ACP product feed |
| List x402 payments that need a manual refund; record the refund transaction |
| Live terminal dashboard of agent traffic, payments and orders |
Principles
Caddy does the HTTP. TLS, HTTP/3, reverse proxying and FastCGI are Caddy's; there is no hand-written server.
No LLM calls. The gateway is deterministic.
Non-custodial. AgentGate never holds wallet keys or raw card data: x402 payments go straight to your
pay_toaddress through a facilitator; cards are charged with Stripe Shared Payment Tokens using a restricted key.Static and offline. One CGO-free binary; no network access at startup; reference data (USDC token registry, tokenizer vocabulary) is embedded.
Privacy. Every SQLite connection uses
PRAGMA secure_delete = ON; buyer personal data is scrubbed after at most 24 hours and never reaches the logs.
Token estimates
Markdown responses and llms*.txt carry
X-Estimated-Tokens: <n>; tokenizer="o200k_base". The count uses the OpenAI
o200k_base BPE vocabulary embedded in the binary (no network access) and equals
tiktoken's count for that encoding. For models outside the OpenAI o200k_base
family it is an approximation: other tokenizers split text differently, most of all
in non-English scripts and in code.
Honest boundaries
The first two limits are part of the product definition (SPEC §1.2) and are printed
by every agentgate audit:
Protocol readiness is not platform listing. Deploying
/.well-known/ucp,/acp/*and the product feed covers the technical requirements of ACP and UCP. A native buy button inside the closed storefronts of ChatGPT and Google additionally requires merchant registration with those platforms (a partner application and feed submission to OpenAI/Stripe for ACP; linking Google Merchant Center for UCP).x402 cannot paywall open HTML. x402 enforces payment on every configured API endpoint, MCP tool, data export and paid resource, regardless of
User-Agent. Public HTML pages that stay open to humans without authorization cannot be protected with402from a scraper that perfectly imitates a browser, without also showing a paywall to real visitors.Token counts are estimates outside the
o200k_basefamily (see above).Bot identity is only as strong as its proof. Web Bot Auth signatures and reverse-DNS checks of search crawlers are verified; a
User-Agentalone is never trusted for anything but analytics.
Performance
Measured with make bench (SPEC §8.1: vegeta, 1000 RPS, 100 connections, 60 s,
local mock upstream). Latest run (bench/results/):
Measure | SPEC budget | Measured |
HTML proxying overhead, p99 vs stock Caddy | ≤ 1.5 ms | below noise (2.67 ms vs 3.22 ms) |
Cached Markdown, p99 | ≤ 3.0 ms | 1.64 ms |
Idle memory, 1 site (10k pages, 50k offers) | ≤ 120 MiB | 90 MiB |
Each additional active site | ≤ +15 MiB | +4 MiB |
Static binary (linux/amd64) | ≤ 95 MiB | 74 MiB |
OCI image, compressed / uncompressed | ≤ 40 / 100 MiB | 28 / 81 MiB |
Development
make build # bin/agentgate
make test # unit + end-to-end tests, no network
make conformance-offline # protocol conformance against the frozen specs, network disabled
make conformance-live # release gate: real Base Sepolia x402 payment, WooCommerce + Stripe test mode
make bench # SPEC §8.1 measurementsdocs/SPEC.md is the specification and docs/PHASES.md maps every requirement to its
implementation and test. Protocol details come only from the frozen upstream sources
in testdata/specs/upstream/.
License
Apache-2.0. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Zero-auth Streamable HTTP MCP server for cited Web3, token risk, and on-chain deep research.
HTTP-first Apify MCP server for Substack RAG Markdown, sponsor domains, and /about emails.
Zero-dependency Cloudflare Worker gateway turning websites and REST APIs into MCP tools.
Public Streamable HTTP MCP gateway for XGRChain, XDaLa sessions, Explorer data and XGR standards.
Related MCP Servers
- FlicenseAqualityCmaintenanceMCP server for a live x402 payment gateway on Base (USDC). Lets AI agents discover, preview for free, then pay per call — with prepaid gasless payments, signed receipts, and delta delivery.7-
- AlicenseAqualityBmaintenanceMCP server that gives Claude/GPT agents commerce tools — each tool call pays an upstream x402 endpoint and returns its artifact.1513 npm8Apache 2.0

AISIX AI Gatewayofficial
AlicenseAqualityAmaintenanceSelf-hosted MCP gateway that registers upstream MCP servers and fronts them behind one governed Streamable HTTP endpoint: per-tool access control by caller API key, guardrails over tool arguments and results, rate limits, and usage logs. The same Rust gateway also proxies LLM and A2A agent traffic.1243Apache 2.0- AlicenseNot gradedqualityDmaintenanceAn open-source, zero-dependency Model Context Protocol (MCP) server and HTTP 402 payment gateway built for Cloudflare Workers and Node.js. This project enables AI agents (Claude Desktop, Cursor, etc.) to natively discover, negotiate, and autonomously pay for digital resources over Solana USDC using standardized MCP tools and standard HTTP 402 Payment Required headers.MIT