MCP Directory

How to add VS Code MCP Server to Windsurf

VS Code extension exposing the editor's file, symbol, diagnostics and shell capabilities to MCP clients. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 373 · http · no auth

Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the VS Code MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5VS Code MCP Server's tools become available to Cascade.

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 Windsurf

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_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 Windsurf?

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