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.
Metadata
Release files for alibabacloud-tair-mcp-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alibabacloud_tair_mcp_server-0.1.1.tar.gz | 17.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.2 kB
Release files / alibabacloud_tair_mcp_server-0.1.1.tar.gz
| Download URL | alibabacloud_tair_mcp_server-0.1.1.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d50386ef2e1860ec178dfd16b2fdfe3e6db6369c2f3c1a39db11e503c768d5d4
|
|
BLAKE2b-256 checksum How to use checksums |
a5074b3db3775a346504b65ab7f6137e29ebf5531bf2cadc704dca6aad93c4e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl
| Download URL | alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64425116eb188dd8d22bb3f957b2c9ecf9db1b61607a760bedfe1d5b9218e687
|
|
BLAKE2b-256 checksum How to use checksums |
1733f84352434373b8eb3f6646d73b66258e213d67095f892e6bbae806003e49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|