vscode
MCP server to expose VS Code editing features to an LLM for AI coding
claude mcp add --transport stdio juehang-vscode-mcp-server npx -y vscode-mcp-server \ --env PORT="3000"
How to use
This MCP server exposes the Visual Studio Code workspace as a set of MCP tools that AI models and other MCP clients can interact with. It provides capabilities to list and read files, move, rename, and copy items, search and inspect code symbols, view hover information and definitions, create new files, perform line-level edits, and run shell commands in the integrated terminal. The server is designed to let Claude-like assistants work directly inside a local VS Code workspace, enabling workflow-driven exploration, refactoring, and code modification through the MCP protocol. Use the toolset to explore the project structure, inspect symbol definitions, and apply changes with controlled edits. When interacting with the workspace, you can list files, read contents, search for symbols across the project, and then drill down into specific files to read or modify content. Remember to run diagnostics after changes to surface any issues in real time.
How to install
Prerequisites:
- Node.js and npm installed on your machine
- VS Code installed (for the extension) or the workspace you want to expose via MCP
Installation steps:
- Install the MCP server package (via npm or clone the repository):
- If distributing via npm: npm install -g vscode-mcp-server
- Or, clone the repository and install dependencies locally: git clone https://github.com/JuehangQin/vscode-mcp-server.git cd vscode-mcp-server npm install
- Build/compile if required by the project: npm run compile
- Run the MCP server (example using npm package): npx vscode-mcp-server
- Ensure the server is listening on the expected port (default 3000) and accessible by MCP clients.
- Configure your MCP client to point to http://localhost:3000/mcp using an MCP configuration similar to: { "mcpServers": { "vscode-mcp-server": { "command": "npx", "args": ["-y", "vscode-mcp-server"] } } }
Additional notes
Tips and considerations:
- Security: The extension can execute shell commands, so run only with trusted MCP clients and consider binding the server to a localhost interface or implementing authentication when available.
- Port configuration: If 3000 is in use, adjust the PORT environment variable accordingly and ensure clients point to the correct URL.
- Extensions and workspace state: Since this MCP server exposes VS Code workspace capabilities, ensure the workspace is in a healthy state (no pending tasks or unsaved changes) when performing edits.
- Resources and limits: Be mindful of large files or heavy operations; the MCP tools include max character limits for reads and may require chunked handling for big files.
- Documentation: The available tools mirror VS Code capabilities (file ops, symbol search/definitions, editing, terminal commands). Use list_files_code and read_file_code first to understand context before performing edits.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud