{"id":47693983,"url":"https://github.com/renegaderiff86/visual-studio-mcp","last_synced_at":"2026-07-05T04:00:38.812Z","repository":{"id":341448660,"uuid":"1170145213","full_name":"RenegadeRiff86/Visual-Studio-MCP","owner":"RenegadeRiff86","description":"Bring-your-own-LLM MCP bridge for Visual Studio that works with Codex, Claude, and other clients for diagnostics, editing, build, debugging, Git, and more.","archived":false,"fork":false,"pushed_at":"2026-06-16T00:27:50.000Z","size":6151,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T02:19:54.248Z","etag":null,"topics":["ai-tools","bring-your-own-llm","bring-your-own-model","byo-model","cpp","csharp","debugging","ide-integration","llm","llm-tools","local-llm","mcp","model-context-protocol","python","visual-studio","visual-studio-extension","visual-studio-mcp"],"latest_commit_sha":null,"homepage":"https://github.com/RenegadeRiff86/Visual-Studio-MCP/releases/latest","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RenegadeRiff86.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-01T19:08:50.000Z","updated_at":"2026-06-16T00:27:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/RenegadeRiff86/Visual-Studio-MCP","commit_stats":null,"previous_names":["stan-elston/vs-ide-bridge","renegaderiff86/vs-ide-bridge","renegaderiff86/visual-studio-mcp"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/RenegadeRiff86/Visual-Studio-MCP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenegadeRiff86%2FVisual-Studio-MCP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenegadeRiff86%2FVisual-Studio-MCP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenegadeRiff86%2FVisual-Studio-MCP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenegadeRiff86%2FVisual-Studio-MCP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RenegadeRiff86","download_url":"https://codeload.github.com/RenegadeRiff86/Visual-Studio-MCP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenegadeRiff86%2FVisual-Studio-MCP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35142824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","bring-your-own-llm","bring-your-own-model","byo-model","cpp","csharp","debugging","ide-integration","llm","llm-tools","local-llm","mcp","model-context-protocol","python","visual-studio","visual-studio-extension","visual-studio-mcp"],"created_at":"2026-04-02T16:13:05.018Z","updated_at":"2026-07-05T04:00:38.743Z","avatar_url":"https://github.com/RenegadeRiff86.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VS IDE Bridge\n\nVS IDE Bridge connects your AI assistant to Visual Studio. Once connected, your assistant can read and edit code, check errors, run builds, inspect debugger state, and work with Git — all against the live project that is already open on your machine.\n\n## Requirements\n\n- Windows 10 or Windows 11\n- Visual Studio 2022 (17.14 or later) or Visual Studio 2026 (18.x) — Community, Professional, or Enterprise\n- An AI assistant with MCP support (Claude Code, Grok, Cursor, Codex, LM Studio, or any MCP-compatible client)\n\n## Installation\n\n1. **Download the installer.** Get the latest `vs-ide-bridge-setup-\u003cversion\u003e.exe` from the [Releases page](https://github.com/RenegadeRiff86/Visual-Studio-MCP/releases/latest).\n2. **Close Visual Studio.** The installer replaces the VS extension, which can't be updated while VS is running.\n3. **Run the installer** (it asks for administrator rights). It installs three things: the Visual Studio extension, the background MCP service (**VS IDE Bridge Service**, a Windows service), and a bundled Python runtime — no separate Python install needed.\n4. **Open Visual Studio** and load your solution. The extension activates automatically. To confirm it's installed, check **Extensions → Manage Extensions → Installed**, or look for the **Tools → VS IDE Bridge** menu.\n5. **Connect your AI assistant** using the setup below.\n\n\u003e **Upgrading** is the same steps: close Visual Studio, run the newer installer, reopen. Your assistant's connection settings carry over — if the tools stop appearing after an upgrade, re-run the registration command for your client and restart it.\n\n## Connecting Your AI Assistant\n\nPick the connection method that matches your client.\n\n### Claude Code (stdio)\n\n```bash\n# Register for the current project\nclaude mcp add --transport stdio --scope project vs-ide-bridge -- \"C:\\Program Files\\VsIdeBridge\\service\\VsIdeBridgeService.exe\" mcp-server\n\n# Or register globally (available from any project)\nclaude mcp add --transport stdio --scope user vs-ide-bridge -- \"C:\\Program Files\\VsIdeBridge\\service\\VsIdeBridgeService.exe\" mcp-server\n```\n\nRestart Claude Code after adding. Visual Studio must be running before you start a session.\n\nIf the server stops appearing after a reinstall, re-run the command above and restart Claude Code.\n\n### Grok / xAI (stdio)\n\nGrok uses the same stdio transport as Claude Code. Visual Studio must be running before you start a session.\n\n**Grok CLI** — register globally via command or config:\n\n```bash\ngrok mcp add vs-ide-bridge --command \"C:\\Program Files\\VsIdeBridge\\service\\VsIdeBridgeService.exe\" --args mcp-server\n```\n\n```toml\n# ~/.grok/config.toml\n[mcp_servers.vs-ide-bridge]\ncommand = 'C:\\Program Files\\VsIdeBridge\\service\\VsIdeBridgeService.exe'\nargs = [\"mcp-server\"]\nenabled = true\n```\n\nVerify the connection with `grok mcp doctor vs-ide-bridge`, then restart Grok.\n\n**Grok in Cursor** — use the Cursor stdio config in the section below. Restart Cursor after adding the server.\n\n### Cursor (stdio)\n\nCursor can also connect directly over stdio using the same service executable:\n\n```json\n// ~/.cursor/mcp.json\n{\n  \"mcpServers\": {\n    \"vs-ide-bridge\": {\n      \"command\": \"C:\\\\Program Files\\\\VsIdeBridge\\\\service\\\\VsIdeBridgeService.exe\",\n      \"args\": [\"mcp-server\"]\n    }\n  }\n}\n```\n\nRestart Cursor after adding. Visual Studio must be running before you start a session.\n\n### HTTP (Codex and most web-based clients)\n\nThe bridge listens on `http://localhost:43117/` by default.\n\n```toml\n# Codex — ~/.codex/config.toml\n[mcp_servers.vs-ide-bridge]\nurl = \"http://localhost:43117/\"\nenabled = true\n```\n\n```json\n// Generic HTTP MCP config\n{\n  \"mcpServers\": {\n    \"vs-ide-bridge\": {\n      \"transport\": { \"type\": \"http\", \"url\": \"http://localhost:43117/\" }\n    }\n  }\n}\n```\n\nIf the endpoint is off, enable it from Visual Studio: **Tools → VS IDE Bridge → Toggle HTTP MCP Server**\n\n### Streamable HTTP (LM Studio and local models)\n\n```json\n{\n  \"mcpServers\": {\n    \"vs-ide-bridge\": {\n      \"transport\": { \"type\": \"streamable-http\", \"url\": \"http://localhost:43118/mcp\" }\n    }\n  }\n}\n```\n\nEnable from Visual Studio: **Tools → VS IDE Bridge → Toggle Streamable HTTP MCP Server**\n\n## What You Can Do\n\nOnce connected, describe what you want in plain language. The assistant figures out how to use the bridge.\n\n**Navigate code**\n- \"Find all the places where `ProcessOrder` is called.\"\n- \"What does this method do? Show me its definition.\"\n- \"Show me everything that calls into this class.\"\n\n**Make changes**\n- \"Rename this variable everywhere it's used.\"\n- \"Extract this block into a new helper method.\"\n- \"Add null checks to all the public methods in this file.\"\n\n**Diagnose and build**\n- \"What errors are in the project right now?\"\n- \"Fix all the warnings in this file.\"\n- \"Build the solution and tell me what broke.\"\n\n**Debug**\n- \"Set a breakpoint on line 42 and start the debugger.\"\n- \"Break when execution reaches the function `ToolResultFormatter.StructuredToolResult`.\"\n- \"Log `requestId` every time that line runs, but don't stop.\"\n- \"What are the local variables at the current line?\"\n- \"Show me the call stack.\"\n- \"Expand `m_buffer` and show me every element and its fields.\"\n- \"Show me the exception the debugger just hit.\"\n\nBreakpoints can target a function or symbol name instead of a file and line — these survive source edits and line shifts — and can log a message and keep running instead of pausing (tracepoints/logpoints). `debug_locals` and `debug_watch` can expand a container or struct into its elements and fields; use `chunk_lines` on `debug_watch` to page large expansions in memory without flooding the reply. Debugger run and step tools include `lastException` when Visual Studio reports a thrown or unhandled exception; for native C++ exceptions, the VSIX also listens for lower-level debugger exception events. Ask for `debug_exceptions` when you need the exception settings snapshot and the latest captured exception details.\n\n**Git**\n- \"What files have I changed since the last commit?\"\n- \"Commit everything with a sensible message.\"\n- \"Show me the diff for this file.\"\n\n**GitHub** (requires the `gh` CLI, authenticated)\n- \"List the open issues and show me issue 42.\"\n- \"Comment on issue 42, add the `bug` label, and close it as completed.\"\n- \"Open an issue titled 'Fix flaky cooling test' with the `bug` label.\"\n- \"Show me the open pull requests and the diff for PR 17.\"\n\n**Project and packages**\n- \"What NuGet packages does this project reference?\"\n- \"Add the latest version of Newtonsoft.Json.\"\n\n## Tips\n\n- **Open Visual Studio first.** The bridge connects to a running VS instance. If VS is not open, the assistant cannot see your code.\n- **Multiple VS windows?** The bridge handles this — see [Working with Multiple VS Instances](#working-with-multiple-vs-instances) below.\n- **After a build error?** Ask *\"what errors came up?\"* instead of reading the Output window yourself — the assistant gets a structured list it can act on immediately.\n- **Slow start?** IntelliSense takes a moment to load after VS opens. If the assistant reports incomplete symbol results, wait a few seconds and try again.\n\n## Working with Multiple VS Instances\n\nYou can have any number of Visual Studio windows open at the same time. The bridge discovers all of them automatically — each VS instance runs its own copy of the extension.\n\n**When only one instance is open** the assistant binds to it automatically at the start of a session. No extra steps needed.\n\n**When more than one instance is open** the bridge rebinds to the solution it was using last time if that solution is still open; otherwise it auto-binds to the first instance it discovers and includes a warning listing the other open instances. If it picked the wrong one — or you want to be explicit up front — just tell the assistant:\n\n- *\"Bind to MySolution.sln.\"*\n- *\"Switch to the CodeMaid project.\"*\n- *\"Connect to the VS instance with OrderService open.\"*\n\nThe assistant stays bound to that instance for the rest of the session. All tool calls — reads, edits, builds, errors — apply to the currently bound instance only.\n\n**Switching mid-session** is supported. Ask the assistant to bind to a different solution at any point and it will switch immediately. This is useful when a change in one project requires a follow-up in another.\n\n**Typical setup** — two VS windows side by side:\n\n| Window | Purpose |\n|---|---|\n| `MySolution.sln` | The project you are working on |\n| `VsIdeBridge.sln` | Bridge source — open only if you are developing the bridge itself |\n\nThe assistant works against whichever one it is bound to. Binding is session-scoped and has no effect on the other open instances.\n\n## Seeing What the Model Is Doing\n\nThe bridge streams a trace of every tool call into the Visual Studio **Output** window in real time. To watch it:\n\n1. In Visual Studio, open **View → Output** (or press **Ctrl+Alt+O**).\n2. Click the **Show output from** dropdown at the top of the Output pane.\n3. Select **IDE Bridge**.\n\nEach line shows the command name, key arguments, and result status as the model works — useful for understanding what the assistant is doing or for diagnosing unexpected behaviour.\n\n## Best-Practice Warnings\n\nVS IDE Bridge runs a lightweight best-practice analyzer on your code and reports issues (prefixed `BP`) in the Visual Studio Error List alongside normal compiler diagnostics. This is on by default.\n\nTo turn it off (or back on), use **Tools → VS IDE Bridge → Toggle Best-Practice Warnings**. The setting persists across Visual Studio restarts — no configuration file to edit.\n\n## Logs\n\nAll logs are written to the same directory. The location is resolved in this order:\n\n| Scenario | Path |\n|---|---|\n| Installed (default) | `C:\\Program Files\\VsIdeBridge\\logs\\` |\n| No installer, `%COMMONAPPDATA%` present | `C:\\ProgramData\\VsIdeBridge\\logs\\` |\n| Fallback | `%TEMP%\\VsIdeBridge\\logs\\` |\n\nThe installed path is read from the registry key `HKLM\\SOFTWARE\\VsIdeBridge\\InstallPath` written by the installer. Both the Windows service and the Visual Studio extension use `BridgeLogPaths.GetSharedLogDirectory()` (in `src/Shared/BridgeLogPaths.cs`) so they always land in the same folder.\n\nTwo files are written:\n\n- `mcp-server.log` — MCP request/response traffic (written by the Windows service)\n- `vs-ide-bridge-yyyy-MM-dd.log` — extension warnings and errors (written by the VS extension, one file per day)\n\n**Retention** — logs are managed automatically. `mcp-server.log` is rotated to `mcp-server.log.old` when it exceeds 5 MB (one backup kept, ~10 MB cap). Daily extension logs older than 7 days are deleted on the first write of each VS session.\n\n\u003e **Developer note** — when running from source without running the installer first, the registry key is absent and logs go to `C:\\ProgramData\\VsIdeBridge\\logs\\`. If you need to change the retention limits or add new log files, all path and cleanup logic is centralised in `src/Shared/BridgeLogPaths.cs`.\n\n## Troubleshooting\n\n**Assistant says it can't find Visual Studio or the solution**\nVisual Studio must be running with your solution open before you start the AI session. Try telling your assistant: *\"Connect to Visual Studio\"* or *\"Bind to MySolution.sln.\"*\n\n**Tools stopped working after a reinstall**\nRe-run the registration command for your client (see [Connecting Your AI Assistant](#connecting-your-ai-assistant)), then restart the client.\n\n**Bridge is not responding**\nCheck that the `VsIdeBridgeService` Windows service is running. Open Services (`services.msc`) and look for **VS IDE Bridge Service**.\n\n## Shell Safety\n\nThe bridge can run arbitrary shell commands on your machine when asked. This is intentional for advanced tasks, but treat it as a power tool:\n\n- Prefer asking for typed actions (edit this file, run a build, commit this change) before asking for raw shell commands.\n- Do not use unattended automation that includes shell commands without review.\n- If your MCP client supports tool approval rules, add `shell_exec` to the requires-approval list.\n\n## Building from Source\n\nPrerequisites:\n\n- Visual Studio 2026 (18.x) with the **Visual Studio extension development** workload (the solution builds against the VS 2026 SDK; the produced VSIX installs on both VS 2022 17.14+ and VS 2026)\n- [Inno Setup 6](https://jrsoftware.org/isinfo.php) — download and install it separately if you want to produce the installer; it is not bundled and not needed for code-only builds\n\n```bash\ngit clone https://github.com/RenegadeRiff86/Visual-Studio-MCP\ncd Visual-Studio-MCP\nscripts\\build.bat Release\n```\n\n`build.bat` locates MSBuild through vswhere and rebuilds the full solution including the VSIX. (Plain `dotnet build` does not work here: the solution contains a C++ probe project that only builds under Visual Studio's MSBuild.)\n\nOpen `VsIdeBridge.sln` in Visual Studio to work on the extension. To produce the installer, compile the Inno Setup script after a Release build:\n\n```bash\n\"C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe\" installer\\inno\\vs-ide-bridge.iss\n```\n\nwhich writes:\n\n```\ninstaller\\output\\vs-ide-bridge-setup-\u003cversion\u003e.exe\n```\n\nWhen developing without the installer, logs are written to `C:\\ProgramData\\VsIdeBridge\\logs\\` instead of the default install directory. See [Logs](#logs) for the full path resolution and retention details.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](CONTRIBUTORS.md) for a list of people who have contributed code to this project.\n\n## Third-Party Notices\n\nSee [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for license information covering third-party components used in this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenegaderiff86%2Fvisual-studio-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenegaderiff86%2Fvisual-studio-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenegaderiff86%2Fvisual-studio-mcp/lists"}