vscode-mcp-server
v4.9.5MCP Server that connects to VSCode Extension via Unix Socket
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
health_check Health Check
Test connection to VSCode MCP Bridge extension. Troubleshoot when other VSCode MCP tools return connection errors or timeouts
| Parameter | Type | Description |
|---|---|---|
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
get_diagnostics Get Diagnostics
Get diagnostic information from vscode language servers. Ideal quality-check tool for AI coding agents, much faster than 'tsc --noEmit' and 'eslint .' **Parameter Examples:** - Check modified files: workspace_path: '/path/to/open-vscode-workspace', __NOT_RECOMMEND__filePaths: [] (auto-detects git changes, including submodules) - Check submodule files explicitly: keep workspace_path at the open VSCode workspace root and pass file paths relative to that root, for example ['submodule/path/src/file.ts'] - Filter to ESLint findings only: sources: ['eslint'] - Errors only (rarely useful): __NOT_RE…
| Parameter | Type | Description |
|---|---|---|
__NOT_RECOMMEND__filePaths * | array | Array of file paths to get diagnostics for. If empty array is provided, will get diagnostics for all git modified files (staged and unstaged) in the workspace. |
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
__NOT_RECOMMEND__severities | array | Severity levels to include. Default includes all four (error, warning, info, hint) so ESLint rules that surface as hints are not silently dropped. |
excludeSources | array | Diagnostic sources to exclude (case-insensitive substring match). Defaults to ["cspell"] to drop noisy spell-checker reports; pass [] to keep them. Applied after `sources`, so an excluded source is dr… |
sources | array | Array of diagnostic sources to include (e.g., "eslint", "ts", "typescript"). If empty array provided, includes all sources. |
get_symbol_lsp_info Get Symbol LSP Info
Retrieve comprehensive LSP information for a symbol, including type definitions, documentation, and usage details. Essential for fixing type errors and understanding symbol declarations. Typical use cases: - Fix TypeScript type checking errors - Extract function parameters and return types from symbols when encapsulating code blocks into functions - Obtain variable types from nearby code symbols when declaring variables or type assertions, avoiding the use of 'any'
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path (absolute or relative to workspace root) |
symbol * | string | Symbol name |
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
codeSnippet | string | Optional code snippet to help precisely locate the symbol when there are multiple symbols with the same name. Eg: "function getUserName()" when locating the symbol "getUserName" |
infoType | string | Type of LSP information to retrieve. **Info Types Available:** - **all**(default): Returns all available information - **hover**: Rich type information and documentation - **signature_help**: Functio… |
get_references Get References
Find all reference locations of a symbol (variable, function, class, etc.) across the codebase **Return Format:** Array of reference locations with file paths and exact positions
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path (absolute or relative to workspace root) |
symbol * | string | Symbol name |
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
codeSnippet | string | Optional code snippet to help precisely locate the symbol when there are multiple symbols with the same name. Eg: "function getUserName()" when locating the symbol "getUserName" |
includeDeclaration | boolean | Whether to include the declaration in the results |
usageCodeLineRange | number | Number of lines to include around each reference for usage context. 5 = ±5 lines (11 total), 0 = only reference line, -1 = no usage code |
execute_command ⚠️ Execute VSCode Command
Execute VSCode commands with arguments **Common Use Cases:** - Format code: 'editor.action.formatDocument' with args: '[]' - Open files: 'vscode.open' with args: '["file:///absolute/path/to/file.ts"]' - Save all files: 'workbench.action.files.saveAll' with args: '[]' - Auto-fix issues: 'editor.action.fixAll' with args: '[]' - Restart TypeScript: 'typescript.restartTsServer' with args: '[]' - Restart ESLint: 'eslint.restart' with args: '[]' **Important Notes:** - Commands and arguments may change with VSCode updates, it's recommended to search in the VSCode official repository to confirm the c…
| Parameter | Type | Description |
|---|---|---|
command * | string | VSCode command to execute (e.g., 'vscode.open', 'editor.action.formatDocument') |
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
args | string | Optional JSON string of arguments array to pass to the command - args parameter must be a JSON string representing an array of arguments - For file paths: Use absolute paths like '["file:///absolute/p… |
saveAllEditors | boolean | Save all dirty editors after executing the command (default: true) |
open_files Open Files
Open files in vscode
| Parameter | Type | Description |
|---|---|---|
files * | array | Array of files to open |
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
rename_symbol ⚠️ Rename Symbol
Rename a symbol with VSCode F2 ability Advantages over search and replace: - Faster - More accurate - Automatically updates imports and reference locations **Important Notes:** - Some symbols may not be renameable (e.g., built-in types, external libraries)
| Parameter | Type | Description |
|---|---|---|
filePath * | string | File path (absolute or relative to workspace root) |
newName * | string | New symbol name |
symbol * | string | Symbol name |
workspace_path * | string | Absolute path of the open VSCode workspace folder that runs the VSCode MCP Bridge extension. This value selects the VSCode socket, so it must match the workspace shown by list_workspaces or the extens… |
codeSnippet | string | Optional code snippet to help precisely locate the symbol when there are multiple symbols with the same name. Eg: "function getUserName()" when locating the symbol "getUserName" |
list_workspaces List Available Workspaces
List all available VSCode workspaces that can be connected to use vscode mcp tools **Return Format:** Array of workspace objects with paths, names, status, and optional details. Includes summary statistics about discovered workspaces. **Important Notes:** - **Active status** means successfully connected and verified - **Available status** means socket exists but not tested