Registry / database / redis-mcp

redis-mcp

JSON →
library0.0.4jsnpmunverified

Redis MCP Server (v0.0.4) is a lightweight Model Context Protocol server that exposes Redis database operations as MCP tools. It enables AI agents like Claude Desktop or Cline to execute Redis commands (String, Hash, Set, Sorted Set, Key) via a standardized interface. The server communicates over TCP to a Redis instance and uses TypeScript, with ESM-only distribution. Key differentiators: zero-dependency Redis connectivity via raw TCP, 12+ built-in tools covering common operations, and a simple extension model for adding custom tools. The package is early stage (0.x) with weekly releases. Alternatives like @anthropic/mcp-server-redis require more setup and have fewer tools.

npm install redis-mcp
INSTALL
IMPORT
SIG · REDIS-MCP
R
redis-mcp
databasejavascriptv0.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RedisMcpServer
import { RedisMcpServer } from 'redis-mcp'
const { RedisMcpServer } = require('redis-mcp')
ESM-only since v0.0.1; CJS require will fail.
RedisTool
import { RedisTool } from 'redis-mcp'
import RedisTool from 'redis-mcp'
Named export, not default.
startServer
import { startServer } from 'redis-mcp'
import { startRedisServer } from 'redis-mcp'
Function name is startServer, not startRedisServer.

Configure MCP client to connect to Redis via npx, then call Redis tools from AI agent.

// Add to MCP client config (e.g., Claude Desktop) { "mcpServers": { "redis": { "command": "npx", "args": ["redis-mcp", "--redis-host", "localhost", "--redis-port", "6379"] } } } // Then call tools from AI agent: // Use hmset to store a hash // Use get to retrieve a string // Use hgetall to get all fields in a hash
Debug
Known issues
breakingRequires Node.js >=18 (ESM only)
fix
Use Node.js 18+ and ensure type: 'module' in package.json or use .mjs extension.
affects: >=0.0.0
deprecatedThe --redis-password CLI argument is deprecated in favor of REDIS_PASSWORD environment variable
fix
Set environment variable REDIS_PASSWORD instead of using --redis-password.
affects: >=0.0.4
gotchaDefault Redis port 6379 may conflict with local Redis instances; no auto-reconnect on connection drop
fix
Use a different port via --redis-port or configure Redis to use a custom port. For reconnection, implement your own health check.
affects: >=0.0.0
gotchaAll tools return raw Redis responses (e.g., 'OK' string) not parsed JSON
fix
Parse Redis response strings manually if expecting JSON objects.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'redis-mcp'
Attempting to import using CommonJS require
fix
Use ESM import syntax or ensure Node.js >=18 with type: 'module'.
Error: connect ECONNREFUSED ::1:6379
Redis server not running on localhost:6379 or host/port mismatch
fix
Start Redis server with redis-server or adjust --redis-host and --redis-port arguments.
TypeError: RedisMcpServer is not a constructor
Using default import instead of named import
fix
Use import { RedisMcpServer } from 'redis-mcp'
Error: Unknown tool 'hincrby'
Tool not implemented in this version
fix
Check available tools list; implement custom tool via extending RedisTool.
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies
ioredisrequiredUsed internally for Redis connection; not exposed to consumers
Agent activity
13 hits · last 30 days
node
10
Meta
1
Resources
redis-mcp — npm install redis-mcp · libregistry