web-sdk-services.xml 1.48 KB
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
         http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">
    
    <!-- MCP SDK Services Servlet Configuration -->
    <servlet>
        <servlet-name>McpSdkServicesServlet</servlet-name>
        <servlet-class>org.moqui.mcp.McpSdkServicesServlet</servlet-class>
        
        <!-- Configuration parameters -->
        <init-param>
            <param-name>moqui-name</param-name>
            <param-value>moqui-mcp-2</param-value>
        </init-param>
        
        <!-- Enable async support (required for SSE) -->
        <async-supported>true</async-supported>
        
        <!-- Load on startup to initialize MCP server -->
        <load-on-startup>1</load-on-startup>
    </servlet>
    
    <!-- Servlet mappings for MCP SDK Services endpoints -->
    <!-- The MCP SDK will handle both SSE and message endpoints through this servlet -->
    <servlet-mapping>
        <servlet-name>McpSdkServicesServlet</servlet-name>
        <url-pattern>/mcp/*</url-pattern>
    </servlet-mapping>
    
    <!-- Session configuration -->
    <session-config>
        <session-timeout>30</session-timeout>
        <cookie-config>
            <http-only>true</http-only>
            <secure>false</secure>
        </cookie-config>
    </session-config>
    
</web-app>