Skip to content

VSCode Connection with Quarkus MCP Server - infinite loop #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pedrocarrijo95 opened this issue May 15, 2025 · 10 comments
Open

VSCode Connection with Quarkus MCP Server - infinite loop #260

pedrocarrijo95 opened this issue May 15, 2025 · 10 comments

Comments

@pedrocarrijo95
Copy link

Hi team, how are you?

I am facing a problem, in the first time that I tested it was working but now my MCP Server connection with VSCode Copilot is receiving a infinite loop waiting initialize from quarkus, I tested the VSCode with another MCP Server SSE and worked, but I dont know what I need to do more, I need it to work because in 2 days I will give a lecture about Quarkus MCP and a live demo.

Thank you very much

Image

Image

Image

@mkouba
Copy link
Contributor

mkouba commented May 16, 2025

Hello @pedrocarrijo95, what version of quarkus-mcp-server do you use? Also it seems that VSCode supports both the legacy SSE transport and the streamable HTTP transport, so I would try to add "type": "sse" to your config for now. We added initial support for the streamable HTTP only recently, it should be available in 1.2.0 that is planned for the next week.

@pedrocarrijo95
Copy link
Author

pedrocarrijo95 commented May 16, 2025

Hi @mkouba , thanks for your answer!

My quarkus-mcp-server version is:

io.quarkiverse.mcp
quarkus-mcp-server-sse
1.1.0

I already tested with version 1.1.1 too.

I put the type = sse, but the result was the same (via DevUI it works, but via VSCode Copilot not):

Image

Image

*Yes for this test I changed the port from 8080 to 8181 inside my quarkus server

Thank you in advance!

@mkouba
Copy link
Contributor

mkouba commented May 19, 2025

@pedrocarrijo95 This is really weird. Could you try to enable traffic logging for the MCP server?

Also I noticed that in your last comment there's a typo in the URL - http:localhost:8181/mcp/sse should be http://localhost:8181/mcp/sse...

@laurentperez
Copy link

Hi. I'm getting the same loop. I'm on 999-SNAPSHOT.

I debugged below.

vscode POSTs this

Image

then GETs this

Image

in contrast a working npx inspector does not do the initial POST

Image

@mkouba
Copy link
Contributor

mkouba commented May 19, 2025

Hi. I'm getting the same loop. I'm on 999-SNAPSHOT.

But I can see the MCP inspector in one of the screenshot?

I'm sorry but those images don't help much. As I mentioned in #260 (comment) it would help to enable traffic logging for the MCP server and provide some text-based steps to reproduce.

@mkouba
Copy link
Contributor

mkouba commented May 19, 2025

in contrast a working npx inspector does not do the initial POST

@laurentperez @pedrocarrijo95 Ah, I completely missed this one!

It seems like if VSCode does not accept an SSE stream but expects a direct HTTP response as if the new "streamable HTTP" transport is used? Note that for standard SSE an HTTP GET is used to establish a new connection.

@laurentperez
Copy link

laurentperez commented May 19, 2025

Hi. Traffic logging is enabled + client debug.

quarkus.mcp.server.client-logging.default-level=DEBUG
quarkus.mcp.server.traffic-logging.enabled=true
quarkus.mcp.server.traffic-logging.text-limit=500
# for wireshark sniffing
quarkus.http.host=0.0.0.0

There is no vscode traffic logged by quarkus, that's why I used to wireshark. However, there is npx inspector traffic logged by quarkus, because the npx inspector works.

The second screenshot is the working npx inspector, the first screenshot is the non working vscode attempt to use the server.

Reproducer :

  • get latest vscode
  • ctrl+shift+p, add MCP server http://localhost:8080/mcp/sse
  • this will write down this configuration (here I just used my ethernet IP to get wireshark traffic instead of loopback)
"mcp": {
        "servers": {
            "mcpsse-localhost:8080/mcp/sse": {
                "type": "sse",
                "url": "http://192.168.0.44:8080/mcp/sse",
                "headers": { "foo": "bar" }

            }
        }
    }
  • start vscode client
  • it will wait on the infinite loop reported above "Waiting for server to respond to initialize request..."

I believe something is "wrong" with the initial vscode POST. npx inspector does not POST such a first request.

@mkouba
Copy link
Contributor

mkouba commented May 19, 2025

BTW we plan to release 1.2.0 with initial "streamable HTTP" transport support on Thursday.

@laurentperez
Copy link

I can confirm that in the meantime, the Streamable HTTP, non-SSE, works in vscode using /mcp @pedrocarrijo95

Image

@mkouba
Copy link
Contributor

mkouba commented May 19, 2025

I can confirm that in the meantime, the Streamable HTTP, non-SSE, works in vscode using /mcp @pedrocarrijo95

Image

Just FTR this won't work in 1.1.x, @laurentperez is using the main branch, i.e. 999-SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants