Class McpServerConfiguration

java.lang.Object
com.xebialabs.xlrelease.mcp.config.McpServerConfiguration

@Configuration(proxyBeanMethods=false) public class McpServerConfiguration extends Object
Stands up an MCP server on the bare MCP Java SDK (no Spring AI starter): a Jackson JsonMapper carrying XlrMcpJacksonModule, the SDK's Servlet transport, the McpSyncServer with tool specs built by McpToolSpecifications from the McpToolset beans, and a ServletRegistrationBean mounting the transport (default /s/mcp). Settings come from XlrConfig (xl.features.mcp.server.*); McpServerEnabledFilter gates serving at runtime.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.boot.web.servlet.FilterRegistrationBean<McpServerEnabledFilter>
    mcpServerEnabledFilter(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.webmvc.autoconfigure.WebMvcProperties> webMvcProperties)
     
    org.springframework.boot.web.servlet.ServletRegistrationBean<io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider>
    mcpServletRegistration(io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider transportProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.webmvc.autoconfigure.WebMvcProperties> webMvcProperties)
     
    io.modelcontextprotocol.server.McpSyncServer
    mcpSyncServer(io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider transportProvider, McpToolSpecifications toolSpecifications, List<McpToolset> toolsets)
     
     
    io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • McpServerConfiguration

      public McpServerConfiguration()
  • Method Details

    • mcpToolSpecifications

      @Bean public McpToolSpecifications mcpToolSpecifications()
    • mcpTransportProvider

      @Bean public io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider mcpTransportProvider()
    • mcpSyncServer

      @Bean public io.modelcontextprotocol.server.McpSyncServer mcpSyncServer(io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider transportProvider, McpToolSpecifications toolSpecifications, List<McpToolset> toolsets)
    • mcpServletRegistration

      @Bean public org.springframework.boot.web.servlet.ServletRegistrationBean<io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider> mcpServletRegistration(io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider transportProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.webmvc.autoconfigure.WebMvcProperties> webMvcProperties)
    • mcpServerEnabledFilter

      @Bean public org.springframework.boot.web.servlet.FilterRegistrationBean<McpServerEnabledFilter> mcpServerEnabledFilter(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.webmvc.autoconfigure.WebMvcProperties> webMvcProperties)