@se-studio/site-mcp 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @se-studio/site-mcp
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Add `apiPathNeedingTrailingSlash` for middleware: rewrite bare `/api/*` under Next `trailingSlash: true` so Streamable HTTP MCP POST is not 308’d. Document the pattern in site-mcp.
8
+ - Updated dependencies
9
+ - @se-studio/core-ui@1.19.3
10
+
3
11
  ## 0.3.0
4
12
 
5
13
  ### Minor Changes
package/README.md CHANGED
@@ -23,6 +23,8 @@ pnpm add @se-studio/site-mcp
23
23
  The **Next.js route file path** is the mount point (e.g. `app/api/mcp/route.ts` → `/api/mcp`).
24
24
  `createSiteMcpHandler` does **not** take a path — routing is owned by App Router.
25
25
 
26
+ **Trailing slash:** SE Studio sites use `trailingSlash: true`. Advertise **`/api/mcp` without a trailing slash** (server card, catalog, agent card). In middleware, call `apiPathNeedingTrailingSlash` from `@se-studio/core-ui` and `NextResponse.rewrite` so bare `/api/*` hits the handler without a client-visible 308 (Streamable HTTP POST cannot rely on redirects).
27
+
26
28
  Use `endpointPath` only on **`buildMcpServerCard`** so the well-known card advertises the same URL agents should call:
27
29
 
28
30
  | Site shape | Example `endpointPath` (server card) |
@@ -1,3 +1,3 @@
1
1
  export declare const SITE_MCP_PACKAGE_NAME = "@se-studio/site-mcp";
2
- export declare const SITE_MCP_VERSION = "0.3.0";
2
+ export declare const SITE_MCP_VERSION = "0.3.1";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Generated by scripts/generate-version.mjs — do not edit manually.
2
2
  export const SITE_MCP_PACKAGE_NAME = "@se-studio/site-mcp";
3
- export const SITE_MCP_VERSION = "0.3.0";
3
+ export const SITE_MCP_VERSION = "0.3.1";
4
4
  //# sourceMappingURL=version.js.map
package/docs/llms.md CHANGED
@@ -58,7 +58,8 @@ buildMcpServerCard({
58
58
  ## Paths
59
59
 
60
60
  - Mount via Next route (e.g. `/api/mcp`)
61
- - Card `endpointPath` must match mount
61
+ - Card `endpointPath` must match mount (**no** trailing slash)
62
+ - Sites with `trailingSlash: true`: middleware rewrite bare `/api/*` via `apiPathNeedingTrailingSlash` from `@se-studio/core-ui` (avoids 308 on MCP POST)
62
63
  - Markdown mapping: `@se-studio/core-ui/agent-ready` (shared with Band A middleware)
63
64
  - Robots: `allowExtra: ['/api/mcp', '/api/search']` when under `Disallow: /api/`
64
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/site-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Public, read-only, stateless MCP for SE Studio marketing sites (search, markdown, site-info)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@modelcontextprotocol/sdk": "^1.29.0",
30
30
  "zod": "^4.4.3",
31
- "@se-studio/core-ui": "1.19.2"
31
+ "@se-studio/core-ui": "1.19.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@biomejs/biome": "^2.5.5",