MCP
@LikeRainDay
The mcp service collection, including aliyun cli and aliyun log, mysql, redis, and the se service of the common tool collection
Overview
What is MCP?
MCP is a Model Context Protocol server written in Rust, designed to integrate with Aliyun (Alibaba Cloud) services and Nacos for configuration management.
How to use MCP?
Build the Docker image using the provided docker build command with required build arguments (Aliyun credentials, Nacos settings, etc.). Run the container with docker run or start directly with cargo run. Connect MCP clients such as Cursor by configuring an SSE endpoint at http://localhost:3001/sse.
Key features of MCP
- Manages MCP configuration via Nacos or local config file.
- Provides time utility functions for formatting and conversion.
- Integrates with Aliyun Log Service for log query and management.
- Integrates with general Aliyun CLI for multiple API calls.
- Supports offline mode toggle via build argument.
Use cases of MCP
- Query and manage Aliyun Log Service logs programmatically.
- Perform Aliyun resource management through integrated CLI commands.
- Use as a central configuration hub for MCP-based applications with Nacos.
- Run as a Docker container for isolated deployment with MCP clients.
FAQ from MCP
What transport protocol does MCP use?
MCP uses Server-Sent Events (SSE) at the /sse endpoint on port 3001.
How is MCP configured?
Configuration is provided via build-time environment variables (e.g., ALIYUN_ACCESS_KEY_ID, NACOS_SERVER_ADDR) or a local YAML config file (CONFIG_FILE). Nacos can serve the configuration dynamically using NACOS_DATA_ID and NACOS_GROUP.
What Aliyun services are integrated?
The server includes modules for Aliyun Log Service (mcp_aliyun_log_cli.rs) and a general Aliyun CLI tool (mcp_aliyun_cli.rs).
Is offline mode supported?
Yes, the OFFLINE_MODE build argument (default false) allows running the server without network dependencies.