Get the FREE Ultimate OpenClaw Setup Guide →

aliyun

This MCP server provides tools for interacting with Aliyun (Alibaba Cloud) services.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio nailuogg-aliyun-mcp-server node /path/to/aliyun-mcp-server/build/index.js \
  --env SLS_ENDPOINT="cn-hangzhou.log.aliyuncs.com" \
  --env ALIYUN_ACCESS_KEY_ID="your-access-key-id" \
  --env ALIYUN_ACCESS_KEY_SECRET="your-access-key-secret"

How to use

The Aliyun MCP Server provides tools to interact with Aliyun's Simple Log Service (SLS) from Claude. It exposes a tool named querySLSLogs that lets you fetch logs from a specified project and logstore using a custom query. This enables you to search, filter, and paginate SLS data directly through Claude without leaving your workflow. The server is designed to be extended in the future to support additional Aliyun capabilities such as ECS management and serverless function deployment, but currently focuses on querying SLS logs efficiently.

To use the server, configure it in your Claude Desktop or VSCode Cline settings by pointing the MCP to the built index.js of the server and supplying your Aliyun credentials and endpoint. Once configured, you can issue a natural language or structured request like "Query SLS logs from project "my-project" and logstore "my-logstore" with the query "error" for the last hour" and Claude will translate that into a call to querySLSLogs and return the results. The tool accepts parameters such as project, logstore, query, from, to, limit, offset, and reverse to control the range and pagination of results. The example in the docs shows a typical query and a sample JSON payload for the request.

How to install

Prerequisites:

  • Node.js (recommended LTS) installed on your system
  • npm or yarn for package management
  • Access credentials for Aliyun SLS (Access Key ID, Access Key Secret) and knowledge of the target SLS endpoint

Install and build the server:

  1. Clone or download the repository containing the Aliyun MCP Server.
  2. Install dependencies:
npm install
  1. Build the server (produces build/index.js):
npm run build
  1. Run the server locally (example):
node /path/to/aliyun-mcp-server/build/index.js
  1. Configure Claude to connect to the running server by adding the following to your claude_desktop_config.json or cline_mcp_settings.json (adjust paths and credentials):
{
  "mcpServers": {
    "aliyun": {
      "command": "node",
      "args": ["/path/to/aliyun-mcp-server/build/index.js"],
      "env": {
        "ALIYUN_ACCESS_KEY_ID": "your-access-key-id",
        "ALIYUN_ACCESS_KEY_SECRET": "your-access-key-secret",
        "SLS_ENDPOINT": "cn-hangzhou.log.aliyuncs.com"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Additional notes

Tips and common issues:

  • Ensure your Aliyun credentials are valid and have permission to read SLS logs for the target project/logstore.
  • The SLS_ENDPOINT should match the region of your log service; use the endpoint provided by Aliyun for your region.
  • If the server cannot connect, verify network access to Aliyun endpoints and that the build/index.js path is correct after your npm run build step.
  • The default query parameters support from, to, limit, offset, and reverse; adjust according to your data size to avoid long response times.
  • When upgrading the server, rebuild and restart to ensure Claude connects to the latest build artifact.

Related MCP Servers

Sponsor this space

Reach thousands of developers