MSBuild MCP Server
About
A lightweight MCP (Model Context Protocol) server for building MSBuild projects. Supports dynamic MSBuild discovery using vswhere and provides flexible build configuration options.
Details
- Author
- zenoengine
- Downloads
- 210
- Categories
- Other
Jump to
- Dynamic MSBuild executable discovery across Visual Studio installations.
- Customizable build configuration (platform, verbosity, parallel CPU count, NuGet restore, extra arguments).
- Clear, filtered error reporting on build failures.
- Seamless integration with popular MCP clients (VSCode, Cursor, Windsurf).
- Supports .sln, .csproj, and .vcxproj files for C#, C++, and other MSBuild-compatible languages.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MSBuild MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Ensure Python 3.11+, Visual Studio or Build Tools, and uv are installed. Register the server by adding the provided JSON configuration to your MCP client’s settings file (e.g., .vscode/mcp.json for VSCode, ~/.cursor/mcp.json for Cursor, or ~/.codeium/windsurf/mcp_config.json for Windsurf). Then restart your tool to activate the server.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"msbuild mcp server": {
"msbuild-mcp-server": {
"command": "uvx",
"args": [
"msbuild-mcp-server@latest"
]
}
}
}
}
McpServers
{
"msbuild-mcp-server": {
"command": "uvx",
"args": [
"msbuild-mcp-server@latest"
]
}
}
MSBuild MCP Server
A lightweight MCP (Model Context Protocol) server for automating MSBuild projects and solutions builds. It dynamically locates MSBuild and provides customizable build configuration options.
Features
- Dynamic MSBuild Discovery: Automatically detects the MSBuild executable, ensuring compatibility with various Visual Studio installations.
- Customizable Build Settings: Easily configure build options such as configuration, platform, verbosity level, parallel build CPU count, NuGet restore, and additional command-line arguments through LLM-driven tool invocation.
- Clear Error Reporting: Filters and presents concise, relevant error messages upon build failures.
- MCP Client Compatibility: Supports seamless integration with popular MCP clients such as VSCode, Cursor, Windsurf, and more. Configuration snippets for these clients are provided in the documentation.
- Cross-Language Support: Supports MSBuild-compatible projects, including .sln, .csproj, and .vcxproj files, enabling builds for languages like C#, C++, and more across Windows platforms.
Prerequisites
Ensure the following prerequisites are installed:
- Python 3.11 or higher
- Visual Studio or Visual Studio Build Tools (for MSBuild)
- uv (recommended)
Registering the MCP Server
Ensure uv is installed.
In the MCP settings of your AI tools (e.g., Cursor, Windsurf, Claude Desktop, etc.), add the following configuration:
{
"mcpServers": {
"msbuild-mcp-server": {
"command": "uvx",
"args": [
"msbuild-mcp-server@latest"
]
}
}
}
Place this snippet in your client configuration file:
- VSCode: .vscode/mcp.json
- Cursor: ~/.cursor/mcp.json or <project-root>/.cursor/mcp.json
- Windsurf: ~/.codeium/windsurf/mcp_config.json
Restart your tool to ensure that the msbuild-mcp-server and its provided tools are properly registered.
License
This project is licensed under the MIT License.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



