Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix: support http mcp server

huanggawa61cb1088a612
diff --git a/docs/en/InstallGuide.md b/docs/en/InstallGuide.md
index 6ee6ab90df..77871d62f5 100644
--- a/docs/en/InstallGuide.md
+++ b/docs/en/InstallGuide.md
@@ -37,7 +37,39 @@ git --version
## First-time installation
-### Option 1: pip install
+### Option 1: Desktop installer (dmg / exe)
+
+For Windows and macOS users who want a ready-to-run app without setting up Python / Node.js themselves. Download the installer for your platform from the gitcode [Release](https://gitcode.com/openJiuwen/jiuwenswarm/releases) page.
+
+| Platform | Artifact |
+|----------|----------|
+| Windows | `JiuwenSwarm-setup-<version>.exe` |
+| macOS | `JiuwenSwarm-<version>.dmg` |
+
+Releases: https://gitcode.com/openJiuwen/jiuwenswarm/releases
+
+#### 1. macOS: download the dmg with curl (recommended)
+
+> ⚠️ **Important:** A `.dmg` downloaded through a browser gets a macOS quarantine flag (`com.apple.quarantine`). When opened it triggers a Gatekeeper check and may report "damaged and can't be opened" or "can't be verified developer". Downloading from the terminal with `curl` does not add the quarantine flag, so the dmg mounts and installs normally.
+
+```bash
+# Replace <version> with the target version
+curl -L --fail -o JiuwenSwarm-<version>.dmg \
+ https://gitcode.com/openJiuwen/jiuwenswarm/releases/download/JiuwenSwarm<version>/JiuwenSwarm-<version>.dmg
+```
+
+#### 2. Install and first launch
+
+- **macOS**: double-click to mount the dmg, then drag `JiuwenSwarm.app` into `Applications`. You may right-click it in Finder and choose "Open".
+- **Windows**: double-click the downloaded installer (`.exe`) and follow the prompts; it initializes the workspace automatically. For the portable onedir build, run `jiuwenswarm.exe init` once manually.
+
+On first launch the app creates `~/.jiuwenswarm/`. Then follow [Post-start verification](#3-post-start-verification) to finish model configuration.
+
+> Match the version to the actual download link on the Release page. For Windows auto-update behavior, see [Windows auto-update design](WindowsAutoUpdateDesign.md).
+
+---
+
+### Option 2: pip install
#### 1. Installation steps
@@ -52,7 +84,15 @@ jiuwenswarm-env\Scripts\activate
source jiuwenswarm-env/bin/activate
# Install JiuwenSwarm
+## Option 1: default install
pip install jiuwenswarm
+
+## Option 2: use a China mirror (recommended)
+# Tsinghua mirror
+pip install jiuwenswarm -i https://pypi.tuna.tsinghua.edu.cn/simple
+
+# Aliyun mirror
+pip install jiuwenswarm -i https://mirrors.aliyun.com/pypi/simple/
```
#### 2. First launch
@@ -92,7 +132,7 @@ jiuwenswarm-start
---
-### Option 2: Install from source (uv)
+### Option 3: Install from source (uv)
#### 1. Environment setup
@@ -163,7 +203,7 @@ jiuwenswarm-init
jiuwenswarm-start
```
-#### 5. Post-start verification (same as Option 1)
+#### 5. Post-start verification (same as Option 2)
Use the checklist under [Post-start verification](#3-post-start-verification).
@@ -176,7 +216,7 @@ jiuwenswarm-start
---
-### Option 3: Install from source (conda)
+### Option 4: Install from source (conda)
#### 1. Environment setup
@@ -254,7 +294,7 @@ jiuwenswarm-init
jiuwenswarm-start
```
-#### 6. Post-start verification (same as Option 1)
+#### 6. Post-start verification (same as Option 2)
Use the checklist under [Post-start verification](#3-post-start-verification).
diff --git a/docs/en/install.md b/docs/en/install.md
index 3830d85856..6b8e010066 100644
--- a/docs/en/install.md
+++ b/docs/en/install.md
@@ -34,9 +34,35 @@ git --version
## First-time installation
-### Option 1: Desktop installer (exe)
+### Option 1: Desktop installer (dmg / exe)
-> To be filled in when a desktop installer is available. Prefer this method when offered.
+For Windows and macOS users who want a ready-to-run app without setting up Python / Node.js themselves. Download the installer for your platform from the gitcode [Release](https://gitcode.com/openJiuwen/jiuwenswarm/releases) page.
+
+| Platform | Artifact |
+|----------|----------|
+| Windows | `JiuwenSwarm-setup-<version>.exe` |
+| macOS | `JiuwenSwarm-<version>.dmg` |
+
+Releases: https://gitcode.com/openJiuwen/jiuwenswarm/releases
+
+#### 1. macOS: download the dmg with curl (recommended)
+
+> ⚠️ **Important:** A `.dmg` downloaded through a browser gets a macOS quarantine flag (`com.apple.quarantine`). When opened it triggers a Gatekeeper check and may report "damaged and can't be opened" or "can't be verified developer". Downloading from the terminal with `curl` does not add the quarantine flag, so the dmg mounts and installs normally.
+
+```bash
+# Replace <version> with the target version
+curl -L --fail -o JiuwenSwarm-<version>.dmg \
+ https://gitcode.com/openJiuwen/jiuwenswarm/releases/download/JiuwenSwarm<version>/JiuwenSwarm-<version>.dmg
+```
+
+#### 2. Install and first launch
+
+- **macOS**: double-click to mount the dmg, then drag `JiuwenSwarm.app` into `Applications`. You may right-click it in Finder and choose "Open".
+- **Windows**: double-click the downloaded installer (`.exe`) and follow the prompts; it initializes the workspace automatically.
+
+On first launch the app creates `~/.jiuwenswarm/`. Then follow [Post-start verification](#3-post-start-verification) to finish model configuration.
+
+> Match the version to the actual download link on the Release page. For Windows auto-update behavior, see [Windows auto-update design](WindowsAutoUpdateDesign.md).
---
@@ -55,12 +81,10 @@ jiuwenswarm-env\Scripts\activate
source jiuwenswarm-env/bin/activate
# Install JiuwenSwarm
+## Option 1: default install
pip install jiuwenswarm
-```
-
-#### 2. Use China mainland mirrors (recommended)
-```bash
+## Option 2: use a China mirror (recommended)
# Tsinghua mirror
pip install jiuwenswarm -i https://pypi.tuna.tsinghua.edu.cn/simple
@@ -68,7 +92,7 @@ pip install jiuwenswarm -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install jiuwenswarm -i https://mirrors.aliyun.com/pypi/simple/
```
-#### 3. First launch
+#### 2. First launch
```bash
# Initialize JiuwenSwarm (first run)
@@ -79,6 +103,21 @@ jiuwenswarm-start
After the first start, the app creates the config directory `~/.jiuwenswarm/`.
+#### 3. Post-start verification
+
+After a successful start, verify the installation with these steps:
+
+1. **Open the Web UI**: in your browser go to `http://localhost:5173`
+2. **Open configuration**: in the left sidebar choose **Configuration**
+3. **Configure the model**: follow [Configuration](Configuration.md) to set up your model API
+4. **Confirm it works**:
+ - The Web UI loads
+ - After model configuration you can run a basic chat
+
+![Example: Web UI connected with a successful verification chat](../assets/images/天气.png)
+
+> 💡 **Tip:** If the Web UI does not load, check `~/.jiuwenswarm/logs/` for errors.
+
#### 4. Restarting the service
If you closed JiuwenSwarm and want to run it again:
diff --git "a/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md" "b/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md"
index da2eae30e0..efe0c1d0c5 100644
--- "a/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md"
+++ "b/docs/zh/\345\256\211\350\243\205\346\214\207\345\215\227.md"
@@ -37,7 +37,39 @@ git --version
## 首次安装
-### 方式一:pip 安装
+### 方式一:桌面安装包(dmg / exe)
+
+适用于 Windows 和 macOS 用户,希望开箱即用、不想自行配置 Python / Node.js 环境。从 gitcode Release 下载对应平台的安装包即可。从 [Release](https://gitcode.com/openJiuwen/jiuwenswarm/releases) 页面下载。
+
+| 平台 | 下载产物 |
+|------|----------|
+| Windows | `JiuwenSwarm-setup-<version>.exe` |
+| macOS | `JiuwenSwarm-<version>.dmg` |
+
+下载地址:https://gitcode.com/openJiuwen/jiuwenswarm/releases
+
+#### 1. macOS:用 curl 下载 dmg(推荐)
+
+> ⚠️ **重要**:从浏览器下载的 `.dmg` 会被 macOS 打上隔离标签(`com.apple.quarantine`),打开时触发 GateKeeper 检查,可能提示「已损坏,无法打开」或「无法验证开发者」。改用终端 `curl` 下载,文件不会带隔离标签,可正常挂载安装。
+
+```bash
+# 把 <version> 替换为目标版本号
+curl -L --fail -o JiuwenSwarm-<version>.dmg \
+ https://gitcode.com/openJiuwen/jiuwenswarm/releases/download/JiuwenSwarm<version>/JiuwenSwarm-<version>.dmg
+```
+
+#### 2. 安装与首次启动
+
+- **macOS**:双击挂载 dmg,将 `JiuwenSwarm.app` 拖入 `Applications`。由于当前 `.app` 未签名 / 未公证,在 Finder 中右键选择「打开」。
+- **Windows**:双击下载的安装包(`.exe`)按提示安装,安装时会自动初始化工作区。
+
+首次启动后,系统会创建配置目录 `~/.jiuwenswarm/`,之后请参考 [启动后验证](#3-启动后验证) 完成模型配置。
+
+> 版本号以 Release 页面实际下载链接为准。Windows 桌面版的自动更新方案见 [Windows 自动更新设计](windows自动更新设计.md)。
+
+---
+
+### 方式二:pip 安装
#### 1. 安装步骤
@@ -100,7 +132,7 @@ jiuwenswarm-start
---
-### 方式二:源码安装(uv 方式)
+### 方式三:源码安装(uv 方式)
#### 1. 环境准备
@@ -184,7 +216,7 @@ jiuwenswarm-start
---
-### 方式三:源码安装(conda 方式)
+### 方式四:源码安装(conda 方式)
#### 1. 环境准备
diff --git a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/mcp.ts b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/mcp.ts
index 38c5852ece..fb203ce5a6 100644
--- a/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/mcp.ts
+++ b/jiuwenswarm/channels/tui/frontend/src/core/commands/builtins/mcp.ts
@@ -1,7 +1,7 @@
import { addError, addInfo } from "../helpers.js";
import { CommandKind, type SlashCommand } from "../types.js";
-type McpTransport = "stdio" | "sse";
+type McpTransport = "stdio" | "sse" | "http" | "streamable-http" | "streamable_http";
export type McpListItem = {
name: string;
@@ -21,7 +21,13 @@ type McpShowPayload = {
items?: Record<string, unknown>[];
};
-const VALID_TRANSPORTS = new Set<McpTransport>(["stdio", "sse"]);
+const VALID_TRANSPORTS = new Set<McpTransport>([
+ "stdio",
+ "sse",
+ "http",
+ "streamable-http",
+ "streamable_http",
+]);
function tokenize(raw: string): string[] {
const re = /"([^"]*)"|'([^']*)'|(\S+)/g;
@@ -179,7 +185,7 @@ export function createMcpCommand(): SlashCommand {
if (opts.transport) {
const transport = String(opts.transport).trim().toLowerCase() as McpTransport;
if (!VALID_TRANSPORTS.has(transport)) {
- ctx.addItem(addError(ctx.sessionId, "Invalid update transport: stdio|sse"));
+ ctx.addItem(addError(ctx.sessionId, "Invalid update transport: stdio|sse|http"));
return;
}
payload.transport = transport;
@@ -215,7 +221,7 @@ export function createMcpCommand(): SlashCommand {
ctx.addItem(
addError(
ctx.sessionId,
- "Invalid add arguments. Usage: /mcp add --name <name> --transport <stdio|sse> ...",
+ "Invalid add arguments. Usage: /mcp add --name <name> --transport <stdio|sse|http> ... (sse/http require --url)",
),
);
return;
@@ -242,7 +248,7 @@ export function createMcpCommand(): SlashCommand {
(typeof opts.headers === "string" && opts.headers.trim())
) {
ctx.addItem(
- addError(ctx.sessionId, "Invalid stdio args: --url/--headers are only for sse"),
+ addError(ctx.sessionId, "Invalid stdio args: --url/--headers are only for sse/http"),
);
return;
}
diff --git a/jiuwenswarm/common/mcp_config.py b/jiuwenswarm/common/mcp_config.py
index 89333e2e34..79321ef847 100644
--- a/jiuwenswarm/common/mcp_config.py
+++ b/jiuwenswarm/common/mcp_config.py
@@ -49,7 +49,7 @@ def build_mcp_server_config(
if not name:
return None
transport = str(entry.get("transport", "")).strip().lower()
- if transport not in {"stdio", "sse"}:
+ if transport not in {"stdio", "sse", "http", "streamable-http", "streamable_http"}:
return None
payload: dict[str, Any] = {
diff --git a/jiuwenswarm/server/agent_ws_server.py b/jiuwenswarm/server/agent_ws_server.py
index 028bb72800..3f6a80e4b4 100644
--- a/jiuwenswarm/server/agent_ws_server.py
+++ b/jiuwenswarm/server/agent_ws_server.py
@@ -3258,7 +3258,7 @@ class AgentWebSocketServer:
name = str(entry.get("name", "")).strip()
transport = str(entry.get("transport", "")).strip().lower()
- if not name or transport not in {"stdio", "sse"}:
+ if not name or transport not in {"stdio", "sse", "http", "streamable-http", "streamable_http"}:
logger.warning("[command.mcp] _fetch skipped: name=%r transport=%r", name, transport)
return []
@@ -3326,8 +3326,8 @@ class AgentWebSocketServer:
transport = str(merged.get("transport", "")).strip().lower()
if not name:
raise ValueError("MCP server name is required")
- if transport not in {"stdio", "sse"}:
- raise ValueError("transport must be one of stdio|sse")
+ if transport not in {"stdio", "sse", "http", "streamable-http", "streamable_http"}:
+ raise ValueError("transport must be one of stdio|sse|http")
payload: dict[str, Any] = {
"name": name,