ampless 1.0.0-beta.61 → 1.0.0-beta.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1669,6 +1669,24 @@ interface AiConfig {
1669
1669
  * abuse protection.
1670
1670
  */
1671
1671
  publicMcp?: boolean;
1672
+ /**
1673
+ * **Experimental.** Publish MCP discovery metadata so AI clients can
1674
+ * find the public endpoint without being handed its URL: a well-known
1675
+ * catalog at `/.well-known/mcp/catalog.json` and a Server Card at
1676
+ * `/api/mcp/server-card`. Requires `publicMcp: true` (discovery only
1677
+ * advertises the same `/api/mcp` endpoint) and an `http(s)` `site.url`
1678
+ * to resolve the absolute URLs it advertises — when either is missing
1679
+ * the discovery routes 404.
1680
+ *
1681
+ * **Default: false.** This tracks the prototype
1682
+ * `modelcontextprotocol/experimental-ext-server-card` spec (SEP-2127 —
1683
+ * still open / unmerged), whose schema and paths may change to follow
1684
+ * upstream, so it is isolated behind this opt-in flag. When enabled,
1685
+ * the `/api/mcp` `initialize` response's `serverInfo` also switches to
1686
+ * a site-derived reverse-DNS name + version so it matches the Server
1687
+ * Card (default OFF sites keep the static `ampless-mcp` serverInfo).
1688
+ */
1689
+ mcpDiscovery?: boolean;
1672
1690
  }
1673
1691
  type Role = 'reader' | 'editor' | 'admin';
1674
1692
  interface AuthContext {
package/dist/index.js CHANGED
@@ -251,7 +251,7 @@ function resolvePublicMcpEndpoint(publicMcp, siteUrl) {
251
251
  try {
252
252
  const parsed = new URL(siteUrl);
253
253
  if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return null;
254
- return new URL("/api/mcp", parsed).toString();
254
+ return new URL("/api/mcp", parsed.origin).toString();
255
255
  } catch {
256
256
  return null;
257
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ampless",
3
- "version": "1.0.0-beta.61",
3
+ "version": "1.0.0-beta.62",
4
4
  "description": "Serverless CMS for AWS Amplify",
5
5
  "license": "MIT",
6
6
  "type": "module",