vscode-context
MCP Server to Connect with VS Code IDE
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:
-
Clone or download the repository: git clone https://github.com/vilasone455/vscode-context-mcp cd vscode-context-mcp
-
Install dependencies: npm install
-
Build the project: npm run build
-
Run the MCP server (example): npm start
-
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
Remote
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
boilerplate
TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.
mobile
A Model Context Protocol (MCP) server that provides mobile automation capabilities.
mcp-tasks
A comprehensive and efficient MCP server for task management with multi-format support (Markdown, JSON, YAML)
MCPNotes
A simple note-taking MCP server for recording and managing notes with AI models.
asterisk
Asterisk Model Context Protocol (MCP) server.