GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mcp): migrate to the stateless MCP 2026-07-28 protocol by antfubot · Pull Request #297 · devframes/devframe

Conversation

@antfubot

@antfubot antfubot commented Aug 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

What & why

Migrates devframe's MCP surface to the stateless MCP 2026-07-28 protocol, as tracked in #293. It retires devframe's hand-rolled Mcp-Session-Id lifecycle in favor of the SDK's stateless serving entry points, so requests reach any server instance without session affinity and modern MCP clients are first-class.

The endpoints keep serving 2025-era clients through the SDK's default stateless legacy path — the custom session registry is gone, but existing clients keep listing and calling tools/resources.

Compatibility (ships within 0.9)

This is source-compatible — no public API, option-type, or dependency changes (the tsnapi snapshot is unchanged), so consumers need zero code changes and it lands as a 0.9 minor rather than a dedicated major.

The changes are on the wire only:

  • GET/DELETE on the HTTP endpoint now return 405 (were the 2025 session stream/teardown ops).
  • No Mcp-Session-Id is issued; both a default (2025-era) client and a modern client connect + list + call successfully.
  • The one regression: a 2025-era client no longer receives live list_changed push over HTTP (stateless legacy has no server→client channel); modern clients get it via subscriptions/listen.

Changes

  • HTTP (createMcpFetchHandler) moves to the SDK's createMcpHandler, building a fresh server per request. The loopback origin gate is unchanged.
  • stdio (createMcpServer) moves to serveStdio, pinning one server per connection.
  • devframe connect negotiates the modern era via server/discover, falling back to the 2025 handshake for a 2025-only instance.
  • list_changed events bridge onto modern subscriptions/listen streams — over HTTP through the handler's notify bus, on stdio through the pinned server's send*ListChanged calls.
  • The pure server factory (buildMcpServerFromContext) is split from the notification bridge (bridgeListChanged); the old transports.ts stdio wrapper is removed.

Docs

  • Rewrites the MCP adapter page's serving model (stateless, per-request).
  • Documents the change as a section in the "Migrating to 0.9" guide.

Closes #293

This PR was created with the help of an agent.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@antfubot
feat(mcp): migrate to the stateless MCP 2026-07-28 protocol
15b75be
Serve the MCP surface through the SDK's stateless 2026-07-28 entry points,
retiring devframe's custom Mcp-Session-Id lifecycle:

- HTTP moves to `createMcpHandler`, building a fresh server per request
  (no session registry, no session-local routing, GET/DELETE -> 405).
  2025-era clients are still served through the SDK's stateless legacy path.
- stdio moves to `serveStdio`, pinning one server per connection.
- `devframe connect` negotiates the modern era via `server/discover`,
  falling back to the 2025 handshake for a 2025-only instance.
- `list_changed` events bridge onto modern `subscriptions/listen` streams
  (HTTP via the handler's notify bus; stdio via the pinned server's
  send*ListChanged calls).

The devframe API surface (createMcpServer, createMcpFetchHandler,
mountMcpHttp, cli.mcp) and the origin gate are unchanged.

Closes #293
@vercel

vercel Bot commented Aug 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
devframe Ignored Ignored Preview Aug 27, 2026 1:56am
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vercel
vercel Bot deployed to Preview August 26, 2026 03:58
View deployment
@antfu antfu changed the title feat(mcp): migrate to the stateless MCP 2026-07-28 protocol feat(mcp)!: migrate to the stateless MCP 2026-07-28 protocol Aug 26, 2026
@antfubot
test(mcp): update stateful MCP assertions for the stateless endpoint
f451229
The hub aggregate-MCP and Next handler tests still exercised the 2025
initialize/Mcp-Session-Id handshake. Serve them statelessly: the hub test
lists tools with a single per-request POST, and both assert no session id
is issued.
@vercel
vercel Bot temporarily deployed to Preview August 26, 2026 04:45 Inactive
antfu
antfu approved these changes Aug 26, 2026
View reviewed changes
@antfubot
Merge remote-tracking branch 'origin/main' into feat/mcp-stateless-2026
b7b2d59
# Conflicts:
#	docs/content/2.adapters/7.mcp.md
@vercel
vercel Bot deployed to Preview August 27, 2026 00:28
View deployment
@antfubot
docs(mcp): fold the stateless MCP change into the 0.9 migration guide
542edae
Retarget the stateless MCP 2026-07-28 migration to ship within 0.9: the
change is source-compatible (no public API or dependency changes), so it
lands as a 0.9 minor rather than a dedicated 0.10 clean break. Remove the
separate 0.10 guide, revert the migration renumbering, and document the
stateless endpoints as a section in the 0.9 guide.
@antfu antfu changed the title feat(mcp)!: migrate to the stateless MCP 2026-07-28 protocol feat(mcp): migrate to the stateless MCP 2026-07-28 protocol Aug 27, 2026
@antfu
antfu merged commit 8d58eb5 into main Aug 27, 2026
18 of 19 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@antfu
antfu deleted the feat/mcp-stateless-2026 branch August 27, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@antfu antfu antfu approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Investigate migration to stateless MCP 2026-07-28

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@antfubot @antfu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.