Support MCP specification version 2026-07-28 (stateless core)

オープン
#42,352 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python

調査の方向性

Start with api/core/mcp/types.py and review PRs #25766 and #37892 to compare existing protocol-version negotiation and ServerCapabilities work. Then trace the /mcp/server/<server_code>/mcp endpoint and client path; the requested stateless core, authorization changes, and Extensions support are broad enough to require decomposition before implementation.

索引モデルが issue の本文から書いたものです。

説明

💪 enhancement
Self Checks
  • I have read the Contributing Guide and Language Policy.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.

The Model Context Protocol released its 2026-07-28 specification (the biggest revision since launch), which moves the protocol core to a stateless model. Key changes include:

  • Removal of the initialize/initialized handshake and the Mcp-Session-Id header (per-request _meta now carries protocol version/client identity/capabilities instead)
  • A new server/discover RPC for capability discovery
  • Multi Round-Trip Requests (MRTR) replacing server-initiated requests (roots/sampling/elicitation)
  • Roots, Sampling, Logging, and the legacy HTTP+SSE transport are now deprecated (12-month grace period)
  • Mandatory Mcp-Method/Mcp-Name headers for routing, cacheable list results, and hardened OAuth/OIDC-based authorization
  • A formal Extensions framework (reverse-DNS identifiers, independent versioning, advertised via ServerCapabilities.extensions), which officially folds in two extensions that matter for Dify's use cases:
    • MCP Apps: lets a server ship server-rendered, interactive UI (sandboxed iframe) alongside a tool call, so a connected client can render rich UI instead of plain text/structured content
    • MCP Tasks: moved out of the core protocol into an official extension for durable, long-running work — clients poll tasks/get for results instead of relying on tasks/result push, which better matches Dify's workflow-as-MCP-server use case for long-running app/workflow executions

Currently Dify's MCP client/server implementation only negotiates up to 2025-06-18
(see api/core/mcp/types.py:
LATEST_PROTOCOL_VERSION = "2025-06-18",
SERVER_SUPPORTED_PROTOCOL_VERSIONS = {"2024-11-05", "2025-03-26", "2025-06-18"}),
and there is no extensions field on ServerCapabilities, so neither MCP Apps nor MCP Tasks can currently be advertised or negotiated.

As more MCP servers/clients (e.g. official Tier-1 SDKs: TypeScript, Python, Go, C#) migrate to the stateless 2026-07-28 spec, I expect Dify will start hitting the same "Unsupported protocol version" error that occurred previously with 2025-06-18 (see #25767, #27677), both when:

  1. Dify acts as an MCP client connecting to upstream servers that only speak 2026-07-28 (potentially including servers that expose MCP Apps UI or MCP Tasks), and
  2. Dify's published-workflow MCP server endpoint (/mcp/server/<server_code>/mcp) needs to serve 2026-07-28-only clients, and would benefit from exposing long-running workflow executions via the MCP Tasks extension instead of blocking on a single synchronous tools/call.

Could the team share a timeline for supporting the 2026-07-28 specification — particularly (a) the stateless core (dropping session-based initialize handshake), (b) the new authorization requirements, and (c) the Extensions framework with MCP Apps and MCP Tasks support?

2. Additional context or comments

References:

Given the stateless core removes session semantics entirely, and MCP Apps/Tasks are net-new capabilities requiring new UI rendering (Apps) and async job/polling infrastructure (Tasks), this is likely a multi-phase migration (broader in scope than PR #25766/#37892) rather than a simple version-string bump:

  1. Protocol negotiation: stateless core, _meta-based versioning, server/discover
  2. Authorization hardening (OAuth/OIDC alignment, CIMD over DCR)
  3. Extensions framework support in ServerCapabilities
  4. MCP Apps: sandboxed iframe UI rendering on the client side (if Dify is to act as a full MCP client), and/or exposing Dify's own rich UI via Apps when Dify acts as an MCP server
  5. MCP Tasks: tasks/get polling support for long-running Dify workflow/app executions exposed via the workflow-as-MCP-server feature

Happy to help test against a 2026-07-28-compliant server/client if useful.

3. Can you help us with this feature?
  • I am interested in contributing to this feature.
主要言語
TypeScript
スター
157k
フォーク
24.7k
平均マージ
22時間 32分
マージ済み PR(30日)
611

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

langgenius/dify のほかの issue

langgenius/dify の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。