我如何在 Cloudflare Pages Functions 上構建 3 個零身份驗證遠端 MCP 伺服器(mcptry 評分 98/100)
How I Built 3 Zero-Auth Remote MCP Servers on Cloudflare Pages Functions (Scoring 98/100 on mcptry)
作者在 Cloudflare Pages Functions 內構建並發布 3 個無狀態、零身份驗證的 Streamable HTTP MCP 伺服器,回應時間約 110 ms,並全部收錄於 Official MCP Registry。Alfalaki Astrology 在 mcptry 獲得 98/100,安全等級為 A。
Most web tools publish a sitemap.xml and stop there. When AI agents (Claude, Cursor, ChatGPT, Perplexity) try to answer live questions from HTML, they often hallucinate numbers or cite stale scrapes.
This week I shipped three stateless, zero-auth Streamable HTTP MCP servers directly inside Cloudflare Pages Functions — no external database, no OAuth boilerplate, ~110 ms response times, and all three published to the Official MCP Registry:
-
Alfalaki Astrology (
https://alfalaki.space/mcp·io.github.samsali-g/alfalaki) — Computes live geocentric planetary longitudes, Moon phases, and Mercury retrograde windows from the VSOP87/ELP2000 ephemeris in English and Arabic. Verified at 98/100 (Security Grade A) on mcptry and indexed on Glama. -
ExifStudio (
https://www.exifstudio.online/mcp·io.github.samsali-g/exifstudio) — Exposes the tool catalogue and AI agent skill guide for our 100% browser-local EXIF/GPS stripper, C2PA provenance inspector, camera shutter count checker, and PDF metadata remover. -
WedMaroc (
https://www.wedmaroc.com/mcp·io.github.samsali-g/wedmaroc) — Read-only Moroccan wedding budget estimator (MAD), 2026 city multipliers, vendor benchmarks (traiteur, neggafa, venue, mahr), and trilingual (AR/FR/EN) planning tools.
4 Details That Pushed Our MCP Registry Score Toward 100/100
-
Describe every parameter in
inputSchema.properties: Even obvious arguments likelang: { enum: ['en', 'ar'] }lose tool-quality points ifdescriptionis omitted. -
Set
annotations: { readOnlyHint: true }andadditionalProperties: false: Agents trust read-only tools faster and automated security graders reward closed schemas. -
Include
iconsinserver.json: Adding PNG + SVG icons (512x512,192x192,any) pushed our listing completeness straight to 15/15. -
Serve
/.well-known/mcp/server-card.json, CORS*, and HTTP202on notifications: Returning202with an empty body fornotifications/initializedkeeps Streamable HTTP clients strictly spec-compliant.
If you run static Astro, Vite, or Next.js sites on Cloudflare Pages, adding a functions/mcp.js handler takes ~150 lines of zero-dependency JavaScript and makes your site discoverable across MCP registries immediately.
來源:DEV Community · dev.to