MCP server and tools for analyzing test and runtime logs.
Project description
Log Analyzer MCP
Overview
Log Analyzer MCP is a specialized Model-Context-Protocol (MCP) server designed to integrate with Cursor. It provides tools for analyzing test logs, runtime errors, and code coverage reports, streamlining the development and debugging workflow.
The system is built with Python, utilizing hatch for project management and pytest for testing. It's designed to be robust and provide actionable insights from various log and report files.
Key Features
- MCP Server Implementation: Provides a suite of tools accessible via the Model-Context-Protocol.
- Test Log Analysis: Parses
pytestoutput to summarize test results, identify failures, and extract error details. - Runtime Error Analysis: Scans application runtime logs to find and contextualize errors based on execution IDs.
- Code Coverage Reporting: Generates and parses code coverage reports (XML format) to provide insights into test effectiveness.
- Hatch Integration: Uses
hatchfor dependency management, environment control, and running tests/coverage. - Subprocess Coverage: Includes mechanisms to capture code coverage from subprocesses started by the MCP server tools.
Getting Started
This project uses hatch for environment and project management.
-
Install Hatch: Follow the instructions on the official Hatch website.
-
Clone the repository:
git clone <repository-url> cd log_analyzer_mcp
-
Activate the Hatch environment:
hatch shellThis will create a virtual environment and install all dependencies if it's the first time.
-
Run Tests:
hatch test
-
Run Tests with Coverage:
hatch test --cover -v
For more detailed information on development, testing, and refactoring, please refer to our documentation:
MCP Server Tools
The server provides tools such as:
ping: Checks server status.analyze_tests: Analyzes test logs.run_tests_no_verbosity,run_tests_verbose: Runs tests with different verbosity.run_unit_test: Runs specific unit tests.analyze_runtime_errors: Analyzes runtime application logs.create_coverage_report: Generates coverage XML.get_coverage_report: Parses and returns coverage data.
(Refer to docs/testing/README.md for more details on server tools, though this file might need an update to reflect the current state precisely).
Contributing
Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License. See the LICENSE.md file for the complete license text.
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 log_analyzer_mcp-0.1.1.tar.gz.
File metadata
- Download URL: log_analyzer_mcp-0.1.1.tar.gz
- Upload date:
- Size: 72.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f879aac94cbaeca1eef528ff1c59c22f318a9f9b5155ed9ece0c3f04a52d8af5
|
|
| MD5 |
050c15a57d877db386b370d8bfe245c2
|
|
| BLAKE2b-256 |
5c6967b2486c95faef59f383203d27c2230f299941334c08b9b95c586233f8b7
|
File details
Details for the file log_analyzer_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: log_analyzer_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c960b555af77cb118aad4e71cd34650c6e3f65b43ee86c238fa7cc082ce6291
|
|
| MD5 |
051392cf1f95684976e79bf657d3709e
|
|
| BLAKE2b-256 |
07c981c44cedb8fdf41edfa4f7518068b2e9a4d4e0d1749655ee11a2e9c1ef89
|