Maven Decoder

io.github.salitaba由 GitHub 账号 salitaba 发布v1.3.2更新于 Oct 25, 2026

Lets AI agents read the real source of any Maven dependency, decompiled from ~/.m2 or Central.

已验证STDIO仅桌面文件与存储开发者工具

概览

AI 生成的概览

本地运行的 MCP 服务器,让 AI 助手读取、反编译并比较本地 Maven 仓库或 Maven Central 中的依赖 jar。

可以做什么
列出、搜索并检查本地 Maven 仓库中的构件与类,包括 jar 结构、元数据、类签名、字段与方法,以及 .proto 等文本资源。提取并反编译 Java 源码,在没有 sources jar 时回退到 javap。分析依赖关系:POM 依赖、完整依赖树、被依赖方和版本冲突。比较两个版本并给出公共 API 差异与破坏性变更,在编译后的字节码中查找类或方法的真实调用方。搜索 Maven Central、列出已发布版本,并把构件下载到独立缓存。
适用场景
适合 Java 与 JVM 开发场景:在升级依赖前确认会破坏什么、了解不熟悉的 API、查找真实调用示例,或检查没有 sources jar 的内部构件,让助手阅读真实代码而不是凭记忆作答。
运行要求
通过 npx 或 uvx(或 Docker)以 stdio 在本地运行。反编译需要 Java 8+,需要本地 Maven 仓库(默认 ~/.m2/repository),以及 Python 3.8+ 或 Node.js 14+。默认启用联网;可选配置包括 MAVEN_REPOSITORY、MAVEN_OFFLINE、MAVEN_AUTO_DOWNLOAD、MAVEN_REMOTE_REPOS、MAVEN_REMOTE_USERNAME 和用于私有镜像的 MAVEN_REMOTE_PASSWORD。
安装前请注意
默认开启在线模式:缺失的构件会从 Maven Central 或配置的镜像下载到缓存,搜索请求会发往公共索引,因此构件坐标会发送给第三方。MAVEN_REMOTE_PASSWORD 是私有仓库的密钥,应放在客户端的环境变量中。如需完全本地、无网络使用,请将 MAVEN_OFFLINE 设为 true。下载内容写入与真实 Maven 仓库分开的缓存目录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Maven Decoder,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Maven Decoder MCP Server

[skills.sh]

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.

[Demo: comparing jsoup 1.17.2 with 1.23.2]

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 changes45
Members removed31
Members added150
Classes with API changes47 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

bash
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
  • Repository Navigation: Browse and explore the local Maven repository structure
  • Metadata Parsing: Extract and parse Maven POM files and metadata
  • Service Discovery: Find and analyze Java services and SPI implementations
  • Response Management: Intelligent pagination and summarization for large responses
  • Method Extraction: Extract specific methods from large Java classes
  • Integrity Checking: Downloads are verified against the repository's SHA-1 checksums

📦 Installation

Prerequisites

  • Java 8+ (for decompilation features)
  • Maven local repository (~/.m2/repository)
  • One of: Python 3.8+, Node.js 14+, or Docker

🚀 Quick Install

One-Line Install (Recommended)
bash
curl -fsSL https://raw.githubusercontent.com/salitaba/maven-decoder-mcp/main/install.sh | bash

📋 Installation Methods

Method 1: uvx (Recommended)
bash
# Install uv (if not installed)curl -Ls https://astral.sh/uv/install.sh | sh# Ensure your shell PATH is updated (restart shell or eval as printed by installer)
# Run the server via uvx (isolated, fast, no venv needed)uvx maven-decoder-mcp
# Optional: pick a specific Python# uvx --python 3.12 maven-decoder-mcp
Method 2: Node.js/npm
bash
# Install globallynpm install -g maven-decoder-mcp
# Or install locallynpm install maven-decoder-mcp
# Run the servermaven-decoder-mcp# or if installed locally: npx maven-decoder-mcp
Method 3: Docker
bash
# Pull and rundocker run --rm -it \  -v ~/.m2:/home/mcpuser/.m2 \  -v $(pwd):/workspace \  ali79taba/maven-decoder-mcp:latest
Method 4: From Source (Development)
bash
# Clone repositorygit clone https://github.com/salitaba/maven-decoder-mcp.gitcd maven-decoder-mcp
# Option A: Using Virtual Environmentpython3 -m venv .venvsource .venv/bin/activate  # On Windows: .venv\Scripts\activatepip install -r requirements.txtpip install "git+https://github.com/modelcontextprotocol/python-sdk.git"./setup_decompilers.sh
# Option B: System-wide Installation (not recommended)./setup_decompilers.sh

