Alibaba Cloud Observability MCP Server
OfficialThe Alibaba Cloud Observability MCP Server provides tools for monitoring and analyzing cloud resources, allowing you to interact with Alibaba Cloud Log Service (SLS) and Application Real-Time Monitoring Service (ARMS) via the MCP protocol. Key capabilities include:
Log Management: List and search SLS projects and logstores with support for fuzzy search and pagination
Schema Analysis: Retrieve detailed information about logstore structure, schema, and indexing configuration
Query Capabilities: Execute SQL queries on logstores within specified time ranges
Natural Language Processing: Translate natural language descriptions into SQL queries, PromQL queries, and ARMS trace queries
Troubleshooting: Diagnose and analyze issues with failed SLS queries
Application Monitoring: Search for ARMS applications and analyze their performance
Performance Analysis: Generate detailed performance profiles and comparative analyses using tools like
arms_profile_flame_analysisandarms_diff_profile_flame_analysisUtility Functions: Access current time and timestamp information
Provides access to ARMS (Application Real-Time Monitoring Service) capabilities, allowing the querying of applications, generating trace queries, and finding performance information such as the slowest traces in an application.
Enables displaying badges within the README for language preferences, as shown in the document header with badges for Chinese and English documentation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Alibaba Cloud Observability MCP Servershow me the error logs for my payment service in the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
阿里云可观测 MCP Server(Go 版)
📌 重要提示
本项目已使用 Go 语言重构。如需使用原 Python 版本,请访问
v1目录:
📖 v1/README.md - Python 版本文档
📦 Python 版本通过
pip install mcp-server-aliyun-observability安装
阿里云可观测 MCP Server 的 Go 语言实现,为 AI 模型提供对阿里云日志服务(SLS)和云监控(CMS)的结构化数据访问能力。基于 Model Context Protocol 协议,可与 Cursor、Kiro、Cline、Windsurf 等 AI 工具无缝集成。
特性
支持 stdio、SSE、streamable-http 三种传输模式
模块化工具集架构:PaaS(云监控 2.0)、IaaS(SLS/CMS 直接访问)、Shared
灵活的时间表达式解析:相对时间、绝对时间戳、Grafana 风格、预设关键词
时序数据对比分析:统计计算、趋势分析、差异评分
结构化错误处理:英文错误描述和解决方案建议
稳定性保障:重试(指数退避)、熔断器、优雅关闭
结构化 JSON 日志(slog)
单一二进制文件,零运行时依赖
Related MCP server: AlibabaCloud DevOps MCP Server
快速开始
下载与安装
从 Releases 页面下载对应平台的二进制文件:
# Linux amd64
wget https://github.com/aliyun/alibabacloud-observability-mcp-server/releases/latest/download/alibabacloud-observability-mcp-server-linux-amd64.tar.gz
tar -xzf alibabacloud-observability-mcp-server-linux-amd64.tar.gz
# macOS arm64 (M1/M2)
wget https://github.com/aliyun/alibabacloud-observability-mcp-server/releases/latest/download/alibabacloud-observability-mcp-server-darwin-arm64.tar.gz
tar -xzf alibabacloud-observability-mcp-server-darwin-arm64.tar.gz解压后包含:
alibabacloud-observability-mcp-server- 可执行文件config.yaml- 默认配置文件
配置凭证
# 设置阿里云 AccessKey
export ALIBABA_CLOUD_ACCESS_KEY_ID=<your_access_key_id>
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<your_access_key_secret>AccessKey 获取方式:阿里云 AccessKey 管理
启动服务
# 以 stdio 模式启动(MCP 客户端直接调用)
./alibabacloud-observability-mcp-server start --stdio
# 以网络模式启动(默认 transport 在 config.yaml 中配置)
./alibabacloud-observability-mcp-server start --config config.yamlCLI 命令
# 查看版本信息
./alibabacloud-observability-mcp-server version
# 列出所有已注册工具
./alibabacloud-observability-mcp-server tools从源码构建
git clone https://github.com/aliyun/alibabacloud-observability-mcp-server.git
cd alibabacloud-observability-mcp-server
make build配置
配置采用两层结构:
config.yaml- 服务器配置(传输模式、日志、网络等).env文件或环境变量 - 凭证和运行时参数
详细的配置项说明请参考 config.yaml 中的注释。
AI 工具集成
streamable-http 模式(推荐)
配置
config.yaml(设置server.transport: streamable-http)启动服务:
./bin/alibabacloud-observability-mcp-server start配置
mcp.json:
{
"mcpServers": {
"alibaba_cloud_observability": {
"url": "http://localhost:8080"
}
}
}stdio 模式
{
"mcpServers": {
"alibaba_cloud_observability": {
"command": "./bin/alibabacloud-observability-mcp-server",
"args": ["start", "--stdio"],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "<your_access_key_id>",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "<your_access_key_secret>"
}
}
}
}工具集
查看完整工具列表
运行以下命令查看当前注册的所有工具:
./bin/alibabacloud-observability-mcp-server tools付费功能说明
以下 AI 智能工具每次调用会产生 STAROps 费用:
工具 | 功能 |
| 自然语言转 SQL |
| 自然语言转 SPL |
| SLS 智能运维助手 |
| 自然语言数据查询 |
计费详情查看 STAROps 计费说明。如不需要 AI 能力,可在 config.yaml 的 enabled_tools 中仅启用免费工具。
权限要求
特殊权限:使用 AI 智能工具(如 sls_text_to_sql、cms_natural_language_query)需要授予 CMS 的 cms:CreateChat、cms:CreateThread 权限。
时间表达式
所有数据查询工具支持灵活的时间范围格式:
格式 | 示例 |
相对预设 |
|
相对时间 |
|
Grafana 风格 |
|
绝对时间戳 |
|
日期时间字符串 |
|
项目结构
├── cmd/server/ # CLI 入口
├── pkg/
│ ├── client/ # SLS/CMS 客户端
│ ├── config/ # 配置管理
│ ├── server/ # MCP Server 核心
│ └── toolkit/ # 工具集(PaaS/IaaS/Shared)
└── v1/ # Python 版本安全建议
服务不存储 AccessKey,仅在运行时用于 API 调用
SSE/HTTP 模式下需自行做好访问控制
建议部署在内网或 VPC,避免暴露公网
推荐使用函数计算 (FC) 部署,仅 VPC 内访问
Skill 自动化部署
本项目提供 AI Agent Skill,支持通过自然语言指令完成部署、启动和更新。
安装 Skill
方式一:npx skills add(推荐)
由 Vercel Labs 维护的通用 skill 安装器,支持 69+ 种 coding agents:
# 全局安装(所有项目可用)
npx skills add aliyun/alibabacloud-observability-mcp-server
# 项目级安装(仅当前项目可用)
npx skills add aliyun/alibabacloud-observability-mcp-server --local方式二:curl(无需 Node.js)
# 下载并安装 skill 到 ~/.claude/skills/
curl -fsSL https://raw.githubusercontent.com/aliyun/alibabacloud-observability-mcp-server/master/skills/deploy-observability/SKILL.md -o ~/.claude/skills/deploy-observability/SKILL.md方式三:从项目仓库复制
如果你已经克隆了本项目:
# 全局安装
cp skills/deploy-observability/SKILL.md ~/.claude/skills/deploy-observability/
# 或项目级安装(在项目根目录下)
cp skills/deploy-observability/SKILL.md .claude/skills/deploy-observability/使用 Skill
安装 skill 后,将以下内容复制到支持 Skill 的 AI Agent(如 Claude Code)中:
首次部署:
请使用 deploy-observability skill 帮我完成以下操作:
1. 克隆项目到 ~/alibabacloud-observability-mcp-server
2. 下载依赖并构建
3. 复制 .env.example 为 .env,并提示我填写阿里云 AccessKey
4. 让我选择启动模式(stdio / sse / streamable-http)
5. 生成 JSON 配置,供我粘贴到 AI Agent 中使用项目更新:
请使用 deploy-observability skill 帮我更新项目:
1. 拉取最新代码
2. 检测是否有依赖、配置或环境变量变更
3. 对比工具列表变化,告诉我新增/删除了哪些工具
4. 重新构建并重启服务详细使用文档请参考 skills/deploy-observability/SKILL.md。
许可证
本项目遵循与原 Python 版相同的许可协议。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliyun/alibabacloud-observability-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server