Skip to content

Conversation

@shannah
Copy link
Owner

@shannah shannah commented Jan 28, 2026

Summary

  • Adds support for installing MCP (Model Context Protocol) server configurations to AI tools during app installation
  • Detects installed AI tools (Claude Desktop, Claude Code, Cursor, Windsurf, VS Code Copilot, Gemini CLI, OpenCode, Codex)
  • Shows "Install AI Integrations" checkbox when app has MCP config and AI tools are detected
  • Displays tool selection dialog before installation to let users choose which tools to configure
  • Writes MCP server entries to each tool's config file with correct binary paths

Key Changes

Shared library (shared/)

  • AiIntegrationConfig - parses MCP config from package.json (jdeploy.ai.mcp)
  • McpServerConfig - model for MCP server configuration
  • AIToolType - enum of supported AI tools with capability flags
  • AiToolDetector / AiToolConfigLocator - detect installed AI tools by checking config paths

Installer (installer/)

  • AiToolSelectionDialog - UI for selecting which AI tools to configure
  • Config writers for each AI tool (Claude Desktop, Claude Code, Cursor, etc.)
  • AiIntegrationInstaller - orchestrates installation to selected tools
  • Updated DefaultInstallationForm to show checkbox and trigger dialog
  • Fixed getBinaryCommandForAiIntegration() to use Client4JLauncher-cli on macOS

Test plan

  • Install an app with jdeploy.ai.mcp configured
  • Verify "Install AI Integrations" checkbox appears
  • Click Install and verify tool selection dialog appears
  • Select tools and verify config files are updated with correct paths
  • Verify MCP server uses Client4JLauncher-cli binary on macOS

- 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.
@shannah shannah merged commit 63fe057 into master Jan 29, 2026
10 checks passed
@shannah shannah deleted the feature/mcp-installer branch January 29, 2026 01:31
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.

2 participants