feat: header metadata support#299
Open
Hsienz wants to merge 6 commits into
Open
Conversation
need to update mcp to make tool_call() to support meta argument
6fff050 to
50054c3
Compare
50054c3 to
7e99ed1
Compare
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.
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Update mcp package so that ClientSession.tool_call() function support meta parameter.
So we can pass unused meta to tool call from exist client-header-forwarding functionality.
Also, implementing the client-header-forwarding to cli command ONLY for streamable-http because I rarely use other type and not able to testing
Added
Send unused meta from client-header-forwarding functionality to tool_call
Add client-header-forwarding to cli command for streamable-http type
usage:
mcpo --port 8001 --type streamable-http --client-header-forwarding '{"enabled":true,"whitelist":["*"]}' -- http://localhost:8000/mcpSee here for format of config.json
Changed
Additional Information
You need to add something like middleware to get meta field
e.g.
Screenshots or Videos
Left panel is mcpo log
Right panel is MCP server log
You can see Authorization appear in the MCP server log