@@ -21,8 +21,32 @@ how to get a test server active within minutes.
21
21
When you have a Redis server available, use the instructions below to install and
22
22
configure the Redis MCP server.
23
23
24
+ ## Quick Start with uvx
25
+
26
+ The easiest way to use the Redis MCP Server is with [ ` uvx ` ] ( https://docs.astral.sh/uv/guides/tools/ ) ,
27
+ which lets you run it directly from a GitHub branch or a tagged release (see the ` uv `
28
+ [ installation instructions] ( https://github.com/astral-sh/uv?tab=readme-ov-file#installation )
29
+ for more information.)
30
+
31
+ ``` bash
32
+ # Run with Redis URI
33
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server --url redis://localhost:6379/0
34
+
35
+ # Run with Redis URI and SSL
36
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server --url " rediss://<USERNAME>:<PASSWORD>@<HOST>:<PORT>?ssl_cert_reqs=required&ssl_ca_certs=<PATH_TO_CERT>"
37
+
38
+ # Run with individual parameters
39
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server --host localhost --port 6379 --password mypassword
40
+
41
+ # See all options
42
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server --help
43
+ ```
44
+
24
45
## Install the server from source
25
46
47
+ You can also run Redis MCP from source, which may be useful if you want to
48
+ contribute to the project.
49
+
26
50
Clone Redis MCP from the
27
51
[ Github repository] ( https://github.com/redis/mcp-redis ) using the following
28
52
command:
@@ -45,6 +69,12 @@ cd mcp-redis
45
69
uv venv
46
70
source .venv/bin/activate
47
71
uv sync
72
+
73
+ # Run with CLI interface
74
+ uv run redis-mcp-server --help
75
+
76
+ # Or run the main file directly (uses environment variables)
77
+ uv run src/main.py
48
78
```
49
79
50
80
## Install using Docker
@@ -63,8 +93,9 @@ docker build -t mcp-redis .
63
93
64
94
The default settings for MCP assume a Redis server is running on the
65
95
local machine, with the default port and no security arrangements.
66
- To change these settings, use the environment variables shown in the
67
- table below. For example, for a ` bash ` shell, use
96
+ You can use environment variables to change these settings
97
+ (see [ Environment variables] ( #environment-variables ) below for the full list).
98
+ For example, for a ` bash ` shell, use
68
99
69
100
``` bash
70
101
export REDIS_USERNAME=" my_username"
@@ -73,6 +104,44 @@ export REDIS_USERNAME="my_username"
73
104
from the command line or the ` .bashrc ` file to set the username you want
74
105
to connect with.
75
106
107
+ Alternatively, you can use a ` .env ` file in your project folder to set the
108
+ environment variables as key-value pairs, one per line:
109
+
110
+ ```
111
+ REDIS_HOST=your_redis_host
112
+ REDIS_PORT=6379
113
+ .
114
+ .
115
+ ```
116
+
117
+ See the [ ` .env.example ` file] ( https://github.com/redis/mcp-redis/blob/main/.env.example )
118
+ in the repository for the full list of variables and their default values.
119
+
120
+ You can also set the configuration using command-line arguments, which
121
+ may be useful if you only want to change a few settings from the defaults:
122
+
123
+ ``` bash
124
+ # Basic Redis connection
125
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server \
126
+ --host localhost \
127
+ --port 6379 \
128
+ --password mypassword
129
+
130
+ # Using Redis URI (simpler)
131
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server \
132
+ --url redis://user:pass@localhost:6379/0
133
+
134
+ # SSL connection
135
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server \
136
+ --url rediss://user:
[email protected] :6379/0
137
+
138
+ # See all available options
139
+ uvx --from git+https://github.com/redis/mcp-redis.git redis-mcp-server --help
140
+ ```
141
+
142
+ ### Environment variables
143
+
144
+ The full set of environment variables is shown in the table below:
76
145
77
146
| Name | Description | Default Value |
78
147
| ----------------------| -----------------------------------------------------------| ---------------|
@@ -90,35 +159,6 @@ to connect with.
90
159
| ` REDIS_CLUSTER_MODE ` | Enable Redis Cluster mode | ` False ` |
91
160
| ` MCP_TRANSPORT ` | Use the ` stdio ` or ` sse ` transport | ` stdio ` |
92
161
93
- ### Making MCP visible externally
94
-
95
- {{< note >}}The configuration for an MCP client includes the commands
96
- to start a local server, so you can ignore this section if you don't
97
- want your Redis MCP to be externally accessible.
98
- {{< /note >}}
99
-
100
- The default configuration assumes you only want to use the MCP server
101
- locally, but you can make it externally available by setting
102
- ` MCP_TRANSPORT ` to ` sse ` :
103
-
104
- ``` bash
105
- export MCP_TRANSPORT=" sse"
106
- ```
107
-
108
- Then, start the server with the following command:
109
-
110
- ``` bash
111
- uv run src/main.py
112
- ```
113
-
114
- You can test the server is responding with the [ ` curl ` ] ( https://curl.se/ )
115
- tool:
116
-
117
- ``` bash
118
- curl -i http://127.0.0.1:8000/sse
119
- HTTP/1.1 200 OK
120
- ```
121
-
122
162
## Redis Cloud MCP
123
163
124
164
A separate version of the MCP server is available for
0 commit comments