← Discover MCPs and Agents
V
MCPAI & MLGitHub

VS-MCPServer

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!

Links

README

From the repo.

VS MCP Server Logo

VS MCP Server

Let AI assistants like Claude control Visual Studio through the Model Context Protocol!

License Build Status


🤔 What is this?

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!

✨ Features

📂 Solution Tools

ToolDescription
project_infoGet detailed project information
project_listList all projects in the solution
solution_closeClose the current solution
solution_infoGet information about the current solution
solution_openOpen a solution file
startup_project_getGet the current startup project
startup_project_setSet the startup project for debugging

📝 Document Tools

ToolDescription
document_activeGet the active document
document_cleanupRun code cleanup on a document
document_closeClose a document
document_listList all open documents
document_openOpen a file in the editor
document_readRead document contents
document_saveSaves an open document
document_writeWrite to a document
file_createCreate a file on disk and open it in the editor
folder_createCreate a folder on disk

✏️ Editor Tools

ToolDescription
editor_findSearch within documents
editor_goto_lineNavigate to a specific line
editor_insertInsert text at cursor position
editor_replaceFind and replace text
selection_getGet the current text selection
selection_setSet the selection range

🔨 Build Tools

ToolDescription
build_cancelCancel a running build
build_configuration_getGet the active and available build configuration/platform pairs
build_configuration_setChange the active build configuration and platform
build_projectBuild a specific project
build_solutionBuild the entire solution
build_statusGet current build status
clean_solutionClean the solution

🧭 Navigation Tools

ToolDescription
find_referencesFind all references to a symbol
goto_definitionNavigate to the definition of a symbol
symbol_documentGet all symbols defined in a document
symbol_workspaceSearch for symbols across the solution

🐛 Debugger Tools

ToolDescription
breakpoint_enableEnable or disable a breakpoint at a file and line
debugger_add_breakpointAdd a breakpoint, optionally with a condition and hit-count rule
debugger_breakPause execution (Ctrl+Alt+Break)
debugger_continueContinue execution (F5)
debugger_evaluateEvaluate an expression in the current debug context
debugger_get_callstackGet the call stack
debugger_get_localsGet local variables in current frame
debugger_launchStart debugging (F5), optionally for a specific project
debugger_launch_without_debuggingStart without debugger (Ctrl+F5), optionally for a specific project
debugger_list_breakpointsList all breakpoints, including conditions and hit-count rules
debugger_remove_breakpointRemove a breakpoint
debugger_set_variableSet the value of a local variable
debugger_statusGet current debugger state
debugger_step_intoStep into (F11)
debugger_step_outStep out (Shift+F11)
debugger_step_overStep over (F10)
debugger_stopStop debugging (Shift+F5)

🔍 Diagnostics Tools

ToolDescription
errors_listRead build errors, warnings, and messages from the Error List
output_list_panesList all available Output window panes
output_readRead content from an Output window pane
output_writeWrite a message to an Output window pane

🧪 Test Tools

ToolDescription
test_cancelCancel the test run in progress
test_debugDebug the tests in a single class or method
test_debug_allDebug every test in the solution
test_runRun the tests in a single class or method
test_run_allRun every test in the solution
test_statsGet passed, failed, skipped, and not-run counts
test_statusGet the run state plus current counts

📊 Coverage Tools

ToolDescription
coverage_analyzeRun all tests with code coverage collection
coverage_reportRead results as a module / class / method tree with line and block counts
coverage_showOpen the Code Coverage Results window

ℹ️ Running coverage needs an edition that supports it — Enterprise only through VS 2022, all editions from VS 2026. Reading an existing .coverage file with coverage_report works on every edition.

💻 Terminal Tools

ToolDescription
terminal_closeClose a single integrated terminal
terminal_close_allClose every integrated terminal
terminal_createOpen an empty terminal using the default profile
terminal_listList the open terminal identifiers
terminal_runRun a command in a new terminal, inside the VS developer environment
terminal_showBring a terminal into view

⚠️ Terminal output is not captured. The Visual Studio terminal is a raw PTY with no exit code or command boundaries, so terminal_run reports only whether the terminal opened. To read results, redirect output to a file and read it back with document_read.

🪟 Window Tools

ToolDescription
toolwindow_hideHide (close) a tool window by caption
toolwindow_showShow a tool window by name (SolutionExplorer, ErrorList, Output, Terminal, etc.)
window_activateActivate (focus) a window by caption
window_listList all open windows with caption, kind, visibility, and GUID

🛠️ Installation

Visual Studio Marketplace

  1. Open Visual Studio 2022 or 2026
  2. Go to Extensions > Manage Extensions
  3. Search for "MCP Server"
  4. Click Download and restart Visual Studio

Manual Installation

Download the latest .vsix from the Releases page and double-click to install.

🚀 Usage

▶️ Starting the Server

  1. Open Visual Studio
  2. Go to Tools > MCP Server > Start Server (or enable auto-start in settings)
  3. The MCP server starts on http://localhost:5050

🤖 Configuring Claude Desktop & Claude Code

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"
    }
  }
}

Claude Code (CLI) - alternate installation technique:

   claude mcp add --transport http visualstudio http://localhost:5050

ℹ️ Note: The HTTP method is the preferred standard. SSE (Server-Sent Events) is a legacy protocol and should only be used for backward compatibility.

⚙️ Settings

Configure the extension at Tools > Options > MCP Server:

SettingDescriptionDefault
Auto-start serverStart the MCP server when Visual Studio launchesOff
Binding AddressAddress the server binds tolocalhost
HTTP PortPort for the MCP server5050
Server NameName reported to MCP clientsVisual Studio MCP
Log LevelMinimum log level for outputInformation
Log RetentionDays to keep log files7

⚠️ terminal_run executes commands on your machine. Combined with a Binding Address other than localhost, this exposes command execution to your network. Leave the binding address at localhost unless you specifically need remote access.

🏗️ Architecture

+------------------+              +----------------------+   named pipes   +------------------+
|  Claude Desktop  |   HTTP/SSE  |  MCPServer.Server    | <-------------> |  VS Extension    |
|  (MCP Client)    | <---------> |  (MCP Server)        |    JSON-RPC     |  (Tool Impl)     |
+------------------+    :5050    +----------------------+                 +------------------+

🤝 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. Open src/CodingWithCalvin.MCPServer.slnx in Visual Studio 2022
  3. Ensure you have the "Visual Studio extension development" workload installed
  4. Ensure you have .NET 10.0 SDK installed
  5. Press F5 to launch the experimental instance

📄 License

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


👥 Contributors

CalvinAllen Arenoros Gh61 SG-FVSP Vidoy fivestar1103 gclpixel hurricanepkt hzwet laviRZ mbeeson-mm shaiku zdomokos


Made with ❤️ by Coding With Calvin

Collected info

  • 73 stars
  • 23 forks
  • Language: C#
  • Source updated: 9/22/2026

Config for your environment

Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.

Tool

OS

Config file: ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server": {
      "url": "{MCP_ENDPOINT_URL}"
    }
  }
}

Paste into mcpServers in the config file. Restart Cursor after saving.

If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.