Back to MCP Directory
VS Code
Model Context Protocol moderate risk

VS Code

This VS Code extension exposes workspace file system and editing capabilities to MCP clients, enabling AI agents to interact with codebases directly.

Connections & Capabilities

Connects To

GitHubFilesystem

Capabilities

readwriteexecadmin

Quickstart

Config

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

  }
}

Exposed MCP Tools (12)

safe
list_files_code

Lists files and directories within a specified path in the workspace.

Read-only operation, no modification of the file system.

safe
read_file_code

Reads the content of a file within the workspace.

Read-only operation, no modification of the file system.

high
move_file_code

Moves a file or directory to a new location within the workspace.

Can cause data loss if target is overwritten or move fails.

high
rename_file_code

Renames a file or directory within the workspace.

Can cause data loss if target is overwritten or rename fails.

moderate
copy_file_code

Copies a file to a new location within the workspace.

Can overwrite existing files if overwrite is enabled.

moderate
create_file_code

Creates a new file within the workspace.

Can overwrite existing files if overwrite is enabled.

moderate
replace_lines_code

Replaces specific lines in a file with new content.

Incorrect replacement can corrupt the file.

safe
get_diagnostics_code

Checks for warnings and errors in the workspace.

Read-only operation, no modification of the file system.

safe
search_symbols_code

Searches for symbols across the workspace.

Read-only operation, no modification of the file system.

safe
get_symbol_definition_code

Gets definition information for a symbol in a file.

Read-only operation, no modification of the file system.

safe
get_document_symbols_code

Gets an outline of all symbols in a file.

Read-only operation, no modification of the file system.

critical
execute_shell_command_code

Executes a shell command in the VS Code integrated terminal.

Allows arbitrary code execution with the user's privileges.

Safety Assessment

This extension offers convenient code interaction but carries moderate risk due to shell command execution and lack of authentication. It's safest when used with trusted MCP clients and with shell command execution disabled.

  • Selective tool configuration allows disabling risky tools.
  • Operates locally, minimizing external network exposure.
  • Requires explicit user action to enable the server.
  • Uses VS Code's built-in capabilities for file system operations.
  • Allows execution of shell commands, posing a significant risk.
  • Lacks authentication, making it vulnerable if exposed.
  • File system write operations can lead to data loss or corruption.
  • Potential for malicious code injection via MCP client.