feat: Add roots change notification support to MCP server
- Implement roots change notification handler in McpAsyncServer - Add rootsChangeConsumer builder methods to support single and multiple consumers - Rename info() builder method to serverInfo() for clarity - Add comprehensive tests for roots change notification functionality - Add default server info implementation in Builder Resolves #39
This commit is contained in:
parent
0b0d5086ce
commit
0fd93a9f82
1 changed files with 266 additions and 58 deletions
|
|
@ -67,7 +67,7 @@ public class McpServerConfig {
|
|||
|
||||
// Create the server with both tool and resource capabilities
|
||||
var server = McpServer.using(transport)
|
||||
.info("MCP Demo Server", "1.0.0")
|
||||
.serverInfo("MCP Demo Server", "1.0.0")
|
||||
.capabilities(capabilities)
|
||||
.resources(systemInfoResourceRegistration())
|
||||
.prompts(greetingPromptRegistration())
|
||||
|
|
|
|||
Loading…
Reference in a new issue