Skip to content

V0.11.0 sproutsocial rc1 #3

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

V0.11.0 sproutsocial rc1 #3

wants to merge 16 commits into from

Conversation

stantonk
Copy link
Collaborator

@stantonk stantonk commented Aug 9, 2025

Makes HttpServletSseServerTransportProvider support McpTransportContext which allows enriching arbitrary key-value pairs onto the McpAsyncServerExchange and McpSyncServerExchange objects which are available to all Tool calls. Lets us poke javax.security.Principal and anything else we need on there.

Plan is to vendor the groupId to com.sproutsocial.io.modelcontextprotocol.sdk and merge this into our fork.

I also have filed an issue and a more comprehensive pull request (with tests) with the official SDK:

modelcontextprotocol#477

I'll update this PR to match that soon, just wanted to get builds working in Jenkins.

tzolov and others added 15 commits July 18, 2025 22:26
…xtprotocol#413)

Addresses issues with servers like Shopify that violate MCP/HTTP specs:
- Prioritize application/json in Accept headers to fix content-type issues
- Handle non-compliant notification non-empty responses
- Add status code validation and null safety improvements

Resolves modelcontextprotocol#406

Signed-off-by: Christian Tzolov <[email protected]>
…nts (modelcontextprotocol#423)

- Replace McpError exceptions with debug/warning logs for unrecognized SSE event types
- Continue processing instead of failing when encountering unknown SSE events
- Update transport implementations:
  - WebClientStreamableHttpTransport: return empty tuple instead of throwing
  - WebFluxSseClientTransport: complete stream instead of erroring
  - HttpClientSseClientTransport: call sink.success() instead of sink.error()
  - HttpClientStreamableHttpTransport: return empty Flux for unknown events

This improves client resilience when servers send non-standard or future SSE event types.

Resolves modelcontextprotocol#272 , modelcontextprotocol#223 , modelcontextprotocol#93, modelcontextprotocol#421

Signed-off-by: Christian Tzolov <[email protected]>
…ransport provider (modelcontextprotocol#420)

- Add WebFluxStreamableServerTransportProvider for streamable HTTP sessions
- Add WebFluxStatelessServerTransport for stateless HTTP MCP servers
  - Add McpStatelessServerFeatures, McpStatelessServerHandler, McpStatelessRequestHandler, McpStatelessNotificationHandler
- Refactor server architecture to support multiple transport categories:
   streamable, single-session, stateless
- Introduce McpTransportContext for transport-level metadata extraction
- Add session management capabilities for streamable HTTP connections
- Update MCP protocol version to 2025-03-26
- Add test coverage for new transport implementations
- Implement integration tests for both stateless and streamable transports

Signed-off-by: Dariusz Jędrzejczyk <[email protected]>
Signed-off-by: Christian Tzolov <[email protected]>
Co-authored-by: Christian Tzolov <[email protected]>
…ntextprotocol#425)

- Add WebMvcStreamableServerTransportProvider with SSE support for streamable sessions
- Support GET, POST, DELETE endpoints for MCP protocol operations
- Implement thread-safe SSE operations using ReentrantLock in WebMvcSseServerTransportProvider
- Add test infrastructure with AbstractMcpClientServerIntegrationTests
  - Refactor WebMvcStreamableIntegrationTests to use parameterized tests
  - Support testing with both HttpClient and WebFlux transports
- Add streamable transport tests for both async and sync server modes
- Refactor existing WebMVC SSE integration tests to use shared test base
- Add error handling improvements in McpStreamableServerSession
- Update dependencies: add json-unit-assertj for enhanced JSON testing
- Reorganize POM dependencies and add mcp-spring-webflux test dependency
- Wrap handler invocations with Mono.defer for lazy evaluation
   - Wrap consumer, tool, resource, prompt, and completion handler calls with Mono.defer()
   - Ensures proper lazy evaluation and error handling in reactive streams

Related to modelcontextprotocol#72

Signed-off-by: Christian Tzolov <[email protected]>
Signed-off-by: Dariusz Jędrzejczyk <[email protected]>
Co-authored-by: Dariusz Jędrzejczyk <[email protected]>
…protocol#290)

Implementation of the Streamable HTTP transport provider for the Servlet API.

---
Signed-off-by: Christian Tzolov <[email protected]>
Co-authored-by: Christian Tzolov <[email protected]>
Co-authored-by: Zachary German <[email protected]>
- Minor improvement: speed up HttpClientSseClientTransportTests by
  reusing the MCP Server container across tests.
- Minor improvement: rename "messageSink" to "deliveredSink" in
  HttpClientStreamableHttpTransport#sendMessage
…nsports

- Add KeepAliveScheduler utility class for configurable periodic session pings
- Integrate keep-alive support in WebFlux, WebMVC, and HttpServlet SSE transport providers
- Add keepAliveInterval configuration option to all transport provider builders
- Deprecate existing constructors in favor of builder pattern with enhanced configuration
- Update graceful shutdown to properly clean up keep-alive schedulers
- Add unit tests for KeepAliveScheduler functionality

Implements MCP specification recommendations for connection health detection:
- Configurable ping frequency to suit different network environments
- Optional keep-alive (disabled by default) to avoid excessive network overhead
- Proper resource cleanup to prevent connection leaks

https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/ping#implementation-considerations

Resolves: modelcontextprotocol#414, modelcontextprotocol#158
Replaces modelcontextprotocol#353

Signed-off-by: Christian Tzolov <[email protected]>
 - Add getters for both MCP Sync/Async clients

Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
…extprotocol#404)

- Add protocolVersion() method to transport and transport provider interfaces and implementations
- Replace hardcoded HTTP header strings with HttpHeaders constants
- Update protocol versions to be transport-specific rather than global
- Deprecate McpSchema.LATEST_PROTOCOL_VERSION in favor of transport-specific versions
- Standardize header names: MCP-Protocol-Version, mcp-session-id, last-event-id
- Update clients and servers to use transport.protocolVersion() for initialization
- Refactor tests to use transport-specific protocol versions
- Include MCP-Protocol-Version header in all GET/POST/DELETE requests
- Update WebClientStreamableHttpTransport, WebFluxSseClientTransport,
  HttpClientSseClientTransport, and HttpClientStreamableHttpTransport

Related to modelcontextprotocol#398 , modelcontextprotocol#363 , modelcontextprotocol#250

Signed-off-by: Christian Tzolov <[email protected]>
- Add WebMvcStatelessServerTransport for mcp-spring-webmvc module
- Add HttpServletStatelessServerTransport for mcp module
- Implement builder patterns for AsyncToolSpecification and SyncToolSpecification
- Create AbstractStatelessIntegrationTests base class for shared test functionality
- Add integration tests for both transport implementations

Signed-off-by: Christian Tzolov <[email protected]>
Signed-off-by: Christian Tzolov <[email protected]>
@stantonk stantonk marked this pull request as ready for review August 9, 2025 23:50
@stantonk stantonk force-pushed the v0.11.0-sproutsocial-rc1 branch from a03ab0d to 1a84243 Compare August 10, 2025 00:11
@stantonk stantonk force-pushed the v0.11.0-sproutsocial-rc1 branch from 69e4e36 to 8b3c7d2 Compare August 10, 2025 02:19
@stantonk stantonk requested a review from maxrjohnson23 August 10, 2025 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants