VSCode Internal Command MCP
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
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
Maintainer
Works with
Installation
Manual Installation
npx vscode-internal-command-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 installBuild the extension
Compile the TypeScript source into the VS Code extension bundle.
npm run compileLaunch 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.
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.
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.
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.
VSCode Internal Command MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to VSCode Internal Command MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up VSCode Internal Command MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.