This guide will help you install the updated vscode-mcp-server extension with the new apply_diff feature, replacing your existing installation.
- Node.js and npm installed
- VS Code installed
- Original vscode-mcp-server extension currently installed (will be replaced)
cd C:\Users\plafayette\workspace\github_projects\vscode-mcp-servernpm installnpm run compileThis compiles all TypeScript files in the src directory to JavaScript in the out directory.
npx vsce packageThis creates vscode-mcp-server-0.0.4.vsix in the project root.
✅ Expected Output:
DONE Packaged: C:\Users\plafayette\workspace\github_projects\vscode-mcp-server\vscode-mcp-server-0.0.4.vsix (6800 files, 13.62 MB)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "vscode-mcp-server"
- Click the gear icon next to the extension
- Select "Uninstall"
- Restart VS Code when prompted
Method 1: Using VS Code UI (Recommended)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Click the "..." menu in the Extensions view
- Select "Install from VSIX..."
- Navigate to:
C:\Users\plafayette\workspace\github_projects\vscode-mcp-server\ - Select:
vscode-mcp-server-0.0.4.vsix - Click "Install"
- Restart VS Code when prompted
Method 2: Using Command Line
cd C:\Users\plafayette\workspace\github_projects\vscode-mcp-server
code --install-extension vscode-mcp-server-0.0.4.vsix- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "vscode-mcp-server"
- Verify version shows "0.0.4"
- Check that it shows "Installed"
Navigate to the extension directory and create test files:
cd C:\Users\plafayette\workspace\github_projects\vscode-mcp-server
node out/test/integration-test-runner.js setupExpected Output:
🚀 Apply Diff Integration Test Runner
Setting up integration test files...
Created: simple.ts
Created: whitespace.js
Created: multiple.ts
Test files created in: C:\Users\plafayette\workspace\github_projects\vscode-mcp-server\integration-test-files
- Open VS Code
- File → Open Folder
- Select:
C:\Users\plafayette\workspace\github_projects\vscode-mcp-server - Verify you can see:
integration-test-files/foldersimple.ts,whitespace.js,multiple.tsfiles
- Open Command Palette (Ctrl+Shift+P)
- Type: "MCP Server"
- Select: "Toggle MCP Server" or check status bar
- Verify server starts (status bar should show server info)
The new extension should register these tools:
create_file_codereplace_lines_codeapply_diff← New tool!
You can verify this by checking your MCP client's available tools list.
Try this simple test with your MCP client:
Test Command:
{
"tool": "apply_diff",
"arguments": {
"filePath": "integration-test-files/simple.ts",
"diffs": [{
"startLine": 1,
"endLine": 1,
"originalContent": " private result: number = 0;",
"newContent": " private result: number = 100;",
"description": "Change initial value to 100"
}],
"description": "Test apply_diff installation"
}
}Expected Behavior:
- VS Code diff viewer opens
- Shows change from
= 0;to= 100; - User approval dialog appears
- Change applies when approved
Get complete test scenarios:
cd C:\Users\plafayette\workspace\github_projects\vscode-mcp-server
node out/test/integration-test-runner.js scenariosThis will output all test commands you can use with your MCP client.
Create performance test files:
node out/test/integration-test-runner.js performance- Check VS Code version: Must be 1.99.0 or higher
- Restart VS Code: Close completely and reopen
- Check file path: Ensure VSIX file exists in correct location
- Check extension status: Look for errors in VS Code output panel
- Verify port configuration: Check MCP Server settings
- Restart extension: Disable and re-enable the extension
- Verify extension version: Should be 0.0.4
- Check MCP connection: Ensure client is connected to server
- Review server logs: Look for tool registration messages
- Check file paths: Use relative paths from workspace root
- Verify file contents: Ensure original content matches exactly
- Reset test files: Run setup command again
You'll know everything is working when:
✅ Extension installed: Version 0.0.4 shows in Extensions view
✅ MCP server running: Status bar shows server information
✅ Apply_diff available: Tool appears in your MCP client
✅ Test files created: integration-test-files folder exists
✅ Basic test works: Simple diff command opens VS Code diff viewer
- Original extension uninstalled
- New extension (v0.0.4) installed
- VS Code restarted
- MCP server running
- Test files created
- Workspace opened in VS Code
- Basic apply_diff test works
🎉 New apply_diff Tool Features:
- Multiple diff sections in single operation
- Fuzzy matching handles whitespace differences
- Content drift detection finds moved content
- Conflict detection prevents overlapping changes
- VS Code integration with diff preview and user approval
- Atomic changes - all or nothing application
- Comprehensive error handling with helpful messages
Once installed and verified:
- Try all test scenarios from the integration test runner
- Test with real files in your projects
- Experiment with fuzzy matching by creating files with different whitespace
- Test error conditions to see helpful error messages
- Use in production for complex code changes
🚀 You're now ready to use the powerful new apply_diff functionality!
Need Help?
- Check
MANUAL_TESTING_GUIDE.mdfor detailed testing scenarios - Review
TESTING_COMPLETE_SUMMARY.mdfor feature overview - Look at
integration-test-files/for example usage