About mcp-redis-server
mcp-redis-server exposes Redis operations to AI models through an MCP server. Its tools cover common Redis data types, keys, connections, and server configuration.
Key features
- 01Connect, disconnect, and ping Redis
- 02Read and write string values
- 03Operate on lists, sets, and hashes
- 04Manage sorted sets and keys
- 05Inspect and configure the server
Use cases
- 01Read or update Redis values
- 02Work with list, set, or hash data
- 03Check key expiry and database size
- 04Inspect Redis server information
MCP support
The MCP server exposes Redis connection, data, key, and server-management operations as tools for MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
44Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| db | integer | No | Redis database number (0-15). |
| ssl | boolean | No | Enable SSL/TLS connection. |
| host | string | No | Redis server hostname or IP address. |
| port | integer | No | Redis server port number. |
| password | any | No | Redis server password (optional). |
Details
From the project READMEmcp-redis-server
MCP server that exposes Redis API to AI models
mcp-name: io.github.daedalus/mcp-redis-server
Install
pip install mcp-redis-server
Usage
from mcp_redis_server import mcp
# Run the server
mcp.run()
Or as a CLI tool:
mcp-redis-server
API
The server exposes the following tools:
Connection
redis_connect- Connect to Redis serverredis_disconnect- Disconnect from Redis serverredis_ping- Ping the Redis server
Strings
redis_get,redis_set,redis_mget,redis_mset,redis_delredis_incr,redis_decr
Lists
redis_lpush,redis_rpush,redis_lrange,redis_llen
Sets
redis_sadd,redis_srem,redis_smembers,redis_sismember,redis_scard
Hashes
redis_hset,redis_hget,redis_hmset,redis_hmget,redis_hgetallredis_hkeys,redis_hvals,redis_hdel,redis_hlen
Sorted Sets
redis_zadd,redis_zscore,redis_zrange,redis_zrevrange,redis_zcard
Keys
redis_exists,redis_expire,redis_ttl,redis_type,redis_scan
Server
redis_dbsize,redis_flushdb,redis_flushall,redis_inforedis_config_get,redis_config_set
Configuration
Environment variables:
REDIS_HOST- Redis host (default: localhost)REDIS_PORT- Redis port (default: 6379)REDIS_PASSWORD- Redis password (optional)REDIS_DB- Redis database number (default: 0)REDIS_SSL- Enable SSL (default: false)
Development
git clone https://github.com/daedalus/mcp-redis-server.git
cd mcp-redis-server
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
Usage
from mcp_redis import mcp
# Run the server
mcp.run()
Or as a CLI tool:
mcp-redis
API
The server exposes the following tools:
Connection
redis_connect- Connect to Redis serverredis_disconnect- Disconnect from Redis serverredis_ping- Ping the Redis server
Strings
redis_get,redis_set,redis_mget,redis_mset,redis_delredis_incr,redis_decr
Lists
redis_lpush,redis_rpush,redis_lrange,redis_llen
Sets
redis_sadd,redis_srem,redis_smembers,redis_sismember,redis_scard
Hashes
redis_hset,redis_hget,redis_hmset,redis_hmget,redis_hgetallredis_hkeys,redis_hvals,redis_hdel,redis_hlen
Sorted Sets
redis_zadd,redis_zscore,redis_zrange,redis_zrevrange,redis_zcard
Keys
redis_exists,redis_expire,redis_ttl,redis_type,redis_scan
Server
redis_dbsize,redis_flushdb,redis_flushall,redis_inforedis_config_get,redis_config_set
Configuration
Environment variables:
REDIS_HOST- Redis host (default: localhost)REDIS_PORT- Redis port (default: 6379)REDIS_PASSWORD- Redis password (optional)REDIS_DB- Redis database number (default: 0)REDIS_SSL- Enable SSL (default: false)
Development
git clone https://github.com/daedalus/mcp-redis.git
cd mcp-redis
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.