VSC-MCP
This project provides tools that expose Language Server Protocol (LSP) functionality as MCP (Model Context Protocol) tools
thomasgazzoni
README
VSC-MCP
This project provides tools that expose Language Server Protocol (LSP) functionality as MCP (Model Context Protocol) tools. It enables AI agents to programmatically analyze and edit TypeScript/JavaScript code through standardized MCP tool calls.
Features
- Works in single-file mode or project mode (
tsconfig.json
detection). - Language-agnostic code manipulation through LSP APIs.
- Fully compatible with Model Context Protocol (MCP) SDK.
Installation
Prerequisites
- Bun (for package management and building)
- Node.js (for running the server)
Setup
- Clone the repository
- Install dependencies:
bun install
Configuration in Claude (macOS)
To use with Claude Desktop, add the server configuration to the Claude Desktop config file:
- On MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Add 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": [
"/path/to/your/vsc-mcp/src/index.ts"
],
"env": {
"LOG_DIR": "/path/to/your/vsc-mcp/logs",
"ALLOWED_DIRECTORIES": "/path/to/your/vsc-mcp"
}
}
}
}
We need the repomix
mcp server dependency.
Replace /path/to/your/vsc-mcp
with the actual path to your vsc-mcp cloned directory.
Security Features
Path Restriction
The VSC-MCP tools include a security feature to restrict file operations 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/workspace
-
If 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.
How It Works
- Launches the typescript-language-server in --stdio mode.
- Sends LSP initialize and didOpen notifications.
- Finds symbols using workspace/symbol and textDocument/documentSymbol requests.
- Falls back to textDocument/implementation for additional symbol discovery.
- Applies edits directly to files using applyWorkspaceEdit utility.
- Returns the result of the operation to the caller.
Available Tools
Currently, the following tools are available:
-
editSymbol
: Edits a symbol (function, class, method, etc.) by name and type in a given file using LSP.- Supports various symbol types: function, method, class, interface, variable, constant, property, field
- Uses LSP's workspace/symbol and textDocument/documentSymbol requests to find symbols
- Applies edits directly to files
-
readSymbol
: Reads a symbol (function, class, method, etc.) by name and type in a given file using LSP.- Supports the same symbol types as editSymbol
- Uses LSP to locate the symbol and extract its content
- Returns the symbol content along with its location information
-
readFile
: Reads the content of a file.- Returns the file content with appropriate MIME type based on file extension
- Handles various file formats including code, text, and configuration files
- Provides detailed error messages for common issues (file not found, directory access, etc.)
-
writeFile
: Creates a new file or overwrites an existing file with the provided content.- Creates parent directories if they don't exist
- Supports any file type
- Returns information about the file operation (created/overwritten, file size)
-
searchReplaceFile
: Searches for content in a file and replaces it with new content.- Ignores whitespace differences when searching (spaces, tabs, newlines)
- Supports flexible matching of content patterns
- Returns the number of replacements made
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.