Javadoc MCP
About
A Model Context Protocol (MCP) server for searching Java documentation. This server enables AI assistants to search and retrieve Java API documentation from JSON files.
Details
- Author
- beamliu
- Categories
- Developer Tools, Other, Knowledge Base
Jump to
Setup
Install Javadoc MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/beamliu/mcp-java-doc
Follow the installation instructions in the repository README, then restart your MCP client.
A comprehensive solution for generating structured JSON documentation from Java source code and providing intelligent search capabilities through MCP (Model Context Protocol).
This project consists of three main components that work together to create a complete Java documentation ecosystem:
- Maven Plugin(java-docs-json-doclet) - Generates structured JSON documentation from Java source code
- MCP Server(mcp-server) - Provides intelligent search and query capabilities for the generated documentation
- Sample Data(javadoc-json) - Example JSON documentation files for testing and reference
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐ │ Java Source Code │ │ HTML Javadoc │ │ Lombok Projects │ │ │ │ (JDK 9) │ │ │ └──────────┬──────────┘ └──────────┬──────────┘ └──────────┬──────────┘ │ │ │ ▼ ▼ ▼ ┌─────────────────────────────────────────────────────────────────────────────┐ │ Maven Plugin (java-docs-json-doclet) │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────────┐ │ │ │ Publish Goal │ │ Crawl Goal │ │ Lombok Support │ │ │ │ (Source Code) │ │ (HTML Docs) │ │ (Delombok Process) │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────────────────┘ │ └─────────────────────────────┬───────────────────────────────────────────────┘ │ ▼ ┌─────────────────────┐ │ JSON Documentation│ │ (Structured Data) │ └──────────┬──────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────────────────┐ │ MCP Server │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────────┐ │ │ │ Search Classes │ │ Search Methods │ │ Get Statistics │ │ │ │ │ │ │ │ │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────────────────┘ │ └─────────────────────────────┬───────────────────────────────────────────────┘ │ ▼ ┌─────────────────────┐ │ Claude Desktop │ │ (AI Assistant) │ └─────────────────────┘
1. Java Docs JSON Doclet (java-docs-json-doclet/)
A Maven plugin that converts Java documentation into structured JSON format.
Future Java versions will be supported in upcoming releases
- Generate Javadoc Json Goal: Generate JSON from Java source code
- Crawl Goal: Extract documentation from HTML Javadoc websites (JDK 9+ supported)
- Lombok Support: Handle Lombok annotations with delombok process
- MCP Compatible: Generate documentation in MCP-compatible format
- Package Filtering: Use regex patterns to filter specific packages
- Proxy Support: Configure proxy settings for crawling external documentation
<plugin> <groupId>io.github.beamliu</groupId> <artifactId>java-docs-json-doclet</artifactId> <version>0.1.1</version> </plugin>
Pay attention, you may encounter compile error if you are using a lombok, please jump toLombok Projectssection.
A Node.js-based MCP server that provides intelligent search capabilities for Java documentation.
- Fuzzy Search: Powered by Fuse.js for intelligent matching
- Multiple Search Types: Classes, methods, constructors, and fields
- Data Deduplication: Automatic merging of duplicate entries
- Statistics: Get overview of documentation coverage
- Claude Integration: Seamless integration with Claude Desktop
npx @io.emop/mcp-javadoc-server --javadoc-path /path/to/javadoc-json
Contains example JSON documentation files generated from various Java projects for testing and reference purposes.
<plugin> <groupId>io.github.beamliu</groupId> <artifactId>java-docs-json-doclet</artifactId> <version>0.1.1</version> </plugin>
Sample maven config could be found at./java-docs-json-doclet/examples/
# Using npx (recommended, no installation needed) npx @io.emop/mcp-javadoc-server --javadoc-path /path/to/javadoc-json
npx @modelcontextprotocol/inspector npx -y @io.emop/mcp-javadoc-server -- --javadoc-path /path/to/javadoc-json
Once configured, you can use these commands in Claude Desktop:
- Search all items:search_all("ArrayList")
- Search classes:search_classes("HashMap")
- Search methods:search_methods("toString")
- Get class details:get_class_details("java.util.List")
- Get statistics:get_stats()
For projects using Lombok, configure the delombok process:
This project is licensed under the MIT License.
一个完整的解决方案,用于从 Java 源代码生成结构化 JSON 文档,并通过 MCP(模型上下文协议)提供智能搜索功能。
- Maven 插件(java-docs-json-doclet) - 从 Java 源代码生成结构化 JSON 文档
- MCP 服务器(mcp-server) - 为生成的文档提供智能搜索和查询功能
- 样例数据(javadoc-json) - 用于测试和参考的示例 JSON 文档文件
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐ │ Java 源代码 │ │ HTML Javadoc │ │ Lombok 项目 │ │ │ │ (JDK 9) │ │ │ └──────────┬──────────┘ └──────────┬──────────┘ └──────────┬──────────┘ │ │ │ ▼ ▼ ▼ ┌─────────────────────────────────────────────────────────────────────────────┐ │ Maven 插件 (java-docs-json-doclet) │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────────┐ │ │ │ 发布目标 │ │ 爬取目标 │ │ Lombok 支持 │ │ │ │ (源代码) │ │ (HTML 文档) │ │ (Delombok 过程) │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────────────────┘ │ └─────────────────────────────┬───────────────────────────────────────────────┘ │ ▼ ┌─────────────────────┐ │ JSON 文档 │ │ (结构化数据) │ └──────────┬──────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────────────────┐ │ MCP 服务器 │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────────────┐ │ │ │ 搜索类 │ │ 搜索方法 │ │ 获取统计信息 │ │ │ │ │ │ │ │ │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────────────────┘ │ └─────────────────────────────┬───────────────────────────────────────────────┘ │ ▼ ┌─────────────────────┐ │ Claude Desktop │ │ (AI 助手) │ └─────────────────────┘
1. Java Docs JSON Doclet (java-docs-json-doclet/)
- 生成 Javadoc Json 目标:从 Java 源代码生成 JSON
- 爬取目标:从 HTML Javadoc 网站提取文档(支持 JDK 9+)
- Lombok 支持:通过 delombok 过程处理 Lombok 注解
- MCP 兼容:生成 MCP 兼容格式的文档
- 包过滤:使用正则表达式模式过滤特定包
- 代理支持:为爬取外部文档配置代理设置
<plugin> <groupId>io.github.beamliu</groupId> <artifactId>java-docs-json-doclet</artifactId> <version>0.1.1</version> </plugin>
注意,如果您正在使用 Lombok,可能会遇到编译错误,请跳转到Lombok 项目章节。
- 模糊搜索:由 Fuse.js 提供智能匹配
- 多种搜索类型:类、方法、构造函数和字段
- 数据去重:自动合并重复条目
- 统计信息:获取文档覆盖率概览
- Claude 集成:与 Claude Desktop 无缝集成
npx @io.emop/mcp-javadoc-server --javadoc-path /path/to/javadoc-json
<plugin> <groupId>io.github.beamliu</groupId> <artifactId>java-docs-json-doclet</artifactId> <version>0.1.1</version> </plugin>
Maven 配置示例可以在./java-docs-json-doclet/examples/找到
# 使用 npx(推荐,无需安装) npx @io.emop/mcp-javadoc-server --javadoc-path /path/to/javadoc-json
npx @modelcontextprotocol/inspector npx -y @io.emop/mcp-javadoc-server -- --javadoc-path /path/to/javadoc-json
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
One shared context layer for AI agents and humans — live API specs, DB schemas, and versioned contracts across repos so every agent and teammate works from the same source of truth.
Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.
Official Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.
Remote, no-auth MCP server providing AI-powered codebase context and answers
Create and read feature flags, review experiments, generate flag types, search docs, and interact with GrowthBook's feature flagging and experimentation platform.
Official MCP server for Stimulsoft Reports & Dashboards documentation. Semantic search across FAQ, Programming Manual, Server/User Manual, and Server/Cloud API for .NET, WPF, Avalonia, WEB, Blazor, Angular, React, JS, PHP, Java, and Python platforms.
Search Apple's Developer Documentation with smart search and wildcard support.
Access documentation from the Awesome-llms-txt repository directly in your conversations.
Connect AI tools like Cursor and VS Code to your product documentation using the Biel.ai platform.
MCP server that ingests project docs once and lets Claude search by meaning instead of reading everything — saving tokens on large codebases
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





