-
Notifications
You must be signed in to change notification settings - Fork 799
[MCP] add support for SSE + HTTP #3099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice and clean! thank you
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
async def add_mcp_server(self, type: Literal["sse"], **params: Unpack[SSEServerParameters_T]): ... | ||
|
||
@overload | ||
async def add_mcp_server(self, type: Literal["streamablehttp"], **params: Unpack[StreamableHTTPParameters_T]): ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async def add_mcp_server(self, type: Literal["streamablehttp"], **params: Unpack[StreamableHTTPParameters_T]): ... | |
async def add_mcp_server(self, type: Literal["http"], **params: Unpack[StreamableHTTPParameters_T]): ... |
in the JS implem we've just used "http", and i think i've seen in some clients (Copilot config for instance) they went for just "http" too.
As it's expected to become the main method, i would keep it super short and simple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(i meant VS Code not Copilot)
here, see this line: https://gist.github.com/AArnott/ea481eeb07fb78b4b6bf4b7436d88009#file-mcp-schema-json-L188
from discussion: modelcontextprotocol/modelcontextprotocol#292 shared by @evalstate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing. Indeed much better to have "http". Addressed in 25726d8
I was in the air while this happened (saw the email) @Wauplin don't think you can make that any shorter! |
Followed implementation from huggingface/huggingface.js#1422
cc @evalstate if you can have a look at it
How to test
Output