Logo vun VSCode MCP

VSCode MCP

Communautéit
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.

Editeurtjx666
Repositoryvscode-mcp
SproochTypeScript
Forks
18
Stären
105
Disponibel Tools
8
Transporttypstdio
Kategorien
Linken
  • Tools mat KI-Workflows verbannen

    VSCode MCP stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 8 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    105 Stären an 18 Forks aus dem verlinkte 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.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

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

Disponibel 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 mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal VSCode MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

VSCode MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu VSCode MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "tjx666-vscode-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "vscode-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu VSCode MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu VSCode MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat VSCode MCP?
VSCode MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat VSCode MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server VSCode MCP benotzt?

VSCode MCP ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech VSCode MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir VSCode MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat VSCode MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann VSCode MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech VSCode MCP MCP mat TypingMind?

VSCode MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt VSCode MCP MCP an TypingMind zur Verfügung?

VSCode MCP stellt 8 MCP-Tools zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir VSCode MCP MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann VSCode MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