Skip to content

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Nov 18, 2025

Implements parser support for the new MCP Tasks feature (SEP-1686) from the November 2025 spec update.

What changed

Added support for task-related RPC methods in the MCP parser:

  • tasks/list - Lists active tasks with cursor pagination
  • tasks/get - Gets task status by taskId
  • tasks/cancel - Cancels a task by taskId
  • tasks/result - Gets task result by taskId
  • notifications/tasks/status - Task status notifications

The implementation follows existing parser patterns and integrates with authorization, audit, and telemetry middleware.

Testing

  • Added comprehensive test coverage including edge cases
  • All tests passing with race detector
  • No breaking changes

References

Closes #2637

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Implements parser support for the new MCP Tasks feature (SEP-1686) that
was merged into the draft specification and will be part of the November
2025 spec update as an experimental feature.

Changes:
- Add support for task-related RPC methods:
  * tasks/list - Lists active tasks with cursor-based pagination
  * tasks/get - Gets task status by taskId
  * tasks/cancel - Cancels a task by taskId
  * tasks/result - Gets task result by taskId
- Add support for notifications/tasks/status notification
- Implement handleTaskIDMethod to extract taskId as resource identifier
- Implement handleTaskStatusNotificationMethod for task notifications
- Support both string and numeric taskId values (consistent with other
  ID handlers like handleCancelledNotificationMethod)
- Add comprehensive test coverage for all task methods including edge
  cases

The implementation follows ToolHive's existing parser patterns and
integrates seamlessly with authorization, audit, and telemetry
middleware. Resource ID extraction enables fine-grained authorization
policies for task operations.

Spec references:
- Draft: https://modelcontextprotocol.io/specification/draft/basic/utilities/tasks
- SEP: modelcontextprotocol/modelcontextprotocol#1686

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.50%. Comparing base (63c8c63) to head (f1b3c54).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2638      +/-   ##
==========================================
+ Coverage   55.47%   55.50%   +0.02%     
==========================================
  Files         312      312              
  Lines       29714    29726      +12     
==========================================
+ Hits        16485    16499      +14     
+ Misses      11789    11788       -1     
+ Partials     1440     1439       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JAORMX JAORMX merged commit 9cd1146 into main Nov 18, 2025
29 checks passed
@JAORMX JAORMX deleted the add-mcp-tasks-parser-support branch November 18, 2025 17:53
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.

November Spec Update

3 participants