Skip to main content

MCP server for JaCoCo code coverage report analysis

Project description

MseeP.ai Security Assessment Badge

MCP-JaCoCo

MCP-JaCoCo is a server tool that converts JaCoCo code coverage reports into formats optimized for Large Language Models (LLMs), making AI-driven analysis easier and more effective.

Why It Matters

As AI and LLMs play a bigger role in software development, traditional code coverage reports—like those from JaCoCo—need a makeover. While great for humans, their XML format isn’t ideal for AI tools to process or analyze. MCP-JaCoCo bridges this gap by transforming these reports into LLM-friendly formats, unlocking powerful benefits for development teams:

  • Quick, meaningful summaries of code coverage
  • Easy identification of untested or poorly tested code
  • Smart suggestions for new test cases
  • Streamlined AI-assisted test planning
  • Automated documentation of coverage results With MCP-JaCoCo, teams can tap into AI’s full potential, boosting efficiency and insight in testing workflows.

What It Solves

  • Complex Formats: Simplifies JaCoCo’s dense XML reports for AI use
  • Scattered Data: Pulls coverage metrics into one accessible place
  • Slow Analysis: Cuts down on time-consuming manual reviews
  • Integration Hurdles: Makes raw data play nicely with AI tools

Key Features

  • Smart Conversion: Transforms JaCoCo XML reports into LLM-friendly JSON format
  • Flexible Coverage Types: Supports multiple coverage metrics (instruction, branch, line, etc.)
  • Efficient Processing: Fast and lightweight report processing
  • Structured Output: Well-organized JSON format for easy AI consumption
  • Customizable Analysis: Filter coverage data by specific metrics of interest

Installation

Install MCP-JaCoCo using uv with this configuration:

{
  "mcpServers": {
     "mcp-jacoco-reporter-server": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/Users/crisschan/workspace/pyspace/mcp-jacoco-reporter/mcp-jacoco-reporter-server.py"
      ],
      "env": {
        "COVERED_TYPES": "nocovered, partiallycovered, fullcovered"
      },
      "alwaysAllow": [
        "jacoco_reporter_server"
      ]
    }
  }
}

Tool

jacoco_reporter_server

  • Reads JaCoCo XML report and returns coverage data in JSON format
  • Input:
    • jacoco_xmlreport_path: Path to JaCoCo xml report path(jacoco.xml)
  • Return:
    • String, formatted JSON data containing coverage metrics

Example output format:

[
    {
        "sourcefile": "PasswordUtil.java",
        "package": "com/cicc/ut/util",
        "lines": {
            "nocovered": [],
            "partiallycovered": []
        },
        "branch": {
            "nocovered": [],
            "partiallycovered": []
        }
    },
    {
        "sourcefile": "UserServiceImpl.java",
        "package": "com/cicc/ut/service/impl",
        "lines": {
            "nocovered": [
                33,
                67,
                69,
                71,
                72
            ],
            "partiallycovered": []
        },
        "branch": {
            "nocovered": [
                67
            ],
            "partiallycovered": [
                32
            ]
        }
    },
    {
        "sourcefile": "Constants.java",
        "package": "com/cicc/ut/constants",
        "lines": {
            "nocovered": [],
            "partiallycovered": []
        },
        "branch": {
            "nocovered": [],
            "partiallycovered": []
        }
    },
    {
        "sourcefile": "AuthException.java",
        "package": "com/cicc/ut/exceptions",
        "lines": {
            "nocovered": [],
            "partiallycovered": []
        },
        "branch": {
            "nocovered": [],
            "partiallycovered": []
        }
    },
    {
        "sourcefile": "UserService.java",
        "package": "com/cicc/ut/service",
        "lines": {
            "nocovered": [],
            "partiallycovered": []
        },
        "branch": {
            "nocovered": [],
            "partiallycovered": []
        }
    }
]

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

iflow_mcp_crisschan_server-0.1.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

iflow_mcp_crisschan_server-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_crisschan_server-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_crisschan_server-0.1.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_crisschan_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cce24e4c538ce14f25c4831ac18e1cd633ff7f63e92d61dcd27f07670462a11f
MD5 90610257d296b193468216781cccb41a
BLAKE2b-256 4420c05fb2708a75b6684442ce0d768ea72c81505131f765dafb1d37d6fd1ddb

See more details on using hashes here.

File details

Details for the file iflow_mcp_crisschan_server-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_crisschan_server-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_crisschan_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39917a26ba0d197fec0f258632b473bfa7a7134b012a0605b2ea9baaf49fee1e
MD5 82f9eb6f01ca28e8d74125426734efe1
BLAKE2b-256 7e40c91adac40106667eda719cb27151c08ea964e7f679173c2122d9bcf0dc0a

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