Skip to content

Conversation

@ihrpr
Copy link
Contributor

@ihrpr ihrpr commented May 19, 2025

There are multiple reports on bot being able to connect to SSE and Streamable Http with Auth:

modelcontextprotocol/python-sdk#731
#390
modelcontextprotocol/python-sdk#679

SSE: due to auth provider - described here

Streamable Http - Auth flow was working fine, but when just clicking on connect, the request was hanging and then just timing out, instead of caching Auth error and re-triggering auth. The issue was that proxy was just masking errors and not returning them back to the client to be correctly handled during initialization. Unlike SSE, streamable Http does the first request on Initialization phase.


cd python-sdk/examples/servers/simple-auth 

uv run mcp-simple-auth --transport streamable-http

 uv run mcp-simple-auth --transport sse    

Testing:
Streamable Http Test:
image
SSE
image

)}
</h4>
{structuredResult.content.map((item, index) => (
{structuredResult.content?.map((item, index) => (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unrelated, build was not happy

Copy link
Member

Choose a reason for hiding this comment

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

That's interesting, that seems to indicate that content became an optional field since the last time we touched the ToolsTab?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, I think I know what's going on, we recently released tool structured output and we probably imported the new version of the TS SDK -- surprised now that CI didn't complain before ...

@bhosmer-ant would be good to add it to the inspector for testing as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, mystery solved! thank you @bhosmer-ant!!

I used local version of typescript sdk hence had this error, removed it

Copy link
Member

Choose a reason for hiding this comment

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

Just leaving this thread open as a placeholder for the incoming SDK change mentioned elsewhere.

@ihrpr ihrpr requested review from cliffhall, olaservo and pcarleton May 20, 2025 07:28
olaservo
olaservo previously approved these changes May 20, 2025
const onOAuthConnect = useCallback(
(serverUrl: string) => {
setSseUrl(serverUrl);
setTransportType("sse");
Copy link
Member

Choose a reason for hiding this comment

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

Why is transport type no longer set here?

@ihrpr ihrpr merged commit eda63da into main May 21, 2025
7 of 9 checks passed
@ihrpr ihrpr deleted the ihrpr/auth-sse-shttp-connect branch May 21, 2025 19:26
IgnacioC44 referenced this pull request in MCPJam/inspector Jun 21, 2025
…p-connect

Fix connection issue for servers with auth
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.

5 participants