VSCode MCP logo

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.

Publishertjx666
Repositoryvscode-mcp
LanguageTypeScript
Forks
18
Stars
105
Available tools
8
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    VSCode MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 8 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    105 stars and 18 forks from the linked 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
Prerequisites:

Node.js 18+

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

Available 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

Use VSCode MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once VSCode MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add VSCode MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the VSCode MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "tjx666-vscode-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "vscode-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the VSCode MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the VSCode MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use VSCode MCP to help me with this task?
VSCode MCP
Sure. I read it.
Here is what I found using VSCode MCP.

Frequently asked questions

What is the VSCode MCP MCP server used for?

VSCode MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use VSCode MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use VSCode MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use VSCode MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With VSCode MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect VSCode MCP MCP to TypingMind?

VSCode MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does VSCode MCP MCP provide in TypingMind?

VSCode MCP exposes 8 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use VSCode MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If VSCode MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