Redis CRUD MCP Server
Redis CRUD MCP 服务器
这是一个用于 Redis 数据库操作的 MCP (Model Context Protocol) 服务器插件,提供完整的 CRUD 操作工具。
✨ 特性
🔍 自动检测项目配置 - 自动向上查找
.env文件定位项目根目录🔄 多项目支持 - 不同项目自动使用不同的 Redis 连接
⏱️ 连接超时保护 - 默认 10 秒超时,可通过环境变量配置
📝 多种配置格式 - 支持 INI section 和 KEY=VALUE 两种格式
🛠️ 兼容多工具 - 支持 Claude Code、Cline、Codex 等
Related MCP server: MCP Server Redis
🚀 快速开始
全局安装(推荐)
npm install -g redis-crud-serverMCP 配置
在项目根目录创建 .mcp.json:
{
"mcpServers": {
"redis-crud": {
"command": "redis-crud-server"
}
}
}⚙️ 配置说明
配置格式一:INI Section 格式
[REDIS]
REDIS_HOSTNAME = 127.0.0.1
PORT = 6379
REDIS_PASSWORD = your_password
SELECT = 0配置格式二:KEY=VALUE 格式
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=your_password支持的配置名称
配置项 | 支持的名称 |
主机 |
|
端口 |
|
密码 |
|
数据库 |
|
🔧 工具列表
字符串操作
redis_set - 设置字符串键值
redis_get - 获取字符串键值
redis_del - 删除键
redis_exists - 检查键是否存在
哈希操作
redis_hset - 设置哈希字段
redis_hget - 获取哈希字段
redis_hgetall - 获取哈希所有字段
redis_hdel - 删除哈希字段
信息
redis_info - 获取连接信息
⏱️ 超时配置
默认连接超时为 10 秒,可通过环境变量配置:
{
"mcpServers": {
"redis-crud": {
"command": "redis-crud-server",
"env": {
"REDIS_TIMEOUT": "30000"
}
}
}
}📝 使用示例
设置键值
redis_set: key=test_key, value=hello_world获取键值
redis_get: key=test_key哈希操作
redis_hset: key=user:1, field=name, value=张三
redis_hget: key=user:1, field=name
redis_hgetall: key=user:1🐛 故障排除
连接超时
检查网络连接和防火墙设置
确认 Redis 服务器可访问
调整
REDIS_TIMEOUT环境变量
配置文件找不到
确保
.env文件在项目根目录MCP 会自动向上查找
.env文件
INI 格式解析失败
确保使用正确的 section 名称
[REDIS]支持 Windows (
\r\n)、Unix (\n) 和旧 Mac (\r) 换行符
📄 许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.11230MIT
- 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.24MIT
- 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.3472MIT
- AlicenseAqualityDmaintenanceEnables AI to safely view and operate Redis databases with read-only mode by default and support for key operations.11MIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
The agent-native cloud: database, functions, AI, storage, computers. 50 tools, one API key.
JSON/YAML, regex, diff, JWT, SQL dialects — the keyless millisecond ops an agent needs mid-task.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nicolas-One/redis-crud-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server