
MCP 服务器用于检查、搜索和反编译 Java AI 编码代理的 Maven .m2 JARs。
概览
让 AI 代理读取任何 Maven 依赖的实际源代码——从 ~/.m2 或 Maven Central 反编译 jar,并针对破坏性变更进行 diff 版本。 问代理“我正在将 org.jsoup:jsoup 从 1.17.2 升级到 1.23.2——哪里坏了?”如果无法读取 jar,它会凭记忆回答。在这个服务器上,compare_versions读取两个 jar 并报告实际变化: 成员会被比较,因此移动到超类型的一个会被报告为已移除,尽管它可能仍然可调用。工具在其自身输出中说明了这一点。 它对必须处理的工件也有效:extract_class_info退回 javap,返回解析后的字段、方法和字节码版本——这正是企业 Nexus 内部工件的真实情况。 这会安装 maven-code-search agent 技能,告诉你的 agent 何时需要使用这些工具。关于原始的 MCP 服务器设置,请参见安装。
概述(AI 翻译)
你的代理猜测它从未读取过的库API。这让它读取了它们。
让AI代理读取任何Maven依赖的实际源代码——从中反编译jar
~/.m2 或 Maven Central,以及用于破坏性变更的差异版本。
问客服*“我正在将org.jsoup:jsoup从1.17.2升级到1.23.2——会出什么问题?”* 和
没有读取罐子的方式,它只能凭记忆回答。有了这个服务器,
compare_versions 读取了两个罐子,并报告了实际发生的变化:
| 1.17.2 → 1.23.2 | |
|---|---|
| 重大变更 | 45 |
| 成员被移除 | 31 |
| 新增成员 | 150 |
| 有API变更的类 | 115个中的47个比较 |
成员会被比较按声明进行,因此移动到超类型的成员会被报告为 即使可能仍可调用,也已移除。该工具在其自身输出中声明了这一点。
它也适用于那些没有来源jar的神器:extract_class_info 退回
返回解析后的字段、方法和字节码版本——这恰好是
企业联结中内部工件的案例。
试试一次命令
这会安装maven-code-search特工技能,告诉你的特工何时该接近
为了这些工具。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Maven Decoder MCP Server
Your agent guesses at library APIs it has never read. This makes it read them.
Lets AI agents read the actual source of any Maven dependency — decompiles jars from
~/.m2 or Maven Central, and diffs versions for breaking changes.
Ask an agent “I’m upgrading org.jsoup:jsoup from 1.17.2 to 1.23.2 — what breaks?” and
without a way to read the jars it will answer from memory. With this server,
compare_versions reads both jars and reports what actually changed:
| 1.17.2 → 1.23.2 | |
|---|---|
| Breaking changes | 45 |
| Members removed | 31 |
| Members added | 150 |
| Classes with API changes | 47 of 115 compared |
Members are compared as declared, so one that moved to a supertype is reported as removed even though it may still be callable. The tool states this in its own output.
It works on artifacts that have no sources jar too: extract_class_info falls back
to javap and returns parsed fields, methods, and bytecode version — which is exactly
the case for the internal artifacts in a corporate Nexus.
Try it in one command
npx skills add https://github.com/salitaba/maven-decoder-mcp --skill maven-code-search
That installs the maven-code-search agent skill, which tells your agent when to reach
for these tools. For a raw MCP server setup instead, see Installation.
🚀 Features
Core Functionality
- Jar File Analysis: Deep inspection of jar files including metadata, manifests, and structure
- Dependency Resolution: Complete dependency tree analysis with transitive dependencies
- Source Code Extraction: Extract source code from source jars or decompile bytecode
- Class Information: Detailed class signatures, methods, fields, and annotations
- Search Capabilities: Find classes, methods, and dependencies across all artifacts
- Version Management: Compare versions, find dependents, and track version conflicts
Online Maven Support
- Maven Central Search: Find artifacts and classes that are not installed locally
- Remote Version Listing: See every published version, not just the ones you have
- On-Demand Download: Fetch any artifact (jar, sources, POM) into a local cache
- Transparent Fallback: Every analysis tool automatically downloads a missing artifact, so decompiling a dependency you never installed just works
- Mirror Friendly: Point it at a corporate Nexus/Artifactory, with optional credentials
- Offline Mode: A single env var restores fully local, network-free behavior
Advanced Features
- Decompilation Support: Integrated support for multiple Java decompilers (CFR, Fernflower, Procyon)
- Conflict Analysis: Detect and analyze dependency version conflicts
安装
uvx maven-decoder-mcp