diff --git a/src/pages/_api/api/og.tsx b/src/pages/_api/api/og.tsx index 750f5008..22559a5d 100644 --- a/src/pages/_api/api/og.tsx +++ b/src/pages/_api/api/og.tsx @@ -251,3 +251,10 @@ export async function GET(request: Request) { }, }); } + +export async function HEAD(request: Request) { + const response = await GET(request); + return new Response(null, { + headers: response.headers, + }); +} diff --git a/src/pages/index.mdx b/src/pages/index.mdx index 7e217937..62f5c83f 100644 --- a/src/pages/index.mdx +++ b/src/pages/index.mdx @@ -10,6 +10,4 @@ description: "MPP (Machine Payments Protocol) is the open standard for machine-t import { LandingPage } from "../components/LandingPage"; -

MPP — Machine Payments Protocol

- diff --git a/src/pages/intents/charge.mdx b/src/pages/intents/charge.mdx index e326f35c..9ca70679 100644 --- a/src/pages/intents/charge.mdx +++ b/src/pages/intents/charge.mdx @@ -1,5 +1,6 @@ --- title: "Charge intent for one-time payments" +description: "Charge intent defines one-time payments in MPP. Use it when a client pays once for a request before receiving the resource." imageDescription: "Collect a one-time payment per API request" --- diff --git a/src/pages/payment-methods/card/charge.mdx b/src/pages/payment-methods/card/charge.mdx index 6000d180..d23f8386 100755 --- a/src/pages/payment-methods/card/charge.mdx +++ b/src/pages/payment-methods/card/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time card payments in MPP using encrypted network tokens and card-compatible payment flows." imageDescription: "One-time card payments with network tokens" --- diff --git a/src/pages/payment-methods/card/index.mdx b/src/pages/payment-methods/card/index.mdx index 2bb1268b..ad4bd437 100755 --- a/src/pages/payment-methods/card/index.mdx +++ b/src/pages/payment-methods/card/index.mdx @@ -1,5 +1,6 @@ --- title: "Card payment method" +description: "Use card payments in MPP to accept traditional payment methods with encrypted network tokens." imageDescription: "Accept card payments with encrypted network tokens" --- diff --git a/src/pages/payment-methods/custom.mdx b/src/pages/payment-methods/custom.mdx index dcd8e273..70035ace 100644 --- a/src/pages/payment-methods/custom.mdx +++ b/src/pages/payment-methods/custom.mdx @@ -1,5 +1,6 @@ --- title: "Custom payment methods" +description: "Build a custom MPP payment method with your own request schema, Credential format, and server verification logic." imageDescription: "Build a custom payment method for MPP" --- diff --git a/src/pages/payment-methods/index.mdx b/src/pages/payment-methods/index.mdx index 793130b1..c44fb336 100644 --- a/src/pages/payment-methods/index.mdx +++ b/src/pages/payment-methods/index.mdx @@ -1,4 +1,5 @@ --- +description: "Compare MPP payment methods and choose the right rails for your API, app, or agent workflow." imageDescription: "Choose a payment method for your service" --- diff --git a/src/pages/payment-methods/lightning/charge.mdx b/src/pages/payment-methods/lightning/charge.mdx index 981cc9f9..cb4c9c4a 100644 --- a/src/pages/payment-methods/lightning/charge.mdx +++ b/src/pages/payment-methods/lightning/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time Bitcoin payments over Lightning with BOLT11 invoices and MPP charge flows." imageDescription: "One-time Lightning payments for API calls" --- diff --git a/src/pages/payment-methods/lightning/index.mdx b/src/pages/payment-methods/lightning/index.mdx index 4380b46c..c3e6ea85 100644 --- a/src/pages/payment-methods/lightning/index.mdx +++ b/src/pages/payment-methods/lightning/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use Lightning payment methods in MPP for Bitcoin charges and prepaid session access." imageDescription: "Instant Bitcoin payments over Lightning" --- diff --git a/src/pages/payment-methods/lightning/session.mdx b/src/pages/payment-methods/lightning/session.mdx index 4b1e026e..d8a12e7f 100644 --- a/src/pages/payment-methods/lightning/session.mdx +++ b/src/pages/payment-methods/lightning/session.mdx @@ -1,4 +1,5 @@ --- +description: "Accept pay-as-you-go Lightning payments with prepaid sessions and per-request billing." imageDescription: "Stream payments over Lightning" --- diff --git a/src/pages/payment-methods/monad/charge.mdx b/src/pages/payment-methods/monad/charge.mdx index 981f9a00..ce145ec8 100644 --- a/src/pages/payment-methods/monad/charge.mdx +++ b/src/pages/payment-methods/monad/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time Monad payments with ERC-20 transfers or ERC-3009 authorizations." imageDescription: "One-time Monad payments using ERC-20 transfers or ERC-3009 authorizations" --- @@ -79,4 +80,3 @@ Monad charge supports two settlement modes: - **Push** — the client broadcasts an ERC-20 `transfer(recipient, amount)` transaction on-chain and includes the transaction hash in the credential. The server verifies the transfer by reading `Transfer` event logs. - **Pull** — the client signs an ERC-3009 `transferWithAuthorization` off-chain. The server broadcasts the authorization on-chain via `transferWithAuthorization`, paying the gas. The server account does not need to match the recipient address. - diff --git a/src/pages/payment-methods/monad/index.mdx b/src/pages/payment-methods/monad/index.mdx index 22f22f71..24a0b8dc 100644 --- a/src/pages/payment-methods/monad/index.mdx +++ b/src/pages/payment-methods/monad/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use Monad payment methods in MPP for ERC-20 token payments with push and pull settlement modes." imageDescription: "ERC-20 token payments on Monad with push and pull settlement modes" --- diff --git a/src/pages/payment-methods/solana/charge.mdx b/src/pages/payment-methods/solana/charge.mdx index 9ae69371..2efa09cc 100644 --- a/src/pages/payment-methods/solana/charge.mdx +++ b/src/pages/payment-methods/solana/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time Solana payments in MPP with signed transactions or confirmed signatures." imageDescription: "One-time Solana payments for API calls" --- diff --git a/src/pages/payment-methods/solana/index.mdx b/src/pages/payment-methods/solana/index.mdx index 02535dd5..de49c97c 100644 --- a/src/pages/payment-methods/solana/index.mdx +++ b/src/pages/payment-methods/solana/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use Solana payment methods in MPP to accept SOL and SPL token payments." imageDescription: "Accept SOL and SPL token payments on Solana" --- diff --git a/src/pages/payment-methods/stellar/charge.mdx b/src/pages/payment-methods/stellar/charge.mdx index 8b08fed0..bbad1712 100644 --- a/src/pages/payment-methods/stellar/charge.mdx +++ b/src/pages/payment-methods/stellar/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time Stellar token payments in MPP using SEP-41 assets and server-side verification." imageDescription: "One-time stablecoin payments on Stellar" --- diff --git a/src/pages/payment-methods/stellar/index.mdx b/src/pages/payment-methods/stellar/index.mdx index 20ce03bb..42d22602 100644 --- a/src/pages/payment-methods/stellar/index.mdx +++ b/src/pages/payment-methods/stellar/index.mdx @@ -1,5 +1,6 @@ --- title: "Stellar SEP-41 token payments" +description: "Use Stellar payment methods in MPP to accept SEP-41 token payments and channel-based sessions." imageDescription: "Accept stablecoin payments on the Stellar network" --- diff --git a/src/pages/payment-methods/stellar/session.mdx b/src/pages/payment-methods/stellar/session.mdx index 1703a5ab..9e746763 100644 --- a/src/pages/payment-methods/stellar/session.mdx +++ b/src/pages/payment-methods/stellar/session.mdx @@ -1,4 +1,5 @@ --- +description: "Accept high-frequency Stellar payments with one-way payment channels and pay-as-you-go billing." imageDescription: "High-frequency payments with Stellar payment channels" --- diff --git a/src/pages/payment-methods/stripe/charge.mdx b/src/pages/payment-methods/stripe/charge.mdx index 45330857..d4ad30d6 100644 --- a/src/pages/payment-methods/stripe/charge.mdx +++ b/src/pages/payment-methods/stripe/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time Stripe payments in MPP with Shared Payment Tokens and browser payment flows." imageDescription: "One-time card payments via Stripe" --- diff --git a/src/pages/payment-methods/stripe/index.mdx b/src/pages/payment-methods/stripe/index.mdx index b76f3888..30b0c482 100644 --- a/src/pages/payment-methods/stripe/index.mdx +++ b/src/pages/payment-methods/stripe/index.mdx @@ -1,5 +1,6 @@ --- title: "Stripe payment method" +description: "Use Stripe payment methods in MPP to accept cards, wallets, and other Stripe-supported payment methods." imageDescription: "Accept cards and wallets via Stripe" --- diff --git a/src/pages/payment-methods/tempo/charge.mdx b/src/pages/payment-methods/tempo/charge.mdx index 463ffe4e..6443257e 100644 --- a/src/pages/payment-methods/tempo/charge.mdx +++ b/src/pages/payment-methods/tempo/charge.mdx @@ -1,4 +1,5 @@ --- +description: "Accept one-time stablecoin payments on Tempo with signed TIP-20 token transfers." imageDescription: "One-time stablecoin payments on Tempo" --- diff --git a/src/pages/payment-methods/tempo/index.mdx b/src/pages/payment-methods/tempo/index.mdx index a62efd87..e3c868cd 100644 --- a/src/pages/payment-methods/tempo/index.mdx +++ b/src/pages/payment-methods/tempo/index.mdx @@ -1,5 +1,6 @@ --- title: "Tempo stablecoin payments" +description: "Use Tempo payment methods in MPP for stablecoin charges and low-cost payment sessions." imageDescription: "Fast, low-cost stablecoin payments on Tempo" --- diff --git a/src/pages/payment-methods/tempo/session.mdx b/src/pages/payment-methods/tempo/session.mdx index 7ff4cb04..11a14bf2 100644 --- a/src/pages/payment-methods/tempo/session.mdx +++ b/src/pages/payment-methods/tempo/session.mdx @@ -1,4 +1,5 @@ --- +description: "Accept pay-as-you-go stablecoin payments on Tempo with payment channels and off-chain vouchers." imageDescription: "Stream payments with low-cost sessions on Tempo" --- diff --git a/src/pages/protocol/challenges.mdx b/src/pages/protocol/challenges.mdx index e0206e19..098ecbdf 100644 --- a/src/pages/protocol/challenges.mdx +++ b/src/pages/protocol/challenges.mdx @@ -1,4 +1,5 @@ --- +description: "Create MPP Challenges that tell clients what a resource costs, which method to use, and when the payment request expires." imageDescription: "Tell clients what to pay and how" --- diff --git a/src/pages/protocol/credentials.mdx b/src/pages/protocol/credentials.mdx index d8e8ad09..098a5d44 100644 --- a/src/pages/protocol/credentials.mdx +++ b/src/pages/protocol/credentials.mdx @@ -1,4 +1,5 @@ --- +description: "Verify MPP Credentials from clients and bind payment proofs to the original server-issued Challenge." imageDescription: "Submit proof of payment with each request" --- diff --git a/src/pages/protocol/transports/mcp.mdx b/src/pages/protocol/transports/mcp.mdx index e490d486..7aee60b3 100644 --- a/src/pages/protocol/transports/mcp.mdx +++ b/src/pages/protocol/transports/mcp.mdx @@ -1,4 +1,5 @@ --- +description: "Use the MCP transport to require payment for JSON-RPC tool calls while preserving MPP Challenges, Credentials, and Receipts." imageDescription: "Pay for AI tool calls over MCP" --- diff --git a/src/pages/sdk/go/client.mdx b/src/pages/sdk/go/client.mdx index 84fd38f0..e6199cf9 100644 --- a/src/pages/sdk/go/client.mdx +++ b/src/pages/sdk/go/client.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Go client to handle HTTP 402 responses, pay with supported methods, and retry requests automatically." imageDescription: "Handle paid APIs automatically in Go" --- diff --git a/src/pages/sdk/go/core.mdx b/src/pages/sdk/go/core.mdx index bba57bab..140010cb 100644 --- a/src/pages/sdk/go/core.mdx +++ b/src/pages/sdk/go/core.mdx @@ -1,4 +1,5 @@ --- +description: "Use Go core types for MPP Challenges, Credentials, Receipts, payment requests, and verification flows." imageDescription: "Core MPP types for Go" --- diff --git a/src/pages/sdk/go/index.mdx b/src/pages/sdk/go/index.mdx index fd29cd7f..927cf84f 100644 --- a/src/pages/sdk/go/index.mdx +++ b/src/pages/sdk/go/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Go SDK to build MPP clients and servers with typed Challenge, Credential, and Receipt primitives." imageDescription: "MPP client and server library for Go" --- diff --git a/src/pages/sdk/go/server.mdx b/src/pages/sdk/go/server.mdx index befdb6a3..afd48bd3 100644 --- a/src/pages/sdk/go/server.mdx +++ b/src/pages/sdk/go/server.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Go server SDK to protect HTTP endpoints with MPP payment requirements and verification." imageDescription: "Charge for your Go API endpoints" --- diff --git a/src/pages/sdk/python/client.mdx b/src/pages/sdk/python/client.mdx index d13690fa..e0613e1e 100644 --- a/src/pages/sdk/python/client.mdx +++ b/src/pages/sdk/python/client.mdx @@ -1,5 +1,6 @@ --- title: "Python MPP client" +description: "Use the Python client to handle HTTP 402 responses, pay with supported methods, and retry requests automatically." imageDescription: "Handle paid APIs automatically in Python" --- diff --git a/src/pages/sdk/python/core.mdx b/src/pages/sdk/python/core.mdx index bdbe8f45..17e6bf3c 100644 --- a/src/pages/sdk/python/core.mdx +++ b/src/pages/sdk/python/core.mdx @@ -1,4 +1,5 @@ --- +description: "Use Python core types for MPP Challenges, Credentials, Receipts, payment requests, and verification flows." imageDescription: "Core MPP types for Python" --- diff --git a/src/pages/sdk/python/index.mdx b/src/pages/sdk/python/index.mdx index d543193b..4add5888 100644 --- a/src/pages/sdk/python/index.mdx +++ b/src/pages/sdk/python/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Python SDK to build MPP clients and servers with typed Challenge, Credential, and Receipt primitives." imageDescription: "MPP client and server library for Python" --- diff --git a/src/pages/sdk/python/server.mdx b/src/pages/sdk/python/server.mdx index dbb2abe0..b3c22c4e 100644 --- a/src/pages/sdk/python/server.mdx +++ b/src/pages/sdk/python/server.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Python server SDK to protect FastAPI endpoints with MPP payment requirements and verification." imageDescription: "Charge for your Python API endpoints" --- diff --git a/src/pages/sdk/ruby/client.mdx b/src/pages/sdk/ruby/client.mdx index 6e838dda..abc3b695 100644 --- a/src/pages/sdk/ruby/client.mdx +++ b/src/pages/sdk/ruby/client.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Ruby client to handle HTTP 402 responses, pay with supported methods, and retry requests automatically." imageDescription: "Handle paid APIs automatically in Ruby" --- diff --git a/src/pages/sdk/ruby/core.mdx b/src/pages/sdk/ruby/core.mdx index f582b63a..03cddcfa 100644 --- a/src/pages/sdk/ruby/core.mdx +++ b/src/pages/sdk/ruby/core.mdx @@ -1,4 +1,5 @@ --- +description: "Use Ruby core types for MPP Challenges, Credentials, Receipts, payment requests, and verification flows." imageDescription: "Core MPP types for Ruby" --- diff --git a/src/pages/sdk/ruby/index.mdx b/src/pages/sdk/ruby/index.mdx index ed9a5d23..cf6238d1 100644 --- a/src/pages/sdk/ruby/index.mdx +++ b/src/pages/sdk/ruby/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Ruby SDK to build MPP clients and servers with typed Challenge, Credential, and Receipt primitives." imageDescription: "MPP client and server library for Ruby" --- diff --git a/src/pages/sdk/ruby/server.mdx b/src/pages/sdk/ruby/server.mdx index 1af049d5..8cd6181b 100644 --- a/src/pages/sdk/ruby/server.mdx +++ b/src/pages/sdk/ruby/server.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Ruby server SDK to protect Rack endpoints with MPP payment requirements and verification." imageDescription: "Charge for your Ruby API endpoints" --- diff --git a/src/pages/sdk/rust/client.mdx b/src/pages/sdk/rust/client.mdx index 41d3c8b8..245cd8d3 100644 --- a/src/pages/sdk/rust/client.mdx +++ b/src/pages/sdk/rust/client.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Rust client to handle HTTP 402 responses, pay with supported methods, and retry requests automatically." imageDescription: "Handle paid APIs automatically in Rust" --- diff --git a/src/pages/sdk/rust/core.mdx b/src/pages/sdk/rust/core.mdx index 1f543ac2..53d4a874 100644 --- a/src/pages/sdk/rust/core.mdx +++ b/src/pages/sdk/rust/core.mdx @@ -1,4 +1,5 @@ --- +description: "Use Rust core types for MPP Challenges, Credentials, Receipts, payment requests, and verification flows." imageDescription: "Core MPP types for Rust" --- diff --git a/src/pages/sdk/rust/index.mdx b/src/pages/sdk/rust/index.mdx index 520d6d9d..3fa8d668 100644 --- a/src/pages/sdk/rust/index.mdx +++ b/src/pages/sdk/rust/index.mdx @@ -1,5 +1,6 @@ --- title: "Rust SDK for MPP" +description: "Use the Rust SDK to build MPP clients and servers with typed Challenge, Credential, and Receipt primitives." imageDescription: "High-performance MPP library for Rust" --- diff --git a/src/pages/sdk/rust/server.mdx b/src/pages/sdk/rust/server.mdx index 89fdd15f..ec0aba49 100644 --- a/src/pages/sdk/rust/server.mdx +++ b/src/pages/sdk/rust/server.mdx @@ -1,4 +1,5 @@ --- +description: "Use the Rust server SDK to protect Axum endpoints with MPP payment requirements and verification." imageDescription: "Charge for your Rust API endpoints" --- diff --git a/src/pages/sdk/typescript/cli.mdx b/src/pages/sdk/typescript/cli.mdx index 833ce0d3..fd2a2017 100644 --- a/src/pages/sdk/typescript/cli.mdx +++ b/src/pages/sdk/typescript/cli.mdx @@ -1,4 +1,5 @@ --- +description: "Use the mppx CLI to make paid HTTP requests from the terminal with automatic MPP payment handling." imageDescription: "Make paid API requests from the terminal" --- diff --git a/src/pages/sdk/typescript/core/Expires.mdx b/src/pages/sdk/typescript/core/Expires.mdx index db533d62..7e985ccb 100644 --- a/src/pages/sdk/typescript/core/Expires.mdx +++ b/src/pages/sdk/typescript/core/Expires.mdx @@ -1,5 +1,6 @@ --- title: "Expires utility functions" +description: "Use Expires helpers to set relative expiration timestamps for MPP Challenges and payment requests." imageDescription: "Set expiration times for payment requests" --- diff --git a/src/pages/sdk/typescript/index.mdx b/src/pages/sdk/typescript/index.mdx index f36aa32a..7f2b4cf0 100644 --- a/src/pages/sdk/typescript/index.mdx +++ b/src/pages/sdk/typescript/index.mdx @@ -1,4 +1,5 @@ --- +description: "Use the mppx TypeScript SDK to build MPP clients, servers, middleware, and payment-aware fetch flows." imageDescription: "MPP client and server library for TypeScript" --- diff --git a/vercel.mjs b/vercel.mjs index ab6cc9da..f4bf5079 100644 --- a/vercel.mjs +++ b/vercel.mjs @@ -12,6 +12,8 @@ const OPENAPI_DISCOVERY_LINK_VALUE = [ '; rel="describedby"; type="application/json"', ].join(", "); +const CONTENT_NEGOTIATION_HEADERS = [header("Vary", "Accept, User-Agent")]; + const API_CATALOG_HEADERS = [ header("Access-Control-Allow-Origin", "*"), header("Cache-Control", "public, max-age=300"), @@ -59,10 +61,18 @@ export const config = { headerRule("/robots.txt", CACHE_HEADERS), headerRule("/openapi.json", [header("Link", OPENAPI_DISCOVERY_LINK_VALUE)]), ...DISCOVERY_PAGE_SOURCES.map((source) => - headerRule(source, [header("Link", DOC_DISCOVERY_LINK_VALUE)]), + headerRule(source, [ + header("Link", DOC_DISCOVERY_LINK_VALUE), + ...CONTENT_NEGOTIATION_HEADERS, + ]), ), ], redirects: [ + { + source: "/index", + destination: "/", + permanent: true, + }, { source: "/openapi.json", destination: "/api/openapi.json", diff --git a/vite.config.ts b/vite.config.ts index 58c267e8..68d88446 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -116,6 +116,30 @@ function contentSignalsRobotsTxt(): Plugin { }; } +function pruneSitemap(): Plugin { + return { + name: "prune-sitemap", + enforce: "post", + async writeBundle(options) { + if (!options.dir?.endsWith("/public")) return; + + const sitemapPath = path.join(options.dir, "sitemap.xml"); + const current = await fs.readFile(sitemapPath, "utf8").catch((error) => { + if ((error as NodeJS.ErrnoException).code === "ENOENT") return null; + throw error; + }); + if (!current) return; + + const next = current.replace( + /\s*\s*[^<]*\/404<\/loc>\s*[^<]+<\/lastmod>\s*<\/url>/, + "", + ); + + if (next !== current) await fs.writeFile(sitemapPath, next, "utf8"); + }, + }; +} + export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), ""); for (const key of Object.keys(env)) { @@ -137,6 +161,7 @@ export default defineConfig(({ mode }) => { react(), vocs(), contentSignalsRobotsTxt(), + pruneSitemap(), ...(mode !== "production" ? [mkcert({ force: true, hosts: ["localhost"] })] : []), diff --git a/vocs.config.ts b/vocs.config.ts index f020c94b..f5e2005c 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -15,6 +15,8 @@ export default defineConfig({ colorScheme: "light dark", baseUrl, redirects: [ + { source: "/index", destination: "/" }, + // Aliases for overview { source: "/docs", destination: "/overview" }, { source: "/documentation", destination: "/overview" },