Skip to content

Commit f1be735

Browse files
Merge pull request #1578 from redis/DOC-5254-mcp-docs
DOC-5254 starter docs for Redis MCP
2 parents b7eb2fb + ec7366c commit f1be735

File tree

3 files changed

+418
-0
lines changed

3 files changed

+418
-0
lines changed

content/integrate/redis-mcp/_index.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
Title: Redis MCP
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- integrate
7+
- rs
8+
description: Access a Redis server using any MCP client.
9+
group: service
10+
hideListLinks: false
11+
linkTitle: Redis MCP
12+
summary: Redis MCP server lets MCP clients access the features of Redis.
13+
type: integration
14+
weight: 1
15+
---
16+
17+
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)
18+
is a standard that lets AI agents access data and perform actions. Using MCP,
19+
your server can publish a set of commands that are usable by any MCP-compatible
20+
client app (such as [Claude Desktop](https://claude.ai/download) or
21+
[VS Code](https://code.visualstudio.com/)). These commands can retrieve
22+
whatever data you wish to provide and you can also let the agent make
23+
changes to the data. For example, you could publish a feed of news items that
24+
an agent can use in its responses, and also let the agent add the user's
25+
comments to those items.
26+
27+
Redis MCP is a general-purpose implementation that lets agents read, write, and
28+
query data in Redis and also has some basic commands to manage the Redis
29+
server. With this enabled, you can use an LLM client as a very high-level
30+
interface to Redis. Add, query, and analyze any Redis data set directly from
31+
an LLM chat using instructions and questions like the following:
32+
33+
- "Store the entire conversation in the 'recent_chats' stream"
34+
- "Cache this item"
35+
- "How many keys does my database have?"
36+
- "What is user:1's email?"
37+
38+
See the other pages in this section to learn how to set up and use Redis MCP.
39+
See also the [GitHub repository](https://github.com/redis/mcp-redis) for
40+
the latest changes.
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
Title: Configure client apps
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- integrate
7+
- rs
8+
summary: Access a Redis server using any MCP client.
9+
group: service
10+
linkTitle: Configure client apps
11+
description: Configure client apps to use the Redis MCP server.
12+
type: integration
13+
weight: 20
14+
---
15+
16+
When you have [installed]({{< relref "/integrate/redis-mcp/install" >}})
17+
the Redis MCP server, you must also configure your client app to use it.
18+
The sections below describe the ways you can do this.
19+
20+
## Smithery
21+
22+
[Smithery](https://smithery.ai/) provides a searchable repository of scripts
23+
that add configurations for many MCP services to client apps.
24+
The easiest way to configure your client is to use the
25+
[Smithery tool for Redis MCP](https://smithery.ai/server/@redis/mcp-redis).
26+
27+
When you select your client from the **Install** bar on the Redis MCP page,
28+
you will see a command line that you can copy and paste into a terminal.
29+
Running this command will configure your client app to use Redis MCP. (Note
30+
that you must have [Node.js](https://nodejs.org/en) installed to run
31+
the Smithery scripts.) For example, the command line for
32+
[Claude Desktop](https://claude.ai/download) is
33+
34+
```bash
35+
npx -y @smithery/cli@latest install @redis/mcp-redis --client claude
36+
```
37+
38+
The script will prompt you for the information required to connect to
39+
your Redis database.
40+
41+
## Manual configuration
42+
43+
You can also add the configuration for Redis MCP to your client app
44+
manually. The exact method varies from client to client but the
45+
basic approach is similar in each case. The pages listed below
46+
give the general configuration details for some common MCP client tools:
47+
48+
- [Claude Desktop](https://modelcontextprotocol.io/quickstart/user)
49+
- [GitHub Copilot for VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)
50+
- [OpenAI](https://openai.github.io/openai-agents-python/mcp/)
51+
52+
### Local servers
53+
54+
For a locally-running MCP server, you need to edit the configuration
55+
file to add the command that launches the server, along with its
56+
arguments. For example, with Claude Desktop, you can locate the
57+
file by selecting **Settings** from the menu, then selecting the
58+
**Developer** tab, and then clicking the **Edit Config** button.
59+
Open this JSON file and add your settings as
60+
shown below:
61+
62+
```json
63+
{
64+
"mcpServers": {
65+
.
66+
.
67+
"redis-mcp-server": {
68+
"type": "stdio",
69+
"command": "uvx",
70+
"args": [
71+
"--from", "git+https://github.com/redis/mcp-redis.git",
72+
"redis-mcp-server",
73+
"--url", "redis://localhost:6379/0"
74+
]
75+
}
76+
}
77+
.
78+
.
79+
}
80+
```
81+
82+
You can find the path to the `uv` command using `which uv`, or
83+
the equivalent. You can also optionally set the environment for
84+
the command shell here in the `env` section:
85+
86+
```json
87+
"redis": {
88+
"type": "stdio",
89+
"command": "uvx",
90+
"args": [
91+
"--from", "git+https://github.com/redis/mcp-redis.git",
92+
"redis-mcp-server",
93+
"--url", "redis://localhost:6379/0"
94+
],
95+
"env": {
96+
"REDIS_HOST": "<your_redis_database_hostname>",
97+
"REDIS_PORT": "<your_redis_database_port>",
98+
"REDIS_PWD": "<your_redis_database_password>",
99+
"REDIS_SSL": True|False,
100+
"REDIS_CA_PATH": "<your_redis_ca_path>",
101+
"REDIS_CLUSTER_MODE": True|False
102+
}
103+
}
104+
```
105+
106+
If you are using
107+
[Docker]({{< relref "/integrate/redis-mcp/install#install-using-docker" >}})
108+
to deploy the server, change the `command` and `args` sections of the
109+
configuration as shown below:
110+
111+
```json
112+
"redis": {
113+
"command": "docker",
114+
"args": ["run",
115+
"--rm",
116+
"--name",
117+
"redis-mcp-server",
118+
"-i",
119+
"-e", "REDIS_HOST=<redis_hostname>",
120+
"-e", "REDIS_PORT=<redis_port>",
121+
"-e", "REDIS_USERNAME=<redis_username>",
122+
"-e", "REDIS_PWD=<redis_password>",
123+
"mcp-redis"]
124+
}
125+
```
126+
127+
## Redis Cloud MCP
128+
129+
If you are using
130+
[Redis Cloud MCP]({{< relref "/integrate/redis-mcp/install#redis-cloud-mcp" >}}),
131+
the configuration is similar to [basic MCP](#manual-configuration), but with a
132+
few differences. Set the client to run the server using the `node` command, as shown
133+
in the example for Claude Desktop below:
134+
135+
```json
136+
{
137+
"mcpServers": {
138+
"mcp-redis-cloud": {
139+
"command": "node",
140+
"args": ["--experimental-fetch", "<absolute_path_to_project_root>/dist/index.js"],
141+
"env": {
142+
"API_KEY": "<redis_cloud_api_key>",
143+
"SECRET_KEY": "<redis_cloud_api_secret_key>"
144+
}
145+
}
146+
}
147+
}
148+
```
149+
150+
Here, the environment includes the Redis Cloud API key and API secret key
151+
(see [Redis Cloud REST API]({{< relref "/operate/rc/api" >}}) for more
152+
information).
153+
154+
If you are deploying Redis Cloud MCP with Docker, use a configuration like
155+
the following to launch the server with the `docker` command:
156+
157+
```json
158+
{
159+
"mcpServers": {
160+
"redis-cloud": {
161+
"command": "docker",
162+
"args": [
163+
"run",
164+
"-i",
165+
"--rm",
166+
"-e",
167+
"API_KEY=<your_redis_cloud_api_key>",
168+
"-e",
169+
"SECRET_KEY=<your_redis_cloud_api_secret_key>",
170+
"mcp/redis-cloud"
171+
]
172+
}
173+
}
174+
}
175+
```

0 commit comments

Comments
 (0)