Class McpServerConfiguration
java.lang.Object
com.xebialabs.xlrelease.mcp.config.McpServerConfiguration
Stands up an MCP server on the bare MCP Java SDK: a Jackson
JsonMapper with
XlrMcpJacksonModule, the SDK's Servlet transport, and the McpSyncServer with tool specs
from the McpToolset beans, mounted at /s/mcp. Settings come from XlrConfig.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmcpReadOnlyToolReconciler(io.modelcontextprotocol.server.McpSyncServer mcpSyncServer, McpServerConfiguration.McpToolSpecs toolSpecs, ExecutorService auxiliaryExecutor) org.springframework.boot.web.servlet.FilterRegistrationBean<McpRootsListChangedFilter> mcpRootsListChangedFilter(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.webmvc.autoconfigure.WebMvcProperties> webMvcProperties) Runs afterMcpServerEnabledFilterso a disabled server still 404s without the body being buffered.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.McpSyncServermcpSyncServer(io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider transportProvider, McpServerConfiguration.McpToolSpecs toolSpecs) mcpToolSpecs(McpToolSpecifications toolSpecifications, List<McpToolset> toolsets) Builds the tool specs once from everyMcpToolsetbean in the main context.io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider
-
Constructor Details
-
McpServerConfiguration
public McpServerConfiguration()
-
-
Method Details
-
mcpToolSpecifications
-
mcpToolSpecs
@Bean public McpServerConfiguration.McpToolSpecs mcpToolSpecs(McpToolSpecifications toolSpecifications, List<McpToolset> toolsets) Builds the tool specs once from everyMcpToolsetbean in the main context. -
mcpTransportProvider
@Bean public io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider mcpTransportProvider() -
mcpSyncServer
@Bean public io.modelcontextprotocol.server.McpSyncServer mcpSyncServer(io.modelcontextprotocol.server.transport.HttpServletStreamableServerTransportProvider transportProvider, McpServerConfiguration.McpToolSpecs toolSpecs) -
mcpReadOnlyToolReconciler
@Bean public McpReadOnlyToolReconciler mcpReadOnlyToolReconciler(io.modelcontextprotocol.server.McpSyncServer mcpSyncServer, McpServerConfiguration.McpToolSpecs toolSpecs, @Qualifier("auxiliary") ExecutorService auxiliaryExecutor) -
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) -
mcpRootsListChangedFilter
@Bean public org.springframework.boot.web.servlet.FilterRegistrationBean<McpRootsListChangedFilter> mcpRootsListChangedFilter(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.webmvc.autoconfigure.WebMvcProperties> webMvcProperties) Runs afterMcpServerEnabledFilterso a disabled server still 404s without the body being buffered.
-