The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Vscode MCP Server listing page.
A Visual Studio Code extension (available on the Marketplace) that allows Claude and other MCP clients to code directly in VS Code! Inspired by Serena, but using VS Code's built-in capabilities. Perfect for extending existing coding agents like Claude Code with VS Code-specific capabilities (symbol search, document outlines) without duplicating tools they already have. Note that this extension uses the streamable HTTP API, not the SSE API.
This extension can allow for execution of shell commands. This means that there is a potential security risk, so use with caution, and ensure that you trust the MCP client that you are using and that the port is not exposed to anything. Authentication would help, but as the MCP authentication spec is still in flux, this has not been implemented for now.
PRs are welcome!
https://github.com/user-attachments/assets/20b87dfb-fc39-4710-a910-b9481dde1e90
npm install and npm run compile to build it.Claude Desktop can be configured to use this extension as an MCP server. To do this, your claude_desktop_config.json file should look like this:
I also like to use this extension in a Claude project, as it allows me to specify additional instructions for Claude. I find the following prompt to work well:
For context efficiency when exploring codebases, consider adding this to your CLAUDE.md:
This extension serves as a Model Context Protocol (MCP) server, exposing VS Code's filesystem and editing capabilities to MCP clients.
The VS Code MCP Server extension implements an MCP-compliant server that allows AI models and other MCP clients to:
This extension enables AI assistants and other tools to interact with your VS Code workspace through the standardized MCP protocol.
The extension creates an MCP server that:
list_files_code: Lists files and directories in your workspace
path: The path to list files fromrecursive (optional): Whether to list files recursivelyread_file_code: Reads file contents
path: The path to the file to readencoding (optional): File encoding (default: utf-8)maxCharacters (optional): Maximum character count (default: 100,000)move_file_code: Moves a file or directory to a new location using VS Code's WorkspaceEdit API
sourcePath: The current path of the file or directory to movetargetPath: The new path where the file or directory should be moved tooverwrite (optional): Whether to overwrite if target already exists (default: false)rename_file_code: Renames a file or directory using VS Code's WorkspaceEdit API
filePath: The current path of the file or directory to renamenewName: The new name for the file or directoryoverwrite (optional): Whether to overwrite if a file with the new name already exists (default: false)copy_file_code: Copies a file to a new location using VS Code's file system API
sourcePath: The path of the file to copytargetPath: The path where the copy should be createdoverwrite (optional): Whether to overwrite if target already exists (default: false)create_file_code: Creates a new file using VS Code's WorkspaceEdit API
path: The path to the file to createcontent: The content to write to the fileoverwrite (optional): Whether to overwrite if the file exists (default: false)ignoreIfExists (optional): Whether to ignore if the file exists (default: false)replace_lines_code: Replaces specific lines in a file
path: The path to the file to modifystartLine: The start line number (1-based, inclusive)endLine: The end line number (1-based, inclusive)content: The new content to replace the lines withoriginalCode: The original code for validationget_diagnostics_code: Checks for warnings and errors in your workspace
path (optional): File path to check (if not provided, checks the entire workspace)severities (optional): Array of severity levels to include (0=Error, 1=Warning, 2=Information, 3=Hint). Default: [0, 1]format (optional): Output format ('text' or 'json'). Default: 'text'includeSource (optional): Whether to include the diagnostic source. Default: trueThis tool is particularly useful for:
search_symbols_code: Searches for symbols across the workspace
query: The search query for symbol namesmaxResults (optional): Maximum number of results to return (default: 10)This tool is useful for:
get_symbol_definition_code: Gets definition information for a symbol in a file
path: The path to the file containing the symbolline: The line number of the symbolsymbol: The symbol name to look for on the specified lineThis tool provides:
It's particularly useful for:
get_document_symbols_code: Gets an outline of all symbols in a file, showing the hierarchical structure
path: The path to the file to analyze (relative to workspace)maxDepth (optional): Maximum nesting depth to displayThis tool provides:
It's particularly useful for:
execute_shell_command_code: Executes a shell command in the VS Code integrated terminal with shell integration
command: The shell command to executecwd (optional): Optional working directory for the command (default: '.')This tool is useful for:
Currently, only one workspace is supported. The extension also only works locally, to avoid exposing your VS Code instance to any network you may be connected to.
vscode-mcp-server.port: The port number for the MCP server (default: 3000)vscode-mcp-server.host: Host address for the MCP server (default: 127.0.0.1)vscode-mcp-server.defaultEnabled: Whether the MCP server should be enabled by default on VS Code startupvscode-mcp-server.enabledTools: Configure which tool categories are enabled (file, edit, shell, diagnostics, symbol)Selective Tool Configuration: Useful for coding agents that already have certain capabilities. For example, with Claude Code you might disable file/edit tools and only enable symbol tools to add VS Code-specific symbol searching without tool duplication.
To connect MCP clients to this server, configure them to use:
Or if you've configured a custom host:
Remember that you need to enable the server first by clicking on the status bar item!
Contributions are welcome! Feel free to submit issues or pull requests.