Metadata-Version: 2.4
Name: log_analyzer_mcp
Version: 0.1.1
Summary: MCP server and tools for analyzing test and runtime logs.
Project-URL: Homepage, https://github.com/nold-ai/log_analyzer_mcp
Project-URL: Repository, https://github.com/nold-ai/log_analyzer_mcp.git
Project-URL: Documentation, https://github.com/nold-ai/log_analyzer_mcp#readme
Author-email: "Dominikus Nold (Nold Coaching & Consulting)" <info@noldcoaching.de>
License: # MIT License
        
        Copyright (c) 2025 Nold Coaching & Consulting, Dominikus Nold
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        "Commons Clause" License Condition v1.0
        
        The Software is provided to you by the Licensor under the License (defined below), subject to the following condition:
        
        Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.
        
        For purposes of the foregoing, "Sell" means practicing any or all of the rights granted to you under the License to provide the Software to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/support services related to the Software), as part of a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.
        
        Software: All Log Analyzer MCP associated files (including all files in the GitHub repository "log_analyzer_mcp" and in the npm package "log-analyzer-mcp").
        
        License: MIT
        
        Licensor: Nold Coaching & Consulting, Dominikus Nold
License-File: LICENSE.md
Keywords: coverage,development-tools,log-analysis,mcp,runtime-errors,testing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Logging
Requires-Python: >=3.10
Requires-Dist: jsonschema>=4.23.0
Requires-Dist: loguru>=0.7.3
Requires-Dist: mcp>=1.4.1
Requires-Dist: pydantic-core>=2.27.2
Requires-Dist: pydantic>=2.10.6
Requires-Dist: python-dateutil>=2.9.0.post0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: pytz>=2025.1
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: requests>=2.32.3
Requires-Dist: rich>=13.9.4
Requires-Dist: tenacity>=9.0.0
Requires-Dist: types-pyyaml>=6.0.12
Requires-Dist: typing-extensions>=4.12.2
Provides-Extra: dev
Requires-Dist: black>=25.1.0; extra == 'dev'
Requires-Dist: isort>=6.0.1; extra == 'dev'
Requires-Dist: mypy>=1.15.0; extra == 'dev'
Requires-Dist: pylint>=3.3.6; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest-mock>=3.14.0; extra == 'dev'
Requires-Dist: pytest>=8.3.5; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0.12.20250402; extra == 'dev'
Description-Content-Type: text/markdown

# 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 `pytest` output 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 `hatch` for 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.

1. **Install Hatch:**
    Follow the instructions on the [official Hatch website](https://hatch.pypa.io/latest/install/).

2. **Clone the repository:**

    ```bash
    git clone <repository-url>
    cd log_analyzer_mcp
    ```

3. **Activate the Hatch environment:**

    ```bash
    hatch shell
    ```

    This will create a virtual environment and install all dependencies if it's the first time.

4. **Run Tests:**

    ```bash
    hatch test
    ```

5. **Run Tests with Coverage:**

    ```bash
    hatch test --cover -v
    ```

For more detailed information on development, testing, and refactoring, please refer to our documentation:

- **[Refactoring Plan](./docs/refactoring/log_analyzer_refactoring_v1.md)**
- **[Testing Overview](./docs/testing/README.md)**

## 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](LICENSE.md) file for the complete license text.
