npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@stg0512/java-quality-mcp

v0.2.0

Published

A [Model Context Protocol](https://modelcontextprotocol.io) server that enforces Java code quality inside Claude Code. It runs Checkstyle + PMD on AI-generated code, detects design smell, and lets teams accumulate custom style samples that guide future ge

Readme

@stg0512/java-quality-mcp

A Model Context Protocol server that enforces Java code quality inside Claude Code. It runs Checkstyle + PMD on AI-generated code, detects design smell, and lets teams accumulate custom style samples that guide future generation.

Features

Layer 1 — Style & rule validation

  • Checkstyle: naming conventions, method length, parameter count, nesting depth, cyclomatic complexity
  • PMD quickstart: empty catch blocks, generic exception handling, string comparison order, and more
  • Claude calls validate_code after generating code, fixes violations before showing output

Layer 2 — Design hints

  • Structural analysis runs alongside linting and returns a design_hints field
  • Detects: long if-else chains → Strategy/CoR, instanceof chains → Strategy/Visitor, sequential guard clauses → CoR
  • Hints describe structural facts; Claude decides whether and how to refactor

Layer 3 — Team style samples

  • /code-flavor-good and /code-flavor-bad slash commands
  • Paste a code snippet → Claude extracts intent and tags → stored in local SQLite
  • Samples are returned with every get_style_context call, shaping future generation

Requirements

  • Node.js 18+
  • Java 8+

Setup

Add to your .mcp.json:

{
  "mcpServers": {
    "code-quality": {
      "command": "npx",
      "args": ["@stg0512/java-quality-mcp"]
    }
  }
}

If java is not on your PATH, specify the JDK location:

{
  "mcpServers": {
    "code-quality": {
      "command": "npx",
      "args": ["@stg0512/java-quality-mcp"],
      "env": {
        "JAVA_HOME": "/path/to/jdk"
      }
    }
  }
}

Java is resolved in this order: JAVA11_HOMEJAVA_HOMEjava in PATH.

Tools

| Tool | When to call | |---|---| | get_style_context | Before generating Java code — returns active rules + style samples | | validate_code | After generating Java code — returns violations + design_hints | | flavor_add | Record a good or bad code sample | | flavor_list | List recorded samples | | flavor_delete | Remove a sample by id | | get_quality_report | Generate a statistics report of accumulated validation data |

Slash commands

/code-flavor-good and /code-flavor-bad — paste a code snippet and Claude will analyze it, generate a note and tags, and save it automatically.

/quality-report — generates a quality statistics report including:

  • Total validations and violations caught
  • Overall first-pass rate
  • Top 5 most frequently violated rules
  • Pass rate trend: recent 7 days vs previous 7 days
  • Total design hints triggered

Data storage

All data is stored in ~/.code-quality-mcp/flavor.db (SQLite), persisting across sessions:

| Table | Contents | |---|---| | flavors | Style samples recorded via /code-flavor-good and /code-flavor-bad | | validations | Auto-recorded results of every validate_code call (for quality reporting) |

License

MIT