Get the FREE Ultimate OpenClaw Setup Guide →

vscode-context

MCP Server to Connect with VS Code IDE

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio vilasone455-vscode-context-mcp node dist/index.js

How to use

VSCode Context MCP provides a bridge between AI assistants and your VSCode workspace, exposing VSCode context, filesystem operations, and shell command execution in a controlled MCP server. The server lets AI models query the active project path, view open editors and their contents, access diagnostics, read and write files, navigate and modify the workspace, and run shell commands with output captured for analysis. It is designed to help AI assistants reason about your codebase with concrete context from your editor and filesystem, enabling more relevant suggestions and automated edits while maintaining a guarded execution environment.

To use it, install and run the MCP server locally, then configure your MCP-enabled assistant (e.g., Claude Desktop) to connect to the server using the provided Node entry point. The server exposes a set of tools under the get_/read_/write_ and run_command capabilities, such as get_project_path, read_file, write_file, edit_file, list_directory, directory_tree, and run_command. Your AI prompts can request specific operations (e.g., “read the active file and list its imports” or “execute ls -la in the project root”) and the server will perform these actions and return structured results.

How to install

Prerequisites:

  • Node.js (recommended LTS) installed on your machine
  • Git (optional, for cloning the repository)

Installation steps:

  1. Clone or download the repository: git clone https://github.com/vilasone455/vscode-context-mcp cd vscode-context-mcp

  2. Install dependencies: npm install

  3. Build the project: npm run build

  4. Run the MCP server (example): npm start

  5. Configure your MCP-enabled assistant (e.g., Claude Desktop) to connect to the server using the Node entry point: { "mcpServers": { "vscode-context-mcp": { "command": "node", "args": ["C:/path/to/vscode-context-mcp/dist/index.js"] } } }

Note: Update the path in args to match your actual build output location. If you encounter port or binding issues, ensure no other process is occupying the default MCP server port and that firewall rules permit local connections.

Additional notes

Tips and considerations:

  • This MCP server emphasizes context-aware operations within VSCode and filesystem access; exercise caution with write operations and shell command execution.
  • Review the available tool set under the Tool Reference in the README to understand what each command returns and how to structure prompts for best results.
  • If you plan to use multiple VSCode projects, consider extending the server to support multiple workspace roots or projects and be aware of potential context size limits.
  • Ensure proper permissions for file read/write operations, especially when running in restricted environments or containers.
  • When integrating with Claude or other assistants, use clear, explicit prompts about which project or workspace you want to operate on to avoid cross-workspace edits.

Related MCP Servers

Sponsor this space

Reach thousands of developers