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

@hyqf98/easy_jar_mcp_server

v1.0.0

Published

MCP Server for analyzing JAR/ZIP/WAR/EAR archives, decompiling Java class files, and remote SSH inspection

Readme

Easy Jar MCP Server

基于 Model Context Protocol (MCP) 的 JAR/ZIP/WAR/EAR 归档分析工具,支持 Java 反编译、前端项目源码分析、SSH 远程服务器检查。

功能特性

  • 归档分析:读取 JAR/ZIP/WAR/EAR 文件结构、清单、依赖
  • Java 反编译:支持 CFR/javap 双引擎,可反编译 JAR 内类、JDK 内置类、Maven 项目类
  • 前端源码分析:分析前端项目依赖结构,读取 node_modules 模块源码(支持 sourcemap 还原、Vue SFC 解析)
  • SSH 远程:通过 SSH 在远程服务器上查找、读取、反编译 JAR 文件

MCP 工具列表

环境检查

| 工具 | 说明 | 关键参数 | |------|------|---------| | check_environment | 检查 Java/CFR/javap 环境是否可用 | 无 |

归档文件操作

| 工具 | 说明 | 关键参数 | |------|------|---------| | list_entries | 列出归档文件中的所有条目 | filePath, filter, type | | read_entry | 读取归档文件中指定条目的内容 | filePath, entryPath, encoding | | read_manifest | 读取 MANIFEST.MF 和 pom.properties | filePath | | search_entries | 搜索归档文件中的条目 | filePath, pattern, includePackages | | analyze_jar | 分析归档文件结构、依赖和元数据 | filePath | | extract_entry | 从归档文件中提取指定条目到本地 | filePath, entryPath, outputPath |

Java 反编译

| 工具 | 说明 | 关键参数 | |------|------|---------| | decompile_class | 反编译 Java class 文件 | className, jarPath, projectPath, decompiler | | decompile_jar | 批量反编译整个 JAR 文件 | filePath, filter, decompiler |

反编译器选择cfr(默认,生成 Java 源码)或 javap(字节码查看,JDK 内置类自动回退)

前端源码分析

| 工具 | 说明 | 关键参数 | |------|------|---------| | analyze_frontend_project | 分析前端项目结构,列出依赖及安装状态 | projectPath | | read_module_source | 读取 node_modules 中模块源码(支持 sourcemap/Vue SFC) | projectPath, moduleName, filePath |

SSH 远程操作

| 工具 | 说明 | 关键参数 | |------|------|---------| | set_ssh_config | 配置 SSH 服务器连接 | name, host, port, username, password/privateKey | | list_ssh_servers | 列出已配置的 SSH 服务器 | 无 | | ssh_find_jars | 在远程服务器上查找 JAR 文件 | serverName, searchPath, maxDepth | | ssh_list_entries | 列出远程 JAR 文件条目 | serverName, archivePath | | ssh_read_entry | 读取远程 JAR 文件中条目内容 | serverName, archivePath, entryPath | | ssh_decompile_class | 反编译远程 JAR 中的 Java 类 | serverName, archivePath, className |

快速添加 MCP 配置

Claude Desktop

编辑配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "jar": {
      "command": "npx",
      "args": ["-y", "@hyqf98/easy_jar_mcp_server"]
    }
  }
}

Claude Code

claude mcp add jar -- npx -y @hyqf98/easy_jar_mcp_server

Codex CLI

codex mcp add jar -- npx -y @hyqf98/easy_jar_mcp_server

OpenCode

opencode mcp add jar -- npx -y @hyqf98/easy_jar_mcp_server

本地开发:将命令替换为 node /path/to/easy_jar_mcp_server/dist/index.js

使用示例

分析 JAR 文件

分析一下 /path/to/app.jar 的结构

反编译 Java 类

反编译 java.util.concurrent.ForkJoinPool
从 /path/to/app.jar 中反编译 com.example.MyService 类

前端项目分析

分析一下 /path/to/frontend-project 的依赖结构
读取 /path/to/frontend-project 中 axios 模块的源码

SSH 远程操作

配置 SSH 服务器 dev,地址 192.168.1.100,用户 root,密码 xxxxxx
在 dev 服务器上查找 /opt 目录下的 JAR 文件

前置要求

  • Node.js >= 18.0.0
  • Java >= 8(反编译功能需要,需设置 JAVA_HOME)
  • CFR 0.152(构建时自动下载到 lib/ 目录)
  • SSH(仅远程功能需要,需服务器支持 SSH2 协议)

开发

npm install
npm run build     # 构建(含自动下载 CFR)
npm run dev       # 开发模式(tsx 直接运行)
npm run start     # 运行构建产物

许可证

MIT License