This tool is designed to analyze MSBench log zip file, automatically extract error information from nested logs.
Project description
MSBench Analysis MCP
This tool is designed to analyze MSBench log zip file, automatically extract error information from nested logs. It is intended for use as an MCP (Model Context Protocol) server, supporting integration with MCP clients such as Copilot Chat or mcp-inspector.
Features
- Recursively extracts and analyzes all inner zip files within a given MSBench log archive.
- Only processes
cls.logfiles located in theoutputdirectory of each inner zip. - Extracts error messages and error types from logs using regular expressions.
- Aggregates error statistics by type and provides total error counts.
- Tracks and reports the number of skipped (unreadable or broken) inner zip files and cls.log files.
- Generates a detailed Excel report with error details and summary statistics.
- Provides both summary and detailed error information via MCP tools.
MCP Tools
1. analyze_errors_and_save_report(zipPath: str) -> str
- Description:
- Analyzes the specified MSBench zip file, extracts all error information, and saves a detailed Excel report.
- Returns a summary string including the report path, total error count, error type breakdown, and the number of skipped files.
- Output Example:
Report path: /path/to/msbench_analysis_report.xlsx Total errors: 42 Error type count: {"TypeA": 10, "TypeB": 32} Skipped inner zip: 1 Skipped cls.log: 2
2. analyze_errors(zipPath: str) -> str
- Description:
- Analyzes the specified MSBench zip file and returns a summary plus a detailed error table in markdown format (for use in markdown-capable clients).
- The table includes file name, error information, and error type for each error found.
- Output Example:
Total errors: 42 Error type count: {"TypeA": 10, "TypeB": 32} Skipped inner zip: 1 Skipped cls.log: 2 | File Name | Error Information | Error Type | |-----------|------------------|------------| | foo.zip | ... | TypeA | | bar.zip | ... | TypeB |
Requirements
- Python version >= 3.10
- uv (Python package manager, recommended)
- Node.js and npx (required for MCP Inspector)
Install uv (Python package manager)
- Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh # If you don't have curl, you can use wget: wget -qO- https://astral.sh/uv/install.sh | sh
Usage
1. VS Code Copilot Chat Configuration
- Open VS Code, go to
Preferences→Settings, search forchat.mcp.discovery, and set it toenabled. - Configure the MCP Server:
- This tool is published on PyPI and can be launched directly using
uvx. - In
Preferences→Settings, search forMcp, find the MCP settings, and editsettings.jsonto add:"msbench-analysis-mcp": { "command": "uvx", "args": [ "msbench-analysis-mcp" ], "env": {} }
- This tool is published on PyPI and can be launched directly using
- Click
Startabove the MCP configuration to launch the server. - After starting, open Copilot Chat and switch the mode to
agent mode. - Check if the two tools provided by this server are recognized by Copilot.
- You can now use Copilot Chat in conversation mode to analyze MSBench errors interactively.
2. MCP Inspector Configuration
- For more about MCP inspector. Please check https://modelcontextprotocol.io/docs/tools/inspector.
- The configuration is similar to Copilot Chat: ensure the MCP server is running and this tool is added.
- You can select this tool in MCP Inspector for interactive analysis.
How to launch MCP Inspector:
- You can start MCP Inspector directly using npx:
npx @modelcontextprotocol/inspector
Configuration steps:
- After launching, open the MCP Inspector UI in your browser.
- In the UI, set up the MCP server as shown below:
- Transport Type: STDIO
- Command:
uvx - Arguments:
msbench-analysis-mcp
- copy the token from the terminal output and paste it into the
configurationsection in the frontend. - It is highly recommended to increase the request timeout in the configuration, as the tools in this server may take a long time to run and could otherwise result in request timeouts.
- In the "Tools" tab, click
List Toolsto display all available tools from the server. Click on any tool to invoke it interactively.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file msbench_analysis_mcp-0.1.1.tar.gz.
File metadata
- Download URL: msbench_analysis_mcp-0.1.1.tar.gz
- Upload date:
- Size: 36.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3225e8d6a9616edcde284c727ef051c247f96de7ee3f288bf69037c3d5287375
|
|
| MD5 |
953dc832f68907072c0011aa05ba6d95
|
|
| BLAKE2b-256 |
607f2b4c745227df3c9435c18c3c98e4828f9dd509f286e191f4d9a5041a206a
|
File details
Details for the file msbench_analysis_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: msbench_analysis_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0370294a41c2fad1e22a04c51ce181caa1127e6757062748649a49d27cede10e
|
|
| MD5 |
58e67ae1a20e81ef6365018f77c01b42
|
|
| BLAKE2b-256 |
1b6eda77f62de01e40a9d96c2d6ed2749b5e10caf81d13f4207dd3862ef23427
|