Why Feat Dropped SSE and Embraced Streamable for JDK 8 AI Compatibility
The article explains how Feat removed the SSE implementation from its MCP client, adopted the Streamable protocol, and kept full JDK 8 support so that legacy Java projects can safely integrate the latest AI capabilities with minimal code changes.
Why remove SSE?
Feat recently deleted the SSE‑related code in McpClient.java and kept only the Streamable mode. The change stems from the evolution of the Model Context Protocol (MCP), an open protocol from Anthropic that enables AI assistants to call external tools.
Early MCP versions used Server‑Sent Events (SSE) as the primary transport, which required maintaining two connection channels and added considerable complexity. The newer MCP specification recommends the Streamable mode, which offers three clear advantages:
Only a single HTTP connection needs to be maintained.
Bidirectional communication feels more natural.
The code becomes simpler.
Consequently, Feat decided to follow the latest specification and fully embrace Streamable.
JDK 8’s dilemma
Feat has always targeted JDK 8, not out of conservatism but because many enterprise systems still run on that version. Most modern AI SDKs and frameworks now require JDK 17+, which blocks JDK 8‑based applications from adopting AI features.
Current AI solutions typically demand JDK 17+, leaving long‑standing JDK 8 systems unable to join the AI wave.
Enterprises cannot upgrade easily due to:
Core systems that have been in production for over a decade.
Massive regression‑testing effort required for a JDK upgrade.
Stability concerns in production environments.
Lengthy approval processes.
Feat’s goal is to break this barrier.
How is it done?
Can JDK 8 support the “new” Streamable protocol? The answer is yes. Streamable is essentially HTTP POST with SSE in the response, which works perfectly on JDK 8. Feat’s underlying HTTP client is a custom implementation that does not rely on any JDK‑specific features introduced after version 8.
Below is a concise example of the new API:
// Create MCP client
McpClient client = McpClient.streamable(options -> {
options.setUrl("http://localhost:8080/mcp");
});
// Initialize
client.initialize();
// Call a tool
ToolCalledResult result = client.callTool("get_weather", JSONObject.of("city", "北京"));The code uses pure JDK 8 syntax without any newer language sugar.
What does this change mean for developers?
If you already use Feat’s MCP client, migration is trivial—just replace one line of code. The rest of the API remains fully compatible:
// Before
McpClient client = McpClient.newSseClient(opt -> {
opt.setEndpoint("http://localhost:8080/sse");
});
// Now
McpClient client = McpClient.streamable(opt -> {
opt.setUrl("http://localhost:8080/mcp");
});Only a single line changes, and the new client works reliably on JDK 8 projects.
More importantly, you can confidently use the latest MCP protocol on JDK 8 without worrying about compatibility issues.
Reflections
People often ask why Feat does not simply require JDK 17, which would simplify the code. The answer is that technical progress should not abandon users. Many JDK 8 developers still want AI capabilities, but version constraints keep them out.
Feat’s stance is to lower the entry barrier rather than raise it: remove SSE, adopt Streamable, and maintain JDK 8 compatibility as a commitment to users.
Key takeaways
Pure Java implementation with no exotic dependencies.
Full support for JDK 8.
Comprehensive documentation and abundant examples.
Ongoing maintenance that follows the latest MCP specifications.
The source code is available on Gitee/GitHub for anyone to inspect, raise issues, or star.
Feat is a lightweight Java web framework focused on simplifying development; its AI module provides Chat, Agent, Embedding, and MCP capabilities to help Java developers quickly build AI applications.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Three Knives
Every line of code you contribute to open source could help make the future better.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
