Investigate whether /preview should move to root #5

Open
opened 2026-05-23 20:54:10 +00:00 by coilysiren · 0 comments
Owner

Originally filed by @coilysiren on 2026-05-02T23:10:32Z - https://github.com/coilysiren/eco-mcp-app/issues/20

Context

Today the HTTP app routes are:

  • / - 302 redirect to /preview
  • /preview, /preview.json, /preview-map, /preview-map.json, /preview/<tool>, /preview/<tool>.json - dev iframe shell + Jinja2 card, JSON twin
  • /mcp/ - Streamable-HTTP MCP transport
  • /healthz

See src/eco_mcp_app/http_app.py:124 for the root redirect.

Question

Why is the dev preview namespaced under /preview with / as a redirect, instead of just serving the preview at /?

Current rationalization (from a chat thread):

  1. /preview* is a tree (.json twins, per-tool subroutes), not a single page. Hoisting to root would shadow other top-level routes or force awkward names.
  2. / is reserved as a future service-info / landing page.
  3. /preview is explicitly dev-only per the module docstring. Real MCP clients hit /mcp/, never /preview. Keeping it under its own prefix signals "browser-poking surface, not the product."

These are not very compelling on their own. Worth checking what other public MCP servers do at the root URL.

Investigation

  • Survey 5-10 publicly-deployed MCP servers (Streamable-HTTP transport). What do they serve at /? Empty 404? Service-info JSON? A landing page? A redirect?
  • Check the MCP Apps spec and Streamable-HTTP transport spec for any guidance on root-URL behavior.
  • Decide: keep the redirect, replace / with service-info JSON (already drafted at service_info in http_app.py:127, just unrouted), or collapse /preview into /.
  • If we collapse, figure out how to keep the .json twin and per-tool subroutes coherent (/.json is awkward; maybe /tools/<name> instead of /preview/<name>).

Out of scope

  • Changing the /mcp/ mount path.
  • Anything about the iframe shell internals.
_Originally filed by @coilysiren on 2026-05-02T23:10:32Z - [https://github.com/coilysiren/eco-mcp-app/issues/20](https://github.com/coilysiren/eco-mcp-app/issues/20)_ ## Context Today the HTTP app routes are: - `/` - 302 redirect to `/preview` - `/preview`, `/preview.json`, `/preview-map`, `/preview-map.json`, `/preview/<tool>`, `/preview/<tool>.json` - dev iframe shell + Jinja2 card, JSON twin - `/mcp/` - Streamable-HTTP MCP transport - `/healthz` See `src/eco_mcp_app/http_app.py:124` for the root redirect. ## Question Why is the dev preview namespaced under `/preview` with `/` as a redirect, instead of just serving the preview at `/`? Current rationalization (from a chat thread): 1. `/preview*` is a tree (`.json` twins, per-tool subroutes), not a single page. Hoisting to root would shadow other top-level routes or force awkward names. 2. `/` is reserved as a future service-info / landing page. 3. `/preview` is explicitly dev-only per the module docstring. Real MCP clients hit `/mcp/`, never `/preview`. Keeping it under its own prefix signals "browser-poking surface, not the product." These are not very compelling on their own. Worth checking what other public MCP servers do at the root URL. ## Investigation - Survey 5-10 publicly-deployed MCP servers (Streamable-HTTP transport). What do they serve at `/`? Empty 404? Service-info JSON? A landing page? A redirect? - Check the MCP Apps spec and Streamable-HTTP transport spec for any guidance on root-URL behavior. - Decide: keep the redirect, replace `/` with service-info JSON (already drafted at `service_info` in `http_app.py:127`, just unrouted), or collapse `/preview` into `/`. - If we collapse, figure out how to keep the `.json` twin and per-tool subroutes coherent (`/.json` is awkward; maybe `/tools/<name>` instead of `/preview/<name>`). ## Out of scope - Changing the `/mcp/` mount path. - Anything about the iframe shell internals.
coilysiren added
P4
and removed
P3
labels 2026-05-31 07:00:24 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/eco-mcp-app#5
No description provided.