Windows

For a source checkout, use Python 3.10 or newer and a JDK on PATH. From the repository root, create and activate a virtual environment in PowerShell:

powershell
python -m venv .venv.\.venv\Scripts\Activate.ps1python -m pip install -e ".[dev]"
# Point to your existing local Maven repository (drive-letter paths are supported)$env:MAVEN_REPOSITORY = 'F:\data\repository'maven-decoder-mcp

In Command Prompt (cmd.exe), activate with .venv\Scripts\activate.bat and set the repository with set "MAVEN_REPOSITORY=F:\data\repository" instead. These environment settings apply to programs launched from that terminal; set them in your MCP client's environment when it launches the server separately.

Remote downloads use a separate cache, resolved in this order (empty values are skipped):

  1. MAVEN_DECODER_CACHE_DIR: the complete cache directory; no subdirectory is appended.
  2. XDG_CACHE_HOME: append maven-decoder-mcp\repository.
  3. LOCALAPPDATA: append maven-decoder-mcp\repository.
  4. Otherwise, ~/.cache/maven-decoder-mcp/repository under your home directory.

On Windows, this usually means %LOCALAPPDATA%\maven-decoder-mcp\repository; XDG_CACHE_HOME still takes precedence if set. The cache uses Maven's directory layout but stays separate from the real local repository so downloads do not interfere with Maven builds. Setting MAVEN_REPOSITORY does not change the cache location.

🔧 Configuration

For Cursor IDE

Add to your ~/.cursor/mcp_servers.json:

json
{  "maven-decoder": {    "command": "uvx",    "args": ["maven-decoder-mcp"]  }}

For Other MCP Clients

The server runs as a standard MCP server and can be integrated with any MCP-compatible client.

🧠 AI Agent Skill

This repository includes a maven-code-search agent skill that tells AI coding agents when and how to use this MCP for searching installed Maven package code.

bash
npx skills add https://github.com/salitaba/maven-decoder-mcp --skill maven-code-search

The skill is located at skills/maven-code-search and is ready for skills.sh indexing after the repository is pushed.

🛠️ Available Tools

Local Analysis

ToolDescription
list_artifactsList artifacts in Maven repository with filtering
analyze_jarAnalyze jar file structure and contents
extract_class_infoGet detailed information about Java classes
get_dependenciesRetrieve Maven dependencies from POM files
search_classesSearch for classes across all jars, optionally filtered by annotation
extract_source_codeDecompile and extract Java source code
extract_jar_resourceExtract text resources such as .proto files, services, and metadata
compare_versionsCompare two versions, including a public API diff and breaking changes
find_usage_examplesFind classes that reference a given class or method
get_dependency_treeGet complete dependency tree
find_dependentsFind artifacts that depend on a specific artifact
get_version_infoGet installed versions of an artifact (set include_remote to add published ones)
analyze_jar_structureAnalyze overall jar structure and metadata
extract_method_infoExtract specific method information from Java classes

Online (Maven Central)

ToolDescription
search_maven_centralSearch Maven Central for artifacts by name, coordinates, or contained class
get_remote_versionsList every version published remotely, flagging which are installed
download_artifactDownload an artifact (jar/sources/POM) into the local cache; accepts latest

Tool parameters

