Skip to content

chore(mcp): upgrade mcp client to 1.27.2 (2025-11-25 protocol)#904

Open
edis-uipath wants to merge 2 commits into
mainfrom
chore/upgrade-mcp-1.27.2
Open

chore(mcp): upgrade mcp client to 1.27.2 (2025-11-25 protocol)#904
edis-uipath wants to merge 2 commits into
mainfrom
chore/upgrade-mcp-1.27.2

Conversation

@edis-uipath

@edis-uipath edis-uipath commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Upgrade the MCP client to mcp==1.27.2 (2025-11-25 protocol)

Bumps the mcp SDK from 1.26.0 → 1.27.2 (latest stable), 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 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:

  • The official client/streamable_http.py is byte-identical between 1.26.0 and 1.27.2 (git diff --stat is empty), so there's nothing to re-sync against this release.
  • The official client still offers no way to provide an initial session id through its public 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 to 2025-11-25 — no transport change needed.

Changes

  • pyproject.toml: mcp==1.26.0mcp==1.27.2; uv.lock regenerated.

Testing

  • tests/agent/tools/test_mcp/57 passed.
  • Full suite — green; ruff check / ruff format clean.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 14, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mcp pin from 1.26.01.27.2 in pyproject.toml.
  • Regenerate uv.lock to 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>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants