Skip to content

sumeetpardeshi/mcp-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Redis MCP Server

A Model Context Protocol (MCP) server implementation that provides Redis database operations through a standardized interface.

Features

  • Key-Value Operations

    • Set/Get values
    • Delete keys
    • Check key existence
    • Get key type and TTL
    • List all keys
    • Get all values
  • Numeric Operations

    • Increment values
    • Decrement values
  • List Operations

    • Push to head (LPUSH)
    • Push to tail (RPUSH)
    • Get range of elements
  • Set Operations

    • Add members
    • Get all members
  • Hash Operations

    • Set hash fields
    • Get hash fields
    • Get all hash fields/values

Installation

  1. Clone the repository
  2. Install dependencies
  3. Test the Redis MCP server locally by running redis locally (via docker) and run npm start
  4. Add to Your Client (eg Cursor)
    • In Cursor IDE settings, add a new MCP server with:
      • Name: "Redis"
      • Type: command
      • Command: node <your path to repo>/server.js
    • The Redis tools will now be available in Cursor's command palette
  5. Test with these prompts:
    • "Set a key 'user:1' with value 'John Doe'"
    • "Get the value for key 'user:1'"
    • "Create a list 'todos' with items 'buy milk' and 'walk dog'"
    • "Get all items from the 'todos' list"
    • "List all keys in the database"
    • "Add 'alice' and 'bob' to a set called 'users'"
    • "Show all members of the 'users' set"
    • "Create a hash 'profile:1' with field 'name' set to 'Alice'"
    • "Get all fields and values from hash 'profile:1'"
    • "Increment a counter 'visits' and show the new value"
    • "Check if key 'user:1' exists"
    • "Get the type of value stored at 'todos'"
    • "Delete the key 'user:1'"

About

mcp connects to local redis instance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published