Skip to main content

English | 中文

Tair MCP Server

PyPI version Python

MCP server with Redis/Tair command tools and performance benchmark tools for Alibaba Cloud

Prerequisites

  1. Python >=3.12
  2. Tair/Redis instance access credentials
  3. 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

  1. Install the server (using PyPI or UV as shown above)

  2. 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support

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)

Source distribution for alibabacloud-tair-mcp-server 0.1.1
File Size Uploaded
alibabacloud_tair_mcp_server-0.1.1.tar.gz 17.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alibabacloud-tair-mcp-server 0.1.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page