Skip to content

Commit ac55e62

Browse files
maxandersenCopilotgastaldimkouba
authored
stremable http mcp blog post (#2320)
Co-authored-by: Copilot <[email protected]> Co-authored-by: George Gastaldi <[email protected]> Co-authored-by: Martin Kouba <[email protected]>
1 parent 9edcd82 commit ac55e62

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
---
2+
layout: post
3+
title: 'Quarkus MCP Server: The First Java Server SDK to Support Streamable HTTP!'
4+
date: 2025-05-23
5+
tags: ai
6+
synopsis: Quarkus MCP Server is blazing a trail as the first Java MCP server with Streamable HTTP support—unlocking new possibilities for developers.
7+
author: maxandersen
8+
---
9+
:imagesdir: /assets/images/posts/mcpservers
10+
ifdef::env-github,env-browser,env-vscode[:imagesdir: ../assets/images/posts/mcpservers]
11+
12+
The Model Context Protocol (MCP) is taking the developer world by storm, and now, with its latest spec update: Streamable HTTP support has arrived!
13+
14+
We're thrilled to announce that Quarkus MCP Server is the very first Java-based MCP server SDK to embrace this innovation, making it easier than ever for you to build, experiment, and deploy MCP-powered solutions—wherever you need them.
15+
16+
https://github.com/quarkiverse/quarkus-mcp-server/releases/tag/1.2.0[Quarkus MCP Server 1.2] now supports Streamable HTTP alongside `stdio` and `SSE` transports. This enables new possibilities for connecting your MCP servers to mobile apps and cloud services. While the implementation is fully functional, some advanced features like https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#resumability-and-redelivery[Resumability and Redelivery] are planned for future releases.
17+
18+
== Why Streamable HTTP Matters
19+
20+
Streamable HTTP is the approach MCP spec have taken for real-time, efficient, and scalable communication between clients and servers. It opens the door to new integrations and user experiences, especially for platforms and devices where traditional transports like SSE or stdio aren't ideal.
21+
22+
And now, thanks to Quarkus MCP Server, Java developers are at the forefront of this evolution. Whether you're building AI assistants, developer tools, or next-gen chatbots, Streamable HTTP gives you the flexibility to reach more users, faster.
23+
24+
== Easy upgrade
25+
26+
Ready to try it out? Just update your Maven dependency to the latest Quarkus MCP Server SSE transport:
27+
28+
```xml
29+
<dependency>
30+
<groupId>io.quarkiverse.mcp</groupId>
31+
<artifactId>quarkus-mcp-servers-sse</artifactId>
32+
<version>1.2.0</version>
33+
</dependency>
34+
```
35+
36+
That's it! You're now equipped to serve Streamable HTTP from your Java MCP server.
37+
38+
Want to see how to write your own MCP server? Check out our previous post: https://quarkus.io/blog/mcp-server/[Introducing MCP Servers].
39+
40+
== Quarkus MCP Servers: Power and Simplicity
41+
42+
Thehttps://github.com/quarkiverse/quarkus-mcp-servers[Quarkus MCP Servers project] brings a suite of ready-to-use MCP servers, all built on Quarkus. With version 1.0.0.CR4, streamable HTTP support is baked in—no extra configuration required. We just updated the dependency, and it was ready to go!
43+
44+
To enable Streamable HTTP, simply launch any server in Quarkus MCP Servers with the `--sse` flag:
45+
46+
```
47+
jbang jvminsight@mcp-java --sse
48+
```
49+
50+
== Connecting Clients
51+
52+
The default URL for Streamable HTTP is:
53+
54+
http://<your-ip>:8080/mcp/
55+
56+
(For SSE, use `http://<your-ip>:8080/mcp/sse` as before.)
57+
58+
While Streamable HTTP is still new, some pioneering clients already support it. Notably, the open source iOS app https://github.com/daodao97/chatmcp"[ChatMCP] (available on https://testflight.apple.com/join/dCXksFJV[TestFlight]) and a non-open source version on the https://apps.apple.com/dk/app/chatmcp/id6745196560[iOS App Store] both work seamlessly with MCP and support or even require Streamable HTTP.
59+
60+
Here's a quick demo of ChatMCP in action with the jvminsight server:
61+
62+
video::6GomKEMucYs[youtube,width=360, height=640]
63+
64+
== Kotlin: Lightweight and Fun
65+
66+
Quarkus supports both Java and Kotlin, giving you flexibility in how you build your MCP servers. Want to experiment? Here's a playful example of a Kotlin MCP server you can run instantly with JBang. It fetches a random image from https://picsum.photos/ and returns it as a base64-encoded image, as the MCP spec requires.
67+
68+
```kotlin
69+
///usr/bin/env jbang "$0" "$@" ; exit $?
70+
71+
//KOTLIN
72+
//DEPS io.quarkus:quarkus-bom:${quarkus.version:3.20.0}@pom
73+
//DEPS io.quarkiverse.mcp.servers:mcp-server-shared:1.0.0.CR4
74+
75+
import io.quarkiverse.mcp.server.*
76+
import java.net.URL
77+
import java.util.Base64.getEncoder
78+
import kotlin.io.readBytes
79+
80+
class demo {
81+
82+
@Tool(description = "Get a random picture")
83+
fun randomimage(@ToolArg(description = "seed for randomness") seed: String,
84+
@ToolArg(description = "width", defaultValue = "300") width: Int,
85+
@ToolArg(description = "height", defaultValue = "300") height : Int): ImageContent {
86+
87+
val image = URL("https://picsum.photos/seed/$seed/$width/$height").readBytes()
88+
89+
return ImageContent(
90+
getEncoder().encodeToString(image),
91+
"image/jpeg"
92+
)
93+
}
94+
}
95+
```
96+
97+
Save this as `demo.kt` and run it with:
98+
99+
```
100+
jbang demo.kt --sse
101+
```
102+
103+
You can now use the `randomimage` tool in ChatMCP or any other MCP client that supports Streamable HTTP. It's that easy—and a great way to start experimenting!
104+
105+
== Conclusion
106+
107+
Streamable HTTP is an important step for the MCP ecosystem, and Quarkus MCP Server is putting Java developers in the driver's seat. Whether you're building tools, bots, or entirely new experiences, now's the perfect time to dive in and see what you can create.
108+
109+
We can't wait to see what you build. Try it out, share your feedback, and help shape the future of MCP — powered by Quarkus!
110+
111+
Have fun!

0 commit comments

Comments
 (0)