@se-studio/site-mcp 0.3.0 → 0.3.2
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 +14 -0
- package/README.md +2 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/docs/llms.md +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @se-studio/site-mcp
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @se-studio/core-ui@1.19.4
|
|
8
|
+
|
|
9
|
+
## 0.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @se-studio/core-ui@1.19.3
|
|
16
|
+
|
|
3
17
|
## 0.3.0
|
|
4
18
|
|
|
5
19
|
### 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). Also set **`skipTrailingSlashRedirect: true`** — Next’s built-in slash 308 runs before middleware and ignores rewrites. Then in middleware call `apiPathNeedingTrailingSlash` + `NextResponse.rewrite` for bare `/api/*`, and 308 HTML paths to the slashed form yourself if you still want page trailing slashes.
|
|
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) |
|
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.
|
|
3
|
+
"version": "0.3.2",
|
|
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.
|
|
31
|
+
"@se-studio/core-ui": "1.19.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@biomejs/biome": "^2.5.5",
|