MCP Hub
Back to servers

vscode-mcp

An MCP server that gives Claude IDE capabilities inside VS Code and Cursor, enabling file operations, shell commands, and workspace management via natural language.

glama
Updated
May 8, 2026

vscode-mcp

An MCP (Model Context Protocol) server that gives Claude IDE capabilities inside VS Code and Cursor. Claude can read, write, edit, search, and run commands in your workspace — directly from the chat.

Tools

ToolDescription
read_fileRead file contents, with optional line range
write_fileWrite or overwrite a file (creates parent dirs)
edit_fileReplace an exact string in a file
list_directoryList files and dirs (optionally recursive)
create_directoryCreate a directory tree
delete_pathDelete a file or directory
move_pathMove or rename a file/directory
search_filesGrep-style regex search across files
find_filesFind files by glob pattern (e.g. *.ts)
run_commandExecute any shell command, capture output
get_workspace_infoPlatform, Node version, git branch & status
get_file_infoFile metadata (size, modified time, type)

Installation

npm install
npm run build

Using with Cursor

Cursor reads MCP server configuration from:

  • Global: ~/.cursor/mcp.json
  • Project: .cursor/mcp.json (in your project root)

Option A — run via node (after build)

Add to your Cursor MCP config:

{
  "mcpServers": {
    "vscode-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/vscode-mcp/dist/index.js"]
    }
  }
}

Option B — run via npx (no manual build needed)

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

After editing the config, open Cursor Settings → Features → MCP and click Refresh (or restart Cursor).

Using with VS Code + Copilot Chat (MCP support)

Add to your VS Code settings.json:

"mcp": {
  "servers": {
    "vscode-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/vscode-mcp/dist/index.js"]
    }
  }
}

Development

npm run dev    # watch mode (recompiles on save)
npm start      # run the built server

Tips

  • All paths can be absolute or relative to the workspace root.
  • Pass workspace_root to any tool to anchor relative paths to a specific directory.
  • run_command accepts any shell command — use it for git, npm, linters, compilers, etc.
  • search_files skips node_modules, dist, and hidden folders automatically.

Reviews

No reviews yet

Sign in to write a review