VSC-MCP
@thomasgazzoni
关于 VSC-MCP
This project provides tools that expose Language Server Protocol (LSP) functionality as MCP (Model Context Protocol) tools
基本信息
配置
工具
7Edits a symbol (function, class, method, etc.) by name and type in a given file using LSP.
Reads a symbol (function, class, method, etc.) by name and type in a given file using LSP.
Reads the content of a file.
Creates a new file or overwrites an existing file with the provided content.
Searches for content in a file and replaces it with new content.
Fetches code errors and issues for a specific file using the LSP textDocument/diagnostic API.
Finds all references to a symbol (function, class, etc.) by name and type in a given file using LSP.
概览
What is VSC-MCP?
VSC-MCP is an MCP server that exposes Language Server Protocol (LSP) functionality as MCP tools, enabling AI clients to programmatically analyze and edit code. It supports any language that VS Code supports, through either a local TypeScript-only language server or a Docker‑based headless VS Code instance.
How to use VSC-MCP?
Clone the repository, install dependencies with bun install, and start the OpenVSCode Server using PROJECT_PATH=/path/to/your/project docker-compose up. Register the MCP server in your AI client’s configuration (e.g., Claude Desktop) with environment variables USE_VSCODE_LSP, ALLOWED_DIRECTORIES, and LOG_DIR. In standalone mode, set USE_VSCODE_LSP to false; in Docker mode, set it to true.
Key features of VSC-MCP
- Exposes LSP functionality (diagnostics, references, symbol editing) as MCP tools
- Two modes: standalone (TypeScript/JavaScript only) and Docker (any VS Code language)
- Live editing via web UI at
http://localhost:3000 - Security: workspace directory restriction and
ALLOWED_DIRECTORIESenvironment variable - Tools:
edit_symbol,read_symbol,read_file,write_file,search_replace_file,get_errors,find_references - Integrates with VS Code extension ecosystem for rich language support
Use cases of VSC-MCP
- Chat with an AI agent to analyze and edit code without opening an IDE
- Programmatically edit symbols (functions, classes, methods) using LSP
- Read and write files, perform search-and-replace with whitespace‑insensitive matching
- Fetch code diagnostics and find references for refactoring and code understanding
- Support multi-language projects (Rust, Go, C#, Python, etc.) via Docker mode
FAQ from VSC-MCP
What is the difference between standalone and Docker mode?
Standalone mode uses a local typescript-language-server and supports only TypeScript/JavaScript. Docker mode runs a headless VS Code (OpenVSCode Server) in Docker, providing LSP for any language that VS Code supports.
How do I restrict file access?
Set the ALLOWED_DIRECTORIES environment variable to a comma‑separated list of permitted directories. VSC-MCP will deny file operations outside those directories. If not set, operations default to the current working directory.
What are the prerequisites for using VSC-MCP in Docker mode?
You need Docker installed and Bun for launching the MCP server. The workspace directory must be mounted via PROJECT_PATH when starting Docker.
How do I configure VSC-MCP for Docker mode in Claude Desktop?
In the MCP server configuration, set "USE_VSCODE_LSP": "true" in the env object, and provide the correct path to ALLOWED_DIRECTORIES and LOG_DIR. Point the command to bun and args to the server entry point.
What tools does VSC-MCP provide?
The server offers seven tools: edit_symbol, read_symbol, read_file, write_file, search_replace_file, get_errors, and find_references. They cover file I/O, symbol manipulation, diagnostics, and reference finding.
其他 分类下的更多 MCP 服务器
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
Codelf
unbugA search tool helps dev to solve the naming things problem.

EverArt
modelcontextprotocolModel Context Protocol Servers
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
评论