请问一下是怎么支持的当前最新的Streamable HTTP模式?
在推文https://mp.weixin.qq.com/s/fDnOQA1jzOLZQJ5aVEIuvg中看到一下内容 在协议的传输层上,支持目前最多AI工具采用的POST+SSE模式,以及最新的Streamable HTTP模式。
请问一下是怎么支持的当前最新的Streamable HTTP模式?
目前只支持Streamable HTTP协议的无状态服务,session相关的后续会支持
没看明白,这个Streamable HTTP协议的无状态服务 最终提供的不就是无状态的链接?为啥说只支持无状态的,session相关的支持又是啥呀。 我有点迷,现在官方只有POST+SSE,是个有状态的链接。 然后官方要升级到Streamable HTTP,但是还没出代码。我看你们文章说已经支持了?
Streamable HTTP的MCP官方SDK目前还没有,我们是根据官方spec的协议实现的。可以看下 REST API MCPServer,就是支持的:https://higress.cn/ai/mcp-quick-start/?spm=36971b57.7beea2de.0.0.d85f20a9nVjyp6#%E9%85%8D%E7%BD%AE-rest-api-mcp-server
Streamable HTTP模式是不局限于无状态的,只是对无状态比较友好而已。目前Higress对有状态的Streamable HTTP模式还尚未支持。
感谢回复,我重新看了一下streamable http的pr,支持无状态服务、无状态流服务、有状态服务。https://github.com/modelcontextprotocol/specification/pull/206
stateful server A stateful server would be implemented very similarly to today. The main difference is that the server will need to generate a session ID, and the client will need to pass that back with every request.
The server can then use the session ID for sticky routing or routing messages on a message bus—that is, a POST message can arrive at any server node in a horizontally-scaled deployment, so must be routed to the existing session using a broker like Redis.
还得依赖sticky routing or message bus or 其它 我觉得大部分mcp server 应该前两种无状态服务、无状态流服务就足够用了。 和当前的POST + SSE没区别 一样的问题。
目前只支持Streamable HTTP协议的无状态服务,session相关的后续会支持
@Jing-ze 请问现在支持2024-11-05版协议吗?
目前只支持Streamable HTTP协议的无状态服务,session相关的后续会支持
@Jing-ze 请问现在支持2024-11-05版协议吗?
2024-11-05版协议现在完全支持
请问现在支持多Higress实例部署吗?理论上一个会话的GET /sse和POST /message请求都需要打到一个实例上吧,这个是如何解决的
@JooKS-me 基于redis做的session同步
Streamable HTTP的MCP官方SDK目前还没有,我们是根据官方spec的协议实现的。可以看下 REST API MCPServer,就是支持的:https://higress.cn/ai/mcp-quick-start/?spm=36971b57.7beea2de.0.0.d85f20a9nVjyp6#%E9%85%8D%E7%BD%AE-rest-api-mcp-server
@johnlanni 文档中的 无需全局 ConfigMap 配置 是什么意思?
指的是 configmap 中的 /user 路径这个配置可以不需要吗?可是我实际测试的时候这个配置必须配才可以。
但 Streamable HTTP 是不需要 /sse 后缀的。你用的哪个客户端呢?
但 Streamable HTTP 是不需要 /sse 后缀的。你用的哪个客户端呢?
cherry studio,去掉 /see 后缀也不行,是客户端不支持 Streamable HTTP?
cherry studio,去掉
/see后缀也不行,是客户端不支持Streamable HTTP?
它界面上都只写了 stdio 和 sse,大概率是不支持 Streamable HTTP 的
cherry studio,去掉
/see后缀也不行,是客户端不支持Streamable HTTP?
要不试试 ChatWise?
ChatWise 要升级才能用 Streamable HTTP,29 美刀。。
新版本的 cherry studio 支持 Streamable HTTP,但是还是不行,从 higress-gateway 上会看到 route not found 的报错。
@johnlanni @Jing-ze 这个问题能解答一下吗? https://github.com/alibaba/higress/issues/2001#issuecomment-2799892498
@johnlanni @Jing-ze 这个问题能解答一下吗? #2001 (comment)
如果只使用streamableHTTP模式配合MCP插件,无需配置configMap,deepchat,chatwise,cherrystudio目前streamable HTTP模式测试都没问题
@johnlanni @Jing-ze 这个问题能解答一下吗? #2001 (comment)
文档里写的有点不正确,如果只使用streamableHTTP,configMap里只需要配置
match_list,match_list控制了访问mcp_server的路由,deepchat,chatwise,cherrystudio目前streamable HTTP模式测试都没问题
是说sse_path_suffix,redis这些都不用配置了吗,不过如果enable打开的话,redis也提示是必须的。
这样配置完之后如果 POST localhost/user 接口,基于MCP协议发送ping,会把请求路由到randomuser.me了
是说sse_path_suffix,redis这些都不用配置了吗,不过如果enable打开的话,redis也提示是必须的。 这样配置完之后如果 POST localhost/user 接口,基于MCP协议发送ping,会把请求路由到randomuser.me了
你升级到最新的 2.1.1 试试看。
@johnlanni @Jing-ze 这个问题能解答一下吗? #2001 (comment)
文档里写的有点不正确,如果只使用streamableHTTP,configMap里只需要配置
match_list,match_list控制了访问mcp_server的路由,deepchat,chatwise,cherrystudio目前streamable HTTP模式测试都没问题
更正一下,只使用streamable HTTP模式配合MCP插件,无需配置configMap,可以使用最新版的2.1.1,已经修复streamable HTTP模式的一些bug,mcp-quick-start给出的 https://randomuser.me/api 国内访问可能会超时503,会更新一个新的demo api
@johnlanni @Jing-ze 这个问题能解答一下吗? #2001 (comment)
文档里写的有点不正确,如果只使用streamableHTTP,configMap里只需要配置
match_list,match_list控制了访问mcp_server的路由,deepchat,chatwise,cherrystudio目前streamable HTTP模式测试都没问题更正一下,只使用streamable HTTP模式配合MCP插件,无需配置configMap,可以使用最新版的2.1.1,已经修复streamable HTTP模式的一些bug,mcp-quick-start给出的
https://randomuser.me/api国内访问可能会超时503,会更新一个新的demo api
如果使用streamable HTTP模式 配合MCP,是不需要在higress-config中再配置了吗? 我配置了MCP服务+路由,match_list第一个为SSE服务,可以调通。第二个为Streamable 不能调通,请问是配置的问题吗?
apiVersion: v1
kind: ConfigMap
metadata:
name: higress-config
namespace: higress-system
resourceVersion: '10'
data:
higress: |-
mcpServer:
enable: true
sse_path_suffix: /sse
match_list:
- match_rule_domain: "*"
match_rule_path: /mcp/sample
match_rule_type: prefix
upstream_type: sse
enable_path_rewrite: true
path_rewrite_prefix: /
- match_rule_domain: "*"
match_rule_path: /mcp/kb
match_rule_type: prefix
upstream_type: http
enable_path_rewrite: true
path_rewrite_prefix: /mcp/server/ltL51tc2oxk7Bgec/mcp
disable_response_buffering: true
servers: []