MCP server with Redis/Tair command tools and performance benchmark tools for Alibaba Cloud
Project description
English | 中文
Tair MCP Server
MCP server with Redis/Tair command tools and performance benchmark tools for Alibaba Cloud
Prerequisites
- Python >=3.12
- Tair/Redis instance access credentials
- Cline MCP client (recommended) or other MCP-compatible client
Installation
Option 1: Install from PyPI
pip install alibabacloud-tair-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_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-mcp-server": {
"command": "tair-mcp-server",
"args": [],
"env": {
"HOST": "127.0.0.1",
"PORT": "6379",
"USERNAME": "your_username",
"PASSWORD": "your_password",
"DB": "0",
"CLUSTER_MODE": "false"
}
}
}
}
Replace the connection details with your actual Tair/Redis credentials.
Available MCP Tools
Standard Redis Data Structures
String Operations
set,get,setnx,getex,append,strlen,incr,decr,incrby,incrbyfloat,mset,mget
Hash Operations
hset,hget,hmset,hmget,hgetall,hdel,hexists,hlen,hkeys,hvals,hincrby,hincrbyfloat
List Operations
lpush,rpush,lpop,rpop,llen,lindex,lset,linsert,lrem,ltrim,lrange
Set Operations
sadd,srem,smembers,sismember,scard,spop,srandmember,sunion,sinter,sdiff
Sorted Set Operations
zadd,zadd_multi,zrem,zscore,zrank,zrevrank,zrange,zrevrange,zrangebyscore,zcard,zcount,zincrby,zpopmin,zpopmax
Tair Extended Data Structures
TairHash (exHash) Operations
exhset,exhget,exhmset,exhmget,exhgetall,exhdel,exhlen,exhexists,exhkeys,exhvals,exhexpire,exhpexpire,exhttl,exhpttl,exhver,exhsetver,exhincrby,exhincrbyfloat
TairString (exString) Operations
exset,exget,exsetver,exincrby,exincrbyfloat,excas,excad
Key Management Operations
delete,exists,expire,expireat,ttl,pttl,persist,type_of,rename,renamenx,keys,dbsize,info,ping,flushdb
Performance Benchmarking Tools
benchmark_set,benchmark_get,benchmark_hset,benchmark_hget,benchmark_lpush,benchmark_lpop,benchmark_sadd,benchmark_spop,benchmark_zadd,benchmark_zrange,benchmark_exhset,benchmark_exhget
Configuration Options
Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
HOST |
Tair/Redis host address | 127.0.0.1 |
No |
PORT |
Tair/Redis port | 6379 |
No |
USERNAME |
Database username | - | No |
PASSWORD |
Database password | - | No |
DB |
Database number | 0 |
No |
CLUSTER_MODE |
Enable cluster mode | false |
No |
TAIR_MCP_LOG_LEVEL |
Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL) | INFO |
No |
TAIR_MCP_LOG_FILE |
Optional log file path | - | No |
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
Release history Release notifications | RSS feed
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_mcp_server-0.1.1.tar.gz.
File metadata
- Download URL: alibabacloud_tair_mcp_server-0.1.1.tar.gz
- Upload date:
- Size: 17.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 |
d50386ef2e1860ec178dfd16b2fdfe3e6db6369c2f3c1a39db11e503c768d5d4
|
|
| MD5 |
47f7136a35b35ab1b18fb6bd598918bb
|
|
| BLAKE2b-256 |
a5074b3db3775a346504b65ab7f6137e29ebf5531bf2cadc704dca6aad93c4e6
|
File details
Details for the file alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl.
File metadata
- Download URL: alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.5 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 |
64425116eb188dd8d22bb3f957b2c9ecf9db1b61607a760bedfe1d5b9218e687
|
|
| MD5 |
5d7a1f9111cb8f970e84e31ca3e21d7a
|
|
| BLAKE2b-256 |
1733f84352434373b8eb3f6646d73b66258e213d67095f892e6bbae806003e49
|