Skip to content

Conversation

@Osiris-Team
Copy link

@Osiris-Team Osiris-Team commented Jul 17, 2025

fix #732

This is an initial commit outlining my idea, I reviewed the code roughly, a more in-depth review is needed, and I still need to test this by actually running the extension, so that's up next, let me know if you want to take over these steps.

This significant feature enhancement revamps the MCP server configuration, introducing a "Marketplace" for discovering new servers and comprehensive lifecycle management for "Installed Servers."

Key Changes:

  • New "Marketplace" Tab:

    • Lists publicly available MCP server projects hosted on GitHub.
    • Uses the public GitHub API to search for Java projects tagged with mcp-server.
    • Displays repository name, description, star count, and last update date.
    • Provides an "Install" button for each marketplace entry.
    • Displays a warning popup for repositories with fewer than 100 stars, advising code review.
  • Intelligent Server Installation Workflow:

    • When "Install" is clicked, a background task clones the GitHub repository.
    • Automatically detects Maven (pom.xml) or Gradle (build.gradle) build systems.
    • Executes standard build commands (mvn clean install -DskipTests for Maven, gradlew build -x test for Gradle).
    • Scans standard build output directories (target/, build/libs/) for the largest .jar file, assuming it's the runnable fat JAR.
    • Copies the built JAR to a dedicated local installation directory (~/.devoxx-genie/mcp-servers/<repo-name>).
    • Creates and adds a new MCPServer configuration to the "Installed Servers" list, pre-configured to run the installed JAR as a STDIO process.
  • Enhanced "Installed Servers" Tab (Formerly Default View):

    • Renamed for clarity.
    • Added new columns for STDIO servers (including newly installed ones):
      • "Status": Dynamically shows "Running" or "Stopped".
      • "Actions": Provides buttons to Start, Stop, and Restart the MCP server process.
      • "Console": Offers a button to open the server's console.log file in the IDE for persistent output viewing, or a temporary dialog for in-memory output if a log file is not found.
    • Remove action now prompts to delete the associated local installation files for marketplace-installed servers.
  • New Service Layer Components:

    • MCPInstallerService: Manages GitHub API interaction, Git cloning, build system detection, execution of build commands, and JAR artifact location.
    • MCPProcessManager: An application service responsible for the actual Process lifecycle (starting, stopping, restarting STDIO MCP servers), handling process output redirection to dedicated log files, and providing real-time status updates to the UI.
  • Updated Models:

    • MCPServer: Augmented with new persistent fields (installationPathString, gitHubUrl, repositoryName) and transient runtime fields (currentProcess, isRunning, consoleOutputBuffer) to track installed servers and their live status.
    • GitHubRepo: A new model to encapsulate data fetched from the GitHub API for marketplace entries.
  • UI/UX Improvements:

    • Refactored MCPSettingsComponent to utilize JTabbedPane for tab navigation.
    • Introduced custom TableCellRenderer and TableCellEditor implementations (ActionButtonRenderer, InstallButtonEditor, ConsoleButtonRenderer, MultiLineTableCellRenderer, etc.) for rich, interactive table cells.
    • Incorporated IntelliJ's ProgressManager for background tasks, providing visual feedback during marketplace refresh and installation.
    • Improved error handling and user feedback through Messages.showErrorDialog.

This update significantly enhances the usability and functionality of managing MCP servers by providing a discovery mechanism and robust runtime control.

This significant feature enhancement revamps the MCP server configuration, introducing a "Marketplace" for discovering new servers and comprehensive lifecycle management for "Installed Servers."

**Key Changes:**

*   **New "Marketplace" Tab:**
    *   Lists publicly available MCP server projects hosted on GitHub.
    *   Uses the public GitHub API to search for Java projects tagged with `mcp-server`.
    *   Displays repository name, description, star count, and last update date.
    *   Provides an "Install" button for each marketplace entry.
    *   Displays a warning popup for repositories with fewer than 100 stars, advising code review.

*   **Intelligent Server Installation Workflow:**
    *   When "Install" is clicked, a background task clones the GitHub repository.
    *   Automatically detects Maven (`pom.xml`) or Gradle (`build.gradle`) build systems.
    *   Executes standard build commands (`mvn clean install -DskipTests` for Maven, `gradlew build -x test` for Gradle).
    *   Scans standard build output directories (`target/`, `build/libs/`) for the largest `.jar` file, assuming it's the runnable fat JAR.
    *   Copies the built JAR to a dedicated local installation directory (`~/.devoxx-genie/mcp-servers/<repo-name>`).
    *   Creates and adds a new `MCPServer` configuration to the "Installed Servers" list, pre-configured to run the installed JAR as a `STDIO` process.

*   **Enhanced "Installed Servers" Tab (Formerly Default View):**
    *   Renamed for clarity.
    *   Added new columns for `STDIO` servers (including newly installed ones):
        *   **"Status"**: Dynamically shows "Running" or "Stopped".
        *   **"Actions"**: Provides buttons to `Start`, `Stop`, and `Restart` the MCP server process.
        *   **"Console"**: Offers a button to open the server's `console.log` file in the IDE for persistent output viewing, or a temporary dialog for in-memory output if a log file is not found.
    *   `Remove` action now prompts to delete the associated local installation files for marketplace-installed servers.

*   **New Service Layer Components:**
    *   `MCPInstallerService`: Manages GitHub API interaction, Git cloning, build system detection, execution of build commands, and JAR artifact location.
    *   `MCPProcessManager`: An application service responsible for the actual `Process` lifecycle (starting, stopping, restarting `STDIO` MCP servers), handling process output redirection to dedicated log files, and providing real-time status updates to the UI.

*   **Updated Models:**
    *   `MCPServer`: Augmented with new persistent fields (`installationPathString`, `gitHubUrl`, `repositoryName`) and transient runtime fields (`currentProcess`, `isRunning`, `consoleOutputBuffer`) to track installed servers and their live status.
    *   `GitHubRepo`: A new model to encapsulate data fetched from the GitHub API for marketplace entries.

*   **UI/UX Improvements:**
    *   Refactored `MCPSettingsComponent` to utilize `JTabbedPane` for tab navigation.
    *   Introduced custom `TableCellRenderer` and `TableCellEditor` implementations (`ActionButtonRenderer`, `InstallButtonEditor`, `ConsoleButtonRenderer`, `MultiLineTableCellRenderer`, etc.) for rich, interactive table cells.
    *   Incorporated IntelliJ's `ProgressManager` for background tasks, providing visual feedback during marketplace refresh and installation.
    *   Improved error handling and user feedback through `Messages.showErrorDialog`.

This update significantly enhances the usability and functionality of managing MCP servers by providing a discovery mechanism and robust runtime control.
@stephanj
Copy link
Collaborator

stephanj commented Aug 6, 2025

Thanks for the PR, will have a closer look at it first

@mydeveloperplanet
Copy link
Collaborator

I like this idea very much, but I do not know whether this is the right way to go.

  • To me, my source for searching MCP servers is https://mcpservers.org/ and not GitHub (the list is also limited to Java-projects at the moment, while many MCP servers are NPM or Python projects).
  • When I install an MCP server from within DevoxxGenie, I still need to navigate to the installation instructions because often extra arguments need to be set, environment variables need to be set, etc. How would this be solved?
  • The list in the Marketplace-tab is limited to 30 servers, while the entire list of https://api.github.com/search/repositories?q=mcp-server+language:java&sort=stars&order=desc is about 1066 MCP servers. This also rises the question: how will you find the MCP server you are looking for?
  • I tried to install an MCP server, the following error is shown although I have installed maven and maven is added to my PATH
Screenshot from 2025-08-09 15-26-20

Is there similar functionality in other AI coding assistants which we can take as an example?

@Osiris-Team Osiris-Team changed the title Introduce MCP Server Marketplace based on GitHub and Lifecycle Management Introduce MCP Server Marketplace based on GitHub. Enhanced Lifecycle Management. Aug 10, 2025
@Osiris-Team
Copy link
Author

Osiris-Team commented Aug 10, 2025

@mydeveloperplanet thanks for testing, yeah the current PR is bare-bones (feel free to join the fun) and is meant to lay the groundwork for this idea, All your points are valid and they could be implemented like this:

  • mcp servers list should be lazy scrollable or paginated and a search text field should be added
  • Integrate https://mcpservers.org/ API if available to find more projects, or via web scraping. duplicate detection via github repo name
  • Support npm and python projects
  • Fix detection of preinstalled software that is needed to build & run the project like maven/java/nodejs/python etc. Ideally maybe even software included in intellij idea directly can be used (I think it has its own version of maven included) , avoiding the need of manual installation. Or automatic installation from trusted sources can be done in the background (in the case of node and python projects an individual installation per project might be needed because of the major version differences and missing backwards compatability unlike java).
  • Find commonly needed environment variables and arguments and set them to a predefined default (for example a server port that we know is free PORT=5000 SERVER_PORT=5000 MCP_PORT=5000 or as args port=5000 server-port 5000 --mcp-port=5000) There surely will be different formats and names for the same things as I am trying to show in my previous example, thus we should provide multiple formats to cover as many as possible and support as many as possible without extra manual configuration.

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.

[Enhancement] MCP tools/servers

3 participants