Skip to content

Conversation

@nquinquenel
Copy link
Member

No description provided.

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Nov 21, 2025

MCP-198

@nquinquenel nquinquenel force-pushed the feature/nq/MCP-198-immediate-start branch 3 times, most recently from 63ec62d to d9c62a8 Compare November 23, 2025 09:15
@nquinquenel nquinquenel marked this pull request as ready for review November 24, 2025 06:56
@nquinquenel nquinquenel force-pushed the feature/nq/MCP-198-immediate-start branch from 55d3e12 to 3b22b2f Compare November 24, 2025 17:24
@nquinquenel nquinquenel force-pushed the feature/nq/MCP-198-immediate-start branch from 3b22b2f to 4a933e6 Compare November 24, 2025 18:48
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 24, 2025

Copy link
Contributor

@damien-urruty-sonarsource damien-urruty-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should work but it brings a lot of complexity:

  • The SonarQubeMcpServer is now pretty long and the code is hard to follow between what can be initialized at startup and what is initialized later
  • We rely on the good will of MCP clients to call listTools when we notify them of a change, which should work, but I find the approach a bit complex

The real source of the complexity is the download of analyzers, that currently delays initialization of the backend. Those analyzers are used only in the context of the analysis tool but somehow delay all other tools too. I think we could come up with a simpler alternative:

  • at startup initialize the backend without analyzers
  • trigger the download of analyzers in the background
  • restart the backend when analyzers are downloaded

This way we can still initialize most services, register telemetry, and move the wait for the initialization to only the Analysis tool, which reduces the friction for all other tools. There might be some state to keep and re-transmit after a restart, e.g. the automatic analysis. Some telemetry notification can be called only at first startup and not at consecutive restart. Devil is in the details, so I maybe miss something, otherwise I think it would make the code simpler and limit the impact of the analyzers download.

I still approved the PR in case you want to move ahead with this approach. Even if complex, it should work

@lobaorn-bitso
Copy link

Hi @nquinquenel @damien-urruty-sonarsource sorry for using this approach, but two things:

I tried to build locally as per the README, but got 401 from your internal jfrog repo. So I guess it does not work to build locally?

And with that, I am really interested in the READ_ONLY and TOOLSETS features, and also this one but those two even more. Is there a new release coming soon? I would appreciate since I can get from the release jars so not to wait until the new docker is published, since I can not build from a commit hash...

@nquinquenel
Copy link
Member Author

Hi @nquinquenel @damien-urruty-sonarsource sorry for using this approach, but two things:

I tried to build locally as per the README, but got 401 from your internal jfrog repo. So I guess it does not work to build locally?

Building from a release tag should work, as all the dependencies should be available on Maven central. However, this branch has a modification of our SLCORE dependency, which has not been released yet, meaning it's only available internally and you need to authenticate to our private JFrog repo.

And with that, I am really interested in the READ_ONLY and TOOLSETS features, and also this one but those two even more. Is there a new release coming soon? I would appreciate since I can get from the release jars so not to wait until the new docker is published, since I can not build from a commit hash...

We will try to release in the coming days, and you will be able to use the Jar immediately. As for the docker image, it's not 100% under our control so there's usually a small delay before it gets updated.

@nquinquenel nquinquenel merged commit 27a0274 into master Nov 27, 2025
4 checks passed
@nquinquenel nquinquenel deleted the feature/nq/MCP-198-immediate-start branch November 27, 2025 08:25
@nquinquenel nquinquenel changed the title MCP-198 Immediately start up the MCP and dynamically load tools MCP-198 Immediately start up the MCP and dynamically load some tools Nov 27, 2025
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

Successfully merging this pull request may close these issues.

4 participants