mcp-server-redis logo

mcp-server-redis

by prajwalnayak7

This server provides a Redis integration through MCP, allowing you to interact with a Redis database using simple commands. It offers resources for checking connection status, retrieving server information, and managing keys, along with tools for basic operations, list manipulation, hash handling, set management, and pub/sub functionality.

View on GitHub

Last updated: N/A

What is mcp-server-redis?

This is a server that integrates with Redis and allows interaction with it via MCP (Message Communication Protocol). It provides resources and tools to manage and interact with Redis data structures.

How to use mcp-server-redis?

To use this server, install the required dependencies using uv venv, source .venv/bin/activate, and uv sync. Configure your Redis connection using the .env.example file. Then, run the server using python src/server.py. You can test it with the MCP Inspector or install it in Claude Desktop using the provided commands.

Key features of mcp-server-redis

  • Redis connection management

  • Resource endpoints for status, info, and keys

  • Tools for basic Redis operations (get, set, delete, increment)

  • List, Hash, and Set operations

  • Pub/Sub functionality

  • Automatic reconnection to Redis

Use cases of mcp-server-redis

  • Checking Redis connection status

  • Retrieving Redis server information

  • Storing and retrieving data in Redis

  • Managing lists, hashes, and sets in Redis

  • Implementing pub/sub messaging with Redis

  • Integrating Redis with MCP-based applications

FAQ from mcp-server-redis

How do I configure the Redis connection?

You can configure the Redis connection by setting the appropriate environment variables in a .env file, based on the .env.example.

What resources are available?

The available resources include redis://status for connection status, redis://info for server information, and redis://keys/{pattern} for listing keys.

What kind of operations can I perform?

You can perform basic operations like getting, setting, deleting, and incrementing values. You can also work with lists, hashes, sets, and use pub/sub.

How do I test the server?

You can test the server using the MCP Inspector with the command mcp dev src/server.py.

Can I extend the server with more Redis commands?

Yes, you can extend the server by adding more Redis commands as needed for your specific use case.