Croway opened a new pull request, #2115:
URL: https://github.com/apache/camel-spring-boot/pull/2115

   [CAMEL-27241](https://issues.apache.org/jira/browse/CAMEL-27241)
   
   Needs apache/camel#30444 (Spring AI 2.1.0). Until a Camel snapshot with that 
change is deployed, this build still resolves Spring AI 2.0.2 and MCP Java SDK 
2.1.0 from the Camel parent, and 
`testResourceAndPromptChangeNotificationsAreDelivered` fails (one notification 
instead of two).
   
   ## Description
   
   Spring AI 2.1.0 brings MCP Java SDK 2.2.0, which sends 
`notifications/resources/list_changed` itself when it removes a resource 
template and the server advertises `listChanged`. SDK 2.1.0 did not, so 
`SpringAiMcpServerEngine.resourceTemplateRemoved` sent the notification after 
the removal. With SDK 2.2.0 clients would get it twice, so the engine no longer 
sends it. camel-mcp-server did the same for its own engines in CAMEL-27145.
   
   - `SpringAiMcpServerEngine`: removes only a registered template, and leaves 
the notification to the SDK.
   - `SpringAiMcpServerEngineTest`: the engine never sends the notification 
itself.
   - 
`SpringBootMcpServerTest.testResourceAndPromptChangeNotificationsAreDelivered`: 
after the template removal and a later prompt change, the client has received 
exactly two resource notifications. The notifications of a session arrive in 
order, so a duplicate would arrive before the prompt notification.
   
   ## Tests
   
   `mvn test -pl components-starter/camel-mcp-server-starter` with 
`-Dspring-ai-version=2.1.0 -Dspring-boot-version=4.2.0 -Dspring-version=7.1.0` 
(MCP Java SDK 2.2.0): 55 tests pass. With the previous engine code on the same 
versions, the notification test fails with three resource notifications instead 
of two.
   
   _Claude Code on behalf of Croway_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to