Skip to content

Commit 37a9bbe

Browse files
authored
Merge branch 'main' into readme-update-config
2 parents 7fd3971 + a957c80 commit 37a9bbe

25 files changed

+2028
-941
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ jobs:
2828
uses: actions/checkout@v5
2929

3030
- name: ⚙️ Install uv
31-
uses: astral-sh/setup-uv@v6
31+
uses: astral-sh/setup-uv@v7
3232
with:
3333
version: "latest"
34+
enable-cache: false
3435

3536
- name: ⚙️ Set Python up and add dependencies
3637
run: |
@@ -57,9 +58,10 @@ jobs:
5758
uses: actions/checkout@v5
5859

5960
- name: ⚙️ Install uv
60-
uses: astral-sh/setup-uv@v6
61+
uses: astral-sh/setup-uv@v7
6162
with:
6263
version: "latest"
64+
enable-cache: false
6365

6466
- name: ⚙️ Set Python up and add dependencies
6567
run: |
@@ -110,9 +112,10 @@ jobs:
110112
uses: actions/checkout@v5
111113

112114
- name: ⚙️ Install uv
113-
uses: astral-sh/setup-uv@v6
115+
uses: astral-sh/setup-uv@v7
114116
with:
115117
version: "latest"
118+
enable-cache: false
116119

117120
- name: ⚙️ Set Python ${{ matrix.python-version }} up and add dependencies
118121
run: |
@@ -138,7 +141,7 @@ jobs:
138141
uses: codecov/codecov-action@v5
139142
if: matrix.python-version == '3.12'
140143
with:
141-
file: ./coverage.xml
144+
files: ./coverage.xml
142145
flags: unittests
143146
name: codecov-umbrella
144147

@@ -155,9 +158,10 @@ jobs:
155158
uses: actions/checkout@v5
156159

157160
- name: ⚙️ Install uv
158-
uses: astral-sh/setup-uv@v6
161+
uses: astral-sh/setup-uv@v7
159162
with:
160163
version: "latest"
164+
enable-cache: false
161165

162166
- name: ⚙️ Set Python ${{ matrix.python-version }} up and add dependencies
163167
run: |
@@ -205,9 +209,10 @@ jobs:
205209
fetch-depth: 0 # Full history for UV build
206210

207211
- name: ⚙️ Install uv
208-
uses: astral-sh/setup-uv@v6
212+
uses: astral-sh/setup-uv@v7
209213
with:
210214
version: "latest"
215+
enable-cache: false
211216

212217
- name: ⚙️ Set up Python
213218
run: uv python install 3.12

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444
fetch-depth: 0 # Full history for UV build
4545

4646
- name: ⚙️ Install uv
47-
uses: astral-sh/setup-uv@v6
47+
uses: astral-sh/setup-uv@v7
4848
with:
4949
version: "latest"
50+
enable-cache: false
5051

5152
- name: ⚙️ Set up Python
5253
run: uv python install 3.12
@@ -66,9 +67,10 @@
6667
fetch-depth: 0
6768

6869
- name: ⚙️ Install uv
69-
uses: astral-sh/setup-uv@v6
70+
uses: astral-sh/setup-uv@v7
7071
with:
7172
version: "latest"
73+
enable-cache: false
7274

7375
- name: ⚙️ Set Python up and add dependencies
7476
run: |
@@ -110,9 +112,10 @@
110112
fetch-depth: 0
111113

112114
- name: ⚙️ Install uv
113-
uses: astral-sh/setup-uv@v6
115+
uses: astral-sh/setup-uv@v7
114116
with:
115117
version: "latest"
118+
enable-cache: false
116119

117120
- name: ⚙️ Set up Python ${{ matrix.python-version }}
118121
run: |
@@ -155,9 +158,10 @@
155158
fetch-depth: 0 # Full history for UV build
156159

157160
- name: ⚙️ Install uv
158-
uses: astral-sh/setup-uv@v6
161+
uses: astral-sh/setup-uv@v7
159162
with:
160163
version: "latest"
164+
enable-cache: false
161165

