Back to Home
bitfist icon

javadoc-mcp-server

by bitfist

Overview

A Spring AI-powered Model Context Protocol (MCP) server that provides AI assistants with seamless access to Java library documentation by fetching, converting, and caching Javadoc from Maven artifacts.

Installation

Run Command
./gradlew bootRun

Security Notes

The server has a critical path traversal vulnerability during Javadoc JAR extraction. The `extractJavaDocJar` function in `DefaultJavadocProvider.kt` does not sufficiently sanitize `entry.name` from the `ZipInputStream` before resolving the target path using `Path.resolve`. This allows a maliciously crafted Javadoc JAR to write files to arbitrary locations on the server's file system, potentially leading to remote code execution or data corruption/exfiltration. Additionally, while less severe, user-controlled input `fullyQualifiedClassName` is used to construct file paths, which could lead to reading unintended files within the extracted Javadoc directory structure if not carefully validated by the AI calling the tool.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassLow
Avg Tokens1500
Stars0
Forks0
Last Update2026-01-17

Tags

Spring AIJavadocMavenAI ToolingKotlin