Click on "Install 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., "@VS Code Settings MCP Serverchange my editor font size to 14 and enable auto-save"
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.
VS Code Settings MCP Server
A powerful MCP (Model Context Protocol) server that enables programmatic management of Visual Studio Code settings through AI assistants and automated tools.
๐ Overview
This MCP server bridges the gap between AI assistants and VS Code configuration management. It allows AI models to read, modify, and manage VS Code settings across different scopes (user/workspace) with full cross-platform support.
Why This Server?
AI-Driven Configuration: Let AI assistants help optimize your VS Code setup
Automated Workflows: Integrate VS Code settings management into CI/CD pipelines
Cross-Platform Consistency: Maintain consistent settings across different operating systems
Workspace Management: Easily synchronize project-specific configurations
โจ Features
Core Functionality
๐ง Update VS Code Settings: Modify user or workspace settings programmatically
๐ Read VS Code Settings: Retrieve current setting values or complete configuration
๐ List Common Settings: Built-in reference guide for frequently used VS Code settings
๐ Cross-Platform Support: Seamless operation on Windows, macOS, and Linux
๐ก๏ธ Error Handling: Comprehensive validation and error reporting
๐ Smart Path Resolution: Automatic detection of VS Code settings locations
Developer Experience
๐ฏ TypeScript Support: Full type safety and IntelliSense support
๐ ESLint & Prettier: Code quality and formatting enforcement
๐๏ธ Modern Architecture: Built with latest ES modules and async/await patterns
๐ฆ Zero Configuration: Works out of the box with sensible defaults
๐ฆ Installation
Prerequisites
Node.js 18+
npm or yarn
Visual Studio Code
Setup
๐ ๏ธ Development
Available Scripts
Project Structure
๐ง MCP Tools
update_vscode_setting
Updates a VS Code setting with a new value.
Parameters:
setting(string): The setting key (e.g., "editor.fontSize")value(any): The value to set (string, number, boolean, object, array)scope("user" | "workspace"): Target scope (default: "user")
Example Response:
get_vscode_setting
Retrieves VS Code settings.
Parameters:
setting(string, optional): Specific setting key, or omit for all settingsscope("user" | "workspace"): Source scope (default: "user")
Example Response:
list_common_settings
Lists commonly used VS Code settings with descriptions.
No Parameters Required
Returns: Reference guide organized by category (Editor, Workbench, Files, Terminal)
๐ก Usage Examples
Basic Setting Updates
Reading Settings
Complex Configurations
๐ Settings Locations
The server automatically detects VS Code settings locations based on your operating system:
User Settings
macOS:
~/Library/Application Support/Code/User/settings.jsonWindows:
%APPDATA%/Code/User/settings.jsonLinux:
~/.config/Code/User/settings.json
Workspace Settings
All Platforms:
.vscode/settings.json(relative to current working directory)
๐ก๏ธ Error Handling & Validation
The server provides comprehensive error handling for common scenarios:
Input Validation
Empty or invalid setting names
Unsupported setting scopes
Malformed JSON values
File System Errors
Missing settings files (automatically created)
Permission denied errors
Disk space issues
Invalid JSON parsing
Platform Compatibility
Unsupported operating systems
Missing VS Code installations
Path resolution failures
Example Error Response:
๐ Quick Start
Installation Methods
Option 1: Local Installation (Recommended)
Prerequisites:
Node.js 18 or higher
npm or yarn
Visual Studio Code installed
Setup:
Option 2: Use with npx (Recommended for Published Package)
When the package is published to npm, you can use it directly with npx without installation:
Configuration
Claude Desktop
Add this configuration to your Claude Desktop config file:
Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
For published package (recommended):
For local development:
VS Code with MCP Extension
If using an MCP-compatible extension in VS Code:
For published package:
For local development:
Other MCP Clients
Any MCP-compatible client can connect using stdio transport:
For published package:
For local development:
Environment Variables
The server supports these optional environment variables:
๐ฏ Usage
Once configured, you can interact with VS Code settings through your MCP client:
Basic Commands
Advanced Usage
๐งช Testing and Troubleshooting
Direct Server Testing
Test the server directly without an MCP client:
For published package:
For local development:
Testing with Claude Desktop
After integration, test these commands in Claude Desktop:
Common Settings to Test
editor.fontSize: Number value (e.g., 12, 14, 16)workbench.colorTheme: String value (e.g., "Dark+ (default dark)")editor.minimap.enabled: Boolean value (true/false)files.exclude: Object value (e.g., {"node_modules": true})editor.rulers: Array value (e.g., [80, 120])editor.wordWrap: String value ("on", "off", "wordWrapColumn")
Troubleshooting
Server Not Responding
Verify the server builds successfully:
npm run buildCheck the absolute path in your MCP configuration
Ensure Node.js version is 18 or higher:
node --versionTest direct server communication with the commands above
Settings Not Updating
Verify VS Code is not running (close all instances)
Check file permissions for VS Code settings directories
Ensure the setting key is valid (use
list_common_settingstool)Verify JSON syntax in complex setting values
Path Issues
macOS: Ensure path starts with
/Users/username/...Windows: Use forward slashes or escape backslashes in JSON
Linux: Ensure proper permissions for the home directory
Debug Mode
Run with additional logging:
๐ค Contributing
Development Setup
Fork the repository
Install dependencies:
npm installMake your changes in
src/Run tests:
npm run lint && npm run typecheckFormat code:
npm run formatBuild:
npm run build
Code Style
Follow existing TypeScript patterns
Use async/await for asynchronous operations
Include comprehensive error handling
Add JSDoc comments for public methods
Maintain cross-platform compatibility
๐ License
MIT License - see LICENSE file for details.
๐ Acknowledgments
Model Context Protocol - For the MCP specification
VS Code Team - For the excellent editor and settings system
TypeScript - For type safety and developer experience
Made with โค๏ธ for the VS Code and AI community