Let AI assistants like Claude control Visual Studio through the Model Context Protocol!
VS MCP Server exposes Visual Studio features through the Model Context Protocol (MCP), enabling AI assistants like Claude to interact with your IDE programmatically. Open files, read code, build projects, and more - all through natural conversation!
| Tool | Description |
|---|---|
solution_info |
Get information about the current solution |
solution_open |
Open a solution file |
solution_close |
Close the current solution |
project_list |
List all projects in the solution |
project_info |
Get detailed project information |
| Tool | Description |
|---|---|
document_list |
List all open documents |
document_active |
Get the active document |
document_open |
Open a file in the editor |
document_close |
Close a document |
document_read |
Read document contents |
document_write |
Write to a document |
document_save |
Saves an open document |
| Tool | Description |
|---|---|
selection_get |
Get the current text selection |
selection_set |
Set the selection range |
editor_insert |
Insert text at cursor position |
editor_replace |
Find and replace text |
editor_goto_line |
Navigate to a specific line |
editor_find |
Search within documents |
| Tool | Description |
|---|---|
build_solution |
Build the entire solution |
build_project |
Build a specific project |
clean_solution |
Clean the solution |
build_cancel |
Cancel a running build |
build_status |
Get current build status |
| Tool | Description |
|---|---|
goto_definition |
Navigate to the definition of a symbol |
find_references |
Find all references to a symbol |
symbol_document |
Get all symbols defined in a document |
symbol_workspace |
Search for symbols across the solution |
| Tool | Description |
|---|---|
debugger_status |
Get current debugger state |
debugger_launch |
Start debugging (F5) |
debugger_launch_without_debugging |
Start without debugger (Ctrl+F5) |
debugger_continue |
Continue execution (F5) |
debugger_break |
Pause execution (Ctrl+Alt+Break) |
debugger_stop |
Stop debugging (Shift+F5) |
debugger_step_over |
Step over (F10) |
debugger_step_into |
Step into (F11) |
debugger_step_out |
Step out (Shift+F11) |
debugger_add_breakpoint |
Add a breakpoint at a file and line |
debugger_remove_breakpoint |
Remove a breakpoint |
debugger_list_breakpoints |
List all breakpoints |
debugger_get_locals |
Get local variables in current frame |
debugger_get_callstack |
Get the call stack |
| Tool | Description |
|---|---|
errors_list |
Read build errors, warnings, and messages from the Error List |
output_read |
Read content from an Output window pane |
output_write |
Write a message to an Output window pane |
output_list_panes |
List all available Output window panes |
- Open Visual Studio 2022 or 2026
- Go to Extensions > Manage Extensions
- Search for "MCP Server"
- Click Download and restart Visual Studio
Download the latest .vsix from the Releases page and double-click to install.
- Open Visual Studio
- Go to Tools > MCP Server > Start Server (or enable auto-start in settings)
- The MCP server starts on
http://localhost:5050
Add this to your Claude Desktop or Claude Code MCP settings (preferred HTTP method):
{
"mcpServers": {
"visualstudio": {
"type": "http",
"url": "http://localhost:5050"
}
}
}Legacy SSE method (deprecated, but still supported):
{
"mcpServers": {
"visualstudio": {
"type": "sse",
"url": "http://localhost:5050/sse"
}
}
}βΉοΈ Note: The HTTP method is the preferred standard. SSE (Server-Sent Events) is a legacy protocol and should only be used for backward compatibility.
Configure the extension at Tools > Options > MCP Server:
| Setting | Description | Default |
|---|---|---|
| Auto-start server | Start the MCP server when Visual Studio launches | Off |
| Binding Address | Address the server binds to | localhost |
| HTTP Port | Port for the MCP server | 5050 |
| Server Name | Name reported to MCP clients | Visual Studio MCP |
| Log Level | Minimum log level for output | Information |
| Log Retention | Days to keep log files | 7 |
+------------------+ +----------------------+ named pipes +------------------+
| Claude Desktop | HTTP/SSE | MCPServer.Server | <-------------> | VS Extension |
| (MCP Client) | <---------> | (MCP Server) | JSON-RPC | (Tool Impl) |
+------------------+ :5050 +----------------------+ +------------------+
Contributions are welcome! Whether it's bug reports, feature requests, or pull requests - all feedback helps make this extension better.
- Clone the repository
- Open
src/CodingWithCalvin.MCPServer.slnxin Visual Studio 2022 - Ensure you have the "Visual Studio extension development" workload installed
- Ensure you have .NET 10.0 SDK installed
- Press F5 to launch the experimental instance
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Coding With Calvin
