Skip to main content

MCP server and tools for analyzing test and runtime logs.

Project description

Log Analyzer MCP

CI codecov PyPI - Version

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.

  2. Clone the repository:

    git clone <repository-url>
    cd log_analyzer_mcp
    
  3. Activate the Hatch environment:

    hatch shell
    

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

  4. Run Tests:

    hatch test
    
  5. 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

Chroma MCP Server is licensed under the MIT License with Commons Clause. This means you can:

Allowed:

  • Use Log Analyzer MCP for any purpose (personal, commercial, academic)
  • Modify the code
  • Distribute copies
  • Create and sell products built using Log Analyzer MCP

Not Allowed:

  • Sell Log Analyzer MCP itself
  • Offer Log Analyzer MCP as a hosted service
  • Create competing products based on Log Analyzer MCP

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

log_analyzer_mcp-0.1.2.tar.gz (90.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

log_analyzer_mcp-0.1.2-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file log_analyzer_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: log_analyzer_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 90.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for log_analyzer_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0b474a7a0fe420554394b5190edba486885f7b4cc2c5edb227250268e36165ae
MD5 7b72ca5b4e441027c45cd22fc8954221
BLAKE2b-256 20b6acc8ef72fd4611649880657333a4c3f1593d5587f513d23269f49fbdcb0e

See more details on using hashes here.

File details

Details for the file log_analyzer_mcp-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for log_analyzer_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c3a0b52f80952b3da86f69700ad97e3a7e5f44e3376680f6a5b1ece1d66a5ef
MD5 83e534066dc43036110b854678b1c7be
BLAKE2b-256 0690e2d05493a112039f9fcfb10a11ad3eb18e2b33ccd4c555797f4bc9aa2dda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page