You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@modelcontextprotocol/server` is a peer dependency; `createMcpServer`speaks`stdio`, spawned per MCP session.
15
+
`@modelcontextprotocol/server` is a peer dependency; `createMcpServer`serves`stdio` through the SDK's `serveStdio`, pinning one server instance per connection.
16
16
17
17
## Route-based server
18
18
@@ -31,7 +31,7 @@ export default defineDevframe({
31
31
32
32
The endpoint speaks Streamable-HTTP at `/__mcp` (`/__<id>/__mcp` under a host framework), sharing its origin/port. `--mcp` / `--no-mcp` override; `__connection.json` advertises it.
33
33
34
-
Each MCP session gets its own MCP server, keyed by`Mcp-Session-Id`. An origin gate requires `Origin` be loopback (or allow-listed) and rejects `Origin`-less requests. Widen for a tunnel/LAN origin with `cli: { mcp: { allowedOrigins: ['https://tunnel.example.com'] } }`.
34
+
The endpoint is **stateless**: it serves the [2026-07-28 revision](https://modelcontextprotocol.io/specification/2026-07-28) per request through the SDK's `createMcpHandler`, building a fresh MCP server for each request — every HTTP request stands alone, with no`Mcp-Session-Id` to correlate. 2025-era clients are still served through the SDK's stateless legacy path. An origin gate requires `Origin` be loopback (or allow-listed) and rejects `Origin`-less requests. Widen for a tunnel/LAN origin with `cli: { mcp: { allowedOrigins: ['https://tunnel.example.com'] } }`.
Copy file name to clipboardExpand all lines: docs/content/7.migrations/1.migration-0.9.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
title: 'Migrating to 0.9'
3
-
description: '0.9 removes the compatibility shims deprecated across the 0.7 series and trims the public API of devframe and @devframes/hub. Each change has a drop-in replacement.'
3
+
description: '0.9 removes the compatibility shims deprecated across the 0.7 series, trims the public API of devframe and @devframes/hub, and moves the MCP surface to the stateless MCP 2026-07-28 protocol.'
4
4
---
5
5
6
-
0.9 removes the compatibility shims deprecated across the 0.7 series and trims the public API of `devframe` and `@devframes/hub`. Each change has a drop-in replacement.
6
+
0.9 removes the compatibility shims deprecated across the 0.7 series and trims the public API of `devframe` and `@devframes/hub`. Each change has a drop-in replacement. It also moves the [MCP](/adapters/mcp) surface to the stateless [MCP 2026-07-28 protocol](https://modelcontextprotocol.io/specification/2026-07-28) — the devframe API is unchanged; see [The MCP endpoints are stateless](#the-mcp-endpoints-are-stateless).
`@devframes/vite/hub` and `@devframes/nuxt/hub` recommend the native [Vite DevTools](https://devtools.vite.dev) / [Nuxt DevTools](https://devtools.nuxt.com) once (silence with `{ quiet: true }`); `@devframes/next/hub` stays quiet.
335
+
336
+
## The MCP endpoints are stateless
337
+
338
+
The [MCP](/adapters/mcp) surface serves the stateless [2026-07-28 protocol](https://modelcontextprotocol.io/specification/2026-07-28). The devframe API you author against — `createMcpServer`, `createMcpFetchHandler`, `mountMcpHttp`, `cli.mcp`, and the agent host — is unchanged; the change is in how the endpoints serve requests on the wire.
339
+
340
+
-**HTTP** serves each request through the SDK's `createMcpHandler`, building a fresh server per request. There is no `Mcp-Session-Id` and no `initialize` handshake to open a session, so a request reaches any server instance without affinity. A `GET` or `DELETE` (the 2025 session operations) is answered `405`. 2025-era clients keep listing and calling tools and resources through the SDK's stateless legacy path; the live server-push channel for `list_changed` notifications is available to modern clients over the `subscriptions/listen` stream they open.
341
+
-**stdio** serves the connection through the SDK's `serveStdio`, pinning one server instance per connection and negotiating the 2026-07-28 era (falling back to the 2025 handshake for a 2025-era opening).
342
+
-**`devframe connect`** probes each instance with `server/discover` and negotiates the modern era, falling back to the 2025 handshake for a 2025-only instance.
343
+
344
+
A client that connects to devframe's HTTP endpoint should negotiate the modern era to use the stateless protocol; one left on the default (2025-era) negotiation is still served through the stateless legacy path:
Copy file name to clipboardExpand all lines: docs/content/7.migrations/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Upgrade guides for devframe and `@devframes/hub`, newest first. Each one lists e
7
7
8
8
| Version | What changed |
9
9
| ------- | ------------ |
10
-
|[Migrating to 0.9](/migrations/migration-0.9)| Removes the compatibility shims deprecated across the 0.7 series and trims the public API. |
10
+
|[Migrating to 0.9](/migrations/migration-0.9)| Removes the compatibility shims deprecated across the 0.7 series, trims the public API, and moves the MCP surface to the stateless MCP 2026-07-28 protocol. |
11
11
|[Migrating to 0.8](/migrations/migration-0.8)| Makes RPC schemas validator-neutral and runtime-validated, and adds the agent-native MCP API. |
12
12
|[Migrating to 0.7](/migrations/migration-0.7)| Makes `cac` an optional peer and moves json-render into an opt-in package. |
13
13
|[Migrating to 0.6](/migrations/migration-0.6)| Tightens `defineDevframe`'s metadata, replaces the terminal and WebSocket transports, and adds enforced auth. |
0 commit comments