Skip to content

add auth client sse#760

Merged
ihrpr merged 2 commits intomainfrom
ihrpr/auth-client-sse
May 20, 2025
Merged

add auth client sse#760
ihrpr merged 2 commits intomainfrom
ihrpr/auth-client-sse

Conversation

@ihrpr
Copy link
Contributor

@ihrpr ihrpr commented May 20, 2025

Similar to Streamable Http Auth client added in #751 adding auth to SSE.

Testing
SSE

uv run mcp-simple-auth --transport sse

MCP_TRANSPORT_TYPE=sse uv run mcp-simple-auth-client

Check that StreamableHttp works:

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

@ihrpr ihrpr requested a review from pcarleton May 20, 2025 11:45
pcarleton
pcarleton previously approved these changes May 20, 2025
Copy link
Member

@pcarleton pcarleton left a comment

Choose a reason for hiding this comment

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

LGTM

Tested against the python example:

uv run mcp-simple-auth --transport sse

MCP_SERVER_URL=http://localhost:8000/sse MCP_TRANSPORT_TYPE=sse uv run mcp-simple-auth-client

Copy link
Member

Choose a reason for hiding this comment

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

nit: might change this to be /sse if the transport is set since that's the default binding we get. might get a little funky making sure you don't overwrite it though.

https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/fastmcp/server.py#L93

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, something is weird, I thought I changed that to port!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't push it 😞

@ihrpr ihrpr merged commit 43ded92 into main May 20, 2025
12 of 13 checks passed
@ihrpr ihrpr deleted the ihrpr/auth-client-sse branch May 20, 2025 14:21
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.

2 participants

Comments