msbuild-mcp-server
Allows building Unreal Engine projects by using MSBuild to compile Unreal Engine solutions and projects with specified configurations and platforms.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@msbuild-mcp-server Build C:\MyProject\MyApp.sln with Release|x64"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Delphi Compiler MCP Server
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.jsonCursor:
~/.cursor/mcp.jsonor<project-root>/.cursor/mcp.jsonWindsurf:
~/.codeium/windsurf/mcp_config.json
Restart your tool to ensure that the msbuild-mcp-server and its provided tools are properly registered.
Agent Prompt Examples
AI agents can trigger builds using natural language like:
Basic Project Build
"Build this solution at
C:/Path/To/Project.slnusingRelease|x64."Unreal Engine Build
"Build the solution located at
C:/Projects/MyGame/MyGame.slnusingDevelopment Editor|Win64."
License
This project is licensed under the MIT License.
Available Tools
1 toolbuild_msbuild_projectA
Build an MSBuild project or solution (.sln, .csproj, .vcxproj) file using MSBuild.
This tool dynamically locates the MSBuild executable using the vswhere Python package. It supports flexible build configurations, including verbosity, platform, and additional arguments.
Parameters:
project_path: Path to the project or solution file to build.
configuration: Build configuration (e.g., Debug, Release).
platform: Target platform (e.g., x86, x64).
verbosity: MSBuild output verbosity (quiet, minimal, normal, detailed, diagnostic).
max_cpu_count: Maximum number of CPUs for parallel build (None for default).
restore: Whether to perform NuGet restore before build.
additional_args: Additional MSBuild command-line arguments.
Returns:
A string indicating the build result, including success or filtered error messages.
Use this tool to automate the build process for MSBuild projects, ensuring compatibility with various configurations and environments.
Inputs: project_path (required), configuration, platform, verbosity, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no ambiguity between tools.
The single tool name 'build_msbuild_project' follows a clear verb_noun pattern and is descriptive.
A single tool for building MSBuild projects is slightly under-scoped but reasonable for a focused server; additional tools like clean or list properties could be added.
The tool covers the core build operation with good configuration options, but lacks related operations such as clean or property listing, which may cause dead ends for some workflows.
Maintenance
Related MCP Connectors
Build, test and cache insights for Xcode, Gradle and Bazel projects, for coding agents.
Discover software problems, analyze evidence, and create implementation-ready Build plans.
Build, check and report on MIDAS CIVIL NX bridge models and design tendons, with MIDAS IT plugins.
Build, run and publish Workbench flows, tasks, shims and knowledge bases.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables building and cleaning Delphi projects (.dproj/.groupproj) on Windows using MSBuild with RAD Studio environment initialization. Supports both individual projects and group projects with configurable build configurations and platforms.519MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to compile Delphi projects and single units directly through the Model Context Protocol. It features automatic compiler detection via the Windows registry and supports MSBuild with full build event integration.47 PyPI108MIT
- AlicenseAqualityBmaintenanceEnables secure Windows development automation by providing MCP tools for filesystem access, project builds, restricted PowerShell commands, and approved network fetches.17MIT
- AlicenseNot gradedqualityCmaintenanceEnables an agent to run a build tool and receive clean structured compiler diagnostics with file, line, severity, and message, avoiding noisy log spam.MIT