VSCode as MCP Server
A VSCode extension that turns your running VS Code instance into an MCP server, giving external AI agents (Claude Desktop, Claude Code, and others) direct access to VS Code's editing, navigation, and debugging capabilities. Supports reviewing code changes through diffs, real-time diagnostic streaming (type errors, lint warnings), terminal command execution, URL preview in the built-in browser, debug session management, and multi-window instance switching. Also relays built-in MCP servers introduced in VS Code 1.99, including GitHub Copilot tools.
Connect
Add this configuration to .claude/mcp.json
{
"mcpServers": {
"vscode": {
"command": "npx",
"args": [
"-y",
"vscode-as-mcp-server"
]
}
}
}Tools (8)
text_editor
View, create, replace, insert, or undo file operations directly in the active VS Code workspace. Changes are shown as diffs for user review.
{
"type": "object",
"required": [
"command",
"path"
],
"properties": {
"path": {
"type": "string",
"description": "File path relative to the workspace root"
},
"command": {
"type": "string",
"description": "Operation to perform (view, create, str_replace, insert, undo_edit)"
},
"new_str": {
"type": "string",
"description": "Replacement string (for str_replace command)"
},
"old_str": {
"type": "string",
"description": "String to replace (for str_replace command)"
}
}
}code_checker
Retrieve current diagnostics (errors, warnings, hints) for files in the workspace as reported by VS Code's language servers.
{
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Optional file path to scope diagnostics to a specific file"
}
}
}execute_command
Execute a shell command in VS Code's integrated terminal. Supports foreground and background execution with configurable timeout.
{
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"type": "string",
"description": "Shell command to execute"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds (default 30)"
},
"background": {
"type": "boolean",
"description": "Run in background without waiting for completion"
}
}
}list_directory
List the contents of a directory in the workspace as a tree structure.
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string",
"description": "Directory path relative to workspace root"
}
}
}focus_editor
Open and focus a specific file at a given line and column in the VS Code editor.
{
"type": "object",
"required": [
"path"
],
"properties": {
"line": {
"type": "integer",
"description": "Line number to scroll to (1-indexed)"
},
"path": {
"type": "string",
"description": "File path to open"
},
"column": {
"type": "integer",
"description": "Column number"
}
}
}preview_url
Open a URL in VS Code's built-in browser preview panel. Useful for previewing local dev servers after starting them.
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "URL to preview (e.g. http://localhost:5173)"
}
}
}start_debug_session
Start a VS Code debug session using a named launch configuration defined in .vscode/launch.json.
{
"type": "object",
"required": [
"configName"
],
"properties": {
"configName": {
"type": "string",
"description": "Name of the launch configuration to start"
}
}
}get_terminal_output
Fetch the current output from a specific VS Code integrated terminal.
{
"type": "object",
"properties": {
"terminalName": {
"type": "string",
"description": "Terminal name or index"
}
}
}Resources
This server does not expose any resources.
Prompts
This server does not expose any prompts.
Server Information
- Author
- acomagu (@acomagu)
- License
- MIT
- Version
- 0.9.0
- Stars
- 640
- Last Updated
- May 31, 2026