xiaozhi-client 1.6.11 → 1.6.12-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -53,8 +53,6 @@
53
53
  1. [功能特性](#功能特性)
54
54
  2. [启动 Web UI](#启动-web-ui)
55
55
  9. [作为 MCP Server 集成到其他客户端](#作为-mcp-server-集成到其他客户端)
56
- 1. [方式一:使用 stdio 模式(推荐)](#方式一使用-stdio-模式推荐)
57
- 2. [方式二:使用 HTTP Server 模式](#方式二使用-http-server-模式)
58
56
 
59
57
  ## 功能特色
60
58
 
@@ -753,7 +751,7 @@ xiaozhi start -u
753
751
 
754
752
  ## 作为 MCP Server 集成到其他客户端
755
753
 
756
- > 需升级至 `1.5.0` 及以上版本
754
+ > 需升级至 `1.6.12` 及以上版本
757
755
 
758
756
  xiaozhi-client 不仅可以作为小智 AI 的客户端使用,还可以作为标准的 MCP Server 被 Cursor、Cherry Studio 等支持 MCP 协议的客户端集成。
759
757
 
@@ -764,74 +762,32 @@ xiaozhi-client 不仅可以作为小智 AI 的客户端使用,还可以作为
764
762
  ![在CherryStudio中集成](https://raw.githubusercontent.com/shenjingnan/xiaozhi-client/main/docs/images/integrate-to-cherry-studio.png)
765
763
  ![在Cursor中集成](https://raw.githubusercontent.com/shenjingnan/xiaozhi-client/main/docs/images/integrate-to-cursor.png)
766
764
 
767
- ### 方式一:使用 stdio 模式(推荐)
765
+ ### 使用方式
768
766
 
769
- 第一步:确保已全局安装 xiaozhi-client
767
+ > 如果你将 xiaozhi-client 装在 docker 中使用,可以通过 HTTP 的方式暴露给外部客户端
770
768
 
771
- ```bash
772
- npm install -g xiaozhi-client
773
- ```
774
-
775
- 第二步:在 客户端 的 MCP 配置中添加:
776
-
777
- ```json
778
- {
779
- "mcpServers": {
780
- "xiaozhi-client": {
781
- "command": "xiaozhi",
782
- "args": ["start", "--stdio"]
783
- }
784
- }
785
- }
786
- ```
787
-
788
- 提示:如果需要指定配置文件位置,可以使用环境变量
789
-
790
- 配置文件的查找顺序
791
-
792
- 1. 当前工作目录
793
- 2. 通过 `XIAOZHI_CONFIG_DIR` 环境变量指定的目录
794
-
795
- ```json
796
- {
797
- "mcpServers": {
798
- "xiaozhi-client": {
799
- "command": "xiaozhi",
800
- "args": ["start", "--stdio"],
801
- "env": {
802
- "XIAOZHI_CONFIG_DIR": "/path/to/your/config/directory"
803
- }
804
- }
805
- }
806
- }
807
- ```
808
-
809
- ### 方式二:使用 HTTP Server 模式
810
-
811
- > 如果你将 xiaozhi-client 装在 docker 中使用,可以通过 http server 的方式暴露给外部客户端
812
-
813
- 第一步:启动 xiaozhi-client 的 HTTP Server:
769
+ 第一步:启动 xiaozhi-client 服务:
814
770
 
815
771
  ```bash
816
- # 使用默认端口 3000
817
- xiaozhi start -s
818
-
819
- # 使用自定义端口
820
- xiaozhi start -s 8080
821
-
822
- # 后台运行
823
- xiaozhi start -s -d
772
+ # 使用默认端口 9999
773
+ xiaozhi start
824
774
  ```
825
775
 
826
- 第二步:在 客户端 中配置 SSE 连接:
776
+ 第二步:在客户端中配置 HTTP 连接:
827
777
 
828
778
  ```json
829
779
  {
830
780
  "mcpServers": {
831
781
  "xiaozhi-client": {
832
- "type": "sse",
833
- "url": "http://localhost:3000/sse"
782
+ "type": "streamableHttp",
783
+ "url": "http://localhost:9999/mcp"
834
784
  }
835
785
  }
836
786
  }
837
787
  ```
788
+
789
+ **说明:**
790
+ - 服务启动后,MCP 端点将在 `http://localhost:9999/mcp` 提供服务
791
+ - 支持标准的 MCP over HTTP 协议
792
+ - 可以通过 `--port` 参数自定义端口号
793
+ - 使用 `-d` 参数可以后台运行服务