VSCode Internal Command MCP

v1.0.0Developer Toolsstable

Converts VSCode into an MCP server that enables external clients to remotely execute VSCode internal commands, query workspace information, and interact with the editor through HTTP streaming. Built on the FastMCP framework with security controls and

vscode-internal-command-mcp-servermcpai-integration
Share:
62
Stars
0
Downloads
0
Weekly
0/5

What is VSCode Internal Command MCP?

VSCode Internal Command MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to converts vscode into an mcp server that enables external clients to remotely execute vscode internal commands, query workspace information, and interact with the editor through http streaming. built o...

Converts VSCode into an MCP server that enables external clients to remotely execute VSCode internal commands, query workspace information, and interact with the editor through HTTP streaming. Built on the FastMCP framework with security controls and

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Converts VSCode into an MCP server that enables external cli

Use Cases

Execute VSCode internal commands remotely from AI clients.
Query workspace information and editor state via HTTP.
Control VSCode programmatically through MCP protocol.
bestK

Maintainer

LicenseNOASSERTION
Languagetypescript
Versionv1.0.0
UpdatedApr 28, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx vscode-internal-command-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use VSCode Internal Command MCP

VSCode Internal Command MCP Server converts a running VS Code instance into an MCP-accessible HTTP endpoint, allowing external AI clients to remotely execute VS Code internal commands, query workspace state, and control the editor programmatically. It is built on the FastMCP framework and exposes tools for listing commands, executing them with arguments, and retrieving workspace information. Developers use it to automate editor actions — formatting, refactoring, opening files, running extensions — from Claude or any MCP-compatible AI assistant without leaving their workflow.

Prerequisites

  • Visual Studio Code installed
  • Node.js and npm installed for building the extension
  • An MCP-compatible client (Claude Desktop, Cursor, or SDK-based client)
  • Git to clone the repository
  • Basic familiarity with VS Code extensions
1

Clone the repository and install dependencies

Download the extension source and install its Node.js dependencies before building.

git clone https://github.com/bestK/vscode-internal-command-mcp-server
cd vscode-internal-command-mcp-server
npm install
2

Build the extension

Compile the TypeScript source into the VS Code extension bundle.

npm run compile
3

Launch the extension in VS Code

Press F5 in VS Code to start the extension in a development host window, or package it as a .vsix file and install it via the Extensions panel for permanent use.

4

Configure VS Code extension settings

Open VS Code Settings and adjust the MCP server parameters. The default port is 8080 on localhost, auto-start is enabled, and 'allowedCommands' can be set to restrict which VS Code commands AI clients may invoke.

5

Connect an MCP client to the server

Point your MCP client at the running HTTP endpoint. The server listens at http://localhost:8080/mcp and exposes a health check at /health.

6

Execute VS Code commands via the MCP tools

Use the three exposed tools: 'list_vscode_commands' to see available commands, 'execute_vscode_command' to run one with optional arguments, and 'get_workspace_info' to read workspace name, folders, and the active editor path.

VSCode Internal Command MCP Examples

Client configuration

Configure Claude Desktop or Cursor to connect to the VSCode MCP server running on localhost:8080.

{
  "mcpServers": {
    "vscode-internal-command": {
      "command": "node",
      "args": ["http://localhost:8080/mcp"],
      "type": "streamable-http"
    }
  }
}

Prompts to try

Once connected, instruct Claude to control VS Code directly through natural language commands.

- "Format the currently open document in VS Code"
- "List all available VS Code commands related to Git"
- "What files are open in the current workspace?"
- "Run the 'editor.action.organizeImports' command on the active file"

Troubleshooting VSCode Internal Command MCP

The MCP client cannot connect to localhost:8080

Confirm the VS Code extension is active and running — check the Output panel in VS Code for any startup errors. Verify no firewall or other process is blocking port 8080. Try the health check endpoint: curl http://localhost:8080/health

execute_vscode_command returns 'command not allowed'

The 'allowedCommands' setting in VS Code may be restricting the command. Either add the command to the whitelist in settings, or set allowedCommands to an empty array to permit all commands.

Extension fails to compile with TypeScript errors

Ensure you are using a compatible Node.js version (16+). Run 'npm install' again to make sure all devDependencies including the TypeScript compiler are present, then retry 'npm run compile'.

Frequently Asked Questions about VSCode Internal Command MCP

What is VSCode Internal Command MCP?

VSCode Internal Command MCP is a Model Context Protocol (MCP) server that converts vscode into an mcp server that enables external clients to remotely execute vscode internal commands, query workspace information, and interact with the editor through http streaming. built on the fastmcp framework with security controls and It connects AI assistants to external tools and data sources through a standardized interface.

How do I install VSCode Internal Command MCP?

Follow the installation instructions on the VSCode Internal Command MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with VSCode Internal Command MCP?

VSCode Internal Command MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is VSCode Internal Command MCP free to use?

Yes, VSCode Internal Command MCP is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use VSCode Internal Command MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides