VSC-MCP: an MCP server exposing LSP code analysis and editing tools

VSC-MCP: an MCP server exposing LSP code analysis and editing tools

vsc-mcp•bythomasgazzoni

An MCP server that exposes Language Server Protocol functionality as tools so AI clients can analyze and edit code, with a standalone TypeScript mode and a Docker mode using a headless VS Code server for broader language support.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides symbol-level tools to read and edit functions, classes, methods and other symbols in a file using LSP.
  • •Offers file tools to read, write, search-and-replace content, and fetch code diagnostics for a file.
  • •Finds all references to a symbol using LSP reference requests, returning file paths and positions.
  • •Restricts file operations to configured allowed directories to prevent access to sensitive files.

BEST FOR

  • •AI-assisted coding agents that need to read, edit and analyze code through LSP rather than raw text.
  • •Working with multiple languages supported by VS Code, such as Rust, Go, C# and Python, via Docker mode.
  • •Refactoring and code analysis tasks that require finding symbol references and diagnostics.

ABOUT VSC-MCP

VSC-MCP: an MCP server exposing LSP code analysis and editing tools is cataloged as an MCP server attributed to thomasgazzoni. An MCP server that exposes Language Server Protocol functionality as tools so AI clients can analyze and edit code, with a standalone TypeScript mode and a Docker mode using a headless VS Code server for broader language support. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for VSC-MCP: an MCP server exposing LSP code analysis and editing tools are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What is the difference between standalone mode and Docker mode?

Standalone mode spawns a local typescript-language-server and supports only TypeScript/JavaScript, while Docker mode runs OpenVSCode Server in Docker for richer LSP support across languages supported by VS Code.

Can I watch the agent's edits happen in real time?

Yes, in Docker mode you can open the exposed port to watch edits in real time as the AI agent interacts with MCP.

How does ALLOWED_DIRECTORIES affect file operations?

It sets a comma-separated list of directories where file operations are permitted; if unset, operations default to the current working directory, and access outside allowed directories is denied.

Upstream README

View this exact version on GitHub

README.md · 535ef45d060c · Fetched 2026-11-13 09:46:33 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

VSC-MCP

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

Docker Mode & VS Code LSP Integration

VSC-MCP can run in two modes:

  • Standalone Mode: It spawn a local typescript-language-server to provide LSP support ONLY for TypeScript/JavaScript.
  • Docker Mode: Leverages a headless VS Code port by Gitpod, namely OpenVSCode Server, running in Docker to provide richer LSP support, for any languages supported by VC Code like Rust, Go, C#, Python, etc.

Why Docker Mode?

  • Unified LSP: Avoids the hassle of launching separate local language servers for each language.
  • Rich Extension Ecosystem: Inherits VS Code's extension support and APIs for advanced language features.
  • Live Editing: Open http://localhost:3000 to watch edits in real time as your AI agent interacts with MCP.
  • Works without IDE: we can write and analyze code without opening any IDE.

How It Works

  1. OpenVSCode Server runs inside Docker, exposing port 3000 (IDE UI) and 5007 (LSP bridge).
  2. Required VS Code extensions are pre-installed (e.g., rust-analyzer, pyright, eslint, and the VSC-MCP extension).
  3. The VSC-MCP extension creates a WebSocket channel between MCP and the VS Code back-end.
  4. File I/O tools use direct access; LSP tools use VS Code's internal language servers.

Installation

Prerequisites

  • Docker (for running the VS Code server)
  • Bun (for launching MCP)

Setup

  1. Clone the repository and cd into it.
  2. Install dependencies
    bun install
    
  3. Build and start OpenVSCode Server (mount your project into the container)
    PROJECT_PATH=/path/to/your/project docker-compose up
    
  4. Register MCP in your AI client (example settings.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"
          }
        }
      }
    }
    

Environment Variables

VariablePurpose
USE_VSCODE_LSPSet 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_DIRECTORIESRestricts direct-file manipulation to the specified directories.
LOG_DIRWhere MCP writes logs for debugging.

Note: By default, USE_VSCODE_LSP is false (standalone mode). Set it to true to use Docker/VS Code LSP integration.

Suggested AI Client Configurations

Claude Desktop

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.

  • 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": [
        "<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.

Security Features

Docker Workspace Restriction

When we start docker we need to specify the workspace directory.

PROJECT_PATH=/path/to/your/project docker-compose up

VSC-MCP tools will only be able to access files in the workspace directory.

Path Restriction

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/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.

Available Tools

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.

    • 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
  • read_symbol: 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
  • read_file: 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.)
  • write_file: 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)
  • search_replace_file: 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
  • get_errors: Fetches code errors and issues for a specific file using the LSP textDocument/diagnostic API.

    • Provides detailed diagnostics including error messages, severity, and location
    • Uses the VS Code extension's diagnostics api to validate code
    • Returns structured information about code issues
  • find_references: Finds all references to a symbol (function, class, 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 textDocument/reference API to find all references to a symbol
    • Returns a list of references with file paths and positions
    • Helps with code analysis, refactoring, and understanding code usage

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for VSC-MCP: an MCP server exposing LSP code analysis and editing tools from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/vsc-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools