{"id":47913608,"url":"https://github.com/tech-sumit/acp-peptide-pharmacy","last_synced_at":"2026-04-04T05:27:31.522Z","repository":{"id":346653256,"uuid":"1190973717","full_name":"tech-sumit/acp-peptide-pharmacy","owner":"tech-sumit","description":"Peptide pharmacy with ACP checkout and MCP server for AI agent ordering. Backend on Cloudflare Workers, frontend on GitHub Pages.","archived":false,"fork":false,"pushed_at":"2026-03-24T21:16:48.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T01:36:46.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/tech-sumit/acp-peptide-pharmacy","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tech-sumit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-24T19:55:56.000Z","updated_at":"2026-03-24T21:16:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tech-sumit/acp-peptide-pharmacy","commit_stats":null,"previous_names":["tech-sumit/acp-peptide-pharmacy"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tech-sumit/acp-peptide-pharmacy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-sumit%2Facp-peptide-pharmacy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-sumit%2Facp-peptide-pharmacy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-sumit%2Facp-peptide-pharmacy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-sumit%2Facp-peptide-pharmacy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tech-sumit","download_url":"https://codeload.github.com/tech-sumit/acp-peptide-pharmacy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-sumit%2Facp-peptide-pharmacy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T05:27:30.922Z","updated_at":"2026-04-04T05:27:31.517Z","avatar_url":"https://github.com/tech-sumit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ACP Peptide Pharmacy\n\nA full-stack demo storefront that combines the **Agentic Commerce Protocol (ACP)**,\n**Model Context Protocol (MCP)**, and optional **Machine Payments Protocol (MPP)**\nwith **Stripe test mode** so Claude, Cursor, and other AI clients can browse products\nand place demo peptide orders.\n\n## Architecture\n\n- `backend/`: Cloudflare Worker with ACP checkout, remote MCP (`/mcp`), optional MPP gate\n- `frontend/`: static storefront (GitHub Pages) + `mpp-demo.html` overview\n- `mcp-config/`: MCP client configuration examples\n- `IMPLEMENTATION_NOTES.md`: frozen MPP route policy for this repo\n\nLive references:\n\n- Storefront: [tech-sumit.github.io/acp-peptide-pharmacy](https://tech-sumit.github.io/acp-peptide-pharmacy/)\n- Worker API: [acp-peptide-pharmacy-backend.tech-sumit.workers.dev](https://acp-peptide-pharmacy-backend.tech-sumit.workers.dev/)\n\n## Machine Payments Protocol (MPP) on `POST /mcp`\n\nThis Worker integrates [MPP](https://mpp.dev/) using Stripe **shared payment tokens (SPTs)** via the official [`mppx`](https://www.npmjs.com/package/mppx) server middleware, following [Stripe’s MPP guide](https://docs.stripe.com/payments/machine/mpp).\n\n### Test mode only (including production Worker)\n\n- The **deployed** Worker follows the same rules as local dev: **only Stripe test keys** (`sk_test_...`). **Live keys (`sk_live_...`) are rejected** — there are **no real card charges** on the public demo; MPP is a **concept demo** using Stripe test mode.\n- All MPP charges in this demo are **sandbox** amounts (currently **$0.01 USD** per paid **`tools/call`** request).\n- ACP checkout remains a **simulated** merchant flow (demo tokens), separate from MPP access fees.\n- **`GET /`** and **`GET /health`** include `mpp_demo_billing` (and unpaid **`tools/call`** responses include `x-mpp-stripe-mode: test`) so clients can see that billing is test-only.\n\n### When MPP is active\n\nIf **both** `STRIPE_SECRET_KEY` and `MPP_SECRET_KEY` are configured as Cloudflare secrets:\n\n1. **Handshake and discovery** (`initialize`, `tools/list`, `ping`, notifications, etc.) stay **free** so Streamable HTTP clients (Cursor, `mcp-remote`) can connect without MPP.\n2. **Paid JSON-RPC** (notably **`tools/call`**) without a valid `Authorization: Payment ...` credential returns **402** with a `WWW-Authenticate: Payment` challenge (RFC 9457 problem body).\n3. After the client pays (Stripe test mode + SPT) and retries with the credential, the Worker runs the tool and may attach a **`Payment-Receipt`** header on success.\n\nIf those secrets are **omitted**, `POST /mcp` behaves as before (no payment gate) so CI and local dev stay simple.\n\n### Configure secrets\n\n```bash\ncd backend\n\n# Stripe test secret from https://dashboard.stripe.com/test/apikeys\nnpx wrangler secret put STRIPE_SECRET_KEY\n\n# 32-byte key, base64 — binds challenges (mpp.dev / mppx)\nopenssl rand -base64 32 | npx wrangler secret put MPP_SECRET_KEY\n```\n\n### Manual smoke test (curl)\n\nHandshake (expect **200** when MPP is configured):\n\n```bash\ncurl -i -X POST \"https://YOUR-WORKER.workers.dev/mcp\" \\\n  -H \"content-type: application/json\" \\\n  -H \"accept: application/json, text/event-stream\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"curl\",\"version\":\"0\"}}}'\n```\n\nUnpaid **`tools/call`** (expect **402** when MPP is configured):\n\n```bash\ncurl -i -X POST \"https://YOUR-WORKER.workers.dev/mcp\" \\\n  -H \"content-type: application/json\" \\\n  -H \"accept: application/json, text/event-stream\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"list_products\",\"arguments\":{}}}'\n```\n\nPaid retry for tool calls requires an MPP-aware client (for example [`npx mppx`](https://www.npmjs.com/package/mppx) against a local dev server, or a small app using Stripe Elements to mint an SPT per Stripe’s docs). See `mcp-config/README.md`.\n\n## Local development\n\n```bash\ncd backend\nnpm install\nnpm run test\nnpm run dev\n```\n\n## Learn more\n\n- Blog walkthrough: [sumitagrawal.dev/blog/machine-payments-protocol-mcp-acp/](https://sumitagrawal.dev/blog/machine-payments-protocol-mcp-acp/) (after the portfolio PR is merged)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-sumit%2Facp-peptide-pharmacy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftech-sumit%2Facp-peptide-pharmacy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-sumit%2Facp-peptide-pharmacy/lists"}