Logo von VSCode MCP

VSCode MCP

Community
tjx666

MCP server for Claude Code/VSCode/Cursor/Windsurf to use editor self functionality. ⚡ Get real-time LSP diagnostics, type information, and code navigation for AI coding agents without waiting for slow tsc/eslint checks.

Herausgebertjx666
Repositoryvscode-mcp
SpracheTypeScript
Forks
18
Sterne
105
Verfügbare Tools
8
Transporttypstdio
Kategorien
Links
  • Tools mit KI-Workflows verbinden

    VSCode MCP stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 8 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    105 Sterne und 18 Forks im verlinkten Repository.

VSCode MCP

MCP Badge CI PRs Welcome Github Open Issues LICENSE

Overview

VSCode MCP is a comprehensive monorepo solution that enables MCP (Model Context Protocol) clients to access rich VSCode context information in real-time. This project bridges the gap between AI assistants and your development environment, providing accurate code analysis, diagnostics, and intelligent code navigation.

Design Motivation

VSCode MCP Bridge primarily serves AI IDEs (like Cursor) and AI coding agents, helping them develop and analyze code more efficiently.

Traditional AI coding agents often need to execute time-consuming commands when validating code modifications:

  • tsc --noEmit - TypeScript type checking
  • eslint . - Code style checking
  • npm run build - Project building

These commands run slowly in large projects, severely impacting AI development efficiency. VSCode MCP Bridge provides real-time LSP (Language Server Protocol) information, allowing AI agents to:

  • Get fast diagnostics (get-diagnostics) - Replace time-consuming type checking and lint commands
  • Access comprehensive LSP information (get-symbol-lsp-info) - Get definition, hover, signatures, and type info in one call
  • Navigate code efficiently (get-references) - Understand code structure and dependencies with usage context
  • Safe file operations - Rename symbols across files with automatic import updates

Core Advantages

  1. Real-time: Leverage VSCode's LSP for real-time code state without executing slow commands
  2. Accuracy: Precise analysis based on language servers, more reliable than static analysis
  3. Efficiency: Significantly reduce AI coding agent wait times
  4. Integration: Deep integration with VSCode ecosystem, supporting multiple languages and extensions

Available Tools

VSCode MCP provides the following tools through the MCP protocol:

ToolDescription
execute_command⚠️ Execute VSCode commands with JSON string arguments
get_symbol_lsp_infoGet comprehensive LSP info (definition, hover, signatures, etc.)
get_diagnosticsGet real-time diagnostics, replace slow tsc/eslint
get_referencesFind symbol references with usage context code
health_checkTest connection to VSCode MCP Bridge extension
list_workspacesList all available VSCode workspaces
open_filesOpen multiple files with optional editor display
rename_symbolRename symbols across all files in workspace

⚠️ Security Warning: The execute_command tool can execute arbitrary VSCode commands and potentially trigger dangerous operations. Use with extreme caution and only with trusted AI models.

Installation

🚨 IMPORTANT: Before installing the MCP server, you must first install the VSCode MCP Bridge extension in your VSCode instance. The extension is required for the MCP server to communicate with VSCode.

Step 1: Install VSCode Extension

Install the VSCode MCP Bridge extension using ID: YuTengjing.vscode-mcp-bridge

Install VSCode Extension

Or search for "VSCode MCP Bridge" in the VSCode Extensions marketplace.

Step 2: Install MCP Server

Codex

Add the following configuration to your ~/.codex/config.toml:

toml
[mcp_servers.vscode-mcp]
command = "bunx"
args = ["-y", "@vscode-mcp/vscode-mcp-server@latest"]
env = { "VSCODE_MCP_DISABLED_TOOLS" = "health_check,list_workspaces,open_files" }
startup_timeout_ms = 16_000

Claude Code

Claude Code (claude.ai/code) provides built-in MCP support. Simply run:

