[go: up one dir, main page]

Let’s talk fast, accurate AI at AWS re:Invent.

Join us in Vegas on Dec. 1-5.

Blog

Redis MCP Server extension in Gemini CLI now available

November 17, 20254 minute read
Mirko Ortensi
Mirko Ortensi
Redis Senior Software Engineer • R&D
Vasko Chomakov

Following Gemini CLI’s recent support for extensions, the Redis MCP Server is now available in the Gemini CLI extensions gallery.

The Redis Model Context Protocol (MCP) Server is a natural language interface designed for code assistants and agentic apps to manage and search data in Redis efficiently. Redis is a popular real-time data store across several use cases, leveraging data structures like hashes, sets, lists, and sorted sets. Starting with Redis 8, JSON data modeling, real-time indexing and search, probabilistic data structures, and time series are available in Redis Open Source, Redis Software, and Redis Cloud.

Redis fulfills a range of use cases in modern GenAI and app development, serving as both short-term and long-term memory as well as powering semantic search, semantic caching, and fast, scalable data access. Through the standard MCP specifications, the Redis MCP Server bridges these capabilities with GenAI tools, allowing code assistants and agentic apps to query, update, and reason over Redis data using natural language. Installing the Redis MCP Server extension in Gemini CLI is quick and straightforward.

Installing the Redis MCP Server extension

If you haven’t already, install Gemini CLI on your machine using the following command:

You can also follow the Gemini CLI installation guide for environment-specific instructions.

Next, browse the Gemini CLI extensions gallery, find Redis, and click the “Copy” icon to get the installation command for the redis extension. Alternatively, you can run the following in your terminal:

This will install and instruct the MCP Server to connect to a local Redis instance on the default port 6379. To connect to another server, you can also specify a URL connection string by setting the REDIS_URL environment variable.

After installation, start Gemini CLI and verify that the Redis MCP Server extension is available:

Under the /mcp slash command, you get more control over the installed MCP extensions. So, as an example, you can inspect the server’s JSON schema for the tools and their parameters:

You can also view all installed MCP servers and their tools in a compact format:

Working with Redis using the Redis MCP Server extension

You can use the Gemini CLI to get started with new projects or edit existing ones. Several powerful tools enable control over the overall coding experience, allowing users to create custom commands, manage memories, revert to previous versions, and more.

Redis is a natural fit for modern apps, providing building blocks for session management, caching, queuing, and leaderboards. With the Redis MCP Server extension, devs can access Redis directly from Gemini CLI: the same place they build, debug, and refine their code. This integration simplifies development by unifying the data and code layers in one environment.

Let’s say you are working on an app and want to implement session management using Redis. Redis is a common solution for scalable, highly available, and real-time apps. You can instruct Gemini CLI to develop an integration with Redis and provide context in the GEMINI.md file to instruct the model with your preferences. This refers specifically to the GEMINI.md file in your project directory (e.g., ~/projects/my-app/GEMINI.md), which defines the context for that particular integration. Other GEMINI.md files may exist, such as a global one at ~/.gemini/GEMINI.md and an extension-specific one at ~/.gemini/extensions/mcp-redis/GEMINI.md.

If you would like to customize your experience further, you can modify the prompt with additional instructions, such as avoiding anti-patterns or providing specific recommendations.

When working with data, you may want to verify the execution of a functionality and review the state of the database. You can use Redis Insight, the official Redis dev tool with an intuitive UI, to quickly browse your data, profile the flow of commands to Redis, inspect JSON files, and more. This is an invaluable source of truth during development.

Alternatively, the Redis MCP Server’s natural language interface helps you issue the right commands and inspect results directly from Gemini CLI while your app runs:

The Gemini CLI knows from the contextual preferences that the app should store sessions in Redis as JSON documents, prefixed with "session:". The Redis MCP Server exposes tools for working with JSON documents, enabling users to ask direct questions about the data:

Peeking into the database isn’t the only way to speed up your coding experience. If you’d like to add some random test data, you can do so without code additions to your project:

You can formulate complex questions that are easily solved using Gemini CLI and the Redis MCP Server extension, as well as write and verify complex data structures. Additionally, you can create, merge, update, or delete data in Redis.

Where to learn more

You can learn more about the Redis MCP Server’s capabilities in our docs. To discover the Gemini CLI’s integration with MCP servers and customize your experience, read the following Gemini CLI docs.


Get started with Redis today

Speak to a Redis expert and learn more about enterprise-grade Redis today.