Redis MCP Server
About
A Redis Management and Control Protocol (MCP) server implementation using Spring Boot and Spring AI
Details
- Author
- yyue9527
- GitHub stars
- 2
- Downloads
- 506
- Categories
- Database
Jump to
- Redis key-value operations (set, get, delete)
- Pattern-based key listing (list)
- Optional key expiration time on set
- SSE-based MCP implementation with Spring Boot and Spring AI
- Lettuce Redis Client for non-blocking Redis access
- Configurable Redis connection via system property
Prerequisites: JDK 17+, Maven 3.6+, and a running Redis server. Build with mvn clean package and run with java -jar target/redis-mcp-server-{version}.jar. Configure the Redis connection via the redis.url system property (default: redis://localhost:6379). The server exposes four MCP tools: set, get, delete, and list. For use in Cursor, add the tool configuration pointing to http://localhost:8080/sse.
Redis MCP Server
A Redis Management and Control Protocol (MCP) server implementation using Spring Boot and Spring AI.
Description
This project implements a Redis MCP server that provides a set of tools for Redis operations. It uses spring-ai-mcp-server-webmvc-spring-boot-starter to implement MCP Server-Sent Events (SSE) functionality.
Prerequisites
- JDK 17 or higher
- Maven 3.6 or higher
- Redis server
Components
- Spring Boot
- Spring AI
- Spring Data Redis
- Lettuce Redis Client
- Jackson
- spring-ai-mcp-server-webmvc-spring-boot-starter
Features
- Redis key-value operations (set, get, delete)
- Pattern-based key listing
- Optional key expiration time
- SSE-based MCP implementation
Configuration
Server Configuration
The Redis connection can be configured using the redis.url system property. Default value is redis://localhost:6379.
Example:
java -Dredis.url=redis://your-redis-host:6379 -jar your-app.jar
Cursor Tool Configuration
To use this MCP server in Cursor, add the following configuration to your Cursor settings:
{
"redis-mcp-server": {
"url": "http://localhost:8080/sse",
"enabled": true
}
}
Building
mvn clean package
Running
java -jar target/redis-mcp-server-{version}.jar
API Endpoints
The server exposes the following MCP tools:
- set: Set a Redis key-value pair with optional expiration time
- get: Get value from Redis by key
- delete: Delete one or multiple keys from Redis
- list: List Redis keys matching a pattern
License
This project is licensed under the MIT License.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



