@upstash/mcp-server 0.2.2 → 0.2.3-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,38 +1,47 @@
1
- # Upstash MCP
1
+ # Upstash MCP Server
2
2
 
3
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=upstash&config=eyJjb21tYW5kIjoibnB4IC15IEB1cHN0YXNoL21jcC1zZXJ2ZXJAbGF0ZXN0IC0tZW1haWwgWU9VUl9FTUFJTCAtLWFwaS1rZXkgWU9VUl9BUElfS0VZIn0%3D)
3
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=upstash&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB1cHN0YXNoL21jcC1zZXJ2ZXJAbGF0ZXN0IiwiLS1lbWFpbCIsIllPVVJfRU1BSUwiLCItLWFwaS1rZXkiLCJZT1VSX0FQSV9LRVkiXX0%3D)
4
+ [<img alt="Install in VS Code" src="https://img.shields.io/badge/Install%20in%20VS%20Code-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white">](https://insiders.vscode.dev/redirect/mcp/install?name=upstash&inputs=%5B%7B%22id%22%3A%22email%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Upstash%20email%22%7D%2C%7B%22id%22%3A%22apiKey%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Upstash%20API%20key%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40upstash%2Fmcp-server%40latest%22%2C%22--email%22%2C%22%24%7Binput%3Aemail%7D%22%2C%22--api-key%22%2C%22%24%7Binput%3AapiKey%7D%22%5D%7D)
4
5
 
5
- [<img alt="Install in VS Code (npx)" src="https://img.shields.io/badge/Install%20in%20VS%20Code-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22name%22%3A%22upstash-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40upstash%2Fmcp-server%40latest%22%2C%22--email%22%2C%22YOUR_EMAIL%22%2C%22--api-key%22%2C%22YOUR_API_KEY%22%5D%7D)
6
+ The Upstash MCP server lets your agent manage and debug your Upstash resources directly, across **Redis**, **QStash**, **Workflow**, and **[Upstash Box](https://upstash.com/docs/box/overall/quickstart)**.
6
7
 
7
- [![smithery badge](https://smithery.ai/badge/@upstash/mcp-server)](https://smithery.ai/server/@upstash/mcp-server)
8
+ > [!TIP]
9
+ > For most workflows, prefer installing the [Upstash Skill](https://upstash.com/docs/agent-resources/skills) and letting your agent drive [`@upstash/cli`](https://upstash.com/docs/agent-resources/cli) over running the MCP server.
8
10
 
9
- The Upstash MCP gives your agent the ability to interact with your Upstash account, such as:
11
+ ## Quickstart
10
12
 
11
- ### Redis
13
+ You'll need your Upstash account email and an API key — create one at [Upstash Console → Account → API Keys](https://console.upstash.com/account/api).
12
14
 
13
- - "Create a new Redis in us-east-1"
14
- - "List my databases that have high memory usage"
15
- - "Give me the schema of how users are stored in redis"
16
- - "Create a backup and clear db"
17
- - "Give me the spikes in throughput during the last 7 days"
15
+ The Upstash MCP server works with any MCP-compatible client. If your client isn't listed below, check its documentation for how to add a stdio MCP server, then point it at the base command:
18
16
 
19
- ### QStash & Workflow
17
+ ```bash
18
+ npx -y @upstash/mcp-server@latest --email YOUR_EMAIL --api-key YOUR_API_KEY
19
+ ```
20
20
 
21
- - "Check the logs and figure out what is wrong"
22
- - "Find me failed workflows of user @ysfk_0x"
23
- - "Restart the failed workflow run started in last 2 hours"
24
- - "Check DLQ and give me a summary"
21
+ > [!NOTE]
22
+ > Readonly API keys are supported. When the server starts with one, it automatically disables every tool that would modify state (creating databases, deleting backups, retrying workflows, etc.). Your agent can still read and query your account, but it cannot make changes.
25
23
 
26
- # Usage
24
+ <details>
25
+ <summary><b>Claude Code</b></summary>
26
+
27
+ Run this command in your terminal. See the [Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp) for more info.
28
+
29
+ ```sh
30
+ claude mcp add --scope user upstash -- npx -y @upstash/mcp-server@latest --email YOUR_EMAIL --api-key YOUR_API_KEY
31
+ ```
27
32
 
28
- ## Quick Setup
33
+ </details>
29
34
 
30
- First, get your Upstash credentials:
35
+ <details>
36
+ <summary><b>Cursor</b></summary>
31
37
 
32
- - **Email**: Your Upstash account email
33
- - **API Key**: Get it from [Upstash Console → Account → API Keys](https://console.upstash.com/account/api)
38
+ Go to `Settings` `Cursor Settings` → `MCP` → `Add new global MCP server`.
34
39
 
35
- Add this to your MCP client configuration:
40
+ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file is the recommended approach. You may also install in a specific project by creating `.cursor/mcp.json` in your project folder. See the [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) for more info.
41
+
42
+ Since Cursor 1.0, you can click the install button below for instant one-click installation. Replace `YOUR_EMAIL` and `YOUR_API_KEY` with your real values before confirming.
43
+
44
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=upstash&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB1cHN0YXNoL21jcC1zZXJ2ZXJAbGF0ZXN0IiwiLS1lbWFpbCIsIllPVVJfRU1BSUwiLCItLWFwaS1rZXkiLCJZT1VSX0FQSV9LRVkiXX0%3D)
36
45
 
37
46
  ```json
38
47
  {
@@ -52,39 +61,300 @@ Add this to your MCP client configuration:
52
61
  }
53
62
  ```
54
63
 
55
- ### Claude Code
64
+ </details>
56
65
 
57
- ```bash
58
- claude mcp add --transport stdio upstash -- npx -y @upstash/mcp-server@latest --email YOUR_EMAIL --api-key YOUR_API_KEY
66
+ <details>
67
+ <summary><b>Windsurf</b></summary>
68
+
69
+ Add this to your Windsurf MCP config file at `~/.codeium/windsurf/mcp_config.json`. See the [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) for more info.
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "upstash": {
75
+ "command": "npx",
76
+ "args": [
77
+ "-y",
78
+ "@upstash/mcp-server@latest",
79
+ "--email",
80
+ "YOUR_EMAIL",
81
+ "--api-key",
82
+ "YOUR_API_KEY"
83
+ ]
84
+ }
85
+ }
86
+ }
59
87
  ```
60
88
 
61
- ### Streamable HTTP Transport (for web applications)
89
+ </details>
62
90
 
63
- Start your MCP server with the `http` transport:
91
+ <details>
92
+ <summary><b>OpenCode</b></summary>
64
93
 
65
- ```bash
66
- npx @upstash/mcp-server@latest --transport http --port 3000 --email YOUR_EMAIL --api-key YOUR_API_KEY
94
+ Add this to your OpenCode configuration file (`~/.config/opencode/opencode.json` or a project-level `opencode.json`). See the [OpenCode MCP docs](https://opencode.ai/docs/mcp-servers) for more info.
95
+
96
+ ```json
97
+ {
98
+ "mcp": {
99
+ "upstash": {
100
+ "type": "local",
101
+ "command": [
102
+ "npx",
103
+ "-y",
104
+ "@upstash/mcp-server@latest",
105
+ "--email",
106
+ "YOUR_EMAIL",
107
+ "--api-key",
108
+ "YOUR_API_KEY"
109
+ ],
110
+ "enabled": true
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ </details>
117
+
118
+ <details>
119
+ <summary><b>OpenAI Codex</b></summary>
120
+
121
+ See the [OpenAI Codex MCP docs](https://developers.openai.com/codex/mcp) for more info.
122
+
123
+ **Using the CLI**
124
+
125
+ ```sh
126
+ codex mcp add upstash -- npx -y @upstash/mcp-server@latest --email YOUR_EMAIL --api-key YOUR_API_KEY
127
+ ```
128
+
129
+ **Manual configuration**
130
+
131
+ Add this to your Codex config file (`~/.codex/config.toml` or `.codex/config.toml`):
132
+
133
+ ```toml
134
+ [mcp_servers.upstash]
135
+ command = "npx"
136
+ args = ["-y", "@upstash/mcp-server@latest", "--email", "YOUR_EMAIL", "--api-key", "YOUR_API_KEY"]
137
+ startup_timeout_sec = 20
67
138
  ```
68
139
 
69
- And configure your MCP client to use the HTTP transport:
140
+ > [!NOTE]
141
+ > If you see startup timeout errors, increase `startup_timeout_sec` to `40`.
142
+
143
+ </details>
144
+
145
+ <details>
146
+ <summary><b>VS Code</b></summary>
147
+
148
+ Click to install — VS Code will prompt for your email and API key (stored in its secret storage):
149
+
150
+ [<img alt="Install in VS Code" src="https://img.shields.io/badge/Install%20in%20VS%20Code-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white" />](https://insiders.vscode.dev/redirect/mcp/install?name=upstash&inputs=%5B%7B%22id%22%3A%22email%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Upstash%20email%22%7D%2C%7B%22id%22%3A%22apiKey%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Upstash%20API%20key%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40upstash%2Fmcp-server%40latest%22%2C%22--email%22%2C%22%24%7Binput%3Aemail%7D%22%2C%22--api-key%22%2C%22%24%7Binput%3AapiKey%7D%22%5D%7D)
151
+ [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/Install%20in%20VS%20Code%20Insiders-24bfa5?style=for-the-badge&logo=visualstudiocode&logoColor=white" />](https://insiders.vscode.dev/redirect/mcp/install?name=upstash&inputs=%5B%7B%22id%22%3A%22email%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Upstash%20email%22%7D%2C%7B%22id%22%3A%22apiKey%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Upstash%20API%20key%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40upstash%2Fmcp-server%40latest%22%2C%22--email%22%2C%22%24%7Binput%3Aemail%7D%22%2C%22--api-key%22%2C%22%24%7Binput%3AapiKey%7D%22%5D%7D&quality=insiders)
152
+
153
+ Or add this to `.vscode/mcp.json` (or your user `mcp.servers` setting). Using `inputs` with `promptString` means your API key is prompted once and kept in VS Code's secret storage instead of sitting in the config file. See the [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more info.
154
+
155
+ ```json
156
+ {
157
+ "inputs": [
158
+ { "type": "promptString", "id": "email", "description": "Upstash email" },
159
+ { "type": "promptString", "id": "apiKey", "description": "Upstash API key", "password": true }
160
+ ],
161
+ "servers": {
162
+ "upstash": {
163
+ "type": "stdio",
164
+ "command": "npx",
165
+ "args": [
166
+ "-y",
167
+ "@upstash/mcp-server@latest",
168
+ "--email",
169
+ "${input:email}",
170
+ "--api-key",
171
+ "${input:apiKey}"
172
+ ]
173
+ }
174
+ }
175
+ }
176
+ ```
177
+
178
+ </details>
179
+
180
+ <details>
181
+ <summary><b>Google Antigravity</b></summary>
182
+
183
+ Add this to your Antigravity MCP config. See the [Antigravity MCP docs](https://antigravity.google/docs/mcp) for more info.
70
184
 
71
185
  ```json
72
186
  {
73
187
  "mcpServers": {
74
188
  "upstash": {
75
- "url": "http://localhost:3000/mcp"
189
+ "command": "npx",
190
+ "args": [
191
+ "-y",
192
+ "@upstash/mcp-server@latest",
193
+ "--email",
194
+ "YOUR_EMAIL",
195
+ "--api-key",
196
+ "YOUR_API_KEY"
197
+ ]
76
198
  }
77
199
  }
78
200
  }
79
201
  ```
80
202
 
81
- ## Telemetry
203
+ </details>
204
+
205
+ <details>
206
+ <summary><b>Claude Desktop</b></summary>
82
207
 
83
- The server sends anonymous runtime/platform info to Upstash with each request. To opt out, add `--disable-telemetry` to your args.
208
+ Open Claude Desktop's developer settings and edit `claude_desktop_config.json`. See the [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) for more info.
84
209
 
85
- ## Troubleshooting
210
+ ```json
211
+ {
212
+ "mcpServers": {
213
+ "upstash": {
214
+ "command": "npx",
215
+ "args": [
216
+ "-y",
217
+ "@upstash/mcp-server@latest",
218
+ "--email",
219
+ "YOUR_EMAIL",
220
+ "--api-key",
221
+ "YOUR_API_KEY"
222
+ ]
223
+ }
224
+ }
225
+ }
226
+ ```
227
+
228
+ </details>
229
+
230
+ <details>
231
+ <summary><b>Gemini CLI</b></summary>
232
+
233
+ Open the Gemini CLI settings file at `~/.gemini/settings.json` and add Upstash to `mcpServers`. See [Gemini CLI Configuration](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html) for details.
234
+
235
+ ```json
236
+ {
237
+ "mcpServers": {
238
+ "upstash": {
239
+ "command": "npx",
240
+ "args": [
241
+ "-y",
242
+ "@upstash/mcp-server@latest",
243
+ "--email",
244
+ "YOUR_EMAIL",
245
+ "--api-key",
246
+ "YOUR_API_KEY"
247
+ ]
248
+ }
249
+ }
250
+ }
251
+ ```
252
+
253
+ </details>
254
+
255
+ ## Example prompts
256
+
257
+ ### Redis
258
+
259
+ - _"Create a new Redis database in us-east-1"_
260
+ - _"List my databases sorted by memory usage"_
261
+ - _"Update the user schema by pulling from Redis"_
262
+ - _"Create a backup of this db, then clear it"_
263
+ - _"Show me throughput spikes during the last 7 days"_
264
+
265
+ ### QStash & Workflow
266
+
267
+ - _"Check the QStash logs and figure out why my webhook keeps failing"_
268
+ - _"Find failed workflow runs for user `@admin` today"_
269
+ - _"Retry the failed workflow run that started 2 hours ago"_
270
+ - _"Summarize what's in the DLQ right now, grouped by error type"_
271
+ - _"Pause the schedules that are throwing errors"_
272
+
273
+ ### Upstash Box
274
+
275
+ - _"Spin up a Box, clone this repo, and run the tests"_
276
+ - _"Snapshot this Box and create 5 copies from it, assign each one a GitHub issue"_
277
+ - _"My Box keeps failing to start, check the logs and tell me what's wrong"_
278
+
279
+ ## Upstash Box API key (optional)
280
+
281
+ For the MCP to interact with [Upstash Box](https://upstash.com/docs/box/overall/quickstart), the agent needs your Box API key. By default you have to paste it into the chat (or keep it in a `.env`) every time the agent runs a Box tool. To avoid this, you can wire the key into the MCP setup itself so the server picks it up automatically on startup.
282
+
283
+ You can pass it in two ways.
284
+
285
+ **CLI flag**
286
+
287
+ ```json
288
+ {
289
+ "mcpServers": {
290
+ "upstash": {
291
+ "command": "npx",
292
+ "args": [
293
+ "-y",
294
+ "@upstash/mcp-server@latest",
295
+ "--email",
296
+ "YOUR_EMAIL",
297
+ "--api-key",
298
+ "YOUR_API_KEY",
299
+ "--box-api-key",
300
+ "YOUR_BOX_API_KEY"
301
+ ]
302
+ }
303
+ }
304
+ }
305
+ ```
306
+
307
+ **Environment variable**
308
+
309
+ ```json
310
+ {
311
+ "mcpServers": {
312
+ "upstash": {
313
+ "command": "npx",
314
+ "args": [
315
+ "-y",
316
+ "@upstash/mcp-server@latest",
317
+ "--email",
318
+ "YOUR_EMAIL",
319
+ "--api-key",
320
+ "YOUR_API_KEY"
321
+ ],
322
+ "env": {
323
+ "UPSTASH_BOX_API_KEY": "YOUR_BOX_API_KEY"
324
+ }
325
+ }
326
+ }
327
+ }
328
+ ```
329
+
330
+ ## Debugging
331
+
332
+ If the server is misbehaving or a tool keeps failing, enable verbose logging with the `--debug` flag:
333
+
334
+ ```json
335
+ {
336
+ "mcpServers": {
337
+ "upstash": {
338
+ "command": "npx",
339
+ "args": [
340
+ "-y",
341
+ "@upstash/mcp-server@latest",
342
+ "--email",
343
+ "YOUR_EMAIL",
344
+ "--api-key",
345
+ "YOUR_API_KEY",
346
+ "--debug"
347
+ ]
348
+ }
349
+ }
350
+ }
351
+ ```
352
+
353
+ Every internal event is then written to **stderr**, which your MCP client surfaces in its own log viewer. Share the relevant snippet when reporting an issue on [GitHub](https://github.com/upstash/mcp/issues).
354
+
355
+ ## Telemetry
86
356
 
87
- See the [troubleshooting guide](https://modelcontextprotocol.io/quickstart#troubleshooting) in the official MCP documentation. You can also reach out to us at [Discord](https://discord.com/invite/w9SenAtbme) for support.
357
+ The server sends anonymous diagnostic info to Upstash with each request: the MCP server SDK version, your runtime version (Node, Bun, etc.), and basic platform info (OS and architecture). **No account data, tool arguments, or results are collected.** To opt out, add `--disable-telemetry` to the args.
88
358
 
89
359
  ## Development
90
360
 
@@ -95,22 +365,24 @@ bun i
95
365
  bun run watch
96
366
  ```
97
367
 
98
- This will continuously build the project and watch for changes.
368
+ This continuously builds the project and watches for changes.
99
369
 
100
- For testing, you can create a `.env` file in the same directory as the project with the following content:
370
+ For testing, create a `.env` file in the project root:
101
371
 
102
372
  ```bash
103
373
  UPSTASH_EMAIL=<UPSTASH_EMAIL>
104
374
  UPSTASH_API_KEY=<UPSTASH_API_KEY>
375
+ # Optional, for Box tools:
376
+ UPSTASH_BOX_API_KEY=<UPSTASH_BOX_API_KEY>
105
377
  ```
106
378
 
107
- To install the local MCP Server to Claude Code, run:
379
+ To install the local MCP server into Claude Code:
108
380
 
109
381
  ```bash
110
382
  claude mcp add --transport stdio upstash -- bun --watch dist/index.js --debug
111
383
  ```
112
384
 
113
- To view the logs from the MCP Server in real time, run:
385
+ To tail logs from the MCP server in real time:
114
386
 
115
387
  ```bash
116
388
  bun run logs