MCP Server for VS Code
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Server for VS CodeFind all references to the function 'calculate'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for VS Code
A VS Code extension that provides a Model Context Protocol (MCP) server, enabling AI assistants to interact with your VS Code environment for language intelligence, debugging, and code execution.
Features
Language Intelligence: Access VS Code's language server features including:
Go to definition
Find references
Diagnostics (errors and warnings)
Symbol search
Call hierarchy
Debugging Support: Control VS Code's debugger programmatically:
Start/stop debug sessions
Set and manage breakpoints
Step through code (into/over/out)
Inspect variables and call stacks
Evaluate expressions in debug context
Related MCP server: DebugMCP
Installation
Alpha Testing
Step 1: Install VS Code Extension
Download the .vsix file from Releases and install:
In VS Code: Extensions →
...menu → Install from VSIXOr via command line:
code --install-extension mcp-server-vscode-*.vsix
Step 2: Configure Claude Desktop
The MCP server runs directly from GitHub using npx. Add this to your Claude config:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"vscode": {
"command": "npx",
"args": ["github:malvex/mcp-server-vscode"]
}
}
}Step 3: Restart Claude Desktop
That's it! The VS Code tools are now available in Claude.
Configure Claude Code (CLI)
For Claude Code users, run this one-liner:
claude mcp add-json vscode '{"type":"stdio","command":"npx","args":["github:malvex/mcp-server-vscode"]}' -s userUsage
Once installed, the extension shows the MCP server status in the VS Code status bar (bottom right).
To start the MCP server: Click on "VS Code MCP: Stopped" in the status bar. It will change to "VS Code MCP: 8991" when running.
The status bar indicates:
VS Code MCP: 8991 - Server is running on port 8991
VS Code MCP: Stopped - Server is not running
Click the status bar item to toggle the server on/off.
How It Works
┌─────────────┐ stdio ┌──────────────────┐ HTTP ┌─────────────┐
│ Claude │ ◄────────────► │ MCP Standalone │ ◄───────────► │ VS Code │
│ Desktop │ │ Server │ :8991 │ Extension │
└─────────────┘ └──────────────────┘ └─────────────┘VS Code Extension provides an HTTP API on port 8991
MCP Standalone Server acts as a bridge, converting stdio ↔ HTTP
Claude Desktop communicates with the standalone server via stdio
Troubleshooting
If Claude can't connect to VS Code:
Check VS Code is running with the extension active
Check the status bar shows "VS Code MCP: 8991"
Test the MCP server: Run
npx github:malvex/mcp-server-vscodein terminalCheck firewall isn't blocking localhost:8991
Try manually starting the MCP server in VS Code (Cmd/Ctrl+Shift+P → "Start MCP Server")
Available Tools
The extension provides 25 tools organized into three main categories:
Language Intelligence Tools (7 tools)
Tool | Description | Main Parameters | Example |
hover | Get hover information (type info, documentation) for a symbol by name |
|
|
definition | Find where a symbol is defined. Instantly jumps to declarations |
|
|
references | Find all references to a symbol. Superior to grep - finds semantic references |
|
|
callHierarchy | Analyze what calls a function or what a function calls |
|
|
symbolSearch | Search for symbols (classes, functions, variables) across the workspace |
|
|
workspaceSymbols | Get a complete map of all symbols in the workspace |
|
|
diagnostics | Get all errors and warnings for a file or workspace |
|
|
Refactoring Tools (1 tool)
Tool | Description | Main Parameters | Example |
refactor_rename | Rename a symbol across all files. Automatically updates all references and imports |
|
|
Debug Tools (17 tools)
Breakpoint Management
Tool | Description | Main Parameters | Example |
debug_setBreakpoint | Set breakpoints by symbol name or file/line with optional conditions |
|
|
debug_toggleBreakpoint | Toggle a breakpoint on/off at a specific location |
|
|
debug_listBreakpoints | List all breakpoints in the workspace |
|
|
debug_clearBreakpoints | Clear all breakpoints from the workspace |
|
|
Session Management
Tool | Description | Main Parameters | Example |
debug_status | Get current debug session status and active threads |
|
|
debug_listConfigurations | List available debug configurations from launch.json |
|
|
debug_startSession | Start a debug session using a configuration |
|
|
debug_stopSession | Stop the active debug session |
|
|
Runtime Control
Tool | Description | Main Parameters | Example |
debug_pauseExecution | Pause the running program |
|
|
debug_continueExecution | Continue execution from current breakpoint |
|
|
debug_stepOver | Step over the current line of code |
|
|
debug_stepInto | Step into the function call at current line |
|
|
debug_stepOut | Step out of the current function |
|
|
Inspection and Evaluation
Tool | Description | Main Parameters | Example |
debug_getCallStack | Get the current call stack with source locations |
|
|
debug_inspectVariables | Inspect variables in the current scope during debugging |
|
|
debug_evaluateExpression | Evaluate an expression in the debug context |
|
|
debug_getOutput | Get debug console output |
|
|
Tool Features
All tools support:
Compact format - Optimized for AI token efficiency
Detailed format - Full data for complex analysis
Symbol-based navigation - Work with names instead of file/line numbers
Workspace-wide operations - Not limited to single files
Language server integration - Accurate semantic understanding
Usage Examples for AI Assistants
When connected via MCP, AI assistants can use these tools to help users with development tasks:
Finding and Understanding Code
User: "What does the handleRequest function do?"
AI uses: hover({ symbol: "handleRequest" })
→ Gets type signature and documentation without reading entire files
User: "Where is the DatabaseConnection class defined?"
AI uses: definition({ symbol: "DatabaseConnection" })
→ Instantly finds the file and line where it's declared
User: "Show me all places where processPayment is called"
AI uses: callHierarchy({ symbol: "processPayment", direction: "incoming" })
→ Gets complete list of callers with their locationsRefactoring
User: "Rename the oldMethodName method to newMethodName everywhere"
AI uses: refactor_rename({ symbol: "oldMethodName", newName: "newMethodName" })
→ Safely renames across all files, updating imports and referencesDebugging
User: "Help me debug why the server crashes"
AI uses: debug_listConfigurations({})
→ Shows available debug configurations
AI uses: debug_startSession({ configuration: "Debug Server" })
→ Starts the debug session
User: "Set a breakpoint where errors are handled"
AI uses: debug_setBreakpoint({ symbol: "handleError" })
→ Sets breakpoint on the function
User: "What's the value of the user object here?"
AI uses: debug_inspectVariables({ scope: "locals", filter: "user" })
→ Shows current value of user variable in debug context
User: "Why is this condition true?"
AI uses: debug_evaluateExpression({ expression: "users.length > 0 && isActive" })
→ Evaluates the expression in current debug scopeDevelopment
Building from Source
# Clone the repository
git clone https://github.com/malvex/mcp-server-vscode.git
cd mcp-server-vscode
# Install dependencies
npm install
# Build everything
npm run compile
npm run package
# Package the VS Code extension
npx vsce packageTesting Local Changes
To test your local development version:
VS Code Extension: Press F5 in VS Code to launch Extension Development Host
MCP Server: Update Claude config to use local path:
{
"mcpServers": {
"vscode": {
"command": "node",
"args": ["/path/to/mcp-server-vscode/out/mcp/standalone-server.js"]
}
}
}License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Live browser debugging for AI assistants — DOM, console, network via MCP.
AI-powered intelligence for your development workflow via Indicate.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to leverage VS Code's language intelligence for code navigation, refactoring, and analysis via the MCP protocol.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to debug code inside VS Code by setting breakpoints, stepping through execution, inspecting variables, and evaluating expressions across multiple languages.501MIT
- FlicenseAqualityDmaintenanceEnables AI agents to control VSCode workspaces, including file operations, terminal commands, search, and workspace management.7-

Debugger MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents like Claude to control VS Code's debugger, supporting any language with a Debug Adapter Protocol implementation.2MIT