ToolParameterTypeDefaultDescription
list_artifactsgroup_idstring—Filter by group ID (e.g., 'org.springframework')
list_artifactsartifact_idstring—Filter by artifact ID (e.g., 'spring-core')
list_artifactsversionstring—Filter by version (e.g., '5.3.21')
list_artifactssort_bystringnameOrder results by: 'name' (group/artifact/version ascending, default), 'size' (largest jars first), or 'modified' (most recently modified first). Unknown values fall back to 'name'.
list_artifactslimitinteger50Maximum number of artifacts to return
list_artifactspageinteger1Page number for pagination
list_artifactsitems_per_pageinteger20Items per page
analyze_jargroup_id*string—Maven group ID
analyze_jarartifact_id*string—Maven artifact ID
analyze_jarversion*string—Maven version
analyze_jarinclude_bytecodebooleanFalseInclude bytecode analysis
analyze_jarinclude_manifestbooleanTrueInclude JAR manifest
analyze_jarsummarize_large_contentbooleanTrueSummarize large content automatically
extract_class_infogroup_id*string—Maven group ID
extract_class_infoartifact_id*string—Maven artifact ID
extract_class_infoversion*string—Maven version
extract_class_infoclass_patternstring—Pattern to match class names (regex supported)
extract_class_infoinclude_methodsbooleanTrueInclude method signatures
extract_class_infoinclude_fieldsbooleanTrueInclude field information
extract_class_infoinclude_bytecodebooleanFalseInclude verbose javap bytecode output for matched classes
extract_class_infopageinteger1Page number for pagination
extract_class_infoitems_per_pageinteger20Items per page
extract_class_infosummarize_large_contentbooleanTrueSummarize large content automatically
get_dependenciesgroup_id*string—Maven group ID
get_dependenciesartifact_id*string—Maven artifact ID
get_dependenciesversion*string—Maven version
get_dependenciesinclude_transitivebooleanFalseInclude transitive dependencies
get_dependenciespageinteger1Page number for pagination
get_dependenciesitems_per_pageinteger20Items per page
search_classesclass_namestring—Class name to search for (supports wildcards)
search_classespackage_patternstring—Package pattern to filter by
search_classesannotationstring—Search for classes with specific annotation
search_classescase_sensitivebooleanTrueMatch class_name and package_pattern case-sensitively. Set false for a case-insensitive search (e.g. 'arraylist' matches 'ArrayList').
search_classeslimitinteger100Maximum results to return
search_classespageinteger1Page number for pagination
search_classesitems_per_pageinteger20Items per page
extract_source_codegroup_id*string—Maven group ID
extract_source_codeartifact_id*string—Maven artifact ID
extract_source_codeversion*string—Maven version
extract_source_codeclass_name*string—Fully qualified class name
extract_source_codeprefer_sourcesbooleanTruePrefer source jar over decompilation
extract_source_codesummarize_large_contentbooleanTrueSummarize large content automatically
extract_source_codemax_linesinteger500Maximum lines to return (0 for all)
extract_jar_resourcegroup_id*string—Maven group ID
extract_jar_resourceartifact_id*string—Maven artifact ID
extract_jar_resourceversion*string—Maven version
extract_jar_resourceresource_pathstring—Exact resource path inside the jar
extract_jar_resourceresource_patternstring—Regex pattern to match resource paths
extract_jar_resourcemax_bytesinteger65536Maximum bytes to read per resource
extract_jar_resourcelimitinteger20Maximum matching resources to return
compare_versionsgroup_id*string—Maven group ID
compare_versionsartifact_id*string—Maven artifact ID
compare_versionsversion1*string—First (older) version to compare
compare_versionsversion2*string—Second (newer) version to compare
compare_versionscompare_apibooleanTrueDiff the public API: added/removed public and protected methods and fields, and breaking changes
compare_versionsresolve_inheritedbooleanFalseReclassify members that disappeared from a class but are still declared on a supertype within the new jar into a 'moved to supertype' bucket instead of counting them as breaking removals. Defaults to false (byte-identical to the as-declared diff).
compare_versionssummarize_large_contentbooleanTrueSummarize large content automatically
find_usage_examplesclass_name*string—Class name to find usage for
find_usage_examplesmethod_namestring—Method name to find usage for
find_usage_examplessearch_testsbooleanTrueSearch in test jars
find_usage_exampleslimitinteger50Maximum results to return
find_usage_examplespageinteger1Page number for pagination
find_usage_examplesitems_per_pageinteger20Items per page
get_dependency_treegroup_id*string—Maven group ID
get_dependency_treeartifact_id*string—Maven artifact ID
get_dependency_treeversion*string—Maven version
get_dependency_treemax_depthinteger3Maximum depth to show
get_dependency_treesummarize_large_contentbooleanTrueSummarize large content automatically
find_dependentsgroup_id*string—Target group ID
find_dependentsartifact_id*string—Target artifact ID
find_dependentsversionstring—Specific version to search for (optional)
find_dependentslimitinteger100Maximum results to return
find_dependentspageinteger1Page number for pagination
find_dependentsitems_per_pageinteger20Items per page
get_version_infogroup_id*string—Maven group ID
get_version_infoartifact_id*string—Maven artifact ID
get_version_infoinclude_remotebooleanFalseAlso list versions published on the remote repository (not just installed ones)
get_version_infolimitinteger50Maximum versions to return
get_version_infopageinteger1Page number for pagination
get_version_infoitems_per_pageinteger20Items per page
analyze_jar_structuregroup_id*string—Maven group ID
analyze_jar_structureartifact_id*string—Maven artifact ID
analyze_jar_structureversion*string—Maven version
analyze_jar_structuresummarize_large_contentbooleanTrueSummarize large content automatically
extract_method_infogroup_id*string—Maven group ID
extract_method_infoartifact_id*string—Maven artifact ID
extract_method_infoversion*string—Maven version
extract_method_infoclass_name*string—Fully qualified class name
extract_method_infomethod_patternstring—Pattern to match method names (regex supported)
extract_method_infoinclude_bytecodebooleanFalseInclude bytecode analysis
extract_method_infomax_methodsinteger10Maximum number of methods to return
search_maven_centralquerystring—Free-text search term (e.g. 'jackson databind')
search_maven_centralgroup_idstring—Exact group ID filter (e.g. 'org.springframework')
search_maven_centralartifact_idstring—Exact artifact ID filter (e.g. 'spring-core')
search_maven_centralclass_namestring—Simple class name to find the containing artifact (e.g. 'ObjectMapper')
search_maven_centralfully_qualified_classstring—Fully qualified class name (e.g. 'com.fasterxml.jackson.databind.ObjectMapper')
search_maven_centralpackagingstring—Packaging filter (e.g. 'jar', 'pom')
search_maven_centralall_versionsbooleanFalseReturn every published version instead of only the latest per artifact
search_maven_centrallimitinteger20Maximum results to return (max 200)
search_maven_centralpageinteger1Page number for pagination
get_remote_versionsgroup_id*string—Maven group ID
get_remote_versionsartifact_id*string—Maven artifact ID
get_remote_versionsinclude_snapshotsbooleanTrueInclude -SNAPSHOT versions. Set false to list only released versions.
get_remote_versionslimitinteger100Maximum versions to return
download_artifactgroup_id*string—Maven group ID
download_artifactartifact_id*string—Maven artifact ID
download_artifactversion*string—Version to download, or 'latest' for the newest release
download_artifactinclude_sourcesbooleanTrueAlso download the sources jar when published
download_artifactinclude_javadocbooleanFalseAlso download the javadoc jar when published
download_artifactclassifierstring—Download a specific classified jar instead of the main one
download_artifactforcebooleanFalseRe-download even when the file is already cached

