msbuild-mcp-server
A lightweight MCP (Model Context Protocol) server for building MSBuild projects. Supports dynamic MSBuild discovery using vswhere and provides flexible build configuration options.
Documentation
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 `/.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.
Agent Prompt Examples
AI agents can trigger builds using natural language like:
- Basic Project Build
> *"Build this solution at `C:/Path/To/Project.sln` using `Release|x64`."*
- Unreal Engine Build
> *"Build the solution located at `C:/Projects/MyGame/MyGame.sln` using `Development Editor|Win64`."*
License
This project is licensed under the MIT License.
Frequently asked questions
What is msbuild-mcp-server?
msbuild-mcp-server is A lightweight MCP (Model Context Protocol) server for building MSBuild projects. Supports dynamic MSBuild discovery using vswhere and provides flexible build configuration options.
How do I install msbuild-mcp-server?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is msbuild-mcp-server open source?
Yes — it is hosted on GitHub at https://github.com/zenoengine/msbuild-mcp-server and has 1 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP