{"id":27651875,"url":"https://github.com/redis/mcp-redis","last_synced_at":"2025-04-25T16:21:18.836Z","repository":{"id":288067760,"uuid":"959084910","full_name":"redis/mcp-redis","owner":"redis","description":"The official Redis MCP Server is a natural language interface designed for agentic applications to manage and search data in Redis efficiently","archived":false,"fork":false,"pushed_at":"2025-04-23T14:36:45.000Z","size":110,"stargazers_count":18,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T04:28:20.470Z","etag":null,"topics":["database","genai","llm","mcp","mcp-server","redis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-02T08:42:13.000Z","updated_at":"2025-04-23T14:36:49.000Z","dependencies_parsed_at":"2025-04-22T13:30:47.452Z","dependency_job_id":null,"html_url":"https://github.com/redis/mcp-redis","commit_stats":null,"previous_names":["redis/mcp-redis"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fmcp-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fmcp-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fmcp-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis%2Fmcp-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redis","download_url":"https://codeload.github.com/redis/mcp-redis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250850385,"owners_count":21497498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","genai","llm","mcp","mcp-server","redis"],"created_at":"2025-04-24T04:23:57.308Z","updated_at":"2025-04-25T16:21:18.810Z","avatar_url":"https://github.com/redis.png","language":"Python","funding_links":[],"categories":["Databases","Database \u0026 Messaging MCP Servers","MCP 服务器精选列表","可用服务","📚 Projects (1974 total)","پیاده‌سازی‌های سرور","🗄️ \u003ca name=\"databases\"\u003e\u003c/a\u003eDatabases","Servers","🗄️ Database","APIs and HTTP Requests","MCP Servers","Python","📂 By Category","🌐 Web, Network \u0026 Protocol","Server Implementations"],"sub_categories":["Cache \u0026 Key-Value","🗄️ 数据库交互","数据库","MCP Servers","🗄️ \u003ca name=\"databases\"\u003e\u003c/a\u003eپایگاه‌های داده","Data \u0026 Databases","Databases","💾 Databases","🗄️ \u003ca name=\"databases\"\u003e\u003c/a\u003eDatabases"],"readme":"# Redis MCP Server\n[![smithery badge](https://smithery.ai/badge/@redis/mcp-redis)](https://smithery.ai/server/@redis/mcp-redis)\n\n\u003ca href=\"https://glama.ai/mcp/servers/@redis/mcp-redis\"\u003e\n  \u003cimg width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@redis/mcp-redis/badge\" alt=\"Redis Server MCP server\" /\u003e\n\u003c/a\u003e\n\n## Overview\nThe 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:\n\n- \"Store the entire conversation in a stream\"\n- \"Cache this item\"\n- \"Store the session with an expiration time\"\n- \"Index and search this vector\"\n\n## Features\n- **Natural Language Queries**: Enables AI agents to query and update Redis using natural language.\n- **Seamless MCP Integration**: Works with any **MCP client** for smooth communication.\n- **Full Redis Support**: Handles **hashes, lists, sets, sorted sets, streams**, and more.\n- **Search \u0026 Filtering**: Supports efficient data retrieval and searching in Redis.\n- **Scalable \u0026 Lightweight**: Designed for **high-performance** data operations.\n\n## Tools\n\nThis MCP Server provides tools to manage the data stored in Redis.\n\n- `string` tools to set, get strings with expiration. Useful for storing simple configuration values, session data, or caching responses.\n- `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.\n- `list` tools with common operations to append and pop items. Useful for queues, message brokers, or maintaining a list of most recent actions.\n- `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.\n- `sorted set` tools to manage data for e.g. leaderboards, priority queues, or time-based analytics with score-based ordering.\n- `pub/sub` functionality to publish messages to channels and subscribe to receive them. Useful for real-time notifications, chat applications, or distributing updates to multiple clients.\n- `streams` tools to add, read, and delete from data streams. Useful for event sourcing, activity feeds, or sensor data logging with consumer groups support.\n- `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.\n\nAdditional tools.\n\n- `query engine` tools to manage vector indexes and perform vector search\n- `server management` tool to retrieve information about the database\n\n## Installation\n\nFollow these instructions to install the server.\n\n```sh\n# Clone the repository\ngit clone https://github.com/redis/mcp-redis.git\ncd mcp-redis\n\n# Install dependencies using uv\nuv venv\nsource .venv/bin/activate\nuv sync\n```\n\n## Configuration\n\nTo configure this Redis MCP Server, consider the following environment variables:\n\n| Name                    | Description                                               | Default Value |\n|-------------------------|-----------------------------------------------------------|---------------|\n| `REDIS_HOST`            | Redis IP or hostname                                      | `\"127.0.0.1\"` |\n| `REDIS_PORT`            | Redis port                                                | `6379`        |\n| `REDIS_USERNAME`        | Default database username                                 | `\"default\"`   |\n| `REDIS_PWD`             | Default database password                                 | \"\"            |\n| `REDIS_SSL`             | Enables or disables SSL/TLS                               | `False`       |\n| `REDIS_CA_PATH`         | CA certificate for verifying server                       | None          |\n| `REDIS_SSL_KEYFILE`     | Client's private key file for client authentication       | None          |\n| `REDIS_SSL_CERTFILE`    | Client's certificate file for client authentication       | None          |\n| `REDIS_CERT_REQS`       | Whether the client should verify the server's certificate | `\"required\"`  |\n| `REDIS_CA_CERTS`        | Path to the trusted CA certificates file                  | None          |\n| `REDIS_CLUSTER_MODE`    | Enable Redis Cluster mode                                 | `False`       |\n\n## Integration with OpenAI Agents SDK\n\nIntegrate this MCP Server with the OpenAI Agents SDK. Read the [documents](https://openai.github.io/openai-agents-python/mcp/) to learn more about the integration of the SDK with MCP.\n\nInstall the Python SDK.\n\n```commandline\npip install openai-agents\n```\n\nConfigure the OpenAI token:\n\n```commandline\nexport OPENAI_API_KEY=\"\u003copenai_token\u003e\"\n```\n\nAnd run the [application](./examples/redis_assistant.py).\n\n```commandline\npython3.13 redis_assistant.py \n```\n\nYou can troubleshoot your agent workflows using the [OpenAI dashboard](https://platform.openai.com/traces/).\n\n## Integration with Claude Desktop\n\n### Via Smithery\n\nIf you'd like to test the [Redis MCP Server](https://smithery.ai/server/@redis/mcp-redis) deployed [by Smithery](https://smithery.ai/docs/deployments), you can configure Claude Desktop automatically:\n\n```bash\nnpx -y @smithery/cli install @redis/mcp-redis --client claude\n```\n\nFollow the prompt and provide the details to configure the server and connect to Redis (e.g. using a Redis Cloud database). \nThe procedure will create the proper configuration in the `claude_desktop_config.json` configuration file.\n\n### Manual configuration\n\nYou can configure Claude Desktop to use this MCP Server.\n\n1. Specify your Redis credentials and TLS configuration\n2. Retrieve your `uv` command full path (e.g. `which uv`)\n3. Edit the `claude_desktop_config.json` configuration file \n   - on a MacOS, at `~/Library/Application\\ Support/Claude/`\n\n```commandline\n{\n    \"mcpServers\": {\n        \"redis\": {\n            \"command\": \"\u003cfull_path_uv_command\u003e\",\n            \"args\": [\n                \"--directory\",\n                \"\u003cyour_mcp_server_directory\u003e\",\n                \"run\",\n                \"src/main.py\"\n            ],\n            \"env\": {\n                \"REDIS_HOST\": \"\u003cyour_redis_database_hostname\u003e\",\n                \"REDIS_PORT\": \"\u003cyour_redis_database_port\u003e\",\n                \"REDIS_PSW\": \"\u003cyour_redis_database_password\u003e\",\n                \"REDIS_SSL\": True|False,\n                \"REDIS_CA_PATH\": \"\u003cyour_redis_ca_path\u003e\",\n                \"REDIS_CLUSTER_MODE\": True|False\n            }\n        }\n    }\n}\n```\n\n### Using with Docker\n\nThe Redis MCP Server provides a Dockerfile. Build this server's image with:\n\n```commandline\ndocker build -t mcp-redis .\n```\n\nFinally, configure Claude Desktop to create the container at start-up. Edit the `claude_desktop_config.json` and add:\n\n```commandline\n{\n  \"mcpServers\": {\n    \"redis\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\",\n                \"--rm\",\n                \"--name\",\n                \"redis-mcp-server\",\n                \"-i\",\n                \"-e\", \"REDIS_HOST=\u003credis_hostname\u003e\",\n                \"-e\", \"REDIS_PORT=\u003credis_port\u003e\",\n                \"-e\", \"REDIS_USERNAME=\u003credis_username\u003e\",\n                \"-e\", \"REDIS_PWD=\u003credis_password\u003e\",\n                \"mcp-redis\"]\n    }\n  }\n}\n```\n\n### Troubleshooting\n\nYou can troubleshoot problems by tailing the log file.\n\n```commandline\ntail -f ~/Library/Logs/Claude/mcp-server-redis.log\n```\n\n## Testing\n\nYou can use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) for visual debugging of this MCP Server.\n\n```sh\nnpx @modelcontextprotocol/inspector uv run src/main.py\n```\n\n## Example Use Cases\n- **AI Assistants**: Enable LLMs to fetch, store, and process data in Redis.\n- **Chatbots \u0026 Virtual Agents**: Retrieve session data, manage queues, and personalize responses.\n- **Data Search \u0026 Analytics**: Query Redis for **real-time insights and fast lookups**.\n- **Event Processing**: Manage event streams with **Redis Streams**.\n\n## Contributing\n1. Fork the repo\n2. Create a new branch (`feature-branch`)\n3. Commit your changes\n4. Push to your branch and submit a PR!\n\n## License\nThis project is licensed under the **MIT License**.\n\n## Contact\nFor questions or support, reach out via [GitHub Issues](https://github.com/redis/mcp-redis/issues).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis%2Fmcp-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredis%2Fmcp-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis%2Fmcp-redis/lists"}