Python: support mcp 2.x (Python SDK): pin blocks mcp 2.0.0
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Bắt đầu với các dependency pin trong python/pyproject.toml:59 và :99, sau đó kiểm tra các import bị ảnh hưởng, việc đọc thuộc tính, thiết lập client và các server handler trong python/semantic_kernel/connectors/mcp.py. Kiểm tra các giao diện SDK mcp 2.0 được mô tả trong issue và xác minh rằng việc cài đặt và Python MCP connector hoạt động với mcp==2.0.0 cùng các dependency floor bắt buộc của nó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
semantic-kernel currently pins the MCP Python SDK to the 1.x line and cannot be installed alongside mcp 2.0.0 (released 2026-07-28). This issue tracks the breaking changes in mcp 2.0 that affect the Python MCP connector.
Current pins
mcp>=1.26.0,<2.0—python/pyproject.toml:59mcp>=1.8,<2.0—python/pyproject.toml:99(themcpextra)
Breaking changes in mcp 2.0 that affect semantic-kernel
All in python/semantic_kernel/connectors/mcp.py, verified against the installed mcp==2.0.0 SDK:
-
streamablehttp_clientrenamed →streamable_http_client, and dropped kwargs.mcp.py:20—from mcp.client.streamable_http import streamablehttp_clientmcp.py:897—return streamablehttp_client(**args)whereargsincludesheaders,timeout,sse_read_timeout(mcp.py:887-895). In 2.0 these kwargs are removed; headers/timeouts must move onto anhttpx2.AsyncClientpassed ashttp_client=.
-
ClientSession(read_timeout_seconds=timedelta(...))now takes a float.mcp.py:337—read_timeout_seconds=timedelta(seconds=self.request_timeout)→ pass a float of seconds.
-
McpErrorrenamed →MCPError.mcp.py:24—from mcp.shared.exceptions import McpError; used atmcp.py:619, 637, 1125, 1158. In 2.0 the name isMCPError(constructorMCPError(code, message, data=None)).
-
camelCase attribute reads on
mcp.types→ snake_case.mcp.py:113, 115, 120—mcp_type.mimeType→mime_typemcp.py:133—mcp_type.toolUseId→tool_use_idmcp.py:207, 208—tool.inputSchema.get(...)→input_schema
-
Lowlevel
@server.list_tools()/@server.call_tool()decorators removed.mcp.py:1091—@server.list_tools();mcp.py:1118—@server.call_tool()(in theMCPServerclass,from mcp.server.lowlevel import Serveratmcp.py:22). In 2.0 handlers are registered via theServer(...)constructor (on_list_tools=/on_call_tool=).
Notes
- Dependency-floor updates.
mcp2.0 requirespydantic>=2.12,anyio>=4.9,typing-extensions>=4.13, and adds required depsopentelemetry-apiandmcp-types(exact-pinned to the SDK version); the SDK's HTTP layer moved fromhttpx/httpx-ssetohttpx2>=2.5.0.
Happy to help with a PR if the maintainers are open to it.
- Ngôn ngữ chính
- C#
- Star
- 28.6k
- Fork
- 4.8k
- Merge trung bình
- 13 giờ 24 phút
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/semantic-kernel
-
python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/semantic-kernel#14491 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/semantic-kernel#14490 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Python: [Python] structured_outputs_transform reuses ChatHistory across calls (prompt pollution)Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
microsoft/semantic-kernel#14483 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
.NET python triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
microsoft/semantic-kernel#14482 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Python: [Python] as_agent_framework_tool drops parameter defaults (optionals become required)Đang mởpython triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
microsoft/semantic-kernel#14481 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/semantic-kernel
Issue tương tự
-
go 🏃 testing 🧪
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
valkey-io/valkey-glide#7239 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15462 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
:watch: Not Triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
comp:instrumentation.aspnetcore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-telemetry/opentelemetry-dotnet-contrib#5427 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[feature request] Condier making `TelemetrySpan`'s constructor and `Activity` property publicĐang mởenhancement needs-triage pkg:OpenTelemetry
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-telemetry/opentelemetry-dotnet#7851 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày