MSBuild binary logs (.binlog files) contain a wealth of information aboutyour build — every property evaluation, target execution, task invocation,error, and warning. But navigating that data manually can be overwhelming,especially when you’re debugging a complex multi-project solution. What if yourAI coding assistant could do the investigation for you?Today we’re introducing the Microsoft Binlog MCP Server, aModel Context Protocol (MCP) server thatgives AI assistants like GitHub Copilot direct access to your build logs. Itparses .binlog files and exposes 15 specialized tools that enable AI-drivenbuild failure diagnosis, property tracing, performance analysis, and buildcomparison — all through natural language conversation.Why MCP for Build Logs?The Model Context Protocol is an openstandard that lets AI assistants call external tools in a structured way. Bywrapping MSBuild binary log analysis in an MCP server, we give AI assistantsthe ability to:Investigate build failures by querying errors, warnings, and their fullproject/target/task contextTrace property origins to understand where a property got its valueAnalyze performance bottlenecks by identifying the slowest projects,targets, and tasksCompare two builds to spot differences in properties and packagesRead embedded source files captured during the buildInstead of manually scrolling through theMSBuild Structured Log Viewer, you can simply askyour AI assistant questions like “Why did my build fail?” or“What’s making my build slow?”15 Tools at Your AI Assistant’s DisposalThe Microsoft Binlog MCP Server provides tools organized into fourcategories:Build InvestigationToolWhat It Doesbinlog_overviewBuild status, duration, project count, error/warning countsbinlog_errorsBuild errors with full project, target, task, file, and line contextbinlog_warningsBuild warnings, filterable by warning codebinlog_searchFull-text search using the StructuredLog Viewer search DSLbinlog_projectsList all projects with build status and durationbinlog_propertiesMSBuild property values (curated defaults or filtered)binlog_itemsMSBuild items like PackageReference, Compile, and morebinlog_importsFull import chain of .props and .targets filesbinlog_explain_propertyTraces where a property gets its value — which file, target, or task set itEmbedded FilesToolWhat It Doesbinlog_filesList or read source files captured during the buildbinlog_search_filesSearch text across all embedded source filesPerformance AnalysisToolWhat It Doesbinlog_expensive_projectsSlowest projects by exclusive durationbinlog_expensive_targetsSlowest targets across the entire buildbinlog_expensive_tasksSlowest tasks across the entire buildBuild ComparisonToolWhat It Doesbinlog_compareDiff two binlogs — compare properties, packages, and moreGetting StartedThe easiest way to get started is through the.NET Agent Skills repository. Thedotnet-msbuild plugin bundles the Microsoft Binlog MCP Server along withcurated skills and agents for MSBuild build investigation and optimization.Pick the section below that matches your development environment.Visual StudioVisual Studio supports MCP servers through GitHub Copilot’s agent mode(Visual Studio 17.14 or later). After installing the dotnet-msbuildplugin, the Microsoft Binlog MCP Server is automatically discovered byCopilot Chat in agent mode. Open the Copilot Chat window, switch toAgent mode, and the binlog_* tools become available for anyconversation about a .binlog file in your solution.Visual Studio CodeIn VS Code, enable plugin support and add the marketplace to yoursettings.json:{ "chat.plugins.enabled": true, "chat.plugins.marketplaces": ["dotnet/skills"]}Then install the dotnet-msbuild plugin from the marketplace — theBinlog MCP Server is configured automatically.Prefer to wire up the MCP server directly? Add it to your.vscode/mcp.json:{ "servers": { "binlog-mcp": { "type": "stdio", "command": "dotnet", "args": ["tool", "run", "Microsoft.AITools.BinlogMcp"] } }}To pre-load a specific binlog at startup, pass the --binlog argument:{ "servers": { "binlog-mcp": { "type": "stdio", "command": "dotnet", "args": ["tool", "run", "Microsoft.AITools.BinlogMcp", "--", "--binlog", "msbuild.binlog"] } }}Command Line (Copilot CLI / Claude Code)For terminal-based AI assistants such as GitHub Copilot CLI or ClaudeCode, install the plugin directly from the dotnet/skills marketplace:/plugin marketplace add dotnet/skills/plugin install dotnet-msbuild@dotnet-agent-skillsRestart your assistant and the binlog_* tools are ready to use. You canverify they loaded with /skills.TipTo generate a binary log, add /bl to anydotnet build, dotnet test, or dotnet pack command — for example:dotnet build /bl.Example: Diagnosing a Build FailureOnce the MCP server is running and your AI assistant has access to a.binlog file, you can investigate build issues conversationally.Here’s a typical workflow:Generate a binlog: Run dotnet build /bl to capture a binary logAsk your assistant: “My build failed. Can you investigatemsbuild.binlog and tell me what went wrong?”The AI investigates: It calls binlog_overview to get the high-levelstatus, then binlog_errors to retrieve the actual errors with fullcontext, and may use binlog_explain_property or binlog_search to tracethe root causeGet actionable guidance: The assistant synthesizes findings and suggestsconcrete fixesFor performance investigations, the AI uses the binlog_expensive_projects,binlog_expensive_targets, and binlog_expensive_tasks tools to identifybottlenecks and recommend optimizations.The screenshot below shows this workflow in action inside VS Code.Try It Yourself: Compare Two BuildsHere’s a great way to take the MCP server for a spin right now. Pick arepository you build regularly — your own product, or an open-sourceproject like dotnet/msbuild ormicrosoft/testfx — and capturetwo binary logs from different versions or configurations:# Build version Agit checkout maindotnet build /bl:build-a.binlog# Build version B (a different branch, SDK, or configuration)git checkout my-feature-branchdotnet build /bl:build-b.binlogThen ask your AI assistant:“Compare build-a.binlog and build-b.binlog. What MSBuild propertiesand package versions changed, and did any of those changes affect buildperformance?”Behind the scenes, the assistant calls binlog_compare to diff propertiesand packages, then uses binlog_expensive_projects andbinlog_expensive_targets on both logs to correlate the changes withtiming differences — turning what used to be a tedious side-by-side logcomparison into a single conversation.Built on StructuredLoggerUnder the hood, the Microsoft Binlog MCP Server uses theMSBuild Structured Log Viewerlibrary — the same engine that powers the popular MSBuild Structured Log Viewerdesktop app. The binlog_search tool supports the fullStructuredLog Viewer search DSL,including node type filters ($error, $warning, $task, $target,$project), hierarchical scoping with under(), and exact phrase matchingwith quoted strings.TelemetryThe server emits anonymous usage telemetry (tool name, latency, result size,success/failure) to help us improve the product. It follows the standard .NETSDK approach: on by default, single opt-out via theDOTNET_CLI_TELEMETRY_OPTOUT environment variable.export DOTNET_CLI_TELEMETRY_OPTOUT=1No binlog content, file paths, or raw error messages are ever collected — onlyfilenames are HMAC-SHA256 hashed for correlation.What’s NextThe Microsoft Binlog MCP Server is in preview and we’re actively improvingit. We’d love your feedback — please file issues in thedotnet/skills repository.If you’re working with MSBuild builds and using AI coding assistants, give ita try. Let your AI do the heavy lifting of build investigation while you focuson writing code.The post AI-Powered MSBuild Investigation with the Microsoft Binlog MCP Server appeared first on .NET Blog.