162166
- name: ⚙️ Set up Python
163167
run: uv python install 3.12
@@ -211,7 +215,7 @@
211215
uv run twine check dist/*
212216
213217
- name: ⚙️ Generate build attestation
214-
uses: actions/attest-build-provenance@v2
218+
uses: actions/attest-build-provenance@v3
215219
with:
216220
subject-path: 'dist/*'
217221

.github/workflows/stale-issues.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
stale:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/stale@v9
18+
- uses: actions/stale@v10
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
dry-run: true
@@ -51,7 +51,7 @@ jobs:
5151
stale-needs-info:
5252
runs-on: ubuntu-latest
5353
steps:
54-
- uses: actions/stale@v9
54+
- uses: actions/stale@v10
5555
with:
5656
repo-token: ${{ secrets.GITHUB_TOKEN }}
5757
dry-run: true

GEMINI.md

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# Redis MCP Server Extension
2+
3+
This extension provides a natural language interface for managing and searching data in Redis through the Model Context Protocol (MCP).
4+
5+
## What this extension provides
6+
7+
The Redis MCP Server enables AI agents to efficiently interact with Redis databases using natural language commands. You can:
8+
9+
- **Store and retrieve data**: Cache items, store session data, manage configuration values
10+
- **Work with data structures**: Manage hashes, lists, sets, sorted sets, and streams
11+
- **Search and filter**: Perform efficient data retrieval and searching operations
12+
- **Pub/Sub messaging**: Publish and subscribe to real-time message channels
13+
- **JSON operations**: Store, retrieve, and manipulate JSON documents
14+
- **Vector search**: Manage vector indexes and perform similarity searches
15+
16+
## Available Tools
17+
18+
### String Operations
19+
- Set, get, and manage string values with optional expiration
20+
- Useful for caching, session data, and simple configuration
21+
22+
### Hash Operations
23+
- Store field-value pairs within a single key
24+
- Support for vector embeddings storage
25+
- Ideal for user profiles, product information, and structured objects
26+
27+
### List Operations
28+
- Append, pop, and manage list items
29+
- Perfect for queues, message brokers, and activity logs
30+
31+
### Set Operations
32+
- Add, remove, and list unique set members
33+
- Perform set operations like intersection and union
34+
- Great for tracking unique values and tags
35+
36+
### Sorted Set Operations
37+
- Manage score-based ordered data
38+
- Ideal for leaderboards, priority queues, and time-based analytics
39+
40+
### Pub/Sub Operations
41+
- Publish messages to channels and subscribe to receive them
42+
- Real-time notifications and chat applications
43+
44+
### Stream Operations
45+
- Add, read, and delete from data streams
46+
- Event sourcing, activity feeds, and sensor data logging
47+
48+
### JSON Operations
49+
- Store, retrieve, and manipulate JSON documents
50+
- Complex nested data structures with path-based access
51+
52+
### Vector Search
53+
- Manage vector indexes and perform similarity searches
54+
- AI/ML applications and semantic search
55+
56+
### Server Management
57+
- Retrieve database information and statistics
58+
- Monitor Redis server status and performance
59+
60+
## Usage Examples
61+
62+
You can interact with Redis using natural language:
63+
64+
- "Store this user session data with a 1-hour expiration"
65+
- "Add this item to the shopping cart list"
66+
- "Search for similar vectors in the product embeddings"
67+
- "Publish a notification to the alerts channel"
68+
- "Get the top 10 scores from the leaderboard"
69+
- "Cache this API response for 5 minutes"
70+
71+
## Configuration
72+
73+
The extension connects to Redis using a Redis URL. Default configuration connects to `redis://127.0.0.1:6379/0`.
74+
75+
### Primary Configuration: Redis URL
76+
77+
Set the `REDIS_URL` environment variable to configure your Redis connection:
78+
79+
```bash
80+
export REDIS_URL=redis://[username:password@]host:port/database
81+
```
82+
83+
### Configuration Examples
84+
85+
**Local Redis (no authentication):**
86+
```bash
87+
export REDIS_URL=redis://127.0.0.1:6379/0
88+
# or
89+
export REDIS_URL=redis://localhost:6379/0
90+
```
91+
92+
**Redis with password:**
93+
```bash
94+
export REDIS_URL=redis://:mypassword@localhost:6379/0
95+
```
96+
97+
**Redis with username and password:**
98+
```bash
99+
export REDIS_URL=redis://myuser:mypassword@localhost:6379/0
100+
```
101+
102+
**Redis Cloud:**
103+
```bash
104+
export REDIS_URL=redis://default:abc123@redis-12345.c1.us-east-1.ec2.cloud.redislabs.com:12345/0
105+
```
106+
107+
**Redis with SSL:**
108+
```bash
109+
export REDIS_URL=rediss://user:pass@secure-redis.com:6380/0
110+
```
111+
112+
**Redis with SSL and certificates:**
113+
```bash
114+
export REDIS_URL=rediss://user:pass@host:6380/0?ssl_cert_reqs=required&ssl_ca_certs=/path/to/ca.pem
115+
```
116+
117+
**AWS ElastiCache:**
118+
```bash
119+
export REDIS_URL=redis://my-cluster.abc123.cache.amazonaws.com:6379/0
120+
```
121+
122+
**Azure Cache for Redis:**
123+
```bash
124+
export REDIS_URL=rediss://mycache.redis.cache.windows.net:6380/0?ssl_cert_reqs=required
125+
```
126+
127+
### Backward Compatibility: Individual Environment Variables
128+
129+
If `REDIS_URL` is not set, the extension will fall back to individual environment variables:
130+
131+
- `REDIS_HOST` - Redis hostname (default: 127.0.0.1)
132+
- `REDIS_PORT` - Redis port (default: 6379)
133+
- `REDIS_DB` - Database number (default: 0)
134+
- `REDIS_USERNAME` - Redis username (optional)
135+
- `REDIS_PWD` - Redis password (optional)
136+
- `REDIS_SSL` - Enable SSL: "true" or "false" (default: false)
137+
- `REDIS_SSL_CA_PATH` - Path to CA certificate file
138+
- `REDIS_SSL_KEYFILE` - Path to SSL key file
139+
- `REDIS_SSL_CERTFILE` - Path to SSL certificate file
140+
- `REDIS_SSL_CERT_REQS` - SSL certificate requirements (default: "required")
141+
- `REDIS_SSL_CA_CERTS` - Path to CA certificates file
142+
- `REDIS_CLUSTER_MODE` - Enable cluster mode: "true" or "false" (default: false)
143+
144+
**Example using individual variables:**
145+
```bash
146+
export REDIS_HOST=my-redis-server.com
147+
export REDIS_PORT=6379
148+
export REDIS_PWD=mypassword
149+
export REDIS_SSL=true
150+
```
151+
152+
### Configuration Priority
153+
154+
1. **`REDIS_URL`** (highest priority) - If set, this will be used exclusively
155+
2. **Individual environment variables** - Used as fallback when `REDIS_URL` is not set
156+
3. **Built-in defaults** - Used when no configuration is provided
157+
158+
### Configuration Methods
159+
160+
1. **Environment Variables**: Set variables in your shell or system
161+
2. **`.env` File**: Create a `.env` file in your project directory
162+
3. **System Environment**: Set variables at the system level
163+
4. **Shell Profile**: Add exports to your `.bashrc`, `.zshrc`, etc.
164+
165+
### No Configuration Required
166+
167+
If you don't set any configuration, the extension will automatically connect to a local Redis instance at `redis://127.0.0.1:6379/0`.
168+
169+
### Advanced SSL Configuration
170+
171+
For production environments with custom SSL certificates, you can use query parameters in the Redis URL:
172+
173+
```bash
174+
export REDIS_URL=rediss://user:pass@host:6380/0?ssl_cert_reqs=required&ssl_ca_path=/path/to/ca.pem&ssl_keyfile=/path/to/key.pem&ssl_certfile=/path/to/cert.pem
175+
```
176+
177+
Supported SSL query parameters:
178+
- `ssl_cert_reqs` - Certificate requirements: "required", "optional", "none"
179+
- `ssl_ca_certs` - Path to CA certificates file
180+
- `ssl_ca_path` - Path to CA certificate file
181+
- `ssl_keyfile` - Path to SSL private key file
182+
- `ssl_certfile` - Path to SSL certificate file
183+
184+
For detailed configuration options and Redis URL format, see the main Redis MCP Server documentation.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 Mirko Ortensi
3+
Copyright (c) 2025, Redis, inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)