Support MCP specification version 2026-07-28 (stateless core)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- api, authentication, backend
调研方向
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 内容生成。
描述
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/initializedhandshake and theMcp-Session-Idheader (per-request_metanow carries protocol version/client identity/capabilities instead) - A new
server/discoverRPC 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-Nameheaders 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/getfor results instead of relying ontasks/resultpush, 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:
- 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
- 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 synchronoustools/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:
- Official spec announcement: https://blog.modelcontextprotocol.io/posts/2026-07-28/
- Changelog vs 2025-11-25: https://modelcontextprotocol.io/specification/2026-07-28/changelog
- MCP Apps extension (live since 2026-01-26): https://modelcontextprotocol.io/specification/2026-07-28 (Extensions section)
- MCP Tasks extension: same spec, Extensions section
- Prior related work in Dify for 2025-06-18 support: PR #25766, #37892
- Relevant file: api/core/mcp/types.py (LATEST_PROTOCOL_VERSION / SERVER_SUPPORTED_PROTOCOL_VERSIONS / ServerCapabilities)
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:
- Protocol negotiation: stateless core,
_meta-based versioning,server/discover - Authorization hardening (OAuth/OIDC alignment, CIMD over DCR)
- Extensions framework support in
ServerCapabilities - 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
- MCP Tasks:
tasks/getpolling 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 分钟
- 30 天内合并 PR
- 611
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
langgenius/dify 的其他 Issue
-
Annotation Reply: a stored score threshold of 0.0 is silently replaced with 1, disabling the feature 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
langgenius/dify#42639 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 70/100
langgenius/dify#42468 · 1 条评论 · 1 个 reaction ·
-
🐞 bug
难度 2/5 1-3 小时 新手友好度 86/100
langgenius/dify#42446 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 88/100
langgenius/dify#42355 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 88/100
langgenius/dify#42350 · 1 条评论 · 1 个 reaction ·
相似的 Issue
-
calcite-components needs triage refactor
难度 2/5 1-3 小时 新手友好度 75/100
Esri/calcite-design-system#15203 ·
-
难度 2/5 1-3 小时 新手友好度 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 78/100
Automattic/studio#4908 ·
-
难度 2/5 1-3 小时 新手友好度 90/100