Skip to main content

A lightweight MCP server for automating MSBuild projects and solutions builds.

Project description

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msbuild_mcp_server-0.1.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

msbuild_mcp_server-0.1.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file msbuild_mcp_server-0.1.3.tar.gz.

File metadata

  • Download URL: msbuild_mcp_server-0.1.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for msbuild_mcp_server-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2f52e3fb911366e23460964bb9eb43818038e90aa3e0ac00bd5638a33375ac43
MD5 c0316fd4126c5f6da87609bd809af199
BLAKE2b-256 08dfc602af2f4c9bf58004c9bba425c6da14047b5e1b0e42a5abdd5c325b3096

See more details on using hashes here.

File details

Details for the file msbuild_mcp_server-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for msbuild_mcp_server-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 104bdda307a9c2b3b0e2e764fbbb98f13b7f9edcf4e31b6ae7c94a2982cd6dff
MD5 4d7d94ca2fc14e58421eee440218ee92
BLAKE2b-256 138009d82c47ade0b8a51cf41582f9746df2998fa69a77deb21e538ddb7c3573

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page