* Required — the parameter appears in the tool's inputSchema required array. Parameters without a * are optional and may be omitted.

💡 Usage Examples

Finding Dependencies

"Show me all dependencies of org.springframework:spring-core:5.3.21"

Decompiling Classes

"Decompile the class com.example.MyService from my Maven repository"

Analyzing Conflicts

"Find all version conflicts in my Maven repository"

Checking an Upgrade for Breaking Changes

"Compare org.jsoup:jsoup 1.17.2 with 1.23.2 and tell me what would break"

compare_versions diffs the public and protected members of every class the two versions share, and reports removals separately from additions. Removed members and removed classes are counted as breaking changes. Members are compared as declared, so one that moved to a supertype is reported as removed even though it may still be callable.

Exploring APIs

"Show me all public methods in the Jackson ObjectMapper class"

Finding Real Callers

"Find classes that call ObjectMapper.readValue, including examples from test jars"

find_usage_examples scans compiled class constant pools, so it finds real callers rather than simple name matches. Pass method_name (such as readValue) to narrow the results to callers of a specific method. Test jars are included by default and ranked first because they often contain the clearest examples; set search_tests to false to exclude them. The scan stops after MCP_USAGE_SCAN_LIMIT classes (default: 200000) to stay responsive on large repositories.

Inspecting Compiled-Only Artifacts

"The sources jar is missing. Use extract_class_info for bytecode-backed fields and methods.""Find and read .proto resources from com.example:protobuf-lib:1.0.0"

When a dependency has no sources jar, extract_class_info uses javap internally and returns parsed fields, methods, bytecode version, and optional verbose bytecode output. Agents should use analyze_jar, extract_class_info, extract_source_code, and extract_jar_resource through this MCP instead of running jar or javap directly.

Working with Large Responses

"List all Spring classes with pagination (page 2, 10 items per page)""Extract source code for a large class with summarization""Get method information for specific patterns in a class"

Searching Maven Central (Online)

"Which Maven artifact contains the class HikariDataSource?""Search Maven Central for retrofit""What is the newest published version of org.apache.commons:commons-lang3?""Download com.google.code.gson:gson:latest and show me the JsonParser class"

🌐 Online Maven Support

The server works against the local repository and remote repositories. Online access is enabled by default.

How it works

  1. Every tool first looks in your local repository (~/.m2/repository).
  2. On a miss, the artifact is downloaded from Maven Central into a cache (~/.cache/maven-decoder-mcp/repository) that uses the standard Maven layout.
  3. All existing analysis (decompilation, class info, dependencies) then runs on the cached artifact exactly as it would on an installed one.

The cache is deliberately separate from ~/.m2 so downloads never interfere with your Maven or Gradle builds. Responses include an origin field (local-repository or remote-cache) so you always know where a result came from.

Going offline

bash
MAVEN_OFFLINE=true   # no network access at all; original local-only behaviorMAVEN_AUTO_DOWNLOAD=false   # keep online search, but never auto-download

Using a private mirror

bash
MAVEN_REMOTE_REPOS="https://nexus.corp/repository/maven-public"MAVEN_REMOTE_USERNAME=builderMAVEN_REMOTE_PASSWORD=secret

A note on the search index

Artifact downloads use repo1.maven.org, which is fast and reliable. Artifact search uses search.maven.org, the only public index that answers class-level (c: / fc:) queries correctly. That index rate-limits bursts, so requests are retried with backoff; a busy period can still surface as a timeout. Downloads and version listing are unaffected, because they read maven-metadata.xml directly from the repository.

🔄 Response Management

Pagination Support

The server automatically handles large responses through intelligent pagination:

  • Automatic Detection: Responses exceeding 50KB are automatically paginated
  • Configurable Page Size: Default 20 items per page, customizable per request
  • Pagination Metadata: Each response includes pagination information
  • Supported Tools: list_artifacts, extract_class_info, search_classes, get_dependencies, find_dependents, get_version_info

Summarization Features

Large text content is automatically summarized to improve readability:

  • Smart Summarization: Preserves important parts (package declarations, method signatures, closing braces)
  • Configurable Limits: Default 10KB text limit, customizable
  • Java-Specific: Optimized for Java source code structure
  • Metadata Preservation: Original structure and metadata are maintained

Method Extraction

New tool for targeted access to specific methods:

  • Pattern Matching: Use regex patterns to find specific methods
  • Limited Results: Control the number of methods returned
  • Full Context: Includes method signatures, bodies, and line numbers
  • Efficient Processing: Only extracts requested methods, not entire classes

🏗️ Architecture

The server is built with a modular architecture:

  • MavenDecoderServer: Main MCP server implementation
  • ResponseManager: Handles pagination and summarization
  • JavaDecompiler: Handles multiple decompilation strategies
  • MavenDependencyAnalyzer: Analyzes Maven dependencies and metadata
  • MavenCentralClient: Remote search, version listing, and artifact downloads
  • Decompilers: CFR, Procyon, Fernflower, and javap integration

🧪 Development

Running Tests

bash
# Install development dependenciespip install -e ".[dev]"
# Run testspytest
# Run specific testpython test_startup.py

Building Package

bash
# Build distributionpython setup.py sdist bdist_wheel
# Install locallypip install dist/maven_decoder_mcp-*.whl

Docker Development

bash
# Build Docker imagedocker build -t maven-decoder-mcp .
# Run containerdocker run --rm -it maven-decoder-mcp

📝 Configuration Options

Environment Variables

Local repository
  • MAVEN_REPOSITORY / MAVEN_REPO: direct path to local Maven repository (e.g. F:\data\repository). Highest precedence.
  • MAVEN_HOME / M2_HOME: Maven install dir or repository dir. A nested repository/ subdir wins when it exists; conf/settings.xml <localRepository> honored.
  • ~/.m2/settings.xml <localRepository> honored when no env var set. Fallback: ~/.m2/repository.
