Skip to content

Conversation

@LucaButBoring
Copy link

@LucaButBoring LucaButBoring commented Jan 13, 2026

Description

Implements client support for MCP Tasks via an adapter model that handles both tool execution modes identically. This can later be hooked into event handlers in a more intelligent way, but this unblocks support for simply invoking task-augmented tools.

Note that unlike strands-agents/sdk-typescript#357, this PR handles the capability/executionMode logic explicitly, as the MCP Python SDK's implementation of Tasks does not encapsulate that logic, unlike the MCP TS SDK.

Related Issues

#1260

Documentation PR

N/A

Type of Change

New feature

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • I ran hatch run prepare
  • I spot-checked against an MCP server that supports Tasks

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 96.62921% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/strands/tools/mcp/mcp_client.py 96.62% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Implements client support for MCP Tasks via an adapter model that handles both tool execution modes identically.
This can later be hooked into event handlers in a more intelligent way, but this unblocks support for simply invoking task-augmented tools.

Keep error handling and edge case tests (timeout, failure status, config).
Also remove unused create_tool_with_task_support helper and trim task_echo_server.

Reduces PR diff from 1433 to 969 lines (under 1000 limit).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant