Redis MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Overview
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. Using this MCP Server, you can ask questions like:
- "Store the entire conversation in a stream"
- "Cache this item"
- "Store the session with an expiration time"
- "Index and search this vector"
Table of Contents
- Overview
- Features
- Tools
- Installation
- From PyPI (recommended)
- Testing the PyPI package
- From GitHub
- Development Installation
- With Docker
- Configuration
- Redis ACL
- Configuration via command line arguments
- Configuration via Environment Variables
- EntraID Authentication for Azure Managed Redis
- Logging
- Integrations
- OpenAI Agents SDK
- Augment
- Claude Desktop
- VS Code with GitHub Copilot
- Testing
- Example Use Cases
- Contributing
- License
- Badges
- Contact
Features
- **Natural Language Queries**: Enables AI agents to query and update Redis using natural language.
- **Seamless MCP Integration**: Works with any **MCP client** for smooth communication.
- **Full Redis Support**: Handles **hashes, lists, sets, sorted sets, streams**, and more.
- **Search & Filtering**: Supports efficient data retrieval and searching in Redis.
- **Scalable & Lightweight**: Designed for **high-performance** data operations.
- **EntraID Authentication**: Native support for Azure Active Directory authentication with Azure Managed Redis.
- The Redis MCP Server supports the stdio transport. Support to the stremable-http transport will be added in the future.
Tools
This MCP Server provides tools to manage the data stored in Redis.
- string tools to set, get strings with expiration. Useful for storing simple configuration values, session data, or caching responses.
- hash tools to store field-value pairs within a single key. The hash can store vector embeddings. Useful for representing objects with multiple attributes, user profiles, or product information where fields can be accessed individually.
- list tools with common operations to append and pop items. Useful for queues, message brokers, or maintaining a list of most recent actions.
- set tools to add, remove and list set members. Useful for tracking unique values like user IDs or tags, and for performing set operations like intersection.
- sorted set tools to manage data for e.g. leaderboards, priority queues, or time-based analytics with score-based ordering.
- pub/sub functionality to publish messages, create stateful channel or pattern subscriptions, and read queued messages using returned subscription handles. Useful for real-time notifications, chat applications, or distributing updates to multiple clients.
- streams tools to add, read, delete, create and destroy consumer groups, and acknowledge processed entries in data streams. Useful for event sourcing, activity feeds, and worker-based event processing with Redis Streams consumer groups.
- JSON tools to store, retrieve, and manipulate JSON documents in Redis. Useful for complex nested data structures, document databases, or configuration management with path-based access.
Additional tools.
- docs tool to search Redis documentation, tutorials, and best practices using natural language questions (backed by the MCP_DOCS_SEARCH_URL HTTP API).
- query engine tools to manage vector indexes and perform vector search
- server management tool to retrieve information about the database
Installation
The Redis MCP Server is available as a PyPI package and as direct installation from the GitHub repository.
From PyPI (recommended)
Configuring the latest Redis MCP Server version from PyPI, as an example, can be done importing the following JSON configuration in the desired framework or tool.
The uvx command will download the server on the fly (if not cached already), create a temporary environment, and then run it.
URL specification
The format to specify the --url argument follows the redis and rediss schemes: