Skip to content

Move sse app to http #358

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

Merged
merged 4 commits into from
May 7, 2025
Merged

Move sse app to http #358

merged 4 commits into from
May 7, 2025

Conversation

jlowin
Copy link
Owner

@jlowin jlowin commented May 7, 2025

Refactor in preparation for streamble http

@Copilot Copilot AI review requested due to automatic review settings May 7, 2025 14:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors the SSE handling by moving its instantiation to the HTTP module, simplifying the server’s responsibility.

  • Removed old SSE app implementation and its related middleware imports from server.py
  • Introduced a new create_sse_app in http.py to configure and return the SSE Starlette application
  • Renamed internal route accumulation variable to better reflect its purpose

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/fastmcp/server/server.py Refactored SSE app creation and renamed _custom_starlette_routes to _additional_http_routes to align with HTTP usage
src/fastmcp/server/http.py Added create_sse_app to encapsulate SSE configuration and routing with auth, consolidating previous SSE logic

@jlowin jlowin merged commit e5748ff into main May 7, 2025
4 checks passed
@jlowin jlowin deleted the sse-http branch May 7, 2025 14:37
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.

1 participant