Skip to content

chore: Add BizContext, extensions, and context support for task#1831

Closed
He-Pin wants to merge 1 commit into
modelcontextprotocol:mainfrom
He-Pin:bizContext
Closed

chore: Add BizContext, extensions, and context support for task#1831
He-Pin wants to merge 1 commit into
modelcontextprotocol:mainfrom
He-Pin:bizContext

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Motivation and Context

To support context free client task handling, eg an agent may put some bizContext to the bizContext assosicated with the task, and waiting an notification later.

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

@He-Pin He-Pin requested a review from a team as a code owner November 18, 2025 08:49
@He-Pin He-Pin changed the title Biz context chore: Add BizContext support for task Nov 18, 2025
@He-Pin He-Pin force-pushed the bizContext branch 2 times, most recently from 8d36726 to fcf697b Compare November 20, 2025 15:05
@He-Pin He-Pin changed the title chore: Add BizContext support for task chore: Add BizContext, extensions, and context support for task Nov 20, 2025
@He-Pin He-Pin mentioned this pull request Nov 20, 2025
@localden

Copy link
Copy Markdown
Contributor

@He-Pin @LucaButBoring should this be a separate SEP that modifies the Tasks spec?

@He-Pin

He-Pin commented Jan 27, 2026

Copy link
Copy Markdown
Contributor Author

I will update it this weekend.

@localden

Copy link
Copy Markdown
Contributor

@He-Pin @LucaButBoring just to confirm, is this already implemented, or is this entirely net-new for tasks? Because this feels SEP-shaped.

@LucaButBoring

Copy link
Copy Markdown
Contributor

@localden net-new

@He-Pin

He-Pin commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

This can be implemented, if this is acceptable, I can first contribute this to the typescript sdk . wdyt @localden @LucaButBoring

Comment on lines +133 to +135
- `extensions` object providing arbitrary extension metadata for the task, used to control how task will be handled.
- `context` object providing context metadata for the task, such as identity information.
- `bizContext` object providing business context metadata for the task, if the server received this, it should respond the same `bizContext` in the task-related responses and notifications.

@LucaButBoring LucaButBoring Mar 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like all three of these additional fields contain arbitrary data? Are there any reasons why these wouldn't be regular request parameters or defined by an actual protocol extension? Thinking on these more, they only appear to make sense if you control both the client and server implementations, at which point it's acceptable to do whatever additional logic you like (but you might want to codify that in an extension specification).

@LucaButBoring LucaButBoring Mar 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Without a specific use case it's hard to judge how this will be used, but extrapolating from the PR description, if what you want is a way to pass a webhook callback outside the scope of the specification, an extension seems to make more sense than having spec-defined fields which the host application can't use unless it's built-to-purpose for a specific use case (there's also a new Triggers and Events Working Group which should start to be a useful discussion platform for that particular topic once they're fully set up, but setting that aside).

@He-Pin

He-Pin commented Mar 15, 2026

Copy link
Copy Markdown
Contributor Author

Yes, we internally maintain a generic MCP server and provide a client for use by the agents platform; however, our server is implemented in Java, which prevents implementations in other languages ​​from leveraging our platform's capabilities. You are right—I should refactor this into a generalized capability. I will make the necessary changes. Thank you for your review. @LucaButBoring

@localden

Copy link
Copy Markdown
Contributor

Closing this as Tasks is moving into an extension.

@localden localden closed this Jun 13, 2026
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.

3 participants