#3166·emdash

Docs MCP server at docs.emdashcms.com/mcp returns 404 because the docs build no longer includes its Worker

Author: danielmlrCreated Sep 16, 2026Updated Sep 16, 2026
Labelsbot:bugbot:awaiting-approval

Description

The docs MCP server at https://docs.emdashcms.com/mcp answers both a GET and an MCP initialize POST with an empty 404. All eight templates that npm create emdash offers ship .mcp.json, .cursor/mcp.json and .vscode/mcp.json pointing at that URL, so new projects come configured with a docs server that returns 404. Since #3105, a build of docs/ produces only static assets, so the Worker in docs/src/worker.ts that serves /mcp isn't part of the output. Other paths that don't exist on the docs site get the same empty 404 instead of the docs' 404 page.

I built docs/ on main and at 64344d35e, the commit before #3105. Both builds report output: "static", but only the older one reports mode: "server" and emits the Worker (steps below). The Workers Builds: docs check on #3105's merge commit passed on 2026-09-14 at 20:06 UTC, so nothing flagged the missing Worker when it was deployed.

#3105 moved the docs site from @astrojs/cloudflare 13.1.7 to 14.3.1. Since 13.6.0 (withastro/astro#16468), the adapter no longer always builds a server: when every route is prerendered, it tells the Cloudflare Vite plugin to build assets only. Every docs route is prerendered, so the custom Worker entry is dropped.

Adding output: "server" to the docs Astro config brings the server entry and its main back, but Rolldown then can't resolve satteri's WebAssembly fallback (log below), so the build still fails.

Steps to reproduce

  1. curl -i https://docs.emdashcms.com/mcp returns HTTP/2 404 with content-length: 0.
  2. On main, run pnpm install --frozen-lockfile --filter docs, then pnpm exec astro build in docs/.
  3. pnpm exec wrangler deploy --dry-run uses the redirected configuration dist/client/wrangler.json, which has no main. dist/server/ is empty.
  4. Check out 64344d35e and repeat step 2: dist/server/wrangler.json has main: "entry.mjs", and dist/server/entry.mjs contains search_docs.

Environment

  • Docs site on main at 2b7533877: astro 7.3.2, @astrojs/cloudflare 14.3.1, @astrojs/starlight 0.42.0, wrangler 4.125.0
  • Node.js version: 26.8.2
  • Runtime: Cloudflare Workers (docs.emdashcms.com); local build on macOS

Screenshots

Not applicable.

Logs / error output

bash
# astro build in docs/ on main
[build] output: "static"
[build] mode: "static"

# pnpm exec wrangler deploy --dry-run
Using redirected Wrangler configuration.
 - Configuration being used: "dist/client/wrangler.json"
 - Original user's configuration: "wrangler.jsonc"

# astro build with output: "server" added to docs/astro.config.mjs
[ERROR] [vite] ✗ Build failed in 1.93s
[vite]: Rolldown failed to resolve import "@bruits/satteri-wasm32-wasi" from ".../node_modules/.pnpm/[email protected]/node_modules/satteri/browser.js".