v0.12.0
Release Notes
❗ Breaking Changes
- Re-purposed
McpTransportContext
to reuse in server and client packages and made immutable - more details below - Updated
(Async|Sync)HttpRequestCustomizer
class signatures as part of transport context implementation - Users relying on template resources in
resources/list
should migrate to usingresources/templates/list
🚀 New Features
Transport Context Support (#522)
- Added McpTransportContext to MCP Clients - Provides a unified API for reading context in which MCP Client requests are issued, regardless of sync/async implementation
- Enhanced HttpRequestCustomizer support - Context is now available to both
McpAsyncHttpRequestCustomizer
andMcpSyncHttpRequestCustomizer
- Improved thread-local handling - Addresses limitations with thread local usage in request customizers
- Breaking Change: Updated signatures for
(Async|Sync)HttpRequestCustomizer
classes - Breaking Change:
McpTransportContext
io.modelcontextprotocol.server -> io.modelcontextprotocol.common package change,void put(String key, Object value)
, andMcpTransportContext copy()
method removal. - Breaking Change:
DefaultMcpTransportContext
class made package private and changed package to io.modelcontextprotocol.common - Changed McpTransportContext usage patterns - it is now immutable and can be created via a static factory method
McpTransportContext create(Map<String, Object> metadata)
🐛 Bug Fixes
Resource Listing Compliance (#528)
- Fixed resource template filtering - Template resources containing
{}
parameters are now properly excluded from standardresources/list
responses - MCP Specification compliance - Ensures proper separation between regular resources (
resources/list
) and resource templates (resources/templates/list
) - Issue: Fixes #319 where template resources were incorrectly appearing in both endpoints
Test Stability Improvements (#535)
- Fixed flaky test - Resolved intermittent failures in
HttpClientStreamableHttpTransportErrorHandlingTest
🔧 Testing & Infrastructure Improvements
Resource Cleanup & Test Reliability (#537)
- Enhanced resource management - Added try-finally blocks to guarantee server cleanup on test completion
- Synchronous shutdown - Implemented
closeGracefully().block()
for proper synchronous shutdown - Resource leak prevention - Added try-with-resources for client lifecycle management
- Reduced test flakiness - Prevents resource leaks that could cause test instability
Test Performance Optimization (#531)
- Significant performance boost - Static container reuse across all client and transport tests
- ~10x speed improvement - Containerized MCP server is now shared within test classes rather than recreated per test
Docker Infrastructure Updates (#536)
- Updated test dependencies - Upgraded mcp-everything-server Docker image from v2 to v3 across all integration tests
Comprehensive Context Testing (#529)
- Expanded test coverage - Added integration tests for transport context propagation between MCP clients and servers
- Multi-environment testing - Coverage for both Spring WebFlux and WebMVC environments
- Transport type coverage - Tests across stateless, streamable, and SSE transport types
- Context validation - Verifies proper flow of authentication tokens, correlation IDs, and metadata through HTTP headers
📋 Technical Details
Compatibility
- All changes maintain backward compatibility except for the noted breaking changes
- Spring WebFlux and WebMVC environments fully supported
- Docker image updates require no user action
🧪 Testing
- 103 async server tests passing
- Comprehensive integration test coverage added
- Resource cleanup and lifecycle management improved
- Test execution time significantly reduced through container optimization
Contributors:
- Christian Tzolov (@tzolov)
- Daniel Garnier-Moiroux (@Kehrlann)
- Richie Caputo (@arcaputo3)
Full Changelog: v0.11.0...v0.12.0