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

Setup with Cline (Recommended)

  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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alibabacloud_tair_mcp_server-0.1.1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file alibabacloud_tair_mcp_server-0.1.1.tar.gz.

File metadata

File hashes

Hashes for alibabacloud_tair_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d50386ef2e1860ec178dfd16b2fdfe3e6db6369c2f3c1a39db11e503c768d5d4
MD5 47f7136a35b35ab1b18fb6bd598918bb
BLAKE2b-256 a5074b3db3775a346504b65ab7f6137e29ebf5531bf2cadc704dca6aad93c4e6

See more details on using hashes here.

File details

Details for the file alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for alibabacloud_tair_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64425116eb188dd8d22bb3f957b2c9ecf9db1b61607a760bedfe1d5b9218e687
MD5 5d7a1f9111cb8f970e84e31ca3e21d7a
BLAKE2b-256 1733f84352434373b8eb3f6646d73b66258e213d67095f892e6bbae806003e49

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page