This is a demo of an Model Context Protocol (MCP) server for analyzing MSBuild binary log files (.binlog) with AI assistance.
This project builds upon the demo provided by baronfel/mcp-binlog-tool. The key feature of this analyzer is its ability to search binary logs with larger returned context that allows finding detailed build information while still keeping token count in check. As a result AI also can do the smart diff of the binlogs if good and bad binlogs are provided. Additional code and insights from JanProvaznik/binlogAInalyzer were also incorporated.
Install as a .NET global tool:
dotnet build
dotnet pack .\binlog.mcp\binlog.mcp.csproj
dotnet tool install --global --add-source "binlog.mcp\bin\Release" ar-may.binlog.mcpConfigure the MCP server in your mcp.json file:
{
"servers": {
"binlog-analyzer": {
"command": "ar-may.binlog.mcp",
"args": []
}
}
}- Generate a binary log during build
- Use the
initial_binlog_instructionsprompt to start and ask questions about your binlog.
load_binlog: Load and index a binary log file for analysis
search_binlog: Search through build events with structured queries and rich contextget_node_details: Get comprehensive information about a specific build node by IDget_node_path: Show hierarchical path from build root to a specific node
list_projects: List all projects with entry targets, durations, and project IDsget_expensive_targets: Identify performance bottlenecks by slowest targetsget_project_target_list: List all targets executed within a specific projectget_target_info_by_name: Get detailed target information by searching by nameget_target_info_by_id: Get detailed target information using unique target ID
get_embedded_file_content: Retrieve content of files embedded in the binloglist_embedded_files: List all embedded files in the binlogget_double_writes: Detect files that were written multiple times during buildget_file_copy_details: Analyze file copy operations and their detailssearch_in_embedded_files: Search within embedded source files
list_evaluations: List all evaluations for a specific projectget_evaluation_global_properties: Get global properties for a specific evaluation
initial_binlog_instructions: Set MSBuild Binary Log Analysis Agent Persona - Use this to start your analysis sessionanalyze_errors_warnings: Analyze Build Errors and Warnings - Focus on build failures and issuesanalyze_performance: Analyze Build Performance - Focus on build timing and optimization opportunities
Contributions are welcome! Please feel free to submit issues and pull requests.
Note: The quality of this code is best described as "vibe-coded" - it works for its intended purpose.