Skip to content

mcp: fix setProgressToken when Meta is nil#846

Merged
maciej-kisiel merged 2 commits intomodelcontextprotocol:mainfrom
StevenRChen:main
Mar 18, 2026
Merged

mcp: fix setProgressToken when Meta is nil#846
maciej-kisiel merged 2 commits intomodelcontextprotocol:mainfrom
StevenRChen:main

Conversation

@StevenRChen
Copy link
Contributor

When SetProgressToken is called on a Params struct with a nil Meta
field, the newly created map is never assigned back to the struct via
SetMeta, causing the progress token to be silently lost.

Call p.SetMeta(m) after creating the new map so the struct retains the
reference.

Fixes #845

@StevenRChen
Copy link
Contributor Author

Duplicating with existing PR
#838

@maciej-kisiel
Copy link
Contributor

Given that the other PR is not proceeding, we can revive this one. It looks good in its current form.

@maciej-kisiel maciej-kisiel reopened this Mar 18, 2026
@maciej-kisiel maciej-kisiel merged commit 48879f0 into modelcontextprotocol:main Mar 18, 2026
9 checks passed
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.

SetProgressToken silently fails when Meta is nil

2 participants