A Model Context Protocol (MCP) server that bridges Claude Code in WSL with the Windows .NET SDK, enabling seamless .NET development across the Windows/WSL boundary.
- Full .NET SDK Integration: Build, run, test, and publish .NET projects from WSL
- WSL Path Translation: Automatic conversion between WSL paths (
/mnt/c/...) and Windows paths (C:\...) - Package Management: Add, remove, and manage NuGet packages
- Entity Framework Support: Create and manage database migrations
- Project Management: Create projects, manage references, and run tests
- Real-time Streaming: Build outputs and logs streamed in real-time
- Async Operations: All long-running operations execute asynchronously
- Windows 10/11 with WSL2 installed
- .NET 9.0 SDK installed on Windows host
- Claude Code CLI installed in WSL
# On Windows host
git clone https://github.com/yourusername/dotnet-build-server.git
cd dotnet-build-server
dotnet build# On Windows host
dotnet run --project DotNetBuildServerThe server will start listening on http://*:5000
After starting the server on Windows, it will display available endpoints. Switch to your WSL terminal and run:
# In WSL terminal, use one of the IPs shown by the Windows server
claude mcp add dotnet-build --transport sse http://[YOUR_WINDOWS_IP]:5000/sse
# Example:
claude mcp add dotnet-build --transport sse http://10.0.0.186:5000/sse
⚠️ Important:
- The URL must end with
/ssefor the SSE transport to work correctly- The
claudecommand only works in WSL, not in Windows- Use the IP address displayed by the Windows server that matches your network
Once connected, you can use Claude Code to work with .NET projects seamlessly:
# Build a project
claude "Build my WPF application at /mnt/c/Projects/MyApp"
# Add a NuGet package
claude "Add MaterialDesignThemes package to my project"
# Create and apply migrations
claude "Create a new migration for adding user table"
# Run tests with coverage
claude "Run all tests in my solution with code coverage"- BuildProject - Build a .NET project with specified configuration
- RebuildProject - Clean and rebuild a project
- CleanProject - Clean build artifacts
- RunProject - Run a .NET application
- PublishProject - Publish for deployment
- GetProjectInfo - Get project details and configuration
- AddPackage - Add NuGet packages
- RemovePackage - Remove NuGet packages
- ListPackages - List all packages
- RestorePackages - Restore NuGet packages
- CreateProject - Create new .NET projects
- AddProjectReference - Add project references
- RemoveProjectReference - Remove project references
- ListProjectReferences - List all references
- RunTests - Run unit tests with optional coverage
- AddMigration - Create new EF migrations
- RemoveMigration - Remove the last migration
- UpdateDatabase - Apply migrations to database
- ListMigrations - List all migrations
┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ WSL/Linux │ HTTP │ Windows Host │ │ .NET SDK │
│ Claude │ ──────> │ DotNet Build │ ──────> │ MSBuild │
│ Code CLI │ :5000 │ Server (MCP) │ │ dotnet CLI │
└─────────────┘ └──────────────────┘ └─────────────────┘
⚠️ Warning: This server is designed for local development only.
- No authentication or authorization
- Binds to all network interfaces
- No path traversal protection
- Full access to local file system
Do not expose this server to public networks.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for Claude Code by Anthropic
- Uses the Model Context Protocol
- Powered by .NET 9.0
For issues, questions, or contributions, please use the GitHub Issues page.