bash
claude mcp add vscode-mcp -- npx -y @vscode-mcp/vscode-mcp-server@latest

This command will automatically configure the MCP server in your Claude Code environment.

Cursor

Click the button to install

Install MCP Server

Or install manually

Go to Cursor Settings -> Tools & Integrations -> New MCP Server. Name to your liking, use command type with the command npx @vscode-mcp/vscode-mcp-server@latest. You can also verify config or add command line arguments via clicking Edit.

json
{
  "mcpServers": {
    "vscode-mcp": {
      "command": "npx",
      "args": ["@vscode-mcp/vscode-mcp-server@latest"]
    }
  }
}

Gemini CLI

Add the following configuration to your ~/.gemini/settings.json:

json
{
  "mcpServers": {
    "vscode-mcp": {
      "command": "npx",
      "args": ["-y", "@vscode-mcp/vscode-mcp-server@latest"],
      "env": {},
      "includeTools": [
        "get_symbol_lsp_info",
        "get_diagnostics",
        "get_references",
        "health_check",
        "rename_symbol"
      ]
    }
  }
}

CLI (no MCP config required)

If your agent can shell out but you don't want to register an MCP server, install @vscode-mcp/vscode-mcp-cli. It exposes the same tools as the MCP server as plain subcommands, talking to the VSCode Bridge extension over the same socket.

bash
# Run directly without install
bunx --bun @vscode-mcp/vscode-mcp-cli --help

# Or install globally
npm i -g @vscode-mcp/vscode-mcp-cli
vscode-cli --help

Subcommands

One subcommand per MCP tool, kebab-case:

vscode-cli get-diagnostics      # real-time LSP diagnostics
vscode-cli get-symbol-lsp-info  # hover / signatures / definitions
vscode-cli get-references       # references with usage context
vscode-cli rename-symbol        # workspace-wide rename
vscode-cli open-files           # open one or more files
vscode-cli execute-command      # ⚠️ run arbitrary VSCode commands
vscode-cli health-check         # ping the bridge
vscode-cli list-workspaces      # enumerate open VSCode windows

Workspace targeting

CLI defaults --workspace to process.cwd(). Override with --workspace <path> when you need to target a different open VSCode window (must match a workspace from list-workspaces).

Examples

bash
# Diagnostics on git-modified files in the current workspace
vscode-cli get-diagnostics

# Find references to `myFunction` in src/utils.ts at line 42
vscode-cli get-references --file-path src/utils.ts --line 42 --character 10

# Open multiple files in background (no editor focus)
vscode-cli open-files --files src/a.ts src/b.ts --no-show-editor

# Target a different VSCode window
vscode-cli get-diagnostics --workspace /Users/me/other-project

The text output is byte-identical to what the MCP server returns — every flag is auto-generated from the IPC zod schema, so anything the MCP tool accepts has a --kebab-case flag here.

Tool Filtering

You can control which tools are available using command-line arguments or environment variables:

Command-line arguments:

  • --enable-tools - Comma-separated list of tools to enable (whitelist mode). If specified, only these tools will be available.
  • --disable-tools - Comma-separated list of tools to disable (blacklist mode). Applied after --enable-tools.

Environment variables:

  • VSCODE_MCP_ENABLED_TOOLS - Same as --enable-tools
  • VSCODE_MCP_DISABLED_TOOLS - Same as --disable-tools

Architecture

Once installed and configured, VSCode MCP works seamlessly with MCP-compatible clients:

  1. VSCode Extension: Runs in your VSCode instance and provides access to LSP data
  2. MCP Server / CLI: Translates MCP calls (or CLI subcommands) to VSCode extension requests over a per-workspace Unix socket

All tools require the workspace_path parameter to target a specific open VSCode instance. This must be the workspace folder reported by list_workspaces or the extension activation log, because each VSCode workspace gets its own socket connection. If you need diagnostics for files inside a child project or git submodule, keep workspace_path set to the open VSCode workspace root and pass child paths as tool-specific file parameters.

