jar-inspector-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jar-inspector-mcpShow me the outline of com.example.UserService in target/app.jar"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
jar-inspector-mcp
An MCP server that lets Claude Code read inside Java archives — classes, APIs, sources, resources, bytecode — without extracting them.
The problem
When Claude Code works on a JVM project and needs to know what is inside a jar, it falls back on shell tools:
unzip -l target/lib/jackson-databind-2.16.1.jar # 780 lines of entry listing
unzip -o app.jar -d /tmp/x && cat /tmp/x/…/Foo.java # a whole file to answer one question
javap -p -c -cp app.jar com.acme.Foo # 300 KB of bytecodeAll of it lands in the context window, most of it is noise, and some of it writes temporary files into the working tree.
The solution
Ten focused tools that answer the actual questions — "what is in this jar", "what is this class's API", "where is this string set" — and return only that.
Measured on jackson-databind-2.16.1.jar (779 classes, 4.1 MB extracted):
Instead of | jar-inspector | |||
| 79,674 chars |
| 2,632 chars | 97% less |
| 36,008 chars |
| 18,061 chars | 50% less |
| 303,105 chars |
| 21,409 chars | 93% less |
Nothing is ever written to disk, and no JDK is required — the class file parser
is pure Python. (jar_disassemble is the one exception; it shells out to javap.)
Install
Requires uv and Python 3.10+.
# from GitHub, nothing to clone
claude mcp add jar-inspector -- uvx --from git+https://github.com/pgatzka/jar-inspector-mcp jar-inspector-mcp
# or from a local clone
git clone https://github.com/pgatzka/jar-inspector-mcp && cd jar-inspector-mcp
claude mcp add jar-inspector -- uv run --directory "$PWD" jar-inspector-mcpAdd --scope project to share it with a repo through .mcp.json, or --scope user
to enable it everywhere. To wire it up by hand instead:
// .mcp.json
{
"mcpServers": {
"jar-inspector": {
"command": "uvx",
"args": ["--from", "git+https://github.com/pgatzka/jar-inspector-mcp", "jar-inspector-mcp"]
}
}
}Verify with claude mcp list, or /mcp inside Claude Code.
Other MCP clients: the server speaks stdio, so uvx --from … jar-inspector-mcp works
as the command anywhere.
Tools
Tool | Answers |
| What is this artifact? Manifest, packages, class count, bytecode level, are sources attached |
| What entries are in it? Filtered by glob and kind, paged |
| Where does |
| What is this class's API? Declaration, annotations, fields, method signatures |
| What does it actually do? Attached |
| What is in this config? One text entry: MANIFEST, |
| Where is this string? Grep across text entries and compiled string constants |
| What does this class touch? Internal vs external references |
| What does this method compile to? One method's bytecode via |
| Where is the jar? Searches build output, the Maven repo and the Gradle cache |
Every tool is read-only and takes a jar argument that accepts:
an archive —
.jar,.war,.ear,.aar,.zip,.jmodan exploded classes directory —
target/classes,build/classes/java/maina nested archive —
app.jar!BOOT-INF/lib/dep-1.0.jar(Spring Boot fat jars)
What the output looks like
jar_class_outline, verbatim (this is the exact output the tests assert on):
com.acme.demo.UserService [class, Java 21, UserService.java]
// source is attached -- jar_read_source(jar, 'com.acme.demo.UserService') shows it
@Deprecated
@Marker(enabled=true, code='z', tags={"alpha", "beta"})
public class UserService implements Repository<String, Integer>
// fields (2)
public static final String CACHE_KEY = "user.cache"
protected volatile boolean dirty
// constructors (1)
public UserService(Map<Integer, String> users)
// methods (5)
public long count()
public List<String> findAll()
public Optional<String> findById(Integer id) throws IllegalStateException
public <R extends Comparable<R>> List<R> mapAll(Function<String, R> fn)
public void rename(int id, String newName, String... aliases)
// nested (1)
UserService.Builder
// 4 more member(s) hidden (visibility below 'protected', synthetic or bridge)Generic signatures, parameter names (when compiled with -g), varargs, declared
exceptions, constant values, records, enums and default methods all survive.
Method bodies, bridge methods and constant pools do not.
Configuration
Environment variable | Effect |
| Path-separated roots the server may read. Unset means no restriction |
| Extra directories |
| Maven repository location, if not |
jar_find searches, in order: ./target, ./build/libs, ./libs, ./lib, the
Maven repository, the Gradle module cache, the Ivy cache and the Coursier cache.
To confine the server to one tree:
claude mcp add jar-inspector --env JAR_INSPECTOR_ALLOW="$HOME/work:$HOME/.m2" \
-- uvx --from git+https://github.com/pgatzka/jar-inspector-mcp jar-inspector-mcpNudging Claude to use it
The server ships MCP instructions telling clients these tools replace unzip,
jar xf and javap. If you still see Claude reaching for the shell, add a line to
your project's CLAUDE.md:
To inspect jars, use the jar-inspector MCP tools instead of unzip/jar/javap.How it works
Class parsing is a dependency-free reader for the class file format: constant pool, access flags,
Signature,MethodParameters,LocalVariableTable,Exceptions,Record,InnerClassesand the runtime annotation attributes. Method bodies are skipped unlessjar_disassembleasks for them.Archives are read through
zipfilein memory. Nested jars are opened from the bytes of the outer entry, so a Spring Boot fat jar needs no unpacking.Sources are resolved from the archive itself, then from the sibling
-sources.jarin Maven layout, then from the neighbouring hash directory that Gradle's cache uses.Output is always capped and always says when it was truncated and how to page.
Development
uv sync
uv run pytest # 49 testsThe tests compile the Java in tests/java with javac and assert against real
bytecode, so generics, bridge methods and records are exercised for real; they skip
when no JDK is present. The parser is additionally checked against every class in
every jar shipped with Maven and Gradle — 65,573 classes, no failures.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
An MCP server that gives your AI access to the source code and docs of all public github repos
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pgatzka/jar-inspector-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server