Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ private void addStatelessTransport(
.tools(true)
.prompts(true)
.resources(true, true)
.logging()
.build();

HttpServletStatelessServerTransport statelessTransport =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,21 @@ void testMcpUtilsGetToolPropertiesLoadsTools() {
assertThat(searchTool.inputSchema()).isNotNull();
}

@Test
void testServerCapabilitiesDoNotAdvertiseLogging() {
// The stateless MCP server has no handler for logging/setLevel.
// Advertising logging capability causes spec-compliant clients (e.g. VSCode)
// to call logging/setLevel, which fails with MethodNotFound.
McpSchema.ServerCapabilities capabilities =
McpSchema.ServerCapabilities.builder()
.tools(true)
.prompts(true)
.resources(true, true)
.build();

assertThat(capabilities.logging()).isNull();
}

@Test
void testMcpUtilsGetPromptsLoadsPrompts() {
// Test that McpUtils.getPrompts loads prompts from JSON file
Expand Down