|
1 |
| -# mcp-redis |
| 1 | +# Redis MCP Server |
| 2 | + |
| 3 | +## Overview |
| 4 | +The Redis MCP Server is a **natural language interface** designed for agentic applications to efficiently manage and search data in Redis. It integrates seamlessly with **MCP (Model Content Protocol) clients**, enabling AI-driven workflows to interact with structured and unstructured data in Redis. |
| 5 | + |
| 6 | +## Features |
| 7 | +- **Natural Language Queries**: Enables AI agents to query and update Redis using natural language. |
| 8 | +- **Seamless MCP Integration**: Works with any **MCP client** for smooth communication. |
| 9 | +- **Full Redis Support**: Handles **hashes, lists, sets, sorted sets, streams**, and more. |
| 10 | +- **Search & Filtering**: Supports efficient data retrieval and searching in Redis. |
| 11 | +- **Scalable & Lightweight**: Designed for **high-performance** data operations. |
| 12 | + |
| 13 | +## Installation |
| 14 | +```sh |
| 15 | +# Clone the repository |
| 16 | +git clone https://github.com/redis/mcp-redis.git |
| 17 | +cd mcp-redis |
| 18 | + |
| 19 | +# Install dependencies using uv |
| 20 | +uv venv |
| 21 | +source .venv/bin/activate |
| 22 | +uv sync |
| 23 | +``` |
| 24 | + |
| 25 | +## Usage |
| 26 | +Start the MCP Redis Server: |
| 27 | +```sh |
| 28 | +python src/main.py |
| 29 | +``` |
| 30 | + |
| 31 | +Configure Claude Desktop to use this MCP Server by editing the `claude_desktop_config.json` configuration file. |
| 32 | + |
| 33 | +1. Specify your Redis credentials and TLS configuration |
| 34 | +2. Retrieve your `uv` command full path (e.g. `which uv`) |
| 35 | +3. Edit the configuration file at `~/Library/Application\ Support/Claude/claude_desktop_config.json` |
| 36 | + |
| 37 | +```commandline |
| 38 | +{ |
| 39 | + "mcpServers": { |
| 40 | + "redis": { |
| 41 | + "command": "<full_path_uv_command>", |
| 42 | + "args": [ |
| 43 | + "--directory", |
| 44 | + "<your_mcp_server_directory>", |
| 45 | + "run", |
| 46 | + "src/main.py" |
| 47 | + ], |
| 48 | + "env": { |
| 49 | + "REDIS_HOST": "<your_redis_database_hostname>", |
| 50 | + "REDIS_PORT": "<your_redis_database_port>", |
| 51 | + "REDIS_PSW": "<your_redis_database_password>", |
| 52 | + "REDIS_SSL": True|False, |
| 53 | + "REDIS_CA_PATH": "<your_redis_ca_path>" |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | +} |
| 58 | +``` |
| 59 | + |
| 60 | +You can troubleshoot any problem by tailing the log file. |
| 61 | + |
| 62 | +```commandline |
| 63 | +tail -f ~/Library/Logs/Claude/mcp-server-redis.log |
| 64 | +``` |
| 65 | + |
| 66 | +## Testing |
| 67 | + |
| 68 | +You can use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) for visual debugging of this MCP Server. |
| 69 | + |
| 70 | +```sh |
| 71 | +npx @modelcontextprotocol/inspector uv run src/main.py |
| 72 | +``` |
| 73 | + |
| 74 | +## Example Use Cases |
| 75 | +- **AI Assistants**: Enable LLMs to fetch, store, and process data in Redis. |
| 76 | +- **Chatbots & Virtual Agents**: Retrieve session data, manage queues, and personalize responses. |
| 77 | +- **Data Search & Analytics**: Query Redis for **real-time insights and fast lookups**. |
| 78 | +- **Event Processing**: Manage event streams with **Redis Streams**. |
| 79 | + |
| 80 | +## Contributing |
| 81 | +1. Fork the repo |
| 82 | +2. Create a new branch (`feature-branch`) |
| 83 | +3. Commit your changes |
| 84 | +4. Push to your branch and submit a PR! |
| 85 | + |
| 86 | +## License |
| 87 | +This project is licensed under the **MIT License**. |
| 88 | + |
| 89 | +## Contact |
| 90 | +For questions or support, reach out via [GitHub Issues](https://github.com/redis/mcp-redis-server/issues). |
| 91 | + |
0 commit comments