Skip to content

Conversation

shahar4499
Copy link
Contributor

@shahar4499 shahar4499 commented Jul 28, 2025

🚀 Add Streamable HTTP Transport Support

This PR adds support for Streamable HTTP transport as the new primary transport method.
#61

⚠️ Breaking Changes

  • mount() method is now deprecated and will be removed in a future version
  • New explicit methods:
    • mount_http() - Recommended for HTTP transport (new default)
    • mount_sse() - For SSE transport (backwards compatibility)
  • For backwards compatibility, the old mount() method defaults to SSE transport with a deprecation warning

🛠 More Fixes

  • Input Validation: Leverage the SDK's input validation to catch input errors BEFORE they reach the FastAPI server
  • Session management: Leverage the SDK's MCP session management capabilities for both HTTP and SSE
  • Request Context: Leverage the SDK's capability to forward request_context to use the HTTP request information (such as auth) in tool handlers.
  • Security: Built-in support for transport security settings and proper session validation

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 84.87395% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
fastapi_mcp/transport/http.py 78.57% 15 Missing ⚠️
fastapi_mcp/server.py 93.33% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@shahar4499 shahar4499 merged commit f796513 into main Jul 28, 2025
7 checks passed
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