Skip to main content

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


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.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_xiaozhi_server-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_xiaozhi_server-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_xiaozhi_server-0.1.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

Hashes for mcp_xiaozhi_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 796c2ba5762e7f465bd165b196c47b7e498dee17f708724969e6502e85e5efe8
MD5 205b3c54884bfab22c95b13c33a05d55
BLAKE2b-256 c0f4a7ee1fbb5186767a233ac7898511124e5047b53aad67d57d0ef16c2491ba

See more details on using hashes here.

File details

Details for the file mcp_xiaozhi_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_xiaozhi_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6d5a8f41b724afe8b85814f0becb41e9554d2e42d07d8b88731d488a7614dcc
MD5 85cfb6a4b32df076447e3e0cb1d9d391
BLAKE2b-256 19d8120a7c768a35b2d5ad6372206a9c1ce4b846fd8be5930507685025596ef3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page