Conversation
Code ReviewThanks for adding this endpoint. The implementation is clean and follows Astro's API route conventions well. Below are my observations, grouped by severity. Issues to Address1. The
endpoint: "/mcp",The server card advertises a
2. Lines 21–24 list all three capability categories, each as an empty object. According to the MCP Server Card spec, advertising a capability implies the server supports it. An empty Minor Issues3. Today is 2026-04-19, but the MCP protocol version string 4. This duplicates the version in import { version } from "../../../../package.json";
// ...
serverInfo: { version },Astro supports JSON imports with TypeScript strict mode out of the box, and this ensures the two stay in sync. 5. CORS header is very permissive "Access-Control-Allow-Origin": "*",A wildcard CORS header on a discovery endpoint is fine and probably intentional here (it is a public, read-only JSON file), but it is worth documenting the reason in a comment so the next reviewer does not wonder whether it was accidental. Positive Notes
SummaryThe main blocker is that the declared transport endpoint ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 347db0d47e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| documentationUrl: "https://asynctalk.com", | ||
| transport: { | ||
| type: "streamable-http", | ||
| endpoint: "/mcp", |
There was a problem hiding this comment.
Point transport endpoint to a live MCP route
The server card advertises transport.endpoint as /mcp, but this change does not add any /mcp handler or rewrite in the repo (I checked with a repo-wide rg -uu -n "\bmcp\b|server-card", which only finds this new file). In deployments built from this code, clients that discover the card will attempt to connect to /mcp and receive a 404, so discovery now directs users to a non-functional MCP endpoint.
Useful? React with 👍 / 👎.
| export const GET: APIRoute = () => { | ||
| return new Response(JSON.stringify(serverCard, null, 2), { | ||
| headers: { | ||
| "Access-Control-Allow-Origin": "*", |
There was a problem hiding this comment.
Add full CORS preflight headers for discovery
The endpoint only returns Access-Control-Allow-Origin, but omits explicit Access-Control-Allow-Methods/Access-Control-Allow-Headers. Cross-origin browser clients that include non-simple discovery headers will trigger a preflight request, and without those allow-lists the browser can block access to the server card, undermining HTTP-based discovery in exactly the browser environments this endpoint is intended to support.
Useful? React with 👍 / 👎.
Summary
/.well-known/mcp/server-card.jsonas a prerendered Astro endpointserverInfo, transport endpoint, and capabilitiesTesting
pnpm astro checkpnpm build