Skip to content

Commit 274ccca

Browse files
committed
feat:《AI MCP Gateway 网关服务系统》第3-22节:streamable-http-api,测试验证案例
1 parent 1bd35f1 commit 274ccca

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2386,6 +2386,7 @@ function getBarAIMCPGateway() {
23862386
"第3-19节:管理端-API与UI对接.md",
23872387
"第3-20节:验证服务,LLM对接测试MCP接口.md",
23882388
"第3-21节:验证服务,LLM对接测试MCP界面.md",
2389+
"第3-22节:streamable-http-api,测试验证案例.md",
23892390
"none.md",
23902391
]
23912392
},
404 KB
Loading
720 KB
Loading
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: 【更】第3-22节:streamable-http-api,测试验证案例
3+
pay: https://t.zsxq.com/Xg0c4
4+
---
5+
6+
# 《AI MCP Gateway 网关服务系统》第3-22节:streamable-http-api,测试验证案例
7+
8+
作者:小傅哥
9+
<br/>博客:[https://bugstack.cn](https://bugstack.cn)
10+
<br/>视频:[https://t.zsxq.com/o3k1M](https://t.zsxq.com/o3k1M)
11+
12+
>沉淀、分享、成长,让自己和他人都能有所收获!😄
13+
14+
## 一、本章诉求
15+
16+
为了让大家学习的时候,更好的理解 streamable http 通信方式,这一节我们先来做一个固定的请求和应答结果的案例。之后后续的章节,在陆续完成 streamable http 接口与 case 编排层、domain 领域层的对接。
17+
18+
>在前面章节已经用 sse 方式串联了整个流程,那么目前章节核心的实现,其实就是把 streamable http 引入进来,之后逐步与底层的 mcp 协议对接即可。像是上传 openapi 协议解析存储,工具调用,结果映射等,这些都是固定的。
19+
20+
## 二、流程设计
21+
22+
如图,streamable http 调用流程(写一个固定编码的案例);
23+
24+
<div align="center">
25+
<img src="https://bugstack.cn/images/article/project/ai-mcp-gateway/ai-mcp-gateway-3-22-01.png" width="950px"/>
26+
</div>
27+
28+
- 首先,此图也就是上一节我们分析 streamable http 协议和调试 spring ai 框架中 streamable http 部分的代码,提炼的流程图。post 简历会话 id,get 创建 sse。之后回到 post 流程,处理接收 mcp 请求,发来的(tools/list、tools/call)请求。
29+
- 之后,就是 get、post 请求的执行流程,对于 post 请求的 method 方法处理,本节案例写了一个固定代码,暂时先不和 mcp 逻辑代码对接。

0 commit comments

Comments
 (0)