https://github.com/yyue9527/redis-mcp-server
A Redis Management and Control Protocol (MCP) server implementation using Spring Boot and Spring AI
https://github.com/yyue9527/redis-mcp-server
Last synced: 3 months ago
JSON representation
A Redis Management and Control Protocol (MCP) server implementation using Spring Boot and Spring AI
- Host: GitHub
- URL: https://github.com/yyue9527/redis-mcp-server
- Owner: yyue9527
- Created: 2025-04-16T03:05:20.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-16T03:06:13.000Z (6 months ago)
- Last Synced: 2025-04-16T03:58:05.509Z (6 months ago)
- Language: Java
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
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:
```json
{
"redis-mcp-server": {
"url": "http://localhost:8080/sse",
"enabled": true
}
}
```## Building
```bash
mvn clean package
```## Running
```bash
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.