MCP Directory

How to add VS Code MCP Server to Claude Desktop

VS Code extension exposing the editor's file, symbol, diagnostics and shell capabilities to MCP clients. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 373โ˜… ยท http ยท no auth

Claude Desktop config for VS Code MCP Server

{
  "mcpServers": {
    "vs-code-mcp-server": {
      "command": "npx",
      "args": [
        "mcp-remote@next",
        "http://localhost:3000/mcp"
      ]
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the VS Code MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm VS Code MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • Visual Studio Code
  • The VS Code MCP Server extension installed (from the Marketplace, or cloned and built with npm install && npm run compile)
  • Server enabled via the status bar item
  • An MCP client capable of connecting over streamable HTTP (e.g. via npx mcp-remote)

What VS Code MCP Server can do in Claude Desktop

list_files_code

Lists files and directories in your workspace. Parameters: path; recursive (optional).

read_file_code

Reads file contents. Parameters: path; encoding (optional, default utf-8); maxCharacters (optional, default 100,000).

move_file_code

Moves a file or directory to a new location using VS Code's WorkspaceEdit API (with import refactoring). Parameters: sourcePath; targetPath; overwrite (optional, default false).

rename_file_code

Renames a file or directory using VS Code's WorkspaceEdit API with automatic reference updates. Parameters: filePath; newName; overwrite (optional, default false).

copy_file_code

Copies a file (files only, not directories) to a new location using VS Code's file system API. Parameters: sourcePath; targetPath; overwrite (optional, default false).

create_file_code

Creates a new file using VS Code's WorkspaceEdit API. Parameters: path; content; overwrite (optional, default false); ignoreIfExists (optional, default false).

replace_lines_code

Replaces specific lines in a file. Parameters: path; startLine (1-based, inclusive); endLine (1-based, inclusive); content; originalCode (for validation).

get_diagnostics_code

Checks for warnings and errors in your workspace. Parameters: path (optional, whole workspace if omitted); severities (optional, array; 0=Error,1=Warning,2=Information,3=Hint; default [0,1]); format (optional, 'text' or 'json', default 'text'); includeSource (optional, default true).

Security

The extension can execute shell commands in the integrated terminal, which is a potential security risk. Use only with MCP clients you trust and do not expose the port to any network. By design the server only works locally (default host 127.0.0.1). MCP authentication is not implemented because the auth spec is still in flux, so there is no built-in access control.

VS Code MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the VS Code MCP Server config there under the "mcpServers" key and restart the client.

Is VS Code MCP Server safe to use with Claude Desktop?

The extension can execute shell commands in the integrated terminal, which is a potential security risk. Use only with MCP clients you trust and do not expose the port to any network. By design the server only works locally (default host 127.0.0.1). MCP authentication is not implemented because the auth spec is still in flux, so there is no built-in access control.

How do I connect an MCP client to the server?

First enable the server by clicking its status bar item in VS Code. Then point clients at http://localhost:3000/mcp (or http://[your-host]:3000/mcp for a custom host). For Claude Desktop, add an mcpServers entry running npx mcp-remote@next against that URL.

Does it use SSE or HTTP transport?

It uses the streamable HTTP API, not the SSE API.

Is it secure?

It can execute shell commands, so there is a security risk. Use it only with trusted MCP clients and never expose the port to a network. It works locally only (default 127.0.0.1) and does not implement MCP authentication yet, since that spec is still in flux.

View repo Full VS Code MCP Server page