- Home
- MCP servers
- Redis CRUD
Redis CRUD
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nicolas-gong-redis-crud-mcp-server": {
"command": "node",
"args": [
"/path/to/your/project/redis-crud-server/build/index.js"
],
"env": {
"REDIS_HOST": "127.0.0.1",
"REDIS_PORT": "6379",
"REDIS_PASSWORD": "your_actual_redis_password"
}
}
}
}You run a Redis CRUD MCP Server that exposes complete Redis database operations through a single MCP endpoint. It lets you manage Redis data programmatically—creating, reading, updating, and deleting strings, lists, sets, hashes, and sorted sets—via simple MCP calls. This guide shows you how to install, configure, start, and use the server with an MCP client.
How to use
You will interact with the Redis CRUD MCP Server by sending MCP calls that match each supported operation. Each operation maps to a Redis command, for example creating a string with redis_set, retrieving it with redis_get, pushing to lists with redis_lpush or redis_rpush, and querying or mutating sets, hashes, and sorted sets with their respective commands. Use the built-in operations to perform common Redis tasks such as storing configuration values, maintaining queues, and inspecting data structures. Ensure you have your Redis connection details ready because the MCP server will connect to Redis using those credentials.
How to install
# Step 1: Install dependencies
npm install
# Step 2: Build the project
npm run build
# Step 3: Start the MCP server
npm start
Configuration and startup details
The server connects to Redis using environment variables. Set REDIS_HOST, REDIS_PORT, and REDIS_PASSWORD to match your Redis deployment. REDIS_PASSWORD is required. You will use these values when starting the MCP server so it can authenticate with Redis.
# Example environment setup and start command
export REDIS_HOST=127.0.0.1
export REDIS_PORT=6379
export REDIS_PASSWORD=your_redis_password
npm start
In-client setup and testing
After starting the MCP server, you can invoke the available MCP methods to interact with Redis. Start by setting a string key, then retrieve it, and expand to other data types such as lists, sets, hashes, and sorted sets. You should also verify key existence and removal with the provided delete and exists operations.
Build and run details
# Build artifacts are produced by the build command. The runtime uses the built index to start the MCP server.
npm install
npm run build
npm start
Configuration example for MCP client integration
{
"mcpServers": {
"redis_crud": {
"autoApprove": [
"redis_set",
"redis_get",
"redis_del",
"redis_exists",
"redis_lpush",
"redis_rpush",
"redis_lpop",
"redis_rpop",
"redis_lrange",
"redis_llen",
"redis_sadd",
"redis_srem",
"redis_smembers",
"redis_sismember",
"redis_hset",
"redis_hget",
"redis_hgetall",
"redis_hdel",
"redis_zadd",
"redis_zrem",
"redis_zrange"
],
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "node",
"args": [
"/path/to/your/project/redis-crud-server/build/index.js"
],
"env": {
"REDIS_HOST": "127.0.0.1",
"REDIS_PORT": "6379",
"REDIS_PASSWORD": "your_actual_redis_password"
}
}
}
}
Available tools
redis_set
Store a string value for a key in Redis via the MCP server.
redis_get
Retrieve the string value for a key.
redis_del
Delete a key from Redis.
redis_exists
Check if a key exists in Redis.
redis_lpush
Push elements to the left of a Redis list.
redis_rpush
Push elements to the right of a Redis list.
redis_lpop
Pop an element from the left of a Redis list.
redis_rpop
Pop an element from the right of a Redis list.
redis_lrange
Retrieve a range of elements from a Redis list.
redis_llen
Get the length of a Redis list.
redis_sadd
Add members to a Redis set.
redis_srem
Remove members from a Redis set.
redis_smembers
Get all members of a Redis set.
redis_sismember
Check if a value is a member of a Redis set.
redis_hset
Set a field in a Redis hash.
redis_hget
Get a field value from a Redis hash.
redis_hgetall
Get all fields and values from a Redis hash.
redis_hdel
Delete a field from a Redis hash.
redis_zadd
Add members to a Redis sorted set with scores.
redis_zrem
Remove members from a Redis sorted set.
redis_zrange
Get members in a Redis sorted set by score range.