Get the FREE Ultimate OpenClaw Setup Guide →

vscode

MCP server for Claude Code/VSCode/Cursor/Windsurf to use editor self functionality. ⚡ Get real-time LSP diagnostics, type information, and code navigation for AI coding agents without waiting for slow tsc/eslint checks.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tjx666-vscode-mcp npx -y @vscode-mcp/vscode-mcp-server@latest \
  --env VSCODE_MCP_DISABLED_TOOLS="health_check,list_workspaces,open_files"

How to use

VSCode MCP provides a bridge between MCP clients and the VSCode editor to enable AI agents to access real-time coding context. The server exposes tools such as get_symbol_lsp_info for comprehensive language server data (definition, hover, signatures, and type information), get_diagnostics for real-time diagnostics to speed up validation, get_references to locate symbol usage across the workspace, and open_files/rename_symbol to manipulate code with context-aware updates. The bridge is designed to reduce reliance on slow local commands (like tsc, eslint, or npm build) by delivering LSP-derived insights directly to AI agents. To use it, configure the MCP server in your environment and ensure your MCP client requests the supported tools through the MCP protocol. You can selectively enable or disable tools via command-line options or environment variables (for example, VSCODE_MCP_ENABLED_TOOLS or VSCODE_MCP_DISABLED_TOOLS) to tailor capabilities to your workflow.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • VSCode installed
  • VSCode MCP Bridge extension installed in your VSCode instance (required for MCP server communication)

Step 1: Install the VSCode MCP Bridge extension

Step 2: Install the MCP Server

  • There are multiple integration options shown in the README. The standard approach is to run the MCP server via npx:
npx -y @vscode-mcp/vscode-mcp-server@latest

This installs or runs the server and registers it with your MCP client(s). You can also configure Codex, Claude Code, Cursor, or Gemini CLI as shown:

Codex:

[mcp_servers.vscode-mcp]
command = "bunx"
args = ["-y", "@vscode-mcp/vscode-mcp-server@latest"]
env = { "VSCODE_MCP_DISABLED_TOOLS" = "health_check,list_workspaces,open_files" }
startup_timeout_ms = 16000

Claude Code:

claude mcp add vscode-mcp -- npx -y @vscode-mcp/vscode-mcp-server@latest

Cursor:

{
  "mcpServers": {
    "vscode-mcp": {
      "command": "npx",
      "args": ["@vscode-mcp/vscode-mcp-server@latest"]
    }
  }
}

Gemini CLI:

{
  "mcpServers": {
    "vscode-mcp": {
      "command": "npx",
      "args": ["-y", "@vscode-mcp/vscode-mcp-server@latest"],
      "env": {},
      "includeTools": [
        "get_symbol_lsp_info",
        "get_diagnostics",
        "get_references",
        "health_check",
        "rename_symbol"
      ]
    }
  }
}

Step 3: Verify the server is reachable by your MCP client and that the desired tools are enabled.

Additional notes

Notes and tips:

  • Always install the VSCode MCP Bridge extension first; the MCP server relies on the bridge to communicate with the editor.
  • You can customize which tools are exposed by setting environment variables like VSCODE_MCP_ENABLED_TOOLS or VSCODE_MCP_DISABLED_TOOLS or by using the includeTools option in client configurations.
  • If you encounter timeouts during startup, increase startup_timeout_ms in your mcp configuration to account for environment load times.
  • The execute_command tool in the available tools is powerful but must be used with caution since it can run arbitrary VSCode commands. Use only with trusted AI models.
  • Ensure your VSCode workspace is accessible to the MCP server; multi-workspace scenarios require proper socket management as described by the architecture notes.

Related MCP Servers

Sponsor this space

Reach thousands of developers