Skip to content

Conversation

@r33drichards
Copy link
Owner

No description provided.

## Summary

I've successfully created a Redis-backed heap storage implementation for the vibe-kanban MCP server. Here's what was added:

### Implementation Details

**1. Redis Heap Storage Class** (server/src/mcp/heap_storage.rs:103-135)
- Created `RedisHeapStorage` struct using Redis `ConnectionManager` for connection pooling
- Implemented async `put()` and `get()` methods that store/retrieve binary heap snapshots
- Added proper error handling with descriptive error messages
- Used Redis SET/GET commands for storing binary data

**2. Dependency** (server/Cargo.toml:25)
- Added `redis = { version = "0.27", features = ["tokio-comp", "connection-manager"] }`
- Includes tokio compatibility for async operations and connection pooling

**3. Integration**
- Added `Redis` variant to `AnyHeapStorage` enum (server/src/mcp/heap_storage.rs:142)
- Updated trait implementation to handle Redis operations (server/src/mcp/heap_storage.rs:154, 161)
- Added `--redis-url` CLI argument with proper conflict checking (server/src/main.rs:32-33)
- Integrated Redis initialization in main.rs with error handling (server/src/main.rs:88-95)

**4. Documentation** (README.md)
- Updated all sections to include Redis as a storage option
- Added Redis connection URL format and examples
- Included Redis in Quick Start, HTTP/SSE transport examples
- Added integration examples for Claude Desktop and Cursor
- Documented Redis use cases: distributed deployments, horizontal scaling, microservices

### Usage

Users can now run the server with Redis storage using:

```bash
# Stdio transport
mcp-v8 --redis-url redis://localhost:6379

# HTTP transport
mcp-v8 --redis-url redis://localhost:6379 --http-port 8080

# SSE transport
mcp-v8 --redis-url redis://localhost:6379 --sse-port 8081

# With authentication
mcp-v8 --redis-url redis://user:password@host:6379/0
```

### Benefits

The Redis backend provides:
- **Distributed state**: Multiple server instances can share heap snapshots
- **High performance**: In-memory storage with fast read/write operations
- **Connection pooling**: Efficient connection management via ConnectionManager
- **Scalability**: Perfect for microservices and horizontal scaling
- **Persistence options**: Redis can be configured for data persistence if needed

The implementation follows the same clean architecture as the existing S3 and File backends, implementing the `HeapStorage` trait with async operations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants