发送 Workflow MCP 消息
POST/api/workflows/:workflowName/mcp
标准 Streamable HTTP MCP JSON-RPC 入口。只接受账户 API Key 或管理员 Key 的
Authorization: Bearer,不接受浏览器 cookie session。initialize 请求省略
Mcp-Session-Id;初始化响应返回该 header,之后的请求必须携带同一会话 ID、
Bearer 凭据、项目和 target。JSON-RPC request 的正常响应通过 SSE 返回;只包含
notification 或 response 的消息返回 202。
Request
Responses
- 200
- 202
- 400
- 401
- 403
- 404
- 406
- 409
- 415
JSON-RPC response 的 SSE 流;initialize 时同时返回会话 ID。
Response Headers
Mcp-Session-Id
初始化生成的会话 ID;后续请求必须原样携带。
notification 或 client response 已接受,没有响应体。
target、session header 或 JSON-RPC 消息无效。
缺少 Bearer,或凭据不是有效的账户 API Key / 管理员 Key。
Response Headers
WWW-Authenticate
Example:
Bearer项目运行权限不足,或会话绑定到其它凭据、项目或 target。
MCP 会话不存在或已过期。
Accept 未同时包含 application/json 和 text/event-stream。
会话 target 或 draft revision 已变化,必须重新连接。
Content-Type 不是 application/json。