Skip to content

A Visual Studio Code extension that exposes an MCP (Model Context Protocol) server, giving AI tools like Claude, Cursor, and others direct access to VS Code's semantic code understanding capabilities - go-to-definition, find references, completions, diagnostics, and so much more!

License

Notifications You must be signed in to change notification settings

CodingWithCalvin/VSC-MCPServer

πŸ”Œ VSC as MCP

πŸš€ Supercharge your AI coding assistants with VS Code's powerful language intelligence!

A Visual Studio Code extension that exposes an MCP (Model Context Protocol) server, giving AI tools like Claude, Cursor, and others direct access to VS Code's semantic code understanding capabilities - go-to-definition, find references, completions, diagnostics, and so much more!


License Build Status

VS Marketplace Version VS Marketplace Installs VS Marketplace Downloads VS Marketplace Rating


✨ Features

  • 🧠 Full Language Intelligence - Access VS Code's language server features via MCP tools
  • πŸ“ Workspace Aware - Works on individual files or full project contexts
  • πŸ”— URI Protocol Handler - Launch VS Code via vscode://codingwithcalvin.mcp/...
  • ⚑ Auto-start - MCP server starts automatically when VS Code launches
  • πŸ”’ Secure by Default - Binds only to localhost, no external access

πŸ› οΈ Available Tools

Tool Description
πŸ“‚ vscode_open_folder Open a workspace folder
πŸ“‹ vscode_get_open_folders Get currently open workspace folder(s)
🏷️ vscode_document_symbols Get all symbols in a document
πŸ” vscode_workspace_symbols Search symbols across the workspace
🎯 vscode_go_to_definition Find symbol definitions
πŸ”— vscode_find_references Find all references to a symbol
πŸ’‘ vscode_hover_info Get type info and documentation
⚠️ vscode_diagnostics Get errors and warnings
πŸ“ž vscode_call_hierarchy Get incoming/outgoing calls
✏️ vscode_completions Get code completions at a position
πŸ“ vscode_signature_help Get function signature help
πŸ—οΈ vscode_type_hierarchy Get type hierarchy information
πŸ”§ vscode_code_actions Get available code actions/quick fixes
🎨 vscode_format_document Format an entire document
βœ‚οΈ vscode_format_range Format a specific range
πŸ“¦ vscode_organize_imports Organize imports in a document
✏️ vscode_rename_symbol Rename a symbol across the workspace
πŸ”Ž vscode_workspace_file_search Search for files by pattern
πŸ“„ vscode_workspace_text_search Search for text across files

πŸ“¦ Installation

From VS Code Marketplace

VS Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "VSC as MCP"
  4. Click Install

Manual Installation

Download the latest .vsix from the Releases page:

code --install-extension CodingWithCalvin.VSC-MCPServer.vsix

🎯 Usage

The MCP server starts automatically when VS Code launches! Just configure your AI tool to connect:

MCP Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "vscode": {
      "url": "http://localhost:4000/mcp",
      "description": "VS Code semantic code navigation"
    }
  }
}

URI Protocol

Launch VS Code and control the MCP server via URI:

vscode://codingwithcalvin.mcp/start                     # Start MCP server
vscode://codingwithcalvin.mcp/start?port=4000           # Start on specific port
vscode://codingwithcalvin.mcp/open?folder=/path/to/dir  # Open folder and start

βš™οΈ Configuration

Setting Default Description
codingwithcalvin.mcp.autoStart true πŸš€ Auto-start server on VS Code launch
codingwithcalvin.mcp.port 4000 πŸ”Œ MCP server port
codingwithcalvin.mcp.bindAddress 127.0.0.1 πŸ”’ Bind address (localhost only)

πŸ’» Commands

Access these from the Command Palette (Ctrl+Shift+P):

  • ▢️ MCP Server: Start - Start the MCP server
  • ⏹️ MCP Server: Stop - Stop the MCP server
  • πŸ”„ MCP Server: Restart - Restart the MCP server
  • πŸ“‹ MCP Server: Show Available Tools - View all available MCP tools

πŸ”’ Security

  • 🏠 Localhost Only - Binds only to 127.0.0.1
  • πŸ›‘οΈ DNS Rebinding Protection - Validates Host header
  • βœ… Same-machine Trusted - No authentication required for local access

πŸ“‹ Requirements

  • πŸ’» Visual Studio Code 1.85.0 or later
  • 🟒 Node.js (bundled with VS Code)

🀝 Contributing

Contributions are welcome! Whether it's bug reports, feature requests, or pull requests - all feedback helps make this extension better. πŸ’ͺ

Development Setup

  1. 🍴 Clone the repository
  2. πŸ“¦ Run npm install
  3. πŸ”¨ Run npm run build
  4. ▢️ Press F5 to launch the Extension Development Host

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘₯ Contributors

CalvinAllen


⭐ If you find VSC as MCP useful, please consider giving it a star! ⭐

Made with ❀️ for the VS Code community by Coding With Calvin

About

A Visual Studio Code extension that exposes an MCP (Model Context Protocol) server, giving AI tools like Claude, Cursor, and others direct access to VS Code's semantic code understanding capabilities - go-to-definition, find references, completions, diagnostics, and so much more!

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors 2

  •  
  •