Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Add Visual Studio Code as MCP Client #286

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jun 20, 2025

This PR adds Visual Studio Code (VS Code) to the list of supported Model Context Protocol (MCP) clients in the Docker AI Tools extension, enabling VS Code users to integrate with Docker's MCP catalog.

Changes Made

New Files

  • src/extension/ui/src/mcp-clients/VSCode.ts - Complete MCP client implementation for VS Code

Modified Files

  • src/extension/ui/src/MCPClients.ts - Added VS Code client import and registration

Implementation Details

The VS Code MCP client follows the same pattern as existing clients (Claude Desktop, Cursor, Continue.dev, Gordon) and includes:

Core Features

  • ✅ Complete MCPClient interface implementation
  • ✅ Platform-specific configuration paths for macOS, Linux, and Windows
  • ✅ User-friendly manual configuration steps with HTML formatting
  • ✅ Connect/disconnect methods using the host-binary CLI pattern
  • ✅ Proper error handling with toast notifications

Configuration Support

  • Name: "Visual Studio Code"
  • Download URL: https://code.visualstudio.com/download
  • Configuration: Standard VS Code settings.json format
  • MCP Integration: Uses mcp.servers configuration section
  • CLI Identifier: vscode (consistent with naming pattern)

Platform-Specific Paths

expectedConfigPath = {
  darwin: "$HOME/Library/Application Support/Code/User/settings.json",
  linux: "$HOME/.config/Code/User/settings.json", 
  win32: "$APPDATA\\Code\\User\\settings.json",
}

Manual Configuration Steps

The implementation provides clear step-by-step instructions for users:

  1. Open VS Code Settings (File > Preferences > Settings or Ctrl+,)
  2. Click "Open Settings (JSON)" in the top right corner
  3. Add MCP configuration to settings.json
  4. Save and restart VS Code if necessary

Testing

  • ✅ TypeScript compilation passes
  • ✅ Vite build succeeds
  • ✅ Integration verified with existing MCP client system
  • ✅ Follows established patterns and conventions

This addition enables VS Code users to seamlessly connect to Docker's MCP catalog alongside users of other supported editors and AI assistants.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add VS Code to MCP Clients List Add Visual Studio Code as MCP Client Jun 20, 2025
Copilot finished work on behalf of digitarald June 20, 2025 21:33
@digitarald
Copy link

@copilot also update src/extension/host-binary/pkg/clients/config.yml , to add the mcp server to VS Code's settings.json , the path is mcp.servers (while other clients use mcpServers)

@digitarald
Copy link

Sorry for the noise, this can be closed and replaced by #287

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

Successfully merging this pull request may close these issues.

2 participants