Skip to main content
Glama
Alibaba Cloud Observability MCP Server

Alibaba Cloud Observability MCP Server

Official
by aliyun

Alibaba Cloud Observability MCP Server (Go Version)


📌 Important Note

This project has been refactored using Go. If you need to use the original Python version, please visit the v1 directory:

  • 📖 v1/README.md - Python version documentation

  • 📦 The Python version can be installed via pip install mcp-server-aliyun-observability


This is the Go implementation of the Alibaba Cloud Observability MCP Server, providing AI models with structured data access capabilities for Alibaba Cloud Log Service (SLS) and CloudMonitor (CMS). Based on the Model Context Protocol, it integrates seamlessly with AI tools such as Cursor, Kiro, Cline, and Windsurf.

Features

  • Supports three transport modes: stdio, SSE, and streamable-http

  • Modular toolset architecture: PaaS (CloudMonitor 2.0), IaaS (direct SLS/CMS access), Shared

  • Flexible time expression parsing: relative time, absolute timestamps, Grafana-style, and preset keywords

  • Time-series data comparative analysis: statistical calculation, trend analysis, and difference scoring

  • Structured error handling: English error descriptions and solution suggestions

  • Stability guarantees: retries (exponential backoff), circuit breakers, and graceful shutdown

  • Structured JSON logging (slog)

  • Single binary file, zero runtime dependencies

Related MCP server: aliyun-sls-mcp

Quick Start

Download and Installation

Download the binary for your platform from the Releases page:

# 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

After extraction, it contains:

  • alibabacloud-observability-mcp-server - Executable file

  • config.yaml - Default configuration file

Configure Credentials

# 设置阿里云 AccessKey
export ALIBABA_CLOUD_ACCESS_KEY_ID=<your_access_key_id>
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=<your_access_key_secret>

How to obtain AccessKey: Alibaba Cloud AccessKey Management

Start the Service

# 以 stdio 模式启动(MCP 客户端直接调用)
./alibabacloud-observability-mcp-server start --stdio

# 以网络模式启动(默认 transport 在 config.yaml 中配置)
./alibabacloud-observability-mcp-server start --config config.yaml

CLI Commands

# 查看版本信息
./alibabacloud-observability-mcp-server version

# 列出所有已注册工具
./alibabacloud-observability-mcp-server tools

Building from Source

Prerequisites

  • Go 1.23+

Build

# 克隆仓库
git clone https://github.com/aliyun/alibabacloud-observability-mcp-server.git
cd alibabacloud-observability-mcp-server

# 构建当前平台
make build

# 构建所有平台(linux/darwin/windows × amd64/arm64)
make build-all

The generated binary is located in the bin/ directory.

Configuration

Configuration uses a two-layer structure:

  1. config.yaml - Server configuration (transport mode, logging, network, etc.)

  2. .env file or environment variables - Credentials and runtime parameters

Configuration Files

cp config.yaml config.yaml.bak       # 备份默认配置(可选)
cp .env.example .env                  # 凭证(AccessKey)

config.yaml search path: current directory → ./config/

.env files are loaded from the current directory, suitable for storing credentials that should not be committed to version control.

config.yaml Structure

# 服务器配置
server:
  transport: streamable-http  # stdio, sse, streamable-http
  host: "0.0.0.0"
  port: 8080

# 日志配置
logging:
  level: info                 # debug, info, warn, error
  debug_mode: false

# 工具集配置
toolkit:
  scope: all                  # all, paas, iaas
  # 精细化工具选择(可选,非空时仅注册列表中的工具)
  # enabled_tools:
  #   - list_workspace
  #   - umodel_get_entities
  #   - sls_execute_sql

# 网络配置
network:
  max_retry: 1
  retry_wait_seconds: 1
  read_timeout_ms: 610000
  connect_timeout_ms: 30000

# 本地化配置
locale:
  timezone: Asia/Shanghai
  language: zh-CN

# 运行时默认值(可选)
# 优先级: 环境变量 > .env 文件 > config.yaml
runtime:
  region: cn-hangzhou
  # workspace: ""

# 端点覆盖(可选,用于内网访问)
# endpoints:
#   sls:
#     cn-hongkong: "cn-hongkong-intranet.log.aliyuncs.com"
#   cms:
#     cn-hongkong: "cms.cn-hongkong.aliyuncs.com"

Fine-grained Tool Selection

