mcp-registry/vscode-mcp-server

    ==================
      
       /// MCP ///
      /// VSC ///
        
    ==================
        
    [server:online]
    [protocol:ready]

vscode-mcp-server

by juehang

VS Code extension that turns your local VS Code instance into a Model Context Protocol (MCP) server, exposing file, edit, diagnostics, symbol-search and shell tools to LLM clients such as Claude.

176
34
Open Source

01

list_files_code

List files and directories in the current VS Code workspace

02

read_file_code

Read the contents of a file with optional encoding and size limits

03

create_file_code

Create a new file (optionally overwrite or ignore if it exists) using VS Code's WorkspaceEdit API

04

replace_lines_code

Replace specific line ranges in a file with new content, validating against original code

05

get_diagnostics_code

Retrieve errors and warnings (diagnostics) for a file or the entire workspace

06

search_symbols_code

Search for symbols (functions, classes, variables, etc.) across the workspace by name

07

get_symbol_definition_code

Fetch definition, type info, and documentation for a symbol at a given file and line

08

get_document_symbols_code

Return a hierarchical outline of all symbols within a file

09

execute_shell_command_code

Run a shell command in the integrated VS Code terminal

Installation

Prerequisites
• Node.js >= 18 and npm (or pnpm/yarn)
• VS Code must be installed on the same machine if you want the server to launch an embedded VS Code instance.
Steps
1. Clone the repo
git clone https://github.com/juehang/vscode-mcp-server.git cd vscode-mcp-server
2. Install dependencies
npm install # or: pnpm install / yarn install
3. Build TypeScript → JavaScript
npm run build # normally calls `tsc -p .`
4. (Optional) configure environment variables
# .env or shell variables PORT=3000 # TCP port the MCP server listens on VSCODE_BINARY=/path/to/code # custom VS Code executable OPENAI_API_KEY=xxx # if the server proxies LLM calls
5. Start the server
npm start # shorthand for `node dist/index.js`
6. Verify
open http://localhost:3000/health # should return OK/200 The server is now reachable by any MCP-compatible client or LLM agent.

Documentation

License: MIT License
Updated 7/30/2025