chore(mcp): upgrade mcp client to 1.27.2 (2025-11-25 protocol)#904
Open
edis-uipath wants to merge 2 commits into
Open
chore(mcp): upgrade mcp client to 1.27.2 (2025-11-25 protocol)#904edis-uipath wants to merge 2 commits into
edis-uipath wants to merge 2 commits into
Conversation
Upgrades the `mcp` SDK from 1.26.0 to the latest stable 1.27.2, whose LATEST_PROTOCOL_VERSION is "2025-11-25". The MCP client negotiates the SDK's latest protocol version on initialize, so this is what lets UiPath MCP servers offer tasks to the agent (prerequisite for suspend-on-UiPath-task). The forked streamable-HTTP transport (which adds UiPath's session-id save/provide layer, needed so a suspended agent resumes onto the same MCP session) is kept as-is: the official client/streamable_http.py is byte-identical between 1.26.0 and 1.27.2, so there is nothing to re-sync, and the official client still offers no way to provide an initial session id through its public entrypoint. Adds a guard test that LATEST_PROTOCOL_VERSION is 2025-11-25, the task result types (CreateTaskResult / GetTaskResult / TaskMetadata) are importable, and Result exposes _meta. Full test suite green (2081 passed). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the project’s MCP SDK dependency to a tasks-capable protocol baseline by upgrading mcp to 1.27.2 (LATEST protocol 2025-11-25) and adding a small guard test to fail loudly on accidental downgrades.
Changes:
- Bump
mcppin from1.26.0→1.27.2inpyproject.toml. - Regenerate
uv.lockto reflect the new pinned MCP version. - Add a new test module to assert the MCP SDK’s latest protocol version and the presence of task-related types.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Pins mcp to 1.27.2 so the SDK negotiates the tasks-capable protocol. |
uv.lock |
Updates the lockfile to match the new MCP pin and resolution metadata. |
tests/agent/tools/test_mcp/test_protocol_version.py |
Adds guard tests for protocol version and SDK surface area (tasks + result metadata). |
Comment on lines
+29
to
+31
| def test_result_exposes_meta() -> None: | ||
| # The UiPath-job marker rides the result's _meta; the client reads it to detect a UiPath job. | ||
| assert "meta" in Result.model_fields |
Removes tests/agent/tools/test_mcp/test_protocol_version.py. It pinned task-type imports (CreateTaskResult / TaskMetadata) and the 2025-11-25 constant — assumptions the long-running-job design has moved away from: the chosen _meta-based contract doesn't use the SDK task types (which 2.x removes anyway). The version bump stands on the rest of the mcp suite. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Upgrade the MCP client to
mcp==1.27.2(2025-11-25 protocol)Bumps the
mcpSDK from 1.26.0 → 1.27.2 (latest stable), whoseLATEST_PROTOCOL_VERSIONis2025-11-25. The MCP client negotiates the SDK's latest protocol version oninitialize, so this is what lets UiPath MCP servers advertise long-running work to the agent.Why the fork stays
The forked streamable-HTTP transport (
agent/tools/mcp/streamable_http.py) exists to add UiPath's session-id save + provide layer (SessionInfo/SessionInfoFactory), which lets a suspended agent resume onto the same MCP session. We keep it because:client/streamable_http.pyis byte-identical between 1.26.0 and 1.27.2 (git diff --statis empty), so there's nothing to re-sync against this release.streamable_http_client()entrypoint. So the provide-on-resume capability still has to live in our fork.The fork reads the negotiated protocol version from the server's
InitializeResult(it doesn't hardcode one), so the bump alone flips negotiation to2025-11-25— no transport change needed.Changes
pyproject.toml:mcp==1.26.0→mcp==1.27.2;uv.lockregenerated.Testing
tests/agent/tools/test_mcp/— 57 passed.ruff check/ruff formatclean.🤖 Generated with Claude Code