Skip to content

Conversation

@maxisbey
Copy link
Contributor

@maxisbey maxisbey commented Nov 19, 2025

This is an MVP implementation of SEP-1686 Tasks with the goal being marking new features as experimental, while being fully spec compliant.

Related PR (previous implementation draft): #1554

TODO:

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@felixweinberger felixweinberger linked an issue Nov 20, 2025 that may be closed by this pull request
@maxisbey maxisbey changed the title SEP-1686: Tasks MCP SEP-1686: Tasks Nov 20, 2025
@maxisbey maxisbey force-pushed the maxisbey/SEP-1686_Tasks branch from cdf6aa0 to 9bd2aa8 Compare November 20, 2025 19:09
@LucaButBoring LucaButBoring mentioned this pull request Nov 20, 2025
9 tasks
chrisguidry added a commit to jlowin/fastmcp that referenced this pull request Nov 20, 2025
Analyzed the official SEP-1686 specification against both the MCP SDK's draft implementation (PR #1645) and FastMCP's current shims. Made corrections to match the spec exactly.

**Key changes:**

1. **Removed `error` field** - Spec only defines `statusMessage` for error details. Changed all handlers to use `statusMessage` instead of separate `error` field.

2. **Removed non-spec status values** - Spec defines exactly 5 statuses: `working`, `input_required`, `completed`, `failed`, `cancelled`. Removed FastMCP's `"submitted"` and `"unknown"` extensions.

3. **Non-existent tasks raise errors** - Aligned with SDK behavior: `tasks/get` for non-existent/deleted tasks raises `ValueError` (JSON-RPC error) instead of returning synthetic `status="unknown"`.

4. **Test updates** - Fixed 12+ tests expecting removed statuses. Changed assertions to expect JSON-RPC errors for not-found scenarios.

**What stayed the same:**

- Client already sends both `task=` (spec-compliant) and `_meta=` (SDK compatibility)
- Server monkeypatches work correctly for request params
- `createdAt` as ISO 8601 string matches spec (SDK uses datetime but serializes same)
- `ttl` field naming confirmed correct in both spec and SDK

All 3270 tests passing. FastMCP is now fully aligned with SEP-1686 final specification.

Related: modelcontextprotocol/python-sdk#1645

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

Co-Authored-By: Claude <noreply@anthropic.com>
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