这个 MCP Server 做什么
Redis MCP Server 是一个面向 Redis 的 Model Context Protocol 服务。它可以连接本地或远程 Redis,并把常见 Redis 操作暴露给 AI 助手。
重点能力
- 连接任意 Redis 实例,支持认证和 TLS
- 30+ 内置工具,覆盖 strings、hashes、lists、sets、sorted sets
- 保存和切换多套 Redis 连接
- Web UI 管理连接、命令黑名单和查询测试
- 密码使用 AES-256-GCM 加密保存
- 默认拦截 FLUSHALL、FLUSHDB、SHUTDOWN、CONFIG SET 等危险命令
安装
git clone https://github.com/minivv/redis-mcp-server.git
cd redis-mcp-server
npm install
npm run build
MCP 客户端配置
{
"mcpServers": {
"redis-mcp-server": {
"type": "stdio",
"command": "node",
"args": ["/your/path/to/redis-mcp-server/build/index.js"],
"env": {
"MCP_OPEN_BROWSER": "false"
}
}
}
}
常用工具
| 类型 | 工具 |
|---|---|
| 连接 | save_connection, use_connection, test_connection, get_connection_info |
| Key | list_keys, get_key_info, delete_key, set_ttl |
| 数据结构 | get_string, set_string, get_hash, get_list, get_set, get_sorted_set |
| 安全 | get_command_blacklist, update_command_blacklist, reset_command_blacklist |
