twelvestocks/visual-studio-mcp-server
If you are the rightful owner of visual-studio-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Visual Studio MCP Server is a .NET 8 console application designed to enhance Visual Studio automation capabilities through integration with Claude Code, providing features like debugging control and XAML designer interaction.
Visual Studio MCP Server
A .NET 8 console application that provides Claude Code with comprehensive Visual Studio automation capabilities including debugging control, XAML designer interaction, and visual context capture through COM interop.
š Quick Start
5-Minute Setup - Get Visual Studio automation running with Claude Code in under 10 minutes!
Prerequisites
- Windows 10/11
- Visual Studio 2022 (17.8 or later)
- .NET 8 SDK
- Claude Code
Installation
# Install as .NET global tool
dotnet tool install --global VisualStudioMcp
# Verify installation
vsmcp --version
Claude Code Configuration
Add to your mcp_servers.json
:
{
"mcpServers": {
"visual-studio": {
"command": "vsmcp",
"args": [],
"env": {}
}
}
}
Your First Automation
- Open Visual Studio 2022 with a solution
- Start Claude Code
- Try: "List my Visual Studio instances and build my solution"
š Complete Setup Guide:
⨠Key Features
Visual Studio Integration
- š Instance Discovery - Find and connect to running Visual Studio instances
- šØ Build Automation - Trigger builds and capture detailed error information
- š Debug Control - Start, stop, and monitor debugging sessions
- š Solution Management - Load, build, and manage Visual Studio solutions
XAML Designer Automation
- šø Designer Screenshots - Capture XAML designer surfaces for visual context
- š¼ļø Window Capture - Screenshot any Visual Studio window or panel
- šØ Visual Context - Provide Claude Code with visual understanding of UI designs
Development Workflow Enhancement
- ā” Real-time Integration - Seamless Claude Code workflow integration
- š Error Analysis - Detailed build error capture and context
- š Automated Testing - Integration with test execution and reporting
- šļø Project Analysis - Deep inspection of project structure and dependencies
šļø Architecture
Technology Stack
- .NET 8 - Modern cross-platform runtime with Windows-specific features
- COM Interop - Direct integration with Visual Studio via EnvDTE APIs
- MCP Protocol - ModelContextProtocol for Claude Code communication
- Dependency Injection - Microsoft.Extensions.Hosting service architecture
Service Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP Server Host ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā VisualStudioMcp.Core ā VS Automation ā
ā VisualStudioMcp.Debug ā Debug Control ā
ā VisualStudioMcp.Xaml ā XAML Designer ā
ā VisualStudioMcp.Imaging ā Screenshots ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā COM Interop Layer (EnvDTE) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Visual Studio 2022 ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š Documentation
Complete documentation is available in the directory:
Getting Started
- - 5-minute setup guide
- - Complete MCP tools documentation (17 tools)
- - Workflows and examples
Operations & Support
- - Detailed installation and setup
- - Comprehensive error resolution
- - Performance expectations and optimization
Security & Enterprise
- - Enterprise security documentation
- - Group Policy and corporate deployment
Development
- - Environment configuration guide
- - Technical design and patterns
- - Vision, goals, and technology decisions
š§ Development
Building from Source
# Clone the repository
git clone https://github.com/your-org/MCP-VS-AUTOMATION
cd MCP-VS-AUTOMATION
# Restore dependencies and build
dotnet restore
dotnet build
# Run tests
dotnet test
Project Structure
src/
āāā VisualStudioMcp.Server/ # Console application entry point
āāā VisualStudioMcp.Core/ # Core VS automation services
āāā VisualStudioMcp.Debug/ # Debugging automation
āāā VisualStudioMcp.Xaml/ # XAML designer automation
āāā VisualStudioMcp.Imaging/ # Screenshot and visual capture
āāā VisualStudioMcp.Shared/ # Common models and interfaces
tests/
āāā VisualStudioMcp.Core.Tests/
āāā VisualStudioMcp.Debug.Tests/
āāā VisualStudioMcp.Integration.Tests/
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
š Security & Safety
- Local Development Tool - No network exposure, operates locally only
- Input Validation - All parameters validated before COM operations
- Resource Management - Proper COM object lifecycle and memory management
- Sandboxed Operations - Limited permissions with Visual Studio integration
ā ļø Requirements & Limitations
System Requirements
- Operating System: Windows 10/11 (Visual Studio COM dependency)
- Visual Studio: 2022 (17.8+) with .NET desktop development workload
- .NET Runtime: 8.0 or later
- Memory: Minimum 4GB RAM (8GB+ recommended)
Known Limitations
- Windows-only deployment (Visual Studio COM interop requirement)
- Requires Visual Studio 2022 installation
- Single Visual Studio instance connection at a time
- COM threading limitations may affect concurrent operations
š Troubleshooting
Quick solutions for common issues:
Issue | Quick Fix |
---|---|
vsmcp: command not found | Run dotnet tool install --global VisualStudioMcp |
Claude Code connection failed | Check mcp_servers.json configuration and restart Claude Code |
No Visual Studio instances found | Ensure VS 2022 is running with a solution loaded |
Permission errors | Run Visual Studio as Administrator |
š Complete Troubleshooting:
š License
This project is licensed under the MIT License - see the file for details.
š¤ Support
- Documentation:
- Issues: GitHub Issues
- Discussions: GitHub Discussions
šÆ Roadmap
- Phase 1: Core Visual Studio automation and debugging control
- Phase 2: Advanced XAML designer integration and visual context
- Phase 3: Extended IDE automation and customisation support
- Phase 4: Multi-instance management and advanced workflows
Built for Claude Code | Powered by .NET 8 | Windows Development Excellence