模型上下文协议
该项目名为MCP(模型上下文协议),提供了一种从抖音和B站等平台获取热门话题的方法。可以通过pip安装,并使用Python脚本运行。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"hot-trending": {
"args": [
"-m",
"server"
],
"command": "python",
"env": {}
}
}
}
服务介绍
模型上下文协议 (MCP) 文档
目录
- 介绍
- 使用案例
介绍
pip install -e .
示例
MCP 示例
python main.py
Claude Desktop 示例
Claude Desktop 示例请求
{
"mcpServers": {
"hot-trending": {
"command": "python",
"args": ["F:\\Python\\mcp-server\\main.py"],
"env": {}
}
}
}
获取热门趋势
MCP 提供 get_hot_trending 功能
# �֖���
get_hot_trending(platform="douyin")
# ��B��
get_hot_trending(platform="bili")
API 端点
- 抖音:
https://60s.zeabur.app/v2/douyin - B站:
https://60s.zeabur.app/v2/bili
响应格式
响应以 JSON 格式返回,包含以下字段:
code: 状态码message: 消息data: 数据