Class SpringExampleApplication

java.lang.Object
org.apache.juneau.examples.mcp.spring.SpringExampleApplication

@SpringBootApplication public class SpringExampleApplication extends Object
A minimal Spring Boot application that serves SpringExampleMcpServer on embedded Tomcat.

Run main and the MCP endpoint is available at http://localhost:8080/mcp (default Spring Boot port). Point ExampleClient at that URL, or drive it with any MCP client. The three @Bean methods are the entire integration:

  • the GreetingService the MCP tool resolves via Spring DI;
  • the SpringExampleMcpServer servlet itself; and
  • a ServletRegistrationBean mounting it at /* (so the MCP operation lands at /mcp).