Annotation ConditionalOnMcpConnection
-
- All Implemented Interfaces:
@Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.CLASS})@Conditional(value = {OnMcpConnectionCondition.class}) public @interface ConditionalOnMcpConnection
Conditional annotation that enables bean creation only when a specific MCP connection is configured in Spring AI properties.
Checks for the presence of: spring.ai.mcp.client.stdio.connections.{connectionName}.command spring.ai.mcp.client.sse.connections.{connectionName}.url