Skip to content

Conversation

@chemicL
Copy link
Member

@chemicL chemicL commented Jan 30, 2026

Add a starting setup for conformance tests

Motivation and Context

In order to comply with the recently proposed SDK tiering system, this PR starts the path to regular conformance evaluation.

How Has This Been Tested?

The current setup uses the basic building blocks that leverage the JDK HttpClient and the Servlet spec and validate the synchronous stack.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

No.

Introduces a new conformance-tests module with initial structure:
- server-servlet: Placeholder servlet server with basic hello_world tool
- client-jdk-http-client: Skeleton client implementation (not yet functional)

This sets up the foundation for future conformance testing of the Java MCP SDK.

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Expand conformance server to pass 36/40 official MCP tests (90%).

- Add 15 tools covering all content types and behaviors
- Add 4 prompts, 3 resources, 1 resource template
- Implement completion, SEP-1034 and SEP-1330 elicitation
- Enable proper server capabilities
- Document validation results and testing instructions

Known limitations: progress notifications timeout, resource
subscriptions not implemented, DNS rebinding protection missing.

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
…ols_call scenarios

Add JDK HTTP client conformance tests using Streamable HTTP transport.
Implements two scenarios: initialize (handshake only) and tools_call
(list and invoke add_numbers tool). Both scenarios pass conformance tests.

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Implement remaining client conformance scenarios (excluding auth):
- elicitation-sep1034-client-defaults: Validates default value
  application from JSON schemas (SEP-1034)
- sse-retry: Tests SSE reconnection behavior (SEP-1699)

Added createClientWithElicitation() method with elicitation handler
that automatically applies defaults from schema properties. Handler
supports string, integer, number, enum, and boolean default values.

Test results for elicitation scenario: 5/5 checks passing
- String defaults applied correctly
- Integer defaults applied correctly
- Number defaults applied correctly
- Enum defaults applied correctly
- Boolean defaults applied correctly

Updated documentation with scenario descriptions and usage examples.
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
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 0.18.0 milestone Jan 30, 2026
tzolov
tzolov previously approved these changes Jan 30, 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,
One minor thing. Perhaps we can use logger instead of sys out in ConformanceJdkClientMcpClient.

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
@chemicL
Copy link
Member Author

chemicL commented Jan 30, 2026

Perhaps we can use logger instead of sys out in ConformanceJdkClientMcpClient.

The use of System.out and System.err is actually intended to keep the client behaviour consistent with the way the reference implementation in Typescript behaves:

    console.log('✅ Connection closed successfully');
    console.error('❌ Error:', error);

@chemicL chemicL merged commit 4fe8f3e into main Jan 30, 2026
6 checks passed
@chemicL chemicL deleted the conformance-tests branch January 30, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants