镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: respect caller-provided server capabilities - #1101

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

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

Conversation

@1yuxiangJ

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 branch has not been deployed

No deployments
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