Skip to content

Is it supported to expose MCP tools by adding spring-ai-starter-mcp-server-webflux to a legacy WebMVC app? No endpoint GET /sse error #3499

@openai0229

Description

@openai0229

Bug description
When adding the spring-ai-starter-mcp-server-webflux starter to an existing Spring WebMVC application to expose MCP tools, accessing the /see or /sse endpoints results in an error. The actual exception is:

org.springframework.web.servlet.NoHandlerFoundException: No endpoint GET /sse.
    at org.springframework.web.servlet.DispatcherServlet.noHandlerFound(DispatcherServlet.java:1305)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
    at org.springframework.web.servlet.FrameworkServlet.service(HttpServlet.java:885)
    at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)

I am not sure if this is a bug or a misconfiguration on my side. Any help or guidance would be appreciated.
Is this kind of integration supported? Or is there any official recommendation for integrating MCP into an existing WebMVC application?

Environment

  • spring-ai-starter-mcp-server-webflux version: 1.0.0
  • Spring Boot version: 3.4.5
  • Java version: 17

Steps to reproduce

  1. Add the spring-ai-starter-mcp-server-webflux dependency to an existing Spring WebMVC application.
  2. Start the project.
  3. Visit /see or /sse in a browser.
  4. The NoHandlerFoundException error above appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions