API documentation
Context Window Supply API and MCP
Browse the drop, price a US order, and create a Stripe checkout link that a person pays. No API key is required. Never send card numbers to this store or its tools.
Authentication
The product, quote, checkout and MCP routes do not use an API key or a login. Anyone may call them. Payment still happens on Stripe, in a browser, by a person.
REST API
Base URL https://contextwindowsupply.com. JSON in, JSON out. Schema: /openapi.json.
- GET
/api/productsList or search. Query: q, type (t-shirt, hoodie, sticker). - GET
/api/products/{id}One product. Unknown ids return 404. - POST
/api/quoteSubtotal, shipping and total. Server prices only. - POST
/api/checkoutCheckout is live. Returns a Stripe checkout link a person pays. - POST
/api/refund-requestFiles a refund request for a person to review. It does not refund by itself.
List products
curl -s 'https://contextwindowsupply.com/api/products'The body is a products array. Each item has id, name, type, tagline, description, price, currency, sizes, colors, material, url, and size_upcharges when a size costs more.
One product
curl -s 'https://contextwindowsupply.com/api/products/approval-required-tee'Price an order
curl -s https://contextwindowsupply.com/api/quote \
-H 'content-type: application/json' \
-d '{"items":[{"product_id":"approval-required-tee","color":"White","size":"L","quantity":1}]}'Prices come from the server. A price sent in the request is ignored. Tees and hoodies need an explicit color and size. US shipping only. Up to 10 lines per order and 10 of each item. First-item shipping is $4.95 for a tee, $8.95 for a hoodie, and $3.95 for a sticker sheet.
Create a checkout link
Checkout is live. An assistant or the bag creates a Stripe checkout link, and a person pays on Stripe. US shipping only. Never send card details to this store or its tools. POST /api/checkout returns checkout_url. Only links that start with https://checkout.stripe.com/ are real. If checkout is paused, the response is HTTP 503 with live: false, a notice and the quote, and no payment link.
curl -s https://contextwindowsupply.com/api/checkout \
-H 'content-type: application/json' \
-d '{"items":[{"product_id":"approval-required-tee","color":"White","size":"L","quantity":1}]}'MCP server
Streamable HTTP at https://contextwindowsupply.com/mcp. Server name context-window-supply. JSON-RPC 2.0. No auth is required for browsing or for creating a checkout link.
{
"mcpServers": {
"context-window-supply": {
"url": "https://contextwindowsupply.com/mcp"
}
}
}A GET to /mcp returns the server name, transport streamable-http, and the tool names. To use the tools, POST JSON-RPC. Start with initialize, then tools/list or tools/call.
curl -s https://contextwindowsupply.com/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"docs","version":"0"}}}'curl -s https://contextwindowsupply.com/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'| Tool | What it does | Input | Effect |
|---|---|---|---|
search_products | Search tees, hoodies and stickers by text or type. | query?: string, type?: "t-shirt" | "hoodie" | "sticker" | Read only |
get_product | One product with sizes, colors, material and price. | product_id: string | Read only |
get_shipping_quote | Subtotal, shipping and total for US delivery. | items: [{ product_id, color?, size?, quantity }] | Read only |
create_checkout_link | Checkout is live. Creates a Stripe checkout link that a person opens and pays on Stripe. Charges nothing by itself. | items: [{ product_id, color?, size?, quantity }] | Returns a link |
request_refund | Files a refund request for a past order. A person reviews it and replies by email. It never refunds anything by itself. | email: string, order_reference: string, reason: string, items?: string | Files a request |
Errors
Failed REST calls return JSON with a string error field, and an HTTP status that matches the failure:
{
"error": "not found"
}- 400: invalid JSON, a missing
itemsarray, or a failed field check. - 404: unknown product id or unknown
/api/path. Body:{ "error": "not found" }. - 413: request body larger than 16 KB.
- 429: rate limited, try again in a minute.
- 503: checkout is paused or not live. Body includes
live: false, an error or notice, and the quote. No payment link. - 500: internal error.
Limits
- The
/api/*and/mcpfunctions allow 60 requests per 60 seconds per IP. Over that, the request is rejected with HTTP 429. - The handler can also return HTTP 429 with
{ "error": "rate limited, try again in a minute" }when its own per-IP budget is exceeded. - US shipping only. Up to 10 lines per order and 10 of each item.
- Never send card numbers. A person completes payment on Stripe.
- Something broken: hello@contextwindowsupply.com. Security reports: security.txt.