Skip to content
Back to search

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!

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/codingwithcalvin--vs-mcpserver/badge.svg)](/listings/codingwithcalvin--vs-mcpserver)

HTML

<a href="/listings/codingwithcalvin--vs-mcpserver"><img src="/api/listings/codingwithcalvin--vs-mcpserver/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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](https://github.com/CodingWithCalvin/VS-MCPServer/releases) page and double-click to install.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 288 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="https://raw.githubusercontent.com/CodingWithCalvin/VS-MCPServer/main/resources/logo.png" alt="VS MCP Server Logo" width="128" height="128">
  3. </p>
  4. <h1 align="center">VS MCP Server</h1>
  5. <p align="center">
  6. <strong>Let AI assistants like Claude control Visual Studio through the Model Context Protocol!</strong>
  7. </p>
  8. <p align="center">
  9. <a href="https://github.com/CodingWithCalvin/VS-MCPServer/blob/main/LICENSE">
  10. <img src="https://img.shields.io/github/license/CodingWithCalvin/VS-MCPServer?style=for-the-badge" alt="License">
  11. </a>
  12. <a href="https://github.com/CodingWithCalvin/VS-MCPServer/actions/workflows/build.yml">
  13. <img src="https://img.shields.io/github/actions/workflow/status/CodingWithCalvin/VS-MCPServer/build.yml?style=for-the-badge" alt="Build Status">
  14. </a>
  15. </p>
  16. ---
  17. ## 🤔 What is this?
  18. **VS MCP Server** exposes Visual Studio features through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), enabling AI assistants like Claude to interact with your IDE programmatically. Open files, read code, build projects, and more - all through natural conversation!
  19. ## ✨ Features
  20. ### 📂 Solution Tools
  21. | Tool | Description |
  22. |------|-------------|
  23. | `project_info` | Get detailed project information |
  24. | `project_list` | List all projects in the solution |
  25. | `solution_close` | Close the current solution |
  26. | `solution_info` | Get information about the current solution |
  27. | `solution_open` | Open a solution file |
  28. | `startup_project_get` | Get the current startup project |
  29. | `startup_project_set` | Set the startup project for debugging |
  30. ### 📝 Document Tools
  31. | Tool | Description |
  32. |------|-------------|
  33. | `document_active` | Get the active document |
  34. | `document_cleanup` | Run code cleanup on a document |
  35. | `document_close` | Close a document |
  36. | `document_list` | List all open documents |
  37. | `document_open` | Open a file in the editor |
  38. | `document_read` | Read document contents |
  39. | `document_save` | Saves an open document |
  40. | `document_write` | Write to a document |
  41. | `file_create` | Create a file on disk and open it in the editor |
  42. | `folder_create` | Create a folder on disk |
  43. ### ✏️ Editor Tools
  44. | Tool | Description |
  45. |------|-------------|
  46. | `editor_find` | Search within documents |
  47. | `editor_goto_line` | Navigate to a specific line |
  48. | `editor_insert` | Insert text at cursor position |
  49. | `editor_replace` | Find and replace text |
  50. | `selection_get` | Get the current text selection |
  51. | `selection_set` | Set the selection range |
  52. ### 🔨 Build Tools
  53. | Tool | Description |
  54. |------|-------------|
  55. | `build_cancel` | Cancel a running build |
  56. | `build_configuration_get` | Get the active and available build configuration/platform pairs |
  57. | `build_configuration_set` | Change the active build configuration and platform |
  58. | `build_project` | Build a specific project |
  59. | `build_solution` | Build the entire solution |
  60. | `build_status` | Get current build status |
  61. | `clean_solution` | Clean the solution |
  62. ### 🧭 Navigation Tools
  63. | Tool | Description |
  64. |------|-------------|
  65. | `find_references` | Find all references to a symbol |
  66. | `goto_definition` | Navigate to the definition of a symbol |
  67. | `symbol_document` | Get all symbols defined in a document |
  68. | `symbol_workspace` | Search for symbols across the solution |
  69. ### 🐛 Debugger Tools
  70. | Tool | Description |
  71. |------|-------------|
  72. | `breakpoint_enable` | Enable or disable a breakpoint at a file and line |
  73. | `debugger_add_breakpoint` | Add a breakpoint, optionally with a condition and hit-count rule |
  74. | `debugger_break` | Pause execution (Ctrl+Alt+Break) |
  75. | `debugger_continue` | Continue execution (F5) |
  76. | `debugger_evaluate` | Evaluate an expression in the current debug context |
  77. | `debugger_get_callstack` | Get the call stack |
  78. | `debugger_get_locals` | Get local variables in current frame |
  79. | `debugger_launch` | Start debugging (F5), optionally for a specific project |
  80. | `debugger_launch_without_debugging` | Start without debugger (Ctrl+F5), optionally for a specific project |
  81. | `debugger_list_breakpoints` | List all breakpoints, including conditions and hit-count rules |
  82. | `debugger_remove_breakpoint` | Remove a breakpoint |
  83. | `debugger_set_variable` | Set the value of a local variable |
  84. | `debugger_status` | Get current debugger state |
  85. | `debugger_step_into` | Step into (F11) |
  86. | `debugger_step_out` | Step out (Shift+F11) |
  87. | `debugger_step_over` | Step over (F10) |
  88. | `debugger_stop` | Stop debugging (Shift+F5) |
  89. ### 🔍 Diagnostics Tools
  90. | Tool | Description |
  91. |------|-------------|
  92. | `errors_list` | Read errors, warnings, and messages from the Error List, filtered by severity, scope, Build/IntelliSense source, suppression state, code, tool, category, project, path, or text |
  93. | `output_list_panes` | List all available Output window panes |
  94. | `output_read` | Read content from an Output window pane |
  95. | `output_write` | Write a message to an Output window pane |
  96. ### 🧪 Test Tools
  97. | Tool | Description |
  98. |------|-------------|
  99. | `test_cancel` | Cancel the test run in progress |
  100. | `test_debug` | Debug the tests in a single class or method |
  101. | `test_debug_all` | Debug every test in the solution |
  102. | `test_run` | Run the tests in a single class or method |
  103. | `test_run_all` | Run every test in the solution |
  104. | `test_stats` | Get passed, failed, skipped, and not-run counts |
  105. | `test_status` | Get the run state plus current counts |
  106. ### 📊 Coverage Tools
  107. | Tool | Description |
  108. |------|-------------|
  109. | `coverage_analyze` | Run all tests with code coverage collection |
  110. | `coverage_report` | Read results as a module / class / method tree with line and block counts |
  111. | `coverage_show` | Open the Code Coverage Results window |
  112. > ℹ️ **Running** coverage needs an edition that supports it — Enterprise only through
  113. > VS 2022, all editions from VS 2026. **Reading** an existing `.coverage` file with
  114. > `coverage_report` works on every edition.
  115. ### 💻 Terminal Tools
  116. | Tool | Description |
  117. |------|-------------|
  118. | `terminal_close` | Close a single integrated terminal |
  119. | `terminal_close_all` | Close every integrated terminal |
  120. | `terminal_create` | Open an empty terminal using the default profile |
  121. | `terminal_list` | List the open terminal identifiers |
  122. | `terminal_run` | Run a command in a new terminal, inside the VS developer environment |
  123. | `terminal_show` | Bring a terminal into view |
  124. > ⚠️ **Terminal output is not captured.** The Visual Studio terminal is a raw PTY with no
  125. > exit code or command boundaries, so `terminal_run` reports only whether the terminal opened.
  126. > To read results, redirect output to a file and read it back with `document_read`.
  127. ### 🪟 Window Tools
  128. | Tool | Description |
  129. |------|-------------|
  130. | `toolwindow_hide` | Hide (close) a tool window by caption |
  131. | `toolwindow_show` | Show a tool window by name (SolutionExplorer, ErrorList, Output, Terminal, etc.) |
  132. | `window_activate` | Activate (focus) a window by caption |
  133. | `window_list` | List all open windows with caption, kind, visibility, and GUID |
  134. ### 💬 Dialog Tools
  135. | Tool | Description |
  136. |------|-------------|
  137. | `dialog_list` | List the modal dialogs Visual Studio is waiting on, with their message and buttons |
  138. | `dialog_respond` | Answer a dialog by clicking one of its buttons |
  139. > 💡 **Stuck on a dialog?** A modal dialog, like "The source code is different from the original
  140. > version" or "Hot Reload changes not supported", blocks Visual Studio until someone answers it.
  141. > If a tool call hangs or times out, `dialog_list` shows what Visual Studio is waiting on and
  142. > `dialog_respond` answers it. Both work while the blocked call is still waiting.
  143. ## 🛠️ Installation
  144. ### Visual Studio Marketplace
  145. 1. Open Visual Studio 2022 or 2026
  146. 2. Go to **Extensions > Manage Extensions**
  147. 3. Search for "MCP Server"
  148. 4. Click **Download** and restart Visual Studio
  149. ### Manual Installation
  150. Download the latest `.vsix` from the [Releases](https://github.com/CodingWithCalvin/VS-MCPServer/releases) page and double-click to install.
  151. ## 🚀 Usage
  152. ### ▶️ Starting the Server
  153. 1. Open Visual Studio
  154. 2. Go to **Tools > MCP Server > Start Server** (or enable auto-start in settings)
  155. 3. The MCP server starts on `http://localhost:5050`
  156. ### 🤖 Configuring Claude Desktop & Claude Code
  157. Add this to your Claude Desktop or Claude Code MCP settings (preferred HTTP method):
  158. ```json
  159. {
  160. "mcpServers": {
  161. "visualstudio": {
  162. "type": "http",
  163. "url": "http://localhost:5050"
  164. }
  165. }
  166. }
  167. ```
  168. **Legacy SSE method** (deprecated, but still supported):
  169. ```json
  170. {
  171. "mcpServers": {
  172. "visualstudio": {
  173. "type": "sse",
  174. "url": "http://localhost:5050/sse"
  175. }
  176. }
  177. }
  178. ```
  179. **Claude Code (CLI) - alternate installation technique:**
  180. ```
  181. claude mcp add --transport http visualstudio http://localhost:5050
  182. ```
  183. > ℹ️ **Note:** The HTTP method is the preferred standard. SSE (Server-Sent Events) is a legacy protocol and should only be used for backward compatibility.
  184. ### ⚙️ Settings
  185. Configure the extension at **Tools > Options > MCP Server**:
  186. | Setting | Description | Default |
  187. |---------|-------------|---------|
  188. | Auto-start server | Start the MCP server when Visual Studio launches | Off |
  189. | Binding Address | Address the server binds to | `localhost` |
  190. | HTTP Port | Port for the MCP server | `5050` |
  191. | Server Name | Name reported to MCP clients | `Visual Studio MCP` |
  192. | Log Level | Minimum log level for output | `Information` |
  193. | Log Retention | Days to keep log files | `7` |
  194. > ⚠️ **`terminal_run` executes commands on your machine.** Combined with a **Binding
  195. > Address** other than `localhost`, this exposes command execution to your network. Leave the
  196. > binding address at `localhost` unless you specifically need remote access.
  197. ## 🏗️ Architecture
  198. ```
  199. +------------------+ +----------------------+ named pipes +------------------+
  200. | Claude Desktop | HTTP/SSE | MCPServer.Server | <-------------> | VS Extension |
  201. | (MCP Client) | <---------> | (MCP Server) | JSON-RPC | (Tool Impl) |
  202. +------------------+ :5050 +----------------------+ +------------------+
  203. ```
  204. ## 🤝 Contributing
  205. Contributions are welcome! Whether it's bug reports, feature requests, or pull requests - all feedback helps make this extension better.
  206. ### 🔧 Development Setup
  207. 1. Clone the repository
  208. 2. Open `src/CodingWithCalvin.MCPServer.slnx` in Visual Studio 2022
  209. 3. Ensure you have the "Visual Studio extension development" workload installed
  210. 4. Ensure you have .NET 10.0 SDK installed
  211. 5. Press F5 to launch the experimental instance
  212. ## 📄 License
  213. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
  214. ---
  215. ## 👥 Contributors
  216. <!-- readme: contributors -start -->
  217. <a href="https://github.com/CalvinAllen"><img src="https://avatars.githubusercontent.com/u/41448698?v=4&s=64" width="64" height="64" align="left" alt="CalvinAllen"></a> <a href="https://github.com/Arenoros"><img src="https://avatars.githubusercontent.com/u/2578918?v=4&s=64" width="64" height="64" align="left" alt="Arenoros"></a> <a href="https://github.com/Gh61"><img src="https://avatars.githubusercontent.com/u/10837736?v=4&s=64" width="64" height="64" align="left" alt="Gh61"></a> <a href="https://github.com/SG-FVSP"><img src="https://avatars.githubusercontent.com/u/195974694?v=4&s=64" width="64" height="64" align="left" alt="SG-FVSP"></a> <a href="https://github.com/Vidoy"><img src="https://avatars.githubusercontent.com/u/6883779?v=4&s=64" width="64" height="64" align="left" alt="Vidoy"></a> <a href="https://github.com/fivestar1103"><img src="https://avatars.githubusercontent.com/u/70753360?v=4&s=64" width="64" height="64" align="left" alt="fivestar1103"></a> <a href="https://github.com/gclpixel"><img src="https://avatars.githubusercontent.com/u/9727108?v=4&s=64" width="64" height="64" align="left" alt="gclpixel"></a> <a href="https://github.com/hurricanepkt"><img src="https://avatars.githubusercontent.com/u/161399?v=4&s=64" width="64" height="64" align="left" alt="hurricanepkt"></a> <a href="https://github.com/hyskylord"><img src="https://avatars.githubusercontent.com/u/26114709?v=4&s=64" width="64" height="64" align="left" alt="hyskylord"></a> <a href="https://github.com/hzwet"><img src="https://avatars.githubusercontent.com/u/118614014?v=4&s=64" width="64" height="64" align="left" alt="hzwet"></a> <a href="https://github.com/laviRZ"><img src="https://avatars.githubusercontent.com/u/29277997?v=4&s=64" width="64" height="64" align="left" alt="laviRZ"></a> <a href="https://github.com/mbeeson-mm"><img src="https://avatars.githubusercontent.com/u/236729541?v=4&s=64" width="64" height="64" align="left" alt="mbeeson-mm"></a> <a href="https://github.com/shaiku"><img src="https://avatars.githubusercontent.com/u/16620522?v=4&s=64" width="64" height="64" align="left" alt="shaiku"></a> <a href="https://github.com/wmdustgv"><img src="https://avatars.githubusercontent.com/u/264346722?v=4&s=64" width="64" height="64" align="left" alt="wmdustgv"></a> <a href="https://github.com/zdomokos"><img src="https://avatars.githubusercontent.com/u/2656974?v=4&s=64" width="64" height="64" align="left" alt="zdomokos"></a> <br clear="all">
  218. <!-- readme: contributors -end -->
  219. ---
  220. <p align="center">
  221. Made with ❤️ by <a href="https://github.com/CodingWithCalvin">Coding With Calvin</a>
  222. </p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.