Prajwalnayak7_mcp Server Redis
Mirror of
MCP-Mirror
README
Usage
The structure is as follows:
mcp-server-redis/
├── src/
│ ├── __init__.py
│ ├── main.py # Main entry point
│ ├── config.py # Configuration
│ ├── connection.py # Redis connection management
│ ├── resources/ # Resource implementations
│ │ ├── __init__.py
│ │ ├── status.py # Connection status resources
│ │ └── keys.py # Key-related resources
│ └── tools/ # Tool implementations
│ ├── __init__.py
│ ├── basic.py # Basic Redis operations
│ ├── lists.py # List operations
│ ├── hashes.py # Hash operations
│ ├── sets.py # Set operations
│ └── pubsub.py # Pub/Sub operations
├── tests/ # Test directory
│ └── __init__.py
├── README.md
└── pyproject.toml
To use this server, you'll need to:
Install the required dependencies:
[If not already installed] https://docs.astral.sh/uv/
uv venv
source .venv/bin/activate
uv sync
Refer to the .env.example file to configure your Redis connection by adding the appropriate variables.
Run the server:
python src/server.py
Capabilities of this server
Resources:
- redis://status - Current connection status
- redis://info - Redis server information
- redis://keys/{pattern} - List keys matching a pattern
Tools:
- Basic operations:
- get_value - Get a value
- set_value - Set a value with optional expiry
- delete_key - Delete a key
- increment - Increment a numeric value
- List operations:
- list_push - Push values to a list
- list_range - Get range of list values
- Hash operations:
- hash_set - Set hash fields
- hash_get - Get hash fields
- Set operations:
- set_add - Add to a set
- set_members - Get set members
- Pub/Sub:
- publish_message - Publish a message
Each tool includes error handling and returns meaningful responses. The server will automatically reconnect to Redis if the connection is lost.
You can test it with the MCP Inspector:
mcp dev src/server.py
Or install it in Claude Desktop:
mcp install src/server.py
Example
User: What's the current Redis connection status?
LLM: Let me check the Redis connection status for you.
[Reading resource redis://status]
The Redis server is currently connected and running on localhost:6379, database 0.
User: Can you store my name "Alice" in Redis?
LLM: I'll help you store your name in Redis using the set_value tool.
[Calling set_value with key="name" value="Alice"]
Successfully set key 'name'
I've stored your name "Alice" in Redis under the key "name". Would you like me to verify the value was stored correctly by retrieving it?
User: Yes please verify it
LLM: I'll retrieve the value using the get_value tool.
[Calling get_value with key="name"]
Alice
Yes, I can confirm that your name "Alice" was successfully stored in Redis and can be retrieved correctly. The value matches exactly what we stored.
This implementation provides a solid foundation for Redis integration through MCP. You can extend it further by adding more Redis commands as needed for your specific use case.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.