MCP 小智服务器 - 智能体管理工具
Project description
MCP 小智服务器
MCP 小智服务器是一个基于 Model Context Protocol (MCP) 的智能体管理工具,可以对小智平台的智能体进行各种操作和配置。
功能特性
- 修改智能体的大语言模型
- 修改智能体的 TTS 模型
- 修改智能体的角色音色
- 修改智能体的角色模板
- 修改智能体的名称
安装
从 PyPI 安装(推荐)
pip install mcp-xiaozhi-server
从源码安装
git clone https://github.com/yourusername/mcp-xiaozhi-server.git
cd mcp-xiaozhi-server
pip install -e .
使用方法
命令行启动
安装后,可以通过命令行启动服务器:
mcp-xiaozhi-server --host https://api.xiaozhi.com --token your_api_token
参数说明
--host: 小智 API 主机地址(必填)--token: 小智 API 访问令牌(必填)--version,-v: 显示版本信息
作为 Python 模块使用
from mcp_xiaozhi_server import XiaoZhiServerController
from mcp_xiaozhi_server.config import Config, set_config
# 设置配置
config = Config(api_host="https://api.xiaozhi.com", api_token="your_api_token")
set_config(config)
# 创建控制器
controller = XiaoZhiServerController()
# 修改智能体
result = controller.modify_xiaozhi_agent(
agent_number=1,
feature="大语言模型",
new_value="豆包"
)
print(result)
支持的功能
修改大语言模型
controller.modify_xiaozhi_agent(1, "大语言模型", "豆包")
controller.modify_xiaozhi_agent(1, "语言模型", "智谱")
controller.modify_xiaozhi_agent(1, "LLM", "通义")
修改 TTS 模型
controller.modify_xiaozhi_agent(1, "TTS模型", "豆包语音合成")
controller.modify_xiaozhi_agent(1, "语音合成", "阿里语音合成")
修改角色音色
controller.modify_xiaozhi_agent(1, "角色音色", "男声")
controller.modify_xiaozhi_agent(1, "音色", "女声")
修改角色模板
controller.modify_xiaozhi_agent(1, "角色模板", "助手")
controller.modify_xiaozhi_agent(1, "模板", "客服")
修改名称
controller.modify_xiaozhi_agent(1, "名称", "新名字")
开发
克隆仓库
git clone https://github.com/yourusername/mcp-xiaozhi-server.git
cd mcp-xiaozhi-server
安装开发依赖
pip install -e .
运行
python -m mcp_xiaozhi_server.cli --host https://api.xiaozhi.com --token your_token
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcp_xiaozhi_server-0.2.0.tar.gz
(10.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_xiaozhi_server-0.2.0.tar.gz.
File metadata
- Download URL: mcp_xiaozhi_server-0.2.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
512ce4331e24d9b215610b134c9a59991deaa82baa96063d1216cc0f0f6d4c2c
|
|
| MD5 |
f2ea4cab71a9bfd1947b44a35051829a
|
|
| BLAKE2b-256 |
bdedabdae1bede19c6f4f81730dd79c3f4357ab4aef6af34bd0eeff23c27b8bb
|
File details
Details for the file mcp_xiaozhi_server-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mcp_xiaozhi_server-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1189e4c22ab0b56f28ff34f9ea09c02c82a144880675e2c8e620819ce48afc1
|
|
| MD5 |
d81eaf36b6de1c60493f567a484b7c8c
|
|
| BLAKE2b-256 |
9b5ea5627d85fc4ee70f54244fd2d917ee6cd185759de8ae2e7e3372bf654e6d
|