License

This project is licensed under the Anti 996 License.

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "tjx666-vscode-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "vscode-mcp"
      ]
    }
  }
}

Verfügbare Tools

  • health_check

    Test connection to VSCode MCP Bridge extension. Troubleshoot when other VSCode MCP tools return connection errors or timeouts

  • get_diagnostics

    Get diagnostic information from vscode language servers.

    Ideal quality-check tool for AI coding agents, much faster than 'tsc --noEmit' and 'eslint .'

    Parameter Examples:

    • Check modified files: filePaths: [] (auto-detects git changes)
    • Filter ESLint errors only: sources: ['eslint'], severities: ['error']

    Return Format: Structured diagnostic results with severity levels, positions, and detailed error messages. Severity levels: 0=ERROR, 1=WARNING, 2=INFO, 3=HINT (matches VSCode DiagnosticSeverity enum)

    Note:

    • In most cases, leave filePaths parameter empty to auto-detect git modified files. Modifying one file often causes diagnostics in other related files.
  • get_symbol_lsp_info

    Retrieve comprehensive LSP information for a symbol, including type definitions, documentation, and usage details. Essential for fixing type errors and understanding symbol declarations. Typical use cases: - Fix TypeScript type checking errors - Extract function parameters and return types from symbols when encapsulating code blocks into functions - Obtain variable types from nearby code symbols when declaring variables or type assertions, avoiding the use of 'any'

  • get_references

    Find all reference locations of a symbol (variable, function, class, etc.) across the codebase

    Return Format: Array of reference locations with file paths and exact positions

  • execute_command

    Execute VSCode commands with arguments Common Use Cases:

    • Format code: 'editor.action.formatDocument' with args: '[]'
    • Open files: 'vscode.open' with args: '["file:///absolute/path/to/file.ts"]'
    • Save all files: 'workbench.action.files.saveAll' with args: '[]'
    • Auto-fix issues: 'editor.action.fixAll' with args: '[]'
    • Restart TypeScript: 'typescript.restartTsServer' with args: '[]'
    • Restart ESLint: 'eslint.restart' with args: '[]'

    Important Notes:

    • Commands and arguments may change with VSCode updates, it's recommended to search in the VSCode official repository to confirm the command and arguments are correct before use
    • Commands like 'reloadWindow', 'reloadExtensionHost' will interrupt conversation
    • ⚠️ WARNING: May cause irreversible changes, use with caution
  • open_files

    Open files in vscode

  • rename_symbol

    Rename a symbol with VSCode F2 ability

    Advantages over search and replace:

    • Faster
    • More accurate
    • Automatically updates imports and reference locations

    Important Notes:

    • Some symbols may not be renameable (e.g., built-in types, external libraries)
  • list_workspaces

    List all available VSCode workspaces that can be connected to use vscode mcp tools

    Return Format: Array of workspace objects with paths, names, status, and optional details. Includes summary statistics about discovered workspaces.

    Important Notes:

    • Active status means successfully connected and verified
    • Available status means socket exists but not tested

VSCode MCP MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald VSCode MCP verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

VSCode MCP als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für VSCode MCP ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "tjx666-vscode-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "vscode-mcp"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von VSCode MCP. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von VSCode MCP.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit VSCode MCP bei dieser Aufgabe helfen?
VSCode MCP
Gerne. Ich habe es gelesen.
Das habe ich mit VSCode MCP gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server VSCode MCP verwendet?

VSCode MCP ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich VSCode MCP MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie VSCode MCP mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum VSCode MCP MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald VSCode MCP verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich VSCode MCP MCP mit TypingMind?

VSCode MCP wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt VSCode MCP MCP in TypingMind bereit?

VSCode MCP stellt 8 MCP-Tools bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um VSCode MCP MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls VSCode MCP eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