VSCode as MCP Server logo

VSCode as MCP Server

by acomagu

A VSCode extension that turns your VSCode into an MCP server, enabling advanced coding assistance from MCP clients like Claude Desktop. It provides a self-hosted alternative to metered coding tools, offering code editing support, terminal operations, and preview tools.

View on GitHub

Last updated: N/A

What is VSCode as MCP Server?

VSCode as MCP Server is a VSCode extension that transforms your VSCode instance into an MCP (Meta-Control Protocol) server. This allows MCP clients, such as Claude Desktop, to interact with VSCode and provide advanced coding assistance.

How to use VSCode as MCP Server?

  1. Install the extension from the VSCode Marketplace. 2. Configure your MCP client (e.g., Claude Desktop) to connect to the server, specifying the command and arguments to launch the server. 3. Verify the server status in the VSCode status bar. You can start the server by clicking the status bar item if it's not already running.

Key features of VSCode as MCP Server

  • Code Editing Support with diff reviews and real-time diagnostic messages.

  • Terminal Operations for executing commands within VSCode's integrated terminal.

  • Preview Tools for directly previewing URLs within VSCode's built-in browser.

  • Multi-instance Switching for easily switching the MCP server between multiple open VSCode windows.

  • Relay Functionality (Experimental) to relay and expose built-in MCP servers externally.

Use cases of VSCode as MCP Server

  • Using Claude Desktop or other MCP clients to get code suggestions and improvements.

  • Executing terminal commands directly from an LLM for tasks like building or testing code.

  • Previewing web applications or documentation within VSCode using the preview tool.

  • Managing debug sessions through MCP commands.

  • Automating file operations such as creating, modifying, or viewing files.

FAQ from VSCode as MCP Server

What is an MCP server?

An MCP (Meta-Control Protocol) server allows external clients to interact with VSCode, enabling advanced coding assistance and automation.

How do I configure Claude Desktop to use this server?

Add the provided configuration snippet to your claude_desktop_config.json file, specifying the command and arguments to launch the server.

How do I know if the server is running?

Check the bottom-right VSCode status bar for the server icon. A server icon indicates the server is running, while ∅ means it's not running (click to start).

What built-in tools are available?

Available tools include execute_command, code_checker, focus_editor, debug session management tools, text_editor, list_directory, get_terminal_output, list_vscode_commands, execute_vscode_command, and preview_url.

Is this extension free to use?

Yes, this extension is intended as an affordable, self-hosted alternative to metered coding tools.