VSCode as MCP Server
acomagu/vscode-as-mcp-server · 124 stars · TypeScript
MCP server Expose VSCode features such as file viewing and editing as MCP, enabling advanced AI-assisted coding directly from tools like Claude Desktop
Install
The repo has no one-line install. Follow its README.
Files
VSCode as MCP Server
A VSCode extension that turns your VSCode into an MCP server, enabling advanced coding assistance from MCP clients like Claude Desktop.
Key Features
Code Editing Support
- Review proposed code changes from an LLM through diffs, allowing you to accept, reject, or provide feedback.
- Real-time diagnostic messages (e.g., type errors) sent instantly to the LLM for immediate corrections.
Terminal Operations
- Execute commands within VSCode’s integrated terminal (supports background/foreground execution, and timeout settings).
Preview Tools
- Preview URLs directly within VSCode’s built-in browser (e.g., automatically opens browser preview after starting a Vite server).
Multi-instance Switching
- Easily switch the MCP server between multiple open VSCode windows.(Just by clicking the status bar item)
Relay Functionality (Experimental)
- Relay and expose built-in MCP servers introduced in VSCode 1.99 externally.
- Allows external access to tools provided by other MCP extensions, such as GitHub Copilot.
Available Built-in Tools
- execute_command: Execute commands in VSCode’s integrated terminal
- code_checker: Retrieve current diagnostics for your code
- focus_editor: Focus specific locations within files
- list_debug_sessions / start_debug_session / restart_debug_session / stop_debug_session: Manage debug sessions
- text_editor: File operations (view, replace, create, insert, undo)
- list_directory: List directory contents in a tree format
- get_terminal_output: Fetch output from a specified terminal
- list_vscode_commands / execute_vscode_command: List and execute arbitrary VSCode commands
- preview_url: Open URLs within VSCode’s integrated browser
Installation & Setup
-
Install the extension from the VSCode Marketplace.
-
Configure your MCP client:
- Using mcp-installer: You can simply instruct it to "install the vscode-as-mcp-server MCP server".
- Other clients like Claude Desktop: Add the following to your configuration file (
claude_desktop_config.json):
{ "mcpServers": { "vscode": { "command": "npx", "args": ["vscode-as-mcp-server"] } } } -
Check the MCP server status in the bottom-right VSCode status bar:
- (Server icon): Server is running
- ∅: Click to start the server
Motivation
This extension was developed to mitigate high costs associated with metered coding tools (like Roo Code and Cursor). It's an affordable, self-hosted alternative built directly into VSCode.
Bug reports and feedback are very welcome! 🙇
Future Roadmap
- Ability to select which built-in MCP servers to expose
- WebView-based approval UI (similar to Roo Code)
- Integration with VSCode's file history (Timeline)
- Instant toggling of auto-approvals and tool activation/deactivation
- Customizable server port configuration
Facts
- Kind
- MCP server
- Group
- Uncategorized
- Stars
- 124
- Language
- TypeScript
- Last push
- 2025-10-18
- Forks
- 29
- 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
- 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
- 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
- 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
- 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k