Skip to content

Commit 67fdc80

Browse files
authored
arthas mcp server default STREAMABLE protocol (#3114)
1 parent 7518088 commit 67fdc80

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/config/McpServerProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static class Builder {
193193
private Duration requestTimeout = Duration.ofSeconds(10);
194194
private Duration initializationTimeout = Duration.ofSeconds(30);
195195
private ObjectMapper objectMapper;
196-
private ServerProtocol protocol = ServerProtocol.STATELESS;
196+
private ServerProtocol protocol = ServerProtocol.STREAMABLE;
197197

198198
public Builder() {
199199
// Private constructor to prevent direct instantiation

arthas-mcp-server/src/main/java/com/taobao/arthas/mcp/server/protocol/server/handler/McpHttpRequestHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public McpHttpRequestHandler build() {
193193
Assert.notNull(this.mcpEndpoint, "MCP endpoint must be set");
194194

195195
if (this.protocol == null) {
196-
this.protocol = ServerProtocol.STATELESS;
196+
this.protocol = ServerProtocol.STREAMABLE;
197197
}
198198

199199
McpHttpRequestHandler handler = new McpHttpRequestHandler(this.mcpEndpoint, this.objectMapper, this.contextExtractor);

core/src/main/java/com/taobao/arthas/core/mcp/ArthasMcpServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ public ArthasMcpServer(String mcpEndpoint, CommandExecutor commandExecutor, Stri
5959
this.mcpEndpoint = mcpEndpoint != null ? mcpEndpoint : DEFAULT_MCP_ENDPOINT;
6060
this.commandExecutor = commandExecutor;
6161

62-
ServerProtocol resolvedProtocol = ServerProtocol.STATELESS;
62+
ServerProtocol resolvedProtocol = ServerProtocol.STREAMABLE;
6363
if (protocol != null && !protocol.trim().isEmpty()) {
6464
try {
6565
resolvedProtocol = ServerProtocol.valueOf(protocol.toUpperCase());
6666
} catch (IllegalArgumentException e) {
67-
logger.warn("Invalid MCP protocol: {}. Using default: STATELESS", protocol);
67+
logger.warn("Invalid MCP protocol: {}. Using default: STREAMABLE", protocol);
6868
}
6969
}
7070
this.protocol = resolvedProtocol;

0 commit comments

Comments
 (0)