Skip to content

Comments

Remove deprecations from 1.0.0#807

Merged
chemicL merged 3 commits intomainfrom
1-0-0-remove-deprecations
Feb 20, 2026
Merged

Remove deprecations from 1.0.0#807
chemicL merged 3 commits intomainfrom
1-0-0-remove-deprecations

Conversation

@chemicL
Copy link
Member

@chemicL chemicL commented Feb 20, 2026

Summary

This PR removes all deprecated APIs and classes in preparation for the 1.0.0 release of the Java MCP SDK. The changes focus on cleaning up the codebase by eliminating deprecated methods, constructors, and entire modules that are no longer needed.

Key Changes

Removed Deprecated Modules

  • Jackson JSON Schema Validator - Removed entire mcp-json-jackson module including:
  • JacksonMcpJsonMapper and JacksonMcpJsonMapperSupplier
  • DefaultJsonSchemaValidator and JacksonJsonSchemaValidatorSupplier
  • All associated tests (~809 lines of test code removed)

Removed Deprecated APIs

Server APIs

  • McpServerSession - Removed deprecated session interface (85 lines)
  • McpAsyncServer.loggingNotification() - Removed method that incorrectly broadcasted to all clients; use McpAsyncServerExchange.loggingNotification() instead
  • McpAsyncServerExchange deprecated constructor - Removed constructor without transport context support
  • McpSyncServer deprecated methods - Removed 15 lines of deprecated functionality

Client APIs

  • McpClientSession - Removed deprecated session interface methods (15 lines)
  • HttpClientSseClientTransport.Builder(String) - Removed deprecated constructor

Schema/Core APIs

  • McpSchema - Removed 145 lines of deprecated schema definitions
  • McpError deprecated constructor - Removed 5 lines

Improved Error Handling

  • Replaced generic McpError exceptions with more appropriate exception types:
  • IllegalStateException for client initialization/configuration errors
  • IllegalArgumentException for invalid parameter errors
  • Proper McpError with error codes (e.g., METHOD_NOT_FOUND) for protocol-level errors

API Modernization

  • Tool specification constructors - Removed deprecated call parameter; now only callHandler is supported
  • Content constructors - Simplified constructors for ImageContent, EmbeddedResource, removing unused annotation parameters
  • Resource builders - Updated to use builder pattern instead of constructors throughout tests

Test Coverage

All tests have been updated to use non-deprecated APIs and continue to pass, ensuring backward compatibility for the migration path while removing the deprecated code paths.


This PR creates a cleaner, more maintainable codebase for the 1.0.0 release by removing legacy APIs that were marked for removal.

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
@chemicL chemicL added this to the 1.0.0-RC1 milestone Feb 20, 2026
@chemicL chemicL added enhancement New feature or request breaking-change labels Feb 20, 2026
Copy link
Contributor

@tzolov tzolov left a comment

Choose a reason for hiding this comment

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

LGTM, nice cleaning @chemicL

@chemicL chemicL merged commit 4c1c3d8 into main Feb 20, 2026
10 checks passed
@chemicL chemicL deleted the 1-0-0-remove-deprecations branch February 20, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants