Java JAR Server
БесплатноНе проверенEnables AI assistants to look up Java class definitions and list dependencies from Maven projects by analyzing local JAR files via the Model Context Protocol.
Описание
Enables AI assistants to look up Java class definitions and list dependencies from Maven projects by analyzing local JAR files via the Model Context Protocol.
README
An npm package that provides MCP (Model Context Protocol) server functionality for Java Maven projects. This server enables AI assistants to access Java class definitions from Maven dependencies, solving the limitation where Cursor and other VSCode-based IDEs cannot automatically read jar file classes.
Features
- Class Definition Lookup: Find Java class definitions from Maven dependencies
- Dependency Listing: List all Maven dependencies for a project
- JAR Class Search: Search for classes within JAR files using patterns
Installation
Prerequisites
- Node.js 18+
- Maven installed (for Maven projects)
Using via npx
{
"mcpServers": {
"java-jar-mcp": {
"command": "npx",
"args": ["-y", "@biggerball/java-jar-mcp@latest"],
"env": {
"MAVEN_REPO_PATH": "/Users/username/.m2/repository"
}
}
}
}
Usage
After configuration, the MCP server will automatically start and provide the following tools to AI assistants:
Available MCP Tools
find_class_definition
Find the definition of a Java class from Maven dependencies.
Parameters:
className(string, required): Fully qualified class name (e.g.,java.util.ArrayList)pomPath(string, required): Path to pom.xml file (e.g.,"/path/to/project/pom.xml")
Returns: Class definition with source code (if available), methods, and fields
Example:
{
"className": "com.alibaba.fastjson2.filter.BeforeFilter",
"pomPath": "/path/to/project/pom.xml"
}
list_project_dependencies
List all Maven dependencies for a project.
Parameters:
pomPath(string, required): Path to pom.xml file (e.g.,"/path/to/project/pom.xml")
Returns: List of dependencies with JAR file paths
search_classes_in_jar
Search for classes matching a pattern in a JAR file.
Parameters:
jarPath(string): Path to the JAR filesearchPattern(string): Search pattern (supports wildcards*and?)
Returns: List of matching class names
Support & Donation
If you find this project helpful and would like to support its development, I'd be grateful if you could buy me a coffee! ☕
Your support helps me continue improving this project and creating more useful tools for the developer community.

If you enjoy using this project, your support would mean a lot to me. Thank you! 🙏
Local Development Installation
Clone the repository
Install dependencies and build:
npm install npm run buildUse local path in MCP configuration:
{ "mcpServers": { "java-jar-mcp": { "command": "node", "args": ["/path/to/java-jar-mcp/dist/index.js"], "env": { "MAVEN_REPO_PATH": "/Users/username/.m2/repository" } } } }
How It Works
The MCP server works through the following steps:
- Parse pom.xml: Read and parse the Maven project's
pom.xmlfile - Locate JAR files: Find corresponding JAR files in the local Maven repository based on Maven coordinates
- Extract class definitions: Extract Java class definition information from JAR files
Development
Project Structure
java-jar-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── mavenParser.ts # pom.xml parsing
│ ├── jarLocator.ts # JAR file location
│ ├── classExtractor.ts # Class definition extraction
│ ├── tools.ts # MCP tool implementations
│ └── cache.ts # LRU cache implementation
└── dist/ # Compiled MCP server
Building
# Build MCP server
npm run build
# Watch mode build
npm run watch
Testing
npm test
Future Improvements
- Support for Gradle projects
- Enhanced Maven property resolution
- Automatic multi-module project detection and dependency merging
License
MIT
Установить Java JAR Server в Claude Desktop, Claude Code, Cursor
unyly install java-jar-mcp-serverСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add java-jar-mcp-server -- npx -y @biggerball/java-jar-mcpFAQ
Java JAR Server MCP бесплатный?
Да, Java JAR Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Java JAR Server?
Нет, Java JAR Server работает без API-ключей и переменных окружения.
Java JAR Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Java JAR Server в Claude Desktop, Claude Code или Cursor?
Открой Java JAR Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Java JAR Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
