diff --git a/model-context-protocol/mcp-servlet-server/src/main/resources/application.properties b/model-context-protocol/mcp-servlet-server/src/main/resources/application.properties index 4bc4fbf..c4bd128 100644 --- a/model-context-protocol/mcp-servlet-server/src/main/resources/application.properties +++ b/model-context-protocol/mcp-servlet-server/src/main/resources/application.properties @@ -5,4 +5,6 @@ spring.main.web-application-type=SERVLET spring.main.banner-mode=off logging.pattern.console= -transport.mode=sse \ No newline at end of file +transport.mode=sse + +logging.file.name=mcp.servlet-server.log \ No newline at end of file diff --git a/model-context-protocol/mcp-webflux-server/src/main/java/org/springframework/ai/mcp/sample/server/McpServerConfig.java b/model-context-protocol/mcp-webflux-server/src/main/java/org/springframework/ai/mcp/sample/server/McpServerConfig.java index de7a95c..798cef9 100644 --- a/model-context-protocol/mcp-webflux-server/src/main/java/org/springframework/ai/mcp/sample/server/McpServerConfig.java +++ b/model-context-protocol/mcp-webflux-server/src/main/java/org/springframework/ai/mcp/sample/server/McpServerConfig.java @@ -58,43 +58,6 @@ public class McpServerConfig { return transport.getRouterFunction(); } - // SSE transport - // @Bean - // @ConditionalOnProperty(prefix = "transport", name = "mode", havingValue = "sse2") - // public HttpServletSseServerTransport sseServerTransport2() { - // var httpTransport = new HttpServletSseServerTransport(new ObjectMapper(), - // "/mcp/message"); - - // // Create and configure Jetty server - // Server server = new Server(8080); - - // ServletContextHandler context = new - // ServletContextHandler(ServletContextHandler.SESSIONS); - // context.setContextPath("/"); - // server.setHandler(context); - - // // Add our SSE servlet - // context.addServlet(new ServletHolder(httpTransport), "/sse"); - - // // Start the server - // try { - // server.start(); - // System.out.println("Server started on http://localhost:8080/sse"); - // server.join(); - // } - // catch (Exception e) { - // e.printStackTrace(); - // try { - // server.stop(); - // } - // catch (Exception e1) { - // e1.printStackTrace(); - // } - // } - - // return httpTransport; - // } - @Bean public McpAsyncServer mcpServer(ServerMcpTransport transport, OpenLibrary openLibrary) { // @formatter:off diff --git a/model-context-protocol/mcp-webflux-server/src/main/resources/application.properties b/model-context-protocol/mcp-webflux-server/src/main/resources/application.properties index 4a0226c..b2b3fcc 100644 --- a/model-context-protocol/mcp-webflux-server/src/main/resources/application.properties +++ b/model-context-protocol/mcp-webflux-server/src/main/resources/application.properties @@ -5,4 +5,7 @@ spring.main.banner-mode=off logging.pattern.console= -transport.mode=sse \ No newline at end of file +# transport.mode=stdio +transport.mode=sse + +logging.file.name=mcp.webflux.log \ No newline at end of file diff --git a/model-context-protocol/mcp-webmvc-server/src/main/resources/application.properties b/model-context-protocol/mcp-webmvc-server/src/main/resources/application.properties index 4bc4fbf..3d554fd 100644 --- a/model-context-protocol/mcp-webmvc-server/src/main/resources/application.properties +++ b/model-context-protocol/mcp-webmvc-server/src/main/resources/application.properties @@ -5,4 +5,6 @@ spring.main.web-application-type=SERVLET spring.main.banner-mode=off logging.pattern.console= -transport.mode=sse \ No newline at end of file +transport.mode=sse + +logging.file.name=mcp.webmvc.log \ No newline at end of file