refactor: remove unused mcp.shared.progress module#2080
Merged
Conversation
Remove the ProgressContext, Progress, and progress() context manager from mcp.shared.progress. This module had zero real-world adoption - every project that implements progress notifications uses either Context.report_progress() or session.send_progress_notification() directly. The module also had an unfixed related_request_id bug (notifications silently dropped on Streamable HTTP transport), which further confirms it was never used in production. - Delete src/mcp/shared/progress.py - Remove test_progress_context_manager test - Update migration guide to document removal and alternatives Github-Issue: #2021
Kludex
approved these changes
Feb 18, 2026
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.
Summary
Remove the
ProgressContext,Progress, andprogress()context manager frommcp.shared.progress. This module had zero real-world adoption and contained an unfixedrelated_request_idbug (#2021) that would silently drop notifications on Streamable HTTP transport.Why
An exhaustive GitHub-wide search confirmed that no project actually calls
ProgressContext.progress()or uses theprogress()context manager:ProgressContext.progress()across all of GitHubprogress()context manager (1 dead import in an unrelated project)ProgressContext— every progress bug report (context.report_progress not sending notifications on streamable-http #953, Progress notifications not delivered via SSE in stateless HTTP mode #2001) was aboutContext.report_progress()ProgressPydantic model was dead code even within the SDK itselfEvery project that implements MCP progress notifications uses either:
Context.report_progress()(the FastMCP high-level API, already fixed in test: fix progress notification assertions for related_request_id #2038)session.send_progress_notification()(the direct low-level API)One project (dedalus-labs) that wanted a higher-level abstraction built their own from scratch rather than using
ProgressContext.Changes
src/mcp/shared/progress.pytest_progress_context_managertest (keep the other two progress tests that testsend_progress_notificationdirectly)docs/migration.mdto document the removal with migration guidanceRelated
ProgressContext.progress()portion of Refactor handler context to be transport- and handler-type-aware #2021related_request_idinContext.report_progress()