Skip to content

我用spring ai实现一个mcp server.服务起来后,一直无法访问/sse端点 #2732

Closed
@shirehappy

Description

@shirehappy

Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description
我用spring ai 实现 mcp server ,如果采用stdio的方式
打成jar包,然后用charry studio 配置,能够正常访问

但是通过spring ai 实现mcp server ,采用sse方式
服务正常启动,但是浏览器死活访问不到sse节点
localhost:8080/sse
通过postman也无法访问(控制台没有任何报错信息)

问题的原因是什么?

Environment
pom.xml:

<dependency>
  <groupId>org.springframework.ai</groupId>
  <artifactId>spring-ai-mcp-server-webmvc-spring-boot-starter</artifactId>
  <version>1.0.0-M6</version>
</dependency>

<dependency>
  <groupId>org.springframework.ai</groupId>
  <artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
  <version>1.0.0-M7</version>
</dependency>

Steps to reproduce
项目结构非常简单,服务也是正常启动
Image
但是页面上就是一直无法访问:
localhost:8080/sse
通过postman也无法访问

Expected behavior
A clear and concise description of what you expected to happen.

Minimal Complete Reproducible example
Please provide a failing test or a minimal complete verifiable example that reproduces the issue.
Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.

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