功能 | MCP Server | Dify Tool |
日志主题查询 | 支持 | 支持 |
指标主题查询 | 支持 | 不支持 |
告警查询 | 支持 | 不支持 |
根据自然语言生成日志查询语句 | 支持 | 不支持 (依赖通用大模型生成查询语句,准确率较低) |
辅助工具 | 支持 根据主题名称查询主题 ID 根据地域名称查询地域简称 时间戳转换 | 不支持 |
{"version": "2.0","statement": [{"effect": "allow","action": ["cls:SearchLog","cls:DescribeLogContext","cls:ChatCompletions","cls:DescribeIndex","cls:DescribeIndexs","cls:DescribeLogHistogram","cls:QueryMetric","cls:QueryRangeMetric","cls:DescribeAlarms","cls:DescribeAlertRecordHistory","cls:GetAlarmLog","cls:DescribeAlarmNotices","cls:DescribeAlarmShields","cls:DescribeNoticeContents","cls:DescribeWebCallbacks","cls:DescribeTopics"],"resource": ["*"]}]}
{"mcpServers": {"cls-mcp-server": {"isActive": true,"name": "cls-mcp-server","type": "stdio","command": "npx","args": ["-y","cls-mcp-server@latest"],"env": {"TRANSPORT": "stdio","TENCENTCLOUD_SECRET_ID": "YOUR_TENCENT_SECRET_ID","TENCENTCLOUD_SECRET_KEY": "YOUR_TENCENT_SECRET_KEY","TENCENTCLOUD_API_BASE_HOST": "tencentcloudapi.com","TZ": "Asia/Shanghai"}}}}
TRANSPORT=httpTENCENTCLOUD_SECRET_ID=<YOUR_SECRET_ID>TENCENTCLOUD_SECRET_KEY=<YOUR_SECRET_KEY># 如在内网使用 MCP,或管理员限定了仅能通过内网方式访问腾讯云 API,请取消下行注释# TENCENTCLOUD_API_BASE_HOST=internal.tencentcloudapi.comPORT=3000TZ=Asia/Shanghai
npx -y cls-mcp-server@latest
{"mcpServers": {"cls-mcp-server": {"name": "cls-mcp-server","type": "http","isActive": true,"url": "http://localhost:3000/mcp"}}}
文档反馈