MCP.so
Sign In

VSCode as MCP Server

@acomagu

About VSCode as MCP Server

Expose VSCode features such as file viewing and editing as MCP, enabling advanced AI-assisted coding directly from tools like Claude Desktop

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "vscode": {
      "command": "npx",
      "args": [
        "vscode-as-mcp-server"
      ]
    }
  }
}

Tools

10

Execute a command in a VSCode integrated terminal with proper shell integration. This tool provides detailed output and exit status information, and supports: - Custom working directory - Shell integration for reliable output capture - Output compression for large outputs - Detailed exit status reporting - Flag for potentially destructive commands (potentiallyDestructive: false to skip confirmation for read-only commands)

Retrieve diagnostics from VSCode's language services for the active workspace. Use this tool after making changes to any code in the filesystem to ensure no new errors were introduced, or when requested by the user.

Open the specified file in the VSCode editor and navigate to a specific line and column. Use this tool to bring a file into focus and position the editor's cursor where desired. Note: This tool operates on the editor visual environment so that the user can see the file. It does not return the file contents in the tool call result.

List all active debug sessions in the workspace.

Start a new debug session with the provided configuration.

Restart a debug session by stopping it and then starting it with the provided configuration.

Stop all debug sessions that match the provided session name.

A text editor tool that provides file manipulation capabilities using VSCode's native APIs: - view: Read file contents with optional line range - str_replace: Replace text in file - create: Create new file - insert: Insert text at specific line - undo_edit: Restore from backup Code Editing Tips: - VSCode may automatically prune unused imports when saving. To prevent this, make sure the imported type is actually used in your code before adding the import.

List directory contents in a tree format, respecting .gitignore patterns. Shows files and directories with proper indentation and icons. Useful for exploring workspace structure while excluding ignored files.

Retrieve the output from a specific terminal by its ID. This tool allows you to check the current or historical output of a terminal, which is particularly useful when working with long-running commands or commands started in background mode with the execute_command tool.

Overview

What is VSCode as MCP Server?

A VSCode extension that turns your VSCode into an MCP server, enabling advanced coding assistance from MCP clients like Claude Desktop. It provides code editing, terminal operations, preview tools, multi-instance switching, and an experimental relay for built-in MCP servers.

How to use VSCode as MCP Server?

Install the extension from the VSCode Marketplace. Configure your MCP client using npx vscode-as-mcp-server in the client’s config file (e.g., claude_desktop_config.json) or use mcp-installer. The server status appears in the VSCode status bar; click to start if not running.

Key features of VSCode as MCP Server

  • Review and accept/reject code changes via diffs
  • Real-time diagnostic messages sent to the LLM
  • Execute commands in VSCode’s integrated terminal
  • Preview URLs in VSCode’s built-in browser
  • Switch MCP server between multiple VSCode windows
  • Relay external access to built-in MCP servers (experimental)

Use cases of VSCode as MCP Server

  • Integrate Claude Desktop as an advanced coding assistant within VSCode
  • Automate code review and correction with live diagnostics
  • Run terminal commands and preview web apps during development
  • Manage debug sessions from an MCP client
  • Expose VSCode’s built-in MCP tools (e.g., GitHub Copilot) to external clients

FAQ from VSCode as MCP Server

What are the dependencies or runtime requirements?

You need VSCode with the extension installed, and an MCP client that supports the standard MCP protocol, such as Claude Desktop.

How does this differ from other coding tools like Roo Code or Cursor?

This extension is a self-hosted, affordable alternative integrated directly into VSCode, designed to reduce costs associated with metered coding tools.

Where does the code data live?

All operations happen within your local VSCode environment; the extension does not send code to external servers.

What transport or authentication does it use?

The extension communicates via the standard MCP protocol; no specific authentication is described. The server runs locally over stdio.

Are there any known limits?

The relay functionality for built-in MCP servers is experimental. There is no built-in approval UI yet; that is on the future roadmap.

Frequently asked questions

What are the dependencies or runtime requirements?

You need VSCode with the extension installed, and an MCP client that supports the standard MCP protocol, such as Claude Desktop.

How does this differ from other coding tools like Roo Code or Cursor?

This extension is a self-hosted, affordable alternative integrated directly into VSCode, designed to reduce costs associated with metered coding tools.

Where does the code data live?

All operations happen within your local VSCode environment; the extension does not send code to external servers.

What transport or authentication does it use?

The extension communicates via the standard MCP protocol; no specific authentication is described. The server runs locally over stdio.

Are there any known limits?

The relay functionality for built-in MCP servers is experimental. There is no built-in approval UI yet; that is on the future roadmap.

Comments

More Developer Tools MCP servers