mcp-java8-sdk
Backported Model Context Protocol SDK for Java 8
claude mcp add --transport stdio krrr-mcp-java8-sdk java -jar mcp-java8-sdk.jar \ --env JAVA_OPTS="Optional JVM options, e.g. -Xms256m -Xmx1024m" \ --env MCP_LOG_LEVEL="INFO (default) or DEBUG"
How to use
The MCP Java SDK for Java 8 provides a Java-based runtime for creating and running MCP servers with compatibility for Java 8 and Spring Boot 2.x or Solon 3.x. This SDK is aimed at enabling MCP tooling and server components in environments restricted to Java 8, while preserving modern MCP patterns. To get started, run the provided JAR using a Java 8 runtime and use the built-in tooling to register MCP endpoints, define command handlers, and serialize/deserialize MCP messages. The SDK exposes a set of APIs for defining MCP services, message adapters, and lifecycle hooks, making it feasible to build custom MCP integrations that work with older Java stacks. Typical usage involves starting the server, wiring in endpoint handlers, and then deploying alongside your existing MCP clients or services. You can customize behavior through environment variables and standard Java options to tune performance and logging.
How to install
Prerequisites:
- Java 8 JRE/JDK or higher compatible with Java 8 features
- Optional: Maven or Gradle if building from source
- Access to a Java-enabled environment (Linux, macOS, Windows)
Install from binary release (recommended):
- Download the mcp-java8-sdk.jar binary release.
- Ensure Java is available: java -version
- Run the server: java -jar mcp-java8-sdk.jar
Build from source (if you prefer compiling from repo):
- Prerequisites: JDK 8+, Maven or Gradle installed.
- Clone the repository: git clone <repository-url> cd <repository-directory>
- Build (example with Maven): mvn clean package
- Run the built artifact (path depends on build): java -jar target/mcp-java8-sdk-<version>.jar
Configuration:
- You can pass JVM options via JAVA_OPTS (e.g., -Xms256m -Xmx1024m).
- Adjust MCP_LOG_LEVEL to control logging verbosity (INFO or DEBUG).
Note: This SDK downgrades certain dependencies to maintain compatibility with Java 8 and supports Spring Boot 2.x and Solon 3.x environments.
Additional notes
Tips and considerations:
- Ensure you are actually running on a Java 8 runtime to avoid compatibility issues.
- If you encounter classpath or dependency issues, verify that you are using the Java 8-appropriate build of the SDK and that Spring Boot 2.x / Solon 3.x dependencies align with the downgraded set.
- Use MCP_LOG_LEVEL=DEBUG during troubleshooting to get verbose output.
- If you plan to integrate with existing MCP clients, confirm that endpoint definitions and message formats match your MCP version expectations.
- When deploying in containerized environments, map appropriate JVM memory settings and ensure network access to any required MCP services.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
sonarqube
SonarQube MCP Server
wanaku
Wanaku MCP Router
WigAI
Bitwig Controller Extension that provides an MCP Server for AI Agent control
SchemaCrawler-AI
Free database schema discovery and comprehension tool
vertx
A Vert.x MCP Server built on top of MCP Java SDK