Online access
  • MAVEN_OFFLINE: set to true to disable all network access (default: false)
  • MAVEN_AUTO_DOWNLOAD: auto-fetch artifacts missing locally (default: true)
  • MAVEN_REMOTE_REPOS / MAVEN_REMOTE_REPO: comma/space separated repository base URLs (default: https://repo1.maven.org/maven2)
  • MAVEN_SEARCH_URL: comma/space separated Solr search endpoints (default: https://search.maven.org/solrsearch/select)
  • MAVEN_DECODER_CACHE_DIR: where downloaded artifacts are cached (default: ~/.cache/maven-decoder-mcp/repository)
  • MAVEN_REMOTE_USERNAME / MAVEN_REMOTE_PASSWORD: basic-auth credentials for a private mirror
  • MAVEN_HTTP_TIMEOUT: per-request timeout in seconds (default: 30)
  • MAVEN_HTTP_RETRIES: retries for transient network failures (default: 3)
  • MAVEN_MAX_DOWNLOAD_SIZE: maximum download size in bytes (default: 104857600)
  • MAVEN_VERIFY_CHECKSUM: verify downloads against published SHA-1 (default: true)
Responses
  • MCP_LOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR)
  • MCP_MAX_RESPONSE_SIZE: Maximum response size in bytes (default: 50000)
  • MCP_MAX_ITEMS_PER_PAGE: Default items per page (default: 20)
  • MCP_MAX_TEXT_LENGTH: Maximum text length before summarization (default: 10000)
  • MCP_MAX_LINES: Maximum lines before summarization (default: 500)
  • MCP_USAGE_SCAN_LIMIT: Max classes scanned by find_usage_examples (default: 200000)
  • MCP_API_DIFF_LIMIT: Max classes compared by compare_versions (default: 2000)
  • MAVEN_DECODER_DECOMPILER_DIR: Directory holding cfr.jar / procyon-decompiler.jar

Advanced Configuration

The server automatically detects and configures:

  • Maven repository location
  • Available Java decompilers
  • System capabilities

🔍 Troubleshooting

Common Issues

Server won't start

bash
# Check Python installationpython --version
# Check Maven repositoryls ~/.m2/repository
# Check logsmaven-decoder-mcp --debug

Decompilation fails

bash
# Check the environment: Java, repository, cache and available decompilersmaven-decoder-setup status
# Install the optional CFR and Procyon decompilersmaven-decoder-setup decompilers

From a source checkout you can instead run ./setup_decompilers.sh, which downloads CFR and Procyon into a decompilers/ directory beside the script, as decompilers/cfr.jar and decompilers/procyon-decompiler.jar.

If maven-decoder-setup status reports no decompilers even though you have the jars, they are somewhere the server does not look. It searches these roots in order, taking the first match:

  1. $MAVEN_DECODER_DECOMPILER_DIR, if set
  2. decompilers/ inside the installed package
  3. decompilers/ beside the package — the source-checkout layout
  4. ~/.cache/maven-decoder-mcp/decompilers
  5. decompilers/ in the current working directory
  6. the current working directory itself

Your MCP client launches the server from an arbitrary working directory, so the last two are unreliable in practice. If your jars live anywhere else, point at them explicitly:

bash
export MAVEN_DECODER_DECOMPILER_DIR=~/tools/decompilers

The directory must contain the jars under the exact names cfr.jar and procyon-decompiler.jar. The value expands ~ and environment variables.

Without CFR or Procyon the server still works, falling back to javap from the JDK for signatures, fields and methods.

No artifacts found

bash
# Verify Maven repository locationls ~/.m2/repository
# Run a Maven build to populate repositorymvn dependency:resolve

Maven Central search times out

The public search index rate-limits bursts of requests. Retries with backoff are built in, but during heavy throttling a search can still fail. Workarounds:

bash
# Wait a moment and retry, or raise the retry budgetMAVEN_HTTP_RETRIES=5
# Downloads and version listing do not use the search index, so these keep# working even while search is throttled:#   get_remote_versions, download_artifact

Downloads fail behind a proxy or firewall

bash
# requests honors the standard proxy variablesexport HTTPS_PROXY=http://proxy.corp:8080
# Or point at an internal mirrorexport MAVEN_REMOTE_REPOS="https://nexus.corp/repository/maven-public"
# Or turn the network off entirelyexport MAVEN_OFFLINE=true

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📊 Stats

[GitHub Stars] [GitHub Forks] [PyPI Downloads] [npm Downloads] [Docker Pulls]


Made with ❤️ for the Java development community

来源:README.md,提交 931d5be

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.3.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分