By default, toolkit.scope controls tool enablement by category (all/paas/iaas). If more granular control is needed, you can use toolkit.enabled_tools to specify the list of tools to enable:

toolkit:
  scope: all
  enabled_tools:
    - list_workspace
    - list_domains
    - umodel_get_entities
    - umodel_get_metrics
    - sls_execute_sql

When enabled_tools is not empty, only the tools in the list will be registered, and the rest will be unavailable. scope still determines which toolkit modules are loaded, and enabled_tools further filters them on top of that.

For the complete list of tools and category descriptions, please refer to the comment template in config.yaml.

CLI Arguments

Argument

Description

Default Value

--config

Specify configuration file path

Auto-search

--stdio

Force use of stdio transport mode

false

Environment Variables (Credentials and Runtime Parameters)

Environment Variable

Description

Required

ALIBABA_CLOUD_ACCESS_KEY_ID

AccessKey ID

No*

ALIBABA_CLOUD_ACCESS_KEY_SECRET

AccessKey Secret

No*

ALIBABA_CLOUD_SECURITY_TOKEN

STS Token (temporary credential)

No

ALIBABA_CLOUD_REGION

Default region

No

ALIBABA_CLOUD_WORKSPACE

Default workspace (required for PaaS tools)

No

  • When AccessKey is not configured, the service will automatically use the Default Credential Chain to obtain credentials (supporting ECS RAM Role, OIDC, configuration files, etc.). Manual AccessKey configuration is not required in cloud environments like ECS or Function Compute.

Credential resolution priority: CLI arguments / .env file > shell environment variables > default credential chain.

💡 Automatic Default Value Filling

When ALIBABA_CLOUD_REGION or ALIBABA_CLOUD_WORKSPACE is set, if regionId or workspace parameters are not provided in the tool call, the service will automatically use the values from the environment variables as defaults. Values explicitly passed by the user will not be overwritten.

AI Tool Integration

Cursor / Kiro / Cline

streamable-http mode (Recommended):

  1. Configure config.yaml (set server.transport: streamable-http)

  2. Start the service:

./bin/alibabacloud-observability-mcp-server start
  1. Configure mcp.json:

{
  "mcpServers": {
    "alibaba_cloud_observability": {
      "url": "http://localhost:8080"
    }
  }
}

stdio mode:

  1. Configure mcp.json:

{
  "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>"
      }
    }
  }
}

Note: In stdio mode, if config.yaml does not exist, built-in default values will be used.

Toolsets

There are 33 tools in total, divided into three levels.

Based on a unified data model, tool names are prefixed with umodel_ or cms_. There are 16 tools in total.

Entity Management Tools

Tool

Description

Key Parameters

umodel_get_entities

Get entity list

workspace, domain, entity_set_name, regionId (required); entity_filter (optional)

umodel_get_neighbor_entities

Get entity neighbor relationships

workspace, src_entity_domain, src_name, src_entity_ids, regionId (required)

umodel_search_entities

Search entities

workspace, search_text, regionId (required)

Dataset Management Tools

Tool

Description

Key Parameters

umodel_list_data_set

List datasets

workspace, domain, entity_set_name, regionId (required); data_set_types (optional)

umodel_search_entity_set

Search entity sets

workspace, search_text, regionId (required)

umodel_get_entity_set

Get entity set Schema definition

domain, entity_set_name, workspace, regionId (required); detail (optional)

umodel_list_related_entity_set

List related entity sets

workspace, domain, entity_set_name, regionId (required)

Data Query Tools

Tool

Description

Key Parameters

umodel_get_metrics

Query metric data

workspace, domain, entity_set_name, metric_domain_name, metric, regionId (required); analysis_mode (basic/cluster/forecast/anomaly_detection), offset (time-series comparison), time_range (optional)

umodel_get_golden_metrics

Query golden metrics

workspace, domain, entity_set_name, regionId (required); offset, time_range (optional)

umodel_get_relation_metrics

Query relation metrics

workspace, src_domain, src_entity_set_name, relation_type, direction (in/out), metric, metric_set_domain, regionId (required); dest_entity_set_name (optional)

umodel_get_logs

Query log data

workspace, domain, entity_set_name, log_set_domain, log_set_name, regionId (required); time_range, limit (optional)

umodel_get_events

Query event data

workspace, domain, entity_set_name, event_set_domain, event_set_name, regionId (required); time_range, limit (optional)

umodel_get_traces

Query trace data

workspace, domain, entity_set_name, trace_set_domain, trace_set_name, trace_ids, regionId (required); time_range (optional)

umodel_search_traces

Search traces

workspace, domain, entity_set_name, trace_set_domain, trace_set_name, regionId (required); conditions, limit, time_range (optional)

umodel_get_profiles

Query performance profiling data

workspace, domain, entity_set_name, profile_set_domain, profile_set_name, entity_ids, regionId (required); time_range, limit (optional)

cms_natural_language_query

Natural language data query

query, workspace, regionId (required); time_range (optional)

IaaS Toolset (Direct SLS/CMS Access)

Direct access to underlying APIs, tool names are prefixed with sls_ or cms_. There are 14 tools in total.

SLS Tools

Tool

Description

Key Parameters

sls_list_projects

List projects

regionId (required); project (optional, fuzzy search)

sls_list_logstores

List logstores

project, regionId (required)

sls_text_to_sql

Natural language to SQL

text, project, logStore, regionId (required)

sls_text_to_sql_old

Natural language to SQL (legacy, compatible with Python version)

text, project, logStore, regionId (required)

sls_text_to_spl

Natural language to SPL

text, project, logStore, data_sample, regionId (required)

sls_execute_sql

Execute SQL query

project, logStore, query, regionId (required); from_time, to_time (optional)

sls_execute_spl

Execute native SPL query

query, workspace, regionId (required); from_time, to_time (optional)

sls_get_context_logs

Get log context

project, logStore, pack_id, pack_meta, regionId (required); back_lines, forward_lines (optional)

sls_log_explore

Log exploration analysis

project, logStore, logField, regionId (required); from_time, to_time, filter_query, groupField (optional)

sls_log_compare

Log comparative analysis

project, logStore, logField, regionId (required); test_from_time, test_to_time, control_from_time, control_to_time, filter_query, groupField (optional)

sls_sop

SLS O&M assistant

text, regionId (required)

CMS Tools

Tool

Description

Key Parameters

cms_execute_promql

Execute PromQL query

project, metricStore, query, regionId (required); from_time, to_time (optional)

cms_text_to_promql

Natural language to PromQL

text, project, metricStore, regionId (required)

Shared Toolset

There are 3 tools in total.

Tool

Description

Key Parameters

list_workspace

List workspaces

regionId (required)

list_domains

List entity domains

workspace, regionId (required)

introduction

Service introduction

No parameters

Time Expressions

All data query tools support flexible time range formats:

Format

Example

Relative Presets

last_5m, last_1h, last_3d, last_1w, last_1M, last_1y

Relative Time

now()-1h, now-30m, now()-7d

Grafana Style

now-15m~now-5m, now/d, now-1d/d

Keywords

today, yesterday

Absolute Timestamp

1718451045 (seconds), 1718451045000 (milliseconds)

Date-Time String

2024-01-01 00:00:00, 2024-01-01T00:00:00Z

Advanced Features

Time-Series Comparative Analysis

umodel_get_metrics and umodel_get_golden_metrics support time-series comparison via the offset parameter:

# 对比当前1小时与1天前的数据
umodel_get_metrics(
    domain="apm", entity_set_name="apm.service",
    metric_domain_name="apm.metric.apm.service", metric="request_count",
    time_range="last_1h", offset="1d"
)

The returned result includes:

  • current: Statistics for the current period (max, min, avg, count)

  • compare: Statistics for the comparison period

  • diff: Change analysis (trend, avg_change, avg_change_percent)

  • diff_score: Difference score (0-1, the higher the value, the more significant the difference)

Advanced Analysis Modes

umodel_get_metrics supports four analysis modes:

Mode

Description

Output Fields

basic

Raw time-series data (default)

__ts__, __value__, __labels__

cluster

K-Means time-series clustering

__cluster_index__, __entities__, __sample_value__

forecast

Time-series forecasting (requires 1-5 days of historical data)

__forecast_ts__, __forecast_value__, __forecast_lower/upper_value__

anomaly_detection

Anomaly detection (requires 1-3 days of data)

__anomaly_list__, __anomaly_msg__, __value_min/max/avg__

Project Structure

├── cmd/server/          # CLI 入口(cobra)
├── pkg/
│   ├── client/          # SLS/CMS 客户端封装
│   ├── config/          # 配置管理(viper + sync.Once)
│   ├── endpoint/        # 端点解析
│   ├── errors/          # 结构化错误与错误码映射
│   ├── logger/          # 结构化日志(slog)
│   ├── server/          # MCP Server 核心(传输层、生命周期、健康检查)
│   ├── stability/       # 重试与熔断器
│   ├── timeparse/       # 时间表达式解析
│   └── toolkit/         # 工具集接口与注册中心
│       ├── paas/        # PaaS 工具集(umodel_*、cms_natural_language_query)
│       ├── iaas/        # IaaS 工具集(sls_*、cms_execute_promql、cms_text_to_promql)
│       └── shared/      # Shared 工具集(list_workspace、list_domains、introduction)
├── v1/                  # Python 版本(历史参考)
├── Makefile
├── go.mod
└── go.sum

Development

# 构建
make build

# 运行测试
make test

# 代码检查
make lint

# 清理构建产物
make clean

Testing

The project adopts a three-track strategy: unit testing + property-based testing + regression testing:

  • Unit testing: Table-driven tests, covering specific examples and boundary conditions

  • Property-based testing: Using gopter to verify general correctness properties across all inputs

  • Regression testing: Integration tests (//go:build integration), comparing parameter consistency with the Python version, requiring real Alibaba Cloud credentials

# 运行所有单元测试
go test ./... -v

# 仅运行属性测试
go test ./... -run TestProperty_

# 运行回归测试(需要配置环境变量)
ALIBABA_CLOUD_ACCESS_KEY_ID=xxx \
ALIBABA_CLOUD_ACCESS_KEY_SECRET=xxx \
ALIBABA_CLOUD_REGION=cn-hongkong \
ALIBABA_CLOUD_WORKSPACE=xxx \
go test -tags=integration ./pkg/toolkit/... -v

AI Agent Development Guidelines

See docs/AGENTS.md, which includes project structure explanations, code style conventions, procedures for adding new tools, testing specifications, etc.

Permissions Requirements

To ensure the MCP Server can successfully access and operate your Alibaba Cloud observability resources, you need to configure the following permissions:

Alibaba Cloud AccessKey

  • The service requires valid Alibaba Cloud credentials to run, supporting the following methods (in order of priority):

    1. AccessKey ID + AccessKey Secret (passed via .env file, environment variables, or CLI arguments)

    2. STS temporary credentials (set ALIBABA_CLOUD_SECURITY_TOKEN environment variable)

    3. Default Credential Chain automatic discovery (ECS RAM Role, OIDC, credential configuration files, etc.)

  • To obtain and manage AccessKey, please refer to the official Alibaba Cloud AccessKey Management documentation

RAM Authorization

The RAM user or role associated with the AccessKey must be granted the necessary permissions to access the relevant cloud services.

It is strongly recommended to follow the "Principle of Least Privilege": grant only the minimum set of permissions necessary to run the MCP tools you plan to use.

Depending on the tools you need to use, refer to the following documentation for permission configuration:

Service

Permission Documentation

Description

Log Service (SLS)

SLS Permission Description

Required for sls_* tools

Application Real-time Monitoring (ARMS)

ARMS Permission Description

Required for umodel_* tools

CloudMonitor (CMS)

CMS Permission Description

Required for cms_* tools

Special Permission Notes:

  • Using SQL generation tools (e.g., sls_text_to_sql) requires separate sls:CallAiTools permission

  • Using natural language query functionality (cms_natural_language_query) requires granting: cms:CreateChat, cms:CreateThread, cms:GetThread, cms:ListThreads

Security Recommendations

  • The service does not store AccessKeys; they are only used for API calls at runtime

  • In SSE/HTTP mode, ensure you implement access control for the endpoint yourself

  • It is recommended to deploy within an internal network or VPC to avoid direct exposure to the public internet

  • Never expose a server endpoint configured with an AccessKey to the public internet without authentication

  • It is recommended to use Alibaba Cloud Function Compute (FC) for deployment and configure it for access only within the VPC

License

This project follows the same license agreement as the original Python version.

Available Tools

9 tools
arms_generate_trace_queryA

生成ARMS应用的调用链查询语句。

        ## 功能概述

        该工具用于将自然语言描述转换为ARMS调用链查询语句,便于分析应用性能和问题。

        ## 使用场景

        - 当需要查询应用的调用链信息时
        - 当需要分析应用性能问题时
        - 当需要跟踪特定请求的执行路径时
        - 当需要分析服务间调用关系时

        ## 查询处理

        工具会将自然语言问题转换为SLS查询,并返回:
        - 生成的SLS查询语句
        - 存储调用链数据的项目名
        - 存储调用链数据的日志库名

        ## 查询上下文

        查询会考虑以下信息:
        - 应用的PID
        - 响应时间以纳秒存储,需转换为毫秒
        - 数据以span记录存储,查询耗时需要对符合条件的span进行求和
        - 服务相关信息使用serviceName字段
        - 如果用户明确提出要查询 trace信息,则需要在查询问题上question 上添加说明返回trace信息

        ## 查询示例

        - "帮我查询下 XXX 的 trace 信息"
        - "分析最近一小时内响应时间超过1秒的调用链"

        Args:
            ctx: MCP上下文,用于访问ARMS和SLS客户端
            user_id: 用户阿里云账号ID
            pid: 应用的PID
            region_id: 阿里云区域ID
            question: 查询调用链的自然语言问题

        Returns:
            包含查询信息的字典,包括sls_query、project和log_store
        

Inputs: pid (required), question (required), region_id (required), user_id (required).

arms_search_appsA

搜索ARMS应用。

        ## 功能概述

        该工具用于根据应用名称搜索ARMS应用,返回应用的基本信息,包括应用名称、PID、用户ID和类型。

        ## 使用场景

        - 当需要查找特定名称的应用时
        - 当需要获取应用的PID以便进行其他ARMS操作时
        - 当需要检查用户拥有的应用列表时

        ## 搜索条件

        - app_name_query必须是应用名称的一部分,而非自然语言
        - 搜索结果将分页返回,可以指定页码和每页大小

        ## 返回数据结构

        返回一个字典,包含以下信息:
        - total: 符合条件的应用总数
        - page_size: 每页大小
        - page_number: 当前页码
        - trace_apps: 应用列表,每个应用包含app_name、pid、user_id和type

        ## 查询示例

        - "帮我查询下 XXX 的应用"
        - "找出名称包含'service'的应用"

        Args:
            ctx: MCP上下文,用于访问ARMS客户端
            app_name_query: 应用名称查询字符串
            region_id: 阿里云区域ID
            page_size: 每页大小,范围1-100,默认20
            page_number: 页码,默认1

        Returns:
            包含应用信息的字典
        

Inputs: app_name_query (required), region_id (required), page_number, page_size.

sls_describe_logstoreA

获取SLS日志库的结构信息。

        ## 功能概述

        该工具用于获取指定SLS项目中日志库的索引信息和结构定义,包括字段类型、别名、是否大小写敏感等信息。

        ## 使用场景

        - 当需要了解日志库的字段结构时
        - 当需要获取日志库的索引配置信息时
        - 当构建查询语句前需要了解可用字段时
        - 当需要分析日志数据结构时

        ## 返回数据结构

        返回一个字典,键为字段名,值包含以下信息:
        - alias: 字段别名
        - sensitive: 是否大小写敏感
        - type: 字段类型
        - json_keys: JSON字段的子字段信息

        ## 查询示例

        - "我想查询 XXX 的日志库的 schema"
        - "我想查询 XXX 的日志库的 index"
        - "我想查询 XXX 的日志库的结构信息"

        Args:
            ctx: MCP上下文,用于访问SLS客户端
            project: SLS项目名称,必须精确匹配
            log_store: SLS日志库名称,必须精确匹配
            region_id: 阿里云区域ID

        Returns:
            包含日志库结构信息的字典
        

Inputs: log_store (required), project (required), region_id (required).

sls_diagnose_queryA

诊断SLS查询语句。

        ## 功能概述

        当 SLS 查询语句执行失败时,可以调用该工具,根据错误信息,生成诊断结果。诊断结果会包含查询语句的正确性、性能分析、优化建议等信息。

        ## 使用场景

        - 当需要诊断SLS查询语句的正确性时
        - 当 SQL 执行错误需要查找原因时

        ## 查询示例

        - "帮我诊断下 XXX 的日志查询语句"
        - "帮我分析下 XXX 的日志查询语句"

        Args:
            ctx: MCP上下文,用于访问SLS客户端
            query: SLS查询语句
            error_message: 错误信息
            project: SLS项目名称
            log_store: SLS日志库名称
            region_id: 阿里云区域ID
        

Inputs: error_message (required), log_store (required), project (required), query (required), +1 more.

sls_execute_queryB

执行SLS日志查询。

        ## 功能概述

        该工具用于在指定的SLS项目和日志库上执行查询语句,并返回查询结果。查询将在指定的时间范围内执行。

        ## 使用场景

        - 当需要根据特定条件查询日志数据时
        - 当需要分析特定时间范围内的日志信息时
        - 当需要检索日志中的特定事件或错误时
        - 当需要统计日志数据的聚合信息时



        ## 查询语法

        查询必须使用SLS有效的查询语法,而非自然语言。如果不了解日志库的结构,可以先使用sls_describe_logstore工具获取索引信息。

        ## 时间范围

        查询必须指定时间范围:
        - from_timestamp: 开始时间戳(秒)
        - to_timestamp: 结束时间戳(秒)

        ## 查询示例

        - "帮我查询下 XXX 的日志信息"
        - "查找最近一小时内的错误日志"

        ## 错误处理
        - Column xxx can not be resolved 如果是 sls_translate_natural_language_to_query 工具生成的查询语句 可能存在查询列未开启统计,可以提示用户增加相对应的信息,或者调用 sls_describe_logstore 工具获取索引信息之后,要用户选择正确的字段或者提示用户对列开启统计。当确定列开启统计之后,可以再次调用sls_translate_natural_language_to_query 工具生成查询语句

        Args:
            ctx: MCP上下文,用于访问SLS客户端
            project: SLS项目名称
            log_store: SLS日志库名称
            query: SLS查询语句
            from_timestamp: 查询开始时间戳(秒)
            to_timestamp: 查询结束时间戳(秒)
            limit: 返回结果的最大数量,范围1-100,默认10
            region_id: 阿里云区域ID

        Returns:
            查询结果列表,每个元素为一条日志记录
        

Inputs: from_timestamp (required), log_store (required), project (required), query (required), +3 more.

sls_get_current_timeA

获取当前时间信息。

        ## 功能概述

        该工具用于获取当前的时间戳和格式化的时间字符串,便于在执行SLS查询时指定时间范围。

        ## 使用场景

        - 当需要获取当前时间以设置查询的结束时间
        - 当需要获取当前时间戳进行时间计算
        - 在构建查询时间范围时使用当前时间作为参考点

        ## 返回数据格式

        返回包含两个字段的字典:
        - current_time: 格式化的时间字符串 (YYYY-MM-DD HH:MM:SS)
        - current_timestamp: 整数形式的Unix时间戳(秒)

        Args:
            ctx: MCP上下文

        Returns:
            包含当前时间信息的字典
        

Inputs: no named parameters.

sls_list_logstoresA

列出SLS项目中的日志库。

        ## 功能概述

        该工具可以列出指定SLS项目中的所有日志库,如果不选,则默认为日志库类型
        支持通过日志库名称进行模糊搜索。如果不提供日志库名称,则返回项目中的所有日志库。

        ## 使用场景

        - 当需要查找特定项目下是否存在某个日志库时
        - 当需要获取项目中所有可用的日志库列表时
        - 当需要根据日志库名称的部分内容查找相关日志库时

        ## 是否指标库

        如果需要查找指标或者时序相关的库,请将is_metric_store参数设置为True

        ## 查询示例

        - "我想查询有没有 XXX 的日志库"
        - "某个 project 有哪些 log store"

        Args:
            ctx: MCP上下文,用于访问SLS客户端
            project: SLS项目名称,必须精确匹配
            log_store: 日志库名称,支持模糊搜索
            limit: 返回结果的最大数量,范围1-100,默认10
            is_metric_store: 是否指标库,可选值为True或False,默认为False
            region_id: 阿里云区域ID

        Returns:
            日志库名称的字符串列表
        

Inputs: project (required), region_id (required), is_metric_store, limit, +2 more.

sls_list_projectsA

列出阿里云日志服务中的所有项目。

        ## 功能概述

        该工具可以列出指定区域中的所有SLS项目,支持通过项目名进行模糊搜索。如果不提供项目名称,则返回该区域的所有项目。

        ## 使用场景

        - 当需要查找特定项目是否存在时
        - 当需要获取某个区域下所有可用的SLS项目列表时
        - 当需要根据项目名称的部分内容查找相关项目时

        ## 返回数据结构

        返回的项目信息包含:
        - project_name: 项目名称
        - description: 项目描述
        - region_id: 项目所在区域

        ## 查询示例

        - "有没有叫 XXX 的 project"
        - "列出所有SLS项目"

        Args:
            ctx: MCP上下文,用于访问SLS客户端
            project_name_query: 项目名称查询字符串,支持模糊搜索
            limit: 返回结果的最大数量,范围1-100,默认10
            region_id: 阿里云区域ID,region id format like "xx-xxx",like "cn-hangzhou"

        Returns:
            包含项目信息的字典列表,每个字典包含project_name、description和region_id
        

Inputs: region_id (required), limit, project_name_query.

sls_translate_natural_language_to_queryA

将自然语言转换为SLS查询语句。

        ## 功能概述

        该工具可以将自然语言描述转换为有效的SLS查询语句,便于用户使用自然语言表达查询需求。

        ## 使用场景

        - 当用户不熟悉SLS查询语法时
        - 当需要快速构建复杂查询时
        - 当需要从自然语言描述中提取查询意图时

        ## 使用限制

        - 仅支持生成SLS查询,不支持其他数据库的SQL如MySQL、PostgreSQL等
        - 生成的是查询语句,而非查询结果,需要配合sls_execute_query工具使用
        - 如果查询涉及ARMS应用,应优先使用arms_generate_trace_query工具
        - 需要对应的 log_sotre 已经设定了索引信息,如果生成的结果里面有字段没有索引或者开启统计,可能会导致查询失败,需要友好的提示用户增加相对应的索引信息

        ## 最佳实践

        - 提供清晰简洁的自然语言描述
        - 不要在描述中包含项目或日志库名称
        - 如有需要,指定查询的时间范围
        - 首次生成的查询可能不完全符合要求,可能需要多次尝试

        ## 查询示例

        - "帮我生成下 XXX 的日志查询语句"
        - "查找最近一小时内的错误日志"

        Args:
            ctx: MCP上下文,用于访问SLS客户端
            text: 用于生成查询的自然语言文本
            project: SLS项目名称
            log_store: SLS日志库名称
            region_id: 阿里云区域ID

        Returns:
            生成的SLS查询语句
        

Inputs: log_store (required), project (required), region_id (required), text (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap. The tools are organized into two main categories: ARMS application monitoring tools (arms_generate_trace_query, arms_search_apps) and SLS log service tools (the remaining seven), with each addressing specific operations like query generation, search, description, diagnosis, execution, time retrieval, listing, and translation. The descriptions clearly differentiate their functions, preventing misselection.

    Naming Consistency5/5

    Tool names follow a highly consistent pattern throughout. All names use snake_case and a clear prefix-action-resource structure (e.g., arms_search_apps, sls_execute_query). The prefixes 'arms_' and 'sls_' denote the service domain, followed by a verb (e.g., generate, search, describe, diagnose) and a noun (e.g., trace_query, apps, logstore), making the set predictable and readable.

    Tool Count5/5

    With 9 tools, the count is well-scoped for an observability server covering ARMS and SLS services. Each tool earns its place by addressing core operations like listing resources, executing queries, generating queries from natural language, and diagnosing issues. This provides comprehensive coverage without being overwhelming or too sparse for the domain.

    Completeness5/5

    The tool set offers complete coverage for the observability domain, including CRUD-like operations for logs and traces. It supports listing projects and logstores, describing structures, executing and diagnosing queries, translating natural language, and managing ARMS applications. There are no obvious gaps; tools like sls_get_current_time and sls_diagnose_query add utility for time handling and error analysis, ensuring agents can handle full workflows without dead ends.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      A
      maintenance
      Enables AI assistants to interact with Alibaba Cloud Yunxiao DevOps platform for managing projects, code repositories, work items, pipelines, deployments, and testing workflows through comprehensive organization, development, and delivery tools.
      81
      1,154 npm
      186
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to query and analyze Alibaba Cloud SLS logs using natural language, supporting multiple log sources like Function Compute and ECS. It provides tools for searching logs, performing SQL analysis, and visualizing log distributions directly within Cursor or Claude.
      6
      77 npm
      11
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides a suite of 33 tools for interacting with Tencent Cloud Log Service (CLS), enabling log analysis, PromQL metrics queries, and resource management. It allows AI assistants to perform CQL/SQL retrieval, manage alarm strategies, and handle data processing tasks with tiered permission controls.
      24
      24 PyPI
      6
      Apache 2.0