
This project provides tools that expose Language Server Protocol (LSP) functionality as MCP
This project provides tools that expose Language Server Protocol (LSP) functionality as MCP (Model Context Protocol) tools
This project provides tools that expose Language Server Protocol (LSP) functionality as MCP (Model Context Protocol) tools. It enables AI clients to programmatically analyze and edit code through standardized MCP tool calls.
It started as a simple project focused on coding only with TypeScript, then evolved to a full-featured MCP server that supports any language supported by VS Code.
Full details about latest changes and migration to headless VC Code can be found here
VSC-MCP can run in two modes:
3000 (IDE UI) and 5007 (LSP bridge).cd into it.bun installPROJECT_PATH=/path/to/your/project docker-compose upsettings.json)
{
"mcpServers": {
"vsc-mcp": {
"command": "bun",
"args": ["<vsc_mcp_cloned_dir>/src/index.ts"],
"env": {
"USE_VSCODE_LSP": "true",
"LOG_DIR": "<vsc_mcp_cloned_dir>/logs",
"ALLOWED_DIRECTORIES": "/path/to/your/project"
}
}
}
}| Variable | Purpose |
|---|---|
USE_VSCODE_LSP | Set to true to enable Docker/VS Code LSP mode. MCP will forward LSP requests to VS Code (port 5007) instead of spawning a local language server. |
ALLOWED_DIRECTORIES | Restricts direct-file manipulation to the specified directories. |
LOG_DIR | Where MCP writes logs for debugging. |
Note: By default,
USE_VSCODE_LSPisfalse(standalone mode). Set it totrueto use Docker/VS Code LSP integration.
For now the best workflow is to use Claude Desktop as AI Client, it support MCP servers and it provide a monthly plan for 20$/month, and by using the VSC-MCP tools, we can "chat" and work with our codebase.
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonAdd the following configurations to the mcp_servers section of the config file:
{
"mcpServers": {
"repomix": {
"command": "npx",
"args": [
"-y",
"repomix",
"--mcp"
]
},
"vsc-mcp": {
"command": "bun",
"args": [
"<vsc_mcp_cloned_dir>/src/index.ts"
],
"env": {
"USE_VSCODE_LSP": "true",
"LOG_DIR": "<vsc_mcp_cloned_dir>/logs",
"ALLOWED_DIRECTORIES": "/path/to/your/project"
}
}
}
}We suggest to add the repomix mcp server dependency, to know why, you can read this blog post.
Replace <vsc_mcp_cloned_dir> with the actual path to your vsc-mcp cloned directory.
When we start docker we need to specify the workspace directory.
PROJECT_PATH=/path/to/your/project docker-compose upVSC-MCP tools will only be able to access files in the workspace directory.
The VSC-MCP tools include a security feature to restrict OS file operations (read and write files on disk) to specific directories:
ALLOWED_DIRECTORIES: An environment variable that specifies a comma-separated list of directories where file operations are permitted.
Example:
ALLOWED_DIRECTORIES=/home/user/projects,/tmp/workspaceIf this environment variable is not set, operations default to the current working directory only.
All file operations (read, write, edit) will check if the target path is within the allowed directories.
Attempting to access files outside allowed directories will result in an "Access denied" error.
This feature helps prevent unauthorized access to sensitive files and directories on the system.
Currently, the following tools are available:
edit_symbol: Edits a symbol (function, class, method, etc.) by name and type in a given file using LSP.
read_symbol: Reads a symbol (function, class, method, etc.) by name and type in a given file using LSP.
read_file: Reads the content of a file.
write_file: Creates a new file or overwrites an existing file with the provided content.
search_replace_file: Searches for content in a file and replaces it with new content.
get_errors: Fetches code errors and issues for a specific file using the LSP textDocument/diagnostic API.
find_references: Finds all references to a symbol (function, class, etc.) by name and type in a given file using LSP.
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add vsc-mcp -- bun <vsc_mcp_cloned_dir>/src/index.ts{
"mcpServers": {
"vsc-mcp": {
"env": {
"LOG_DIR": "",
"USE_VSCODE_LSP": "",
"ALLOWED_DIRECTORIES": ""
},
"args": [
"<vsc_mcp_cloned_dir>/src/index.ts"
],
"command": "bun"
}
}
}code --add-mcp '{"name":"vsc-mcp","env":{"LOG_DIR":"","USE_VSCODE_LSP":"","ALLOWED_DIRECTORIES":""},"args":["<vsc_mcp_cloned_dir>/src/index.ts"],"command":"bun"}'[mcp_servers.vsc-mcp]
command = "bun"
args = ["<vsc_mcp_cloned_dir>/src/index.ts"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/vsc-mcp to learn what the "Vsc Mcp" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
This server runs locally, so we can't read its tool list over the web yet.
Maintain this server? Claiming proves you own the listing and earns the last 4 points.
Claim this listingPaste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/vsc-mcp)Nothing comparable is listed yet.
No tagged releases on record.
Connect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "vsc-mcp" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.