Redis CRUD MCP Server
Provides comprehensive CRUD operations for Redis database, supporting all major data types including strings, lists, sets, hashes, and sorted sets with operations like get/set, push/pop, add/remove members, and range queries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Redis CRUD MCP Server add 'user:123' to the session cache with value 'active'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Redis CRUD MCP Server
This is an MCP (Model Context Protocol) server plugin for Redis database operations, providing a full suite of CRUD tools.
✨ Features
🔍 Automatic Project Configuration Detection - Automatically searches upwards for
.envfiles to locate the project root directory🔄 Multi-Project Support - Automatically uses different Redis connections for different projects
⏱️ Connection Timeout Protection - 10-second default timeout, configurable via environment variables
📝 Multiple Configuration Formats - Supports both INI section and KEY=VALUE formats
🛠️ Multi-Tool Compatibility - Supports Claude Code, Cline, Codex, etc.
Related MCP server: MCP Server Redis
🚀 Quick Start
Global Installation (Recommended)
npm install -g redis-crud-serverMCP Configuration
Create a .mcp.json file in your project root:
{
"mcpServers": {
"redis-crud": {
"command": "redis-crud-server"
}
}
}⚙️ Configuration Guide
Configuration Format 1: INI Section Format
[REDIS]
REDIS_HOSTNAME = 127.0.0.1
PORT = 6379
REDIS_PASSWORD = your_password
SELECT = 0Configuration Format 2: KEY=VALUE Format
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=your_passwordSupported Configuration Names
Configuration Item | Supported Names |
Host |
|
Port |
|
Password |
|
Database |
|
🔧 Tool List
String Operations
redis_set - Set string key-value
redis_get - Get string key-value
redis_del - Delete key
redis_exists - Check if key exists
Hash Operations
redis_hset - Set hash field
redis_hget - Get hash field
redis_hgetall - Get all hash fields
redis_hdel - Delete hash field
Information
redis_info - Get connection information
⏱️ Timeout Configuration
The default connection timeout is 10 seconds, which can be configured via environment variables:
{
"mcpServers": {
"redis-crud": {
"command": "redis-crud-server",
"env": {
"REDIS_TIMEOUT": "30000"
}
}
}
}📝 Usage Examples
Set Key-Value
redis_set: key=test_key, value=hello_worldGet Key-Value
redis_get: key=test_keyHash Operations
redis_hset: key=user:1, field=name, value=张三
redis_hget: key=user:1, field=name
redis_hgetall: key=user:1🐛 Troubleshooting
Connection Timeout
Check network connection and firewall settings
Confirm the Redis server is accessible
Adjust the
REDIS_TIMEOUTenvironment variable
Configuration File Not Found
Ensure the
.envfile is in the project root directoryMCP will automatically search upwards for the
.envfile
INI Format Parsing Failure
Ensure the correct section name
[REDIS]is usedSupports Windows (
\r\n), Unix (\n), and legacy Mac (\r) line endings
📄 License
MIT
Available Tools
9 toolsredis_delC
删除键。
Inputs: key (required).
redis_existsC
检查键是否存在。
Inputs: key (required).
redis_getC
获取键值。
Inputs: key (required).
redis_hdelC
删除哈希字段。
Inputs: key (required), fields (required).
redis_hgetC
获取哈希字段。
Inputs: key (required), field (required).
redis_hgetallC
获取哈希所有字段。
Inputs: key (required).
redis_hsetC
设置哈希字段。
Inputs: key (required), field (required), value (required).
redis_infoB
获取连接信息。
Inputs: no named parameters.
redis_setC
设置键值。自动读取项目 .env 配置连接 Redis。
Inputs: key (required), value (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: key operations (del, exists, get, set) and hash operations (hdel, hget, hgetall, hset) are well-separated, with an additional info tool for connection details. No ambiguity.
All tools follow a consistent pattern: 'redis_' prefix followed by verb_noun in snake_case (e.g., redis_del, redis_hgetall). No camelCase or mixing of conventions.
9 tools is well-scoped for a Redis CRUD server. It covers essential operations for keys and hashes without being excessive or insufficient.
Covers CRUD for keys (set, get, exists, del) and hashes (hset, hget, hgetall, hdel). Missing hash field existence check (hexists) and other data structures like lists/sets, but acceptable for a basic CRUD server.
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Interact with your Google Cloud Firestore resources using natural language commands.
Persistent cloud memory for AI agents. Store and search key-value memories across sessions.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceProvides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.179 npm30MIT
- AlicenseNot gradedqualityDmaintenanceA server that provides Claude with Redis database access and operations through a set of tools for basic operations, lists, hashes, sets, and pub/sub functionality.25MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to perform comprehensive Redis database operations including managing strings, hashes, lists, sets, sorted sets, TTL management, and data backup/restore. Supports secure connections and provides batch operations for efficient Redis interaction through natural language.3417 npm2MIT
- AlicenseAqualityDmaintenanceEnables AI to safely view and operate Redis databases with read-only mode by default and support for key operations.11MIT