FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: respect caller-provided server capabilities by 1yuxiangJ · Pull Request #1101 · modelcontextprotocol/java-sdk · GitHub

fix: respect caller-provided server capabilities - #1101

Open
1yuxiangJ wants to merge 2 commits into
modelcontextprotocol:mainfrom
1yuxiangJ:fix/1086-server-capabilities-logging
Open

fix: respect caller-provided server capabilities#1101
1yuxiangJ wants to merge 2 commits into
modelcontextprotocol:mainfrom
1yuxiangJ:fix/1086-server-capabilities-logging

Conversation

Copy link
Copy Markdown

Fixes #1086

Problem

McpAsyncServer unconditionally advertises the logging capability,
even when the caller did not configure it.

Changes

  • Preserve the caller-provided server capabilities
  • Stop implicitly advertising logging
  • Cover both server transport construction paths
  • Add regression tests
  • Explicitly configure logging in the existing logging integration test

Testing

Passed:

./mvnw -pl mcp-core -Dtest=McpAsyncServerCapabilitiesTests test
./mvnw -pl mcp-core test
./mvnw -pl mcp-test -am \
  -Dtest=HttpServletSseIntegrationTests#testLoggingNotification,HttpServletStreamableIntegrationTests#testLoggingNotification \
  -Dsurefire.failIfNoSpecifiedTests=false test

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

ServerCapabilities.logging is added unconditionally, overriding the caller's explicit capabilities

1 participant


Back | FazBrowse Home | New Git URL