feat: Add MCP server integration to installer#392
Merged
Conversation
- Add AI integration config loading from NPMPackageVersion (uses already-parsed package.json) - Add AiToolSelectionDialog for selecting which AI tools to configure - Add config writers for Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Gemini CLI, OpenCode, and Codex - Show AI tool selection dialog before install if checkbox is pre-selected - Fix MCP binary path to use Client4JLauncher-cli on macOS - Add AI tool detection for auto-configurable tools - Track aiDialogShown state to ensure dialog is shown at least once
When an app has CLI commands but no services, the installer now explicitly runs --jdeploy:update to download JARs during installation. Previously, JARs were only downloaded on first app launch, causing delays and potential offline failures. Changes: - Add UpdateProgressDialog with smart timing (1s delay before show, 2s minimum display to avoid flashing) - Add hasCommandsButNoServices() helper method - Add runUpdateForCommandsOnly() method that runs the update with progress feedback - Modify post-install flow to use separate paths for services vs commands-only apps If the update fails, installation now fails with an error message.
- Log full process output and exit code to log file for debugging - Show user-friendly error message in dialog with path to log file - Capture process output using BufferedReader for better error reporting
- Use mcpCommandName (e.g., "weather") as config key instead of FQN
- Add _jdeploy metadata field with fqn and appName for identification
- Update all config writers to support new addMcpServer signature
- Manifest now stores friendly name for uninstall tracking
Config now displays as:
"weather": { ... }
Instead of:
"1c3a55084bbeb1aff7c15111dc15ce73.weather-mcp": { ... }
- Use appDisplayName as the MCP server key instead of command name or FQN for better user experience in AI tool settings - Add conflict detection: check if server exists before adding - Only overwrite existing servers if they belong to us (same _jdeploy.fqn) - Skip conflicting servers and log warnings instead of overwriting - Show warning in success dialog when conflicts occur - Add AiIntegrationInstallResult to track both manifest entries and conflicts
- Add updateManifestWithAiIntegrations() to write MCP server, skill, and agent entries to the uninstall manifest after installation - Update updateManifestWithHelper() to preserve existing AI integration entries when adding Helper entries - This enables proper cleanup of MCP server entries during uninstall
- Add AI integrations panel to jDeploy project editor GUI - Add AiAssetBundler for packaging AI assets (skills, agents) - Extend UninstallManifest to track MCP servers, skills, and agents - Add XML schema, generator, and parser support for AI integrations - Add UninstallService cleanup phase for AI integrations - Add tray menu support for AI integration toggle
The runUpdateForCommandsOnly method was creating a Swing UpdateProgressDialog even when running in headless mode (CI pipeline), causing installation failures. Now checks headlessInstall flag and runs the update directly without GUI components in headless mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Key Changes
Shared library (
shared/)AiIntegrationConfig- parses MCP config from package.json (jdeploy.ai.mcp)McpServerConfig- model for MCP server configurationAIToolType- enum of supported AI tools with capability flagsAiToolDetector/AiToolConfigLocator- detect installed AI tools by checking config pathsInstaller (
installer/)AiToolSelectionDialog- UI for selecting which AI tools to configureAiIntegrationInstaller- orchestrates installation to selected toolsDefaultInstallationFormto show checkbox and trigger dialoggetBinaryCommandForAiIntegration()to useClient4JLauncher-clion macOSTest plan
jdeploy.ai.mcpconfiguredClient4JLauncher-clibinary on macOS