mcp-server-redis

This repository provides a Python-based Redis server with resources for connection status, server information, key listing, and tools for basic operations, lists, hashes, sets, and pub/sub functionalities. This repository provides

18
0

Summary

This document describes a server designed to interact with a Redis database, built with MCP (likely Meta-Config Protocol). The server's structure includes modules for configuration, connection management, resource implementations (status, keys), and tools for various Redis operations.

To use the server, install dependencies using uv venv, activate the virtual environment, and sync dependencies with uv sync. Configure the Redis connection using environment variables defined in .env.example. The server can then be started using python src/server.py.

The server offers resources like connection status (redis://status), Redis server information (redis://info), and key listing (redis://keys/{pattern}). It also provides tools for basic operations (get, set, delete, increment), list operations (push, range), hash operations (set, get), set operations (add, members), and Pub/Sub functionality (publish). Error handling is included, and the server automatically reconnects to Redis if the connection is lost.

The server can be tested using mcp dev src/server.py or installed in Claude Desktop using mcp install src/server.py. The example interaction demonstrates how to check Redis status and store/retrieve data. This implementation offers a foundation for Redis integration through MCP, and can be extended with more Redis commands.

Repository

PR
prajwalnayak7

prajwalnayak7/mcp-server-redis

Created

February 2, 2025

Updated

March 28, 2025

Language

Python

Category

Database