MCP server for managing Alibaba Cloud R-KVStore (Tair/Redis) via OpenAPI
Project description
English | 中文
MCP server for managing Alibaba Cloud R-KVStore (Tair/Redis) via OpenAPI
Prerequisites
- Python >=3.12
- Alibaba Cloud credentials with access to Alibaba Cloud R-KVStore services
- Cline MCP client (recommended) or other MCP-compatible client
Installation
Option 1: Install from PyPI
pip install alibabacloud-tair-openapi-mcp-server
Option 2: Install from Source with UV
# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/aliyun/alibabacloud-tair-mcp-server.git
cd alibabacloud-tair-mcp-server/tair_openapi_mcp_server
uv venv
source .venv/bin/activate
uv pip install -e .
Quick Start
Setup with Cline (Recommended)
-
Install the server (using PyPI or UV as shown above)
-
Configure Cline by adding this to your Cline configuration:
{
"mcpServers": {
"tair-openapi": {
"command": "tair-openapi-mcp-server",
"args": [],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "your-access-key-id",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your-access-key-secret"
}
}
}
}
Replace the credentials with your actual Alibaba Cloud access keys.
Alternative: Claude Desktop Setup
For Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": {
"tair-openapi": {
"command": "tair-openapi-mcp-server",
"args": [],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "your-access-key-id",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your-access-key-secret"
}
}
}
}
Features
This MCP server provides comprehensive access to Alibaba Cloud R-KVStore (Tair/Redis) services including:
Core Instance Operations
- Instance Management: Create Redis Community Edition and Tair Enterprise Edition instances (classic and cloud-native)
- Resource Discovery: Query available regions, zones, and instance specifications
- Network Configuration: VPC and VSwitch management for instance deployment
Account Management
- Account Operations: Query and manage database accounts
- Password Management: Reset account passwords with security validation
Security Management
- IP Whitelist: Configure and manage IP whitelist groups for access control
- Security Groups: Query and modify security IP groups
Multi-language Support
- Full Chinese and English language support for all operations
Available OpenAPI Tools
This server provides the following Tair/Redis management tools:
Resource Discovery
describe_regions: List all available regions for Alibaba Cloud Tair instancesdescribe_zones: Query available zones in a region for Tair instancesdescribe_available_resource: Query available instance specifications in a specific zonedescribe_vpcs: Query VPC (Virtual Private Cloud) list in a regiondescribe_vswitches: Query VSwitch (Virtual Switch) list in a region
Instance Management
create_instance: Create a Redis Community Edition or Tair Enterprise Edition Classic instance- Supports both classic and cloud-native deployment types
- Automatic DryRun pre-check before creation
- Supports master-slave and cluster configurations
create_tair_instance: Create a Tair Enterprise Edition cloud-native instance- Supports MASTER_SLAVE and STAND_ALONE shard types
- Flexible shard count configuration (1-128)
- Automatic DryRun pre-check before creation
Account Management
describe_accounts: Query account information for a Tair instancereset_account_password: Reset the password for a Tair account with security validation
Security Management
describe_security_ips: Query IP whitelist configuration for a Tair instancemodify_security_ips: Modify IP whitelist for a Tair instance- Supports Cover, Append, and Delete modes
- Supports CIDR notation and single IP addresses
- Maximum 1000 IP entries per group
Configuration Options
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
ALIBABA_CLOUD_ACCESS_KEY_ID |
Alibaba Cloud Access Key ID | - | Yes |
ALIBABA_CLOUD_ACCESS_KEY_SECRET |
Alibaba Cloud Access Key Secret | - | Yes |
TAIR_MCP_LOG_LEVEL |
Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL) | INFO |
No |
TAIR_MCP_LOG_FILE |
Optional log file path | - | No |
Permissions
Ensure your Alibaba Cloud credentials have the following permissions:
- R-KVStore (Tair/Redis) read/write access
- VPC read access for network configuration
- Account management permissions
Development
Local Development Setup
git clone https://github.com/aliyun/alibabacloud-tair-mcp-server.git
cd alibabacloud-tair-mcp-server/tair_openapi_mcp_server
# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install
uv venv
source .venv/bin/activate
uv pip install -e .
# Run tests (if available)
pytest test/
Building from Source
uv build
uv publish # For maintainers only
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Support
- Documentation: Alibaba Cloud Tair Documentation
- Issues: Report issues on GitHub
- MCP Protocol: Model Context Protocol
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alibabacloud_tair_openapi_mcp_server-0.0.1.tar.gz.
File metadata
- Download URL: alibabacloud_tair_openapi_mcp_server-0.0.1.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4ee5d9bbeadab334297acdb49788ba9324b516d93f2aa2a56f65f7d5b5def14
|
|
| MD5 |
6a6dcc29472478dcb5feda3ec78d8cfb
|
|
| BLAKE2b-256 |
9b9a50ceebe5613ed459e203081cb335fdd4b9b81e45bcc785f7d258c49f1be9
|
File details
Details for the file alibabacloud_tair_openapi_mcp_server-0.0.1-py3-none-any.whl.
File metadata
- Download URL: alibabacloud_tair_openapi_mcp_server-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418d87a1c7b17ef515ee7f9e0fb405fba6b1bdb0d8feb88f0cafbe9e0e5c9276
|
|
| MD5 |
51c7b05b1d9a87b7cce72921ed90224f
|
|
| BLAKE2b-256 |
c5282e904661a4b5714f24a4ce529ce6bae1b70b8e7426094a54840835859150
|