Feature Request: 支持 MCP Streamable HTTP 传输协议

问题描述

Alma 目前似乎只支持 stdio 传输方式,无法直接连接到使用 Streamable HTTP 传输的 MCP 服务器。(如果我对 Alma MCP 使用不当,麻烦请指教正确的使用方式)。

版本:0.0.79

当前限制:

  • 即使 MCP 服务器已经独立运行(如 http://127.0.0.1:14242/mcp),Alma 仍强制要求提供启动命令

  • 不支持通过 URL 直接连接到 HTTP 端点

MCP 官方规范

根据 MCP 规范,协议定义了几种标准传输:

  1. stdio - 通过子进程的标准输入/输出通信

  2. Streamable HTTP - 通过 HTTP POST/GET + SSE 通信

  3. 还有其他的协议,但是大差不大

期望功能

希望 Alma 支持类似以下的配置:

{
  "mcpServers": {
    "my-server": {
      "transport": "streamableHttp",
      "url": "http://127.0.0.1:14242/mcp",
      "headers": {
        "APP": "Alma"
      }
    }
  }
}

关键点:

  • 使 command 字段可选(当使用 HTTP 传输时)

  • 支持 url 字段配置服务器地址

  • 支持自定义 HTTP headers

  • 处理 SSE 流式响应

  • 支持 Mcp-Session-Id 会话管理

参考

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board
💡

Feature Request

Date

3 months ago

Author

Appointat

Subscribe to post

Get notified by email when there are changes.