@upstash/context7-mcp 1.0.14 → 1.0.16

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,8 +1,10 @@
1
1
  # Context7 MCP - Up-to-date Code Docs For Any Prompt
2
2
 
3
- [![Website](https://img.shields.io/badge/Website-context7.com-blue)](https://context7.com) [![smithery badge](https://smithery.ai/badge/@upstash/context7-mcp)](https://smithery.ai/server/@upstash/context7-mcp) [<img alt="Install in VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Context7%20MCP&color=0098FF">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%7B%22name%22%3A%22context7%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40upstash%2Fcontext7-mcp%40latest%22%5D%7D)
3
+ [![Website](https://img.shields.io/badge/Website-context7.com-blue)](https://context7.com) [![smithery badge](https://smithery.ai/badge/@upstash/context7-mcp)](https://smithery.ai/server/@upstash/context7-mcp)
4
4
 
5
- [![繁體中文](https://img.shields.io/badge/docs-繁體中文-yellow)](./docs/README.zh-TW.md) [![簡體中文](https://img.shields.io/badge/docs-簡體中文-yellow)](./docs/README.zh-CN.md) [![한국어 문서](https://img.shields.io/badge/docs-한국어-green)](./docs/README.ko.md) [![Documentación en Español](https://img.shields.io/badge/docs-Español-orange)](./docs/README.es.md) [![Documentation en Français](https://img.shields.io/badge/docs-Français-blue)](./docs/README.fr.md) [![Documentação em Português (Brasil)](<https://img.shields.io/badge/docs-Português%20(Brasil)-purple>)](./docs/README.pt-BR.md) [![Documentazione in italiano](https://img.shields.io/badge/docs-Italian-red)](./docs/README.it.md) [![Dokumentasi Bahasa Indonesia](https://img.shields.io/badge/docs-Bahasa%20Indonesia-pink)](./docs/README.id-ID.md) [![Dokumentation auf Deutsch](https://img.shields.io/badge/docs-Deutsch-darkgreen)](./docs/README.de.md) [![Документация на русском языке](https://img.shields.io/badge/docs-Русский-darkblue)](./docs/README.ru.md) [![Türkçe Doküman](https://img.shields.io/badge/docs-Türkçe-blue)](./docs/README.tr.md) [![Arabic Documentation](https://img.shields.io/badge/docs-Arabic-white)](./docs/README.ar.md)
5
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D) [<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%22context7%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40upstash%2Fcontext7-mcp%40latest%22%5D%7D)
6
+
7
+ [![繁體中文](https://img.shields.io/badge/docs-繁體中文-yellow)](./docs/README.zh-TW.md) [![简体中文](https://img.shields.io/badge/docs-简体中文-yellow)](./docs/README.zh-CN.md) [![日本語](https://img.shields.io/badge/docs-日本語-b7003a)](./docs/README.ja.md) [![한국어 문서](https://img.shields.io/badge/docs-한국어-green)](./docs/README.ko.md) [![Documentación en Español](https://img.shields.io/badge/docs-Español-orange)](./docs/README.es.md) [![Documentation en Français](https://img.shields.io/badge/docs-Français-blue)](./docs/README.fr.md) [![Documentação em Português (Brasil)](<https://img.shields.io/badge/docs-Português%20(Brasil)-purple>)](./docs/README.pt-BR.md) [![Documentazione in italiano](https://img.shields.io/badge/docs-Italian-red)](./docs/README.it.md) [![Dokumentasi Bahasa Indonesia](https://img.shields.io/badge/docs-Bahasa%20Indonesia-pink)](./docs/README.id-ID.md) [![Dokumentation auf Deutsch](https://img.shields.io/badge/docs-Deutsch-darkgreen)](./docs/README.de.md) [![Документация на русском языке](https://img.shields.io/badge/docs-Русский-darkblue)](./docs/README.ru.md) [![Українська документація](https://img.shields.io/badge/docs-Українська-lightblue)](./docs/README.uk.md) [![Türkçe Doküman](https://img.shields.io/badge/docs-Türkçe-blue)](./docs/README.tr.md) [![Arabic Documentation](https://img.shields.io/badge/docs-Arabic-white)](./docs/README.ar.md) [![Tiếng Việt](https://img.shields.io/badge/docs-Tiếng%20Việt-red)](./docs/README.vi.md)
6
8
 
7
9
  ## ❌ Without Context7
8
10
 
@@ -19,11 +21,11 @@ Context7 MCP pulls up-to-date, version-specific documentation and code examples
19
21
  Add `use context7` to your prompt in Cursor:
20
22
 
21
23
  ```txt
22
- Create a basic Next.js project with app router. use context7
24
+ Create a Next.js middleware that checks for a valid JWT in cookies and redirects unauthenticated users to `/login`. use context7
23
25
  ```
24
26
 
25
27
  ```txt
26
- Create a script to delete the rows where the city is "" given PostgreSQL credentials. use context7
28
+ Configure a Cloudflare Worker script to cache JSON API responses for five minutes. use context7
27
29
  ```
28
30
 
29
31
  Context7 fetches up-to-date code examples and documentation right into your LLM's context.
@@ -43,7 +45,8 @@ Check out our [project addition guide](./docs/adding-projects.md) to learn how t
43
45
  ### Requirements
44
46
 
45
47
  - Node.js >= v18.0.0
46
- - Cursor, Windsurf, Claude Desktop or another MCP Client
48
+ - Cursor, Claude Code, VSCode, Windsurf or another MCP Client
49
+ - Context7 API Key (Optional for higher rate limits) (Get yours by creating an account at [context7.com/dashboard](https://context7.com/dashboard))
47
50
 
48
51
  <details>
49
52
  <summary><b>Installing via Smithery</b></summary>
@@ -69,13 +72,16 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i
69
72
 
70
73
  #### Cursor Remote Server Connection
71
74
 
72
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D)
75
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D)
73
76
 
74
77
  ```json
75
78
  {
76
79
  "mcpServers": {
77
80
  "context7": {
78
- "url": "https://mcp.context7.com/mcp"
81
+ "url": "https://mcp.context7.com/mcp",
82
+ "headers": {
83
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
84
+ }
79
85
  }
80
86
  }
81
87
  }
@@ -83,61 +89,50 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i
83
89
 
84
90
  #### Cursor Local Server Connection
85
91
 
86
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IC15IEB1cHN0YXNoL2NvbnRleHQ3LW1jcCJ9)
92
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IC15IEB1cHN0YXNoL2NvbnRleHQ3LW1jcCJ9)
87
93
 
88
94
  ```json
89
95
  {
90
96
  "mcpServers": {
91
97
  "context7": {
92
98
  "command": "npx",
93
- "args": ["-y", "@upstash/context7-mcp"]
99
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
94
100
  }
95
101
  }
96
102
  }
97
103
  ```
98
104
 
105
+ </details>
106
+
99
107
  <details>
100
- <summary>Alternative: Use Bun</summary>
108
+ <summary><b>Install in Claude Code</b></summary>
101
109
 
102
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=context7&config=eyJjb21tYW5kIjoiYnVueCAteSBAdXBzdGFzaC9jb250ZXh0Ny1tY3AifQ%3D%3D)
110
+ Run this command. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/tutorials#set-up-model-context-protocol-mcp) for more info.
103
111
 
104
- ```json
105
- {
106
- "mcpServers": {
107
- "context7": {
108
- "command": "bunx",
109
- "args": ["-y", "@upstash/context7-mcp"]
110
- }
111
- }
112
- }
112
+ #### Claude Code Remote Server Connection
113
+
114
+ ```sh
115
+ claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: YOUR_API_KEY"
113
116
  ```
114
117
 
115
- </details>
118
+ Or using SSE transport:
116
119
 
117
- <details>
118
- <summary>Alternative: Use Deno</summary>
120
+ ```sh
121
+ claude mcp add --transport sse context7 https://mcp.context7.com/sse --header "CONTEXT7_API_KEY: YOUR_API_KEY"
122
+ ```
119
123
 
120
- [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=context7&config=eyJjb21tYW5kIjoiZGVubyBydW4gLS1hbGxvdy1lbnYgLS1hbGxvdy1uZXQgbnBtOkB1cHN0YXNoL2NvbnRleHQ3LW1jcCJ9)
124
+ #### Claude Code Local Server Connection
121
125
 
122
- ```json
123
- {
124
- "mcpServers": {
125
- "context7": {
126
- "command": "deno",
127
- "args": ["run", "--allow-env", "--allow-net", "npm:@upstash/context7-mcp"]
128
- }
129
- }
130
- }
126
+ ```sh
127
+ claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
131
128
  ```
132
129
 
133
130
  </details>
134
131
 
135
- </details>
136
-
137
132
  <details>
138
133
  <summary><b>Install in Windsurf</b></summary>
139
134
 
140
- Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.windsurf.com/windsurf/mcp) for more info.
135
+ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.windsurf.com/windsurf/cascade/mcp) for more info.
141
136
 
142
137
  #### Windsurf Remote Server Connection
143
138
 
@@ -145,7 +140,10 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.
145
140
  {
146
141
  "mcpServers": {
147
142
  "context7": {
148
- "serverUrl": "https://mcp.context7.com/sse"
143
+ "serverUrl": "https://mcp.context7.com/mcp",
144
+ "headers": {
145
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
146
+ }
149
147
  }
150
148
  }
151
149
  }
@@ -158,7 +156,7 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.
158
156
  "mcpServers": {
159
157
  "context7": {
160
158
  "command": "npx",
161
- "args": ["-y", "@upstash/context7-mcp"]
159
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
162
160
  }
163
161
  }
164
162
  }
@@ -181,7 +179,10 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
181
179
  "servers": {
182
180
  "context7": {
183
181
  "type": "http",
184
- "url": "https://mcp.context7.com/mcp"
182
+ "url": "https://mcp.context7.com/mcp",
183
+ "headers": {
184
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
185
+ }
185
186
  }
186
187
  }
187
188
  }
@@ -195,7 +196,7 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
195
196
  "context7": {
196
197
  "type": "stdio",
197
198
  "command": "npx",
198
- "args": ["-y", "@upstash/context7-mcp"]
199
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
199
200
  }
200
201
  }
201
202
  }
@@ -204,19 +205,135 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
204
205
  </details>
205
206
 
206
207
  <details>
207
- <summary><b>Install in Visual Studio 2022</b></summary>
208
+ <summary>
209
+ <b>Install in Cline</b>
210
+ </summary>
208
211
 
209
- You can configure Context7 MCP in Visual Studio 2022 by following the [Visual Studio MCP Servers documentation](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).
212
+ You can easily install Context7 through the [Cline MCP Server Marketplace](https://cline.bot/mcp-marketplace) by following these instructions:
210
213
 
211
- Add this to your Visual Studio MCP config file (see the [Visual Studio docs](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022) for details):
214
+ 1. Open **Cline**.
215
+ 2. Click the hamburger menu icon (☰) to enter the **MCP Servers** section.
216
+ 3. Use the search bar within the **Marketplace** tab to find _Context7_.
217
+ 4. Click the **Install** button.
218
+
219
+ </details>
220
+
221
+ <details>
222
+ <summary><b>Install in Zed</b></summary>
223
+
224
+ It can be installed via [Zed Extensions](https://zed.dev/extensions?query=Context7) or you can add this to your Zed `settings.json`. See [Zed Context Server docs](https://zed.dev/docs/assistant/context-servers) for more info.
212
225
 
213
226
  ```json
214
227
  {
215
- "mcp": {
216
- "servers": {
217
- "context7": {
218
- "type": "http",
219
- "url": "https://mcp.context7.com/mcp"
228
+ "context_servers": {
229
+ "Context7": {
230
+ "command": {
231
+ "path": "npx",
232
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
233
+ },
234
+ "settings": {}
235
+ }
236
+ }
237
+ }
238
+ ```
239
+
240
+ </details>
241
+
242
+ <details>
243
+ <summary><b>Install in Augment Code</b></summary>
244
+
245
+ To configure Context7 MCP in Augment Code, you can use either the graphical interface or manual configuration.
246
+
247
+ ### **A. Using the Augment Code UI**
248
+
249
+ 1. Click the hamburger menu.
250
+ 2. Select **Settings**.
251
+ 3. Navigate to the **Tools** section.
252
+ 4. Click the **+ Add MCP** button.
253
+ 5. Enter the following command:
254
+
255
+ ```
256
+ npx -y @upstash/context7-mcp@latest
257
+ ```
258
+
259
+ 6. Name the MCP: **Context7**.
260
+ 7. Click the **Add** button.
261
+
262
+ Once the MCP server is added, you can start using Context7's up-to-date code documentation features directly within Augment Code.
263
+
264
+ ---
265
+
266
+ ### **B. Manual Configuration**
267
+
268
+ 1. Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
269
+ 2. Select Edit Settings
270
+ 3. Under Advanced, click Edit in settings.json
271
+ 4. Add the server configuration to the `mcpServers` array in the `augment.advanced` object
272
+
273
+ ```json
274
+ "augment.advanced": {
275
+ "mcpServers": [
276
+ {
277
+ "name": "context7",
278
+ "command": "npx",
279
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
280
+ }
281
+ ]
282
+ }
283
+ ```
284
+
285
+ Once the MCP server is added, restart your editor. If you receive any errors, check the syntax to make sure closing brackets or commas are not missing.
286
+
287
+ </details>
288
+
289
+ <details>
290
+ <summary><b>Install in Roo Code</b></summary>
291
+
292
+ Add this to your Roo Code MCP configuration file. See [Roo Code MCP docs](https://docs.roocode.com/features/mcp/using-mcp-in-roo) for more info.
293
+
294
+ #### Roo Code Remote Server Connection
295
+
296
+ ```json
297
+ {
298
+ "mcpServers": {
299
+ "context7": {
300
+ "type": "streamable-http",
301
+ "url": "https://mcp.context7.com/mcp"
302
+ }
303
+ }
304
+ }
305
+ ```
306
+
307
+ #### Roo Code Local Server Connection
308
+
309
+ ```json
310
+ {
311
+ "mcpServers": {
312
+ "context7": {
313
+ "command": "npx",
314
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
315
+ }
316
+ }
317
+ }
318
+ ```
319
+
320
+ </details>
321
+
322
+ <details>
323
+ <summary><b>Install in Gemini CLI</b></summary>
324
+
325
+ See [Gemini CLI Configuration](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html) for details.
326
+
327
+ 1. Open the Gemini CLI settings file. The location is `~/.gemini/settings.json` (where `~` is your home directory).
328
+ 2. Add the following to the `mcpServers` object in your `settings.json` file:
329
+
330
+ ```json
331
+ {
332
+ "mcpServers": {
333
+ "context7": {
334
+ "httpUrl": "https://mcp.context7.com/mcp",
335
+ "headers": {
336
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
220
337
  }
221
338
  }
222
339
  }
@@ -227,35 +344,36 @@ Or, for a local server:
227
344
 
228
345
  ```json
229
346
  {
230
- "mcp": {
231
- "servers": {
232
- "context7": {
233
- "type": "stdio",
234
- "command": "npx",
235
- "args": ["-y", "@upstash/context7-mcp"]
236
- }
347
+ "mcpServers": {
348
+ "context7": {
349
+ "command": "npx",
350
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
237
351
  }
238
352
  }
239
353
  }
240
354
  ```
241
355
 
242
- For more information and troubleshooting, refer to the [Visual Studio MCP Servers documentation](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).
356
+ If the `mcpServers` object does not exist, create it.
357
+
243
358
  </details>
244
359
 
245
360
  <details>
246
- <summary><b>Install in Zed</b></summary>
361
+ <summary><b>Install in Claude Desktop</b></summary>
247
362
 
248
- It can be installed via [Zed Extensions](https://zed.dev/extensions?query=Context7) or you can add this to your Zed `settings.json`. See [Zed Context Server docs](https://zed.dev/docs/assistant/context-servers) for more info.
363
+ #### Remote Server Connection
364
+
365
+ Open Claude Desktop and navigate to Settings > Connectors > Add Custom Connector. Enter the name as `Context7` and the remote MCP server URL as `https://mcp.context7.com/mcp`.
366
+
367
+ #### Local Server Connection
368
+
369
+ Open Claude Desktop developer settings and edit your `claude_desktop_config.json` file to add the following configuration. See [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) for more info.
249
370
 
250
371
  ```json
251
372
  {
252
- "context_servers": {
253
- "Context7": {
254
- "command": {
255
- "path": "npx",
256
- "args": ["-y", "@upstash/context7-mcp"]
257
- },
258
- "settings": {}
373
+ "mcpServers": {
374
+ "context7": {
375
+ "command": "npx",
376
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
259
377
  }
260
378
  }
261
379
  }
@@ -264,59 +382,177 @@ It can be installed via [Zed Extensions](https://zed.dev/extensions?query=Contex
264
382
  </details>
265
383
 
266
384
  <details>
267
- <summary><b>Install in Claude Code</b></summary>
385
+ <summary><b>Install in Opencode</b></summary>
268
386
 
269
- Run this command. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/tutorials#set-up-model-context-protocol-mcp) for more info.
387
+ Add this to your Opencode configuration file. See [Opencode MCP docs](https://opencode.ai/docs/mcp-servers) docs for more info.
270
388
 
271
- #### Claude Code Remote Server Connection
389
+ #### Opencode Remote Server Connection
272
390
 
273
- ```sh
274
- claude mcp add --transport sse context7 https://mcp.context7.com/sse
391
+ ```json
392
+ "mcp": {
393
+ "context7": {
394
+ "type": "remote",
395
+ "url": "https://mcp.context7.com/mcp",
396
+ "headers": {
397
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
398
+ },
399
+ "enabled": true
400
+ }
401
+ }
275
402
  ```
276
403
 
277
- #### Claude Code Local Server Connection
404
+ #### Opencode Local Server Connection
278
405
 
279
- ```sh
280
- claude mcp add context7 -- npx -y @upstash/context7-mcp
406
+ ```json
407
+ {
408
+ "mcp": {
409
+ "context7": {
410
+ "type": "local",
411
+ "command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
412
+ "enabled": true
413
+ }
414
+ }
415
+ }
416
+ ```
417
+
418
+ </details>
419
+ <details>
420
+ <summary><b>Install in OpenAI Codex</b></summary>
421
+
422
+ See [OpenAI Codex](https://github.com/openai/codex) for more information.
423
+
424
+ Add the following configuration to your OpenAI Codex MCP server settings:
425
+
426
+ ```toml
427
+ [mcp_servers.context7]
428
+ args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
429
+ command = "npx"
281
430
  ```
282
431
 
283
432
  </details>
284
433
 
285
434
  <details>
286
- <summary><b>Install in Claude Desktop</b></summary>
435
+ <summary><b>Install in JetBrains AI Assistant</b></summary>
436
+
437
+ See [JetBrains AI Assistant Documentation](https://www.jetbrains.com/help/ai-assistant/configure-an-mcp-server.html) for more details.
438
+
439
+ 1. In JetBrains IDEs go to `Settings` -> `Tools` -> `AI Assistant` -> `Model Context Protocol (MCP)`
440
+ 2. Click `+ Add`.
441
+ 3. Click on `Command` in the top-left corner of the dialog and select the As JSON option from the list
442
+ 4. Add this configuration and click `OK`
443
+
444
+ ```json
445
+ {
446
+ "mcpServers": {
447
+ "context7": {
448
+ "command": "npx",
449
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
450
+ }
451
+ }
452
+ }
453
+ ```
454
+
455
+ 5. Click `Apply` to save changes.
456
+ 6. The same way context7 could be added for JetBrains Junie in `Settings` -> `Tools` -> `Junie` -> `MCP Settings`
457
+
458
+ </details>
459
+
460
+ <details>
461
+
462
+ <summary><b>Install in Kiro</b></summary>
287
463
 
288
- Add this to your Claude Desktop `claude_desktop_config.json` file. See [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) for more info.
464
+ See [Kiro Model Context Protocol Documentation](https://kiro.dev/docs/mcp/configuration/) for details.
465
+
466
+ 1. Navigate `Kiro` > `MCP Servers`
467
+ 2. Add a new MCP server by clicking the `+ Add` button.
468
+ 3. Paste the configuration given below:
289
469
 
290
470
  ```json
291
471
  {
292
472
  "mcpServers": {
293
473
  "Context7": {
294
474
  "command": "npx",
295
- "args": ["-y", "@upstash/context7-mcp"]
475
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
476
+ "env": {},
477
+ "disabled": false,
478
+ "autoApprove": []
296
479
  }
297
480
  }
298
481
  }
299
482
  ```
300
483
 
484
+ 4. Click `Save` to apply the changes.
485
+
301
486
  </details>
302
487
 
303
488
  <details>
304
- <summary><b>Install in BoltAI</b></summary>
489
+ <summary><b>Install in Trae</b></summary>
305
490
 
306
- Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:
491
+ Use the Add manually feature and fill in the JSON configuration information for that MCP server.
492
+ For more details, visit the [Trae documentation](https://docs.trae.ai/ide/model-context-protocol?_lang=en).
493
+
494
+ #### Trae Remote Server Connection
495
+
496
+ ```json
497
+ {
498
+ "mcpServers": {
499
+ "context7": {
500
+ "url": "https://mcp.context7.com/mcp"
501
+ }
502
+ }
503
+ }
504
+ ```
505
+
506
+ #### Trae Local Server Connection
307
507
 
308
508
  ```json
309
509
  {
310
510
  "mcpServers": {
311
511
  "context7": {
312
512
  "command": "npx",
313
- "args": ["-y", "@upstash/context7-mcp"]
513
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
314
514
  }
315
515
  }
316
516
  }
317
517
  ```
318
518
 
319
- Once saved, enter in the chat `get-library-docs` followed by your Context7 documentation ID (e.g., `get-library-docs /nuxt/ui`). More information is available on [BoltAI's Documentation site](https://docs.boltai.com/docs/plugins/mcp-servers). For BoltAI on iOS, [see this guide](https://docs.boltai.com/docs/boltai-mobile/mcp-servers).
519
+ </details>
520
+
521
+ <details>
522
+ <summary><b>Using Bun or Deno</b></summary>
523
+
524
+ Use these alternatives to run the local Context7 MCP server with other runtimes. These examples work for any client that supports launching a local MCP server via command + args.
525
+
526
+ #### Bun
527
+
528
+ ```json
529
+ {
530
+ "mcpServers": {
531
+ "context7": {
532
+ "command": "bunx",
533
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
534
+ }
535
+ }
536
+ }
537
+ ```
538
+
539
+ #### Deno
540
+
541
+ ```json
542
+ {
543
+ "mcpServers": {
544
+ "context7": {
545
+ "command": "deno",
546
+ "args": [
547
+ "run",
548
+ "--allow-env=NO_DEPRECATION,TRACE_DEPRECATION",
549
+ "--allow-net",
550
+ "npm:@upstash/context7-mcp"
551
+ ]
552
+ }
553
+ }
554
+ }
555
+ ```
320
556
 
321
557
  </details>
322
558
 
@@ -380,6 +616,13 @@ If you prefer to run the MCP server in a Docker container:
380
616
 
381
617
  </details>
382
618
 
619
+ <details>
620
+ <summary><b>Install Using the Desktop Extension</b></summary>
621
+
622
+ Install the [context7.dxt](dxt/context7.dxt) file under the dxt folder and add it to your client. For more information please check out [the desktop extensions docs](https://github.com/anthropics/dxt#desktop-extensions-dxt).
623
+
624
+ </details>
625
+
383
626
  <details>
384
627
  <summary><b>Install in Windows</b></summary>
385
628
 
@@ -390,7 +633,7 @@ The configuration on Windows is slightly different compared to Linux or macOS (_
390
633
  "mcpServers": {
391
634
  "github.com/upstash/context7-mcp": {
392
635
  "command": "cmd",
393
- "args": ["/c", "npx", "-y", "@upstash/context7-mcp@latest"],
636
+ "args": ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
394
637
  "disabled": false,
395
638
  "autoApprove": []
396
639
  }
@@ -401,57 +644,254 @@ The configuration on Windows is slightly different compared to Linux or macOS (_
401
644
  </details>
402
645
 
403
646
  <details>
404
- <summary><b>Install in Augment Code</b></summary>
647
+ <summary><b>Install in Amazon Q Developer CLI</b></summary>
405
648
 
406
- To configure Context7 MCP in Augment Code, follow these steps:
649
+ Add this to your Amazon Q Developer CLI configuration file. See [Amazon Q Developer CLI docs](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html) for more details.
407
650
 
408
- 1. Press Cmd/Ctrl Shift P or go to the hamburger menu in the Augment panel
409
- 2. Select Edit Settings
410
- 3. Under Advanced, click Edit in settings.json
411
- 4. Add the server configuration to the `mcpServers` array in the `augment.advanced` object
651
+ ```json
652
+ {
653
+ "mcpServers": {
654
+ "context7": {
655
+ "command": "npx",
656
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
657
+ }
658
+ }
659
+ }
660
+ ```
661
+
662
+ </details>
663
+
664
+ <details>
665
+ <summary><b>Install in Warp</b></summary>
666
+
667
+ See [Warp Model Context Protocol Documentation](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server) for details.
668
+
669
+ 1. Navigate `Settings` > `AI` > `Manage MCP servers`.
670
+ 2. Add a new MCP server by clicking the `+ Add` button.
671
+ 3. Paste the configuration given below:
412
672
 
413
673
  ```json
414
- "augment.advanced": {
415
- "mcpServers": [
416
- {
417
- "name": "context7",
418
- "command": "npx",
419
- "args": ["-y", "@upstash/context7-mcp"]
420
- }
421
- ]
674
+ {
675
+ "Context7": {
676
+ "command": "npx",
677
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
678
+ "env": {},
679
+ "working_directory": null,
680
+ "start_on_launch": true
681
+ }
422
682
  }
423
683
  ```
424
684
 
425
- Once the MCP server is added, restart your editor. If you receive any errors, check the syntax to make sure closing brackets or commas are not missing.
685
+ 4. Click `Save` to apply the changes.
426
686
 
427
687
  </details>
428
688
 
429
689
  <details>
430
- <summary><b>Install in Roo Code</b></summary>
431
690
 
432
- Add this to your Roo Code MCP configuration file. See [Roo Code MCP docs](https://docs.roocode.com/features/mcp/using-mcp-in-roo) for more info.
691
+ <summary><b>Install in Copilot Coding Agent</b></summary>
433
692
 
434
- #### Roo Code Remote Server Connection
693
+ ## Using Context7 with Copilot Coding Agent
694
+
695
+ Add the following configuration to the `mcp` section of your Copilot Coding Agent configuration file Repository->Settings->Copilot->Coding agent->MCP configuration:
696
+
697
+ ```json
698
+ {
699
+ "mcpServers": {
700
+ "context7": {
701
+ "type": "http",
702
+ "url": "https://mcp.context7.com/mcp",
703
+ "headers": {
704
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
705
+ },
706
+ "tools": ["get-library-docs", "resolve-library-id"]
707
+ }
708
+ }
709
+ }
710
+ ```
711
+
712
+ For more information, see the [official GitHub documentation](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp).
713
+
714
+ </details>
715
+
716
+ <details>
717
+ <summary><b>Install in LM Studio</b></summary>
718
+
719
+ See [LM Studio MCP Support](https://lmstudio.ai/blog/lmstudio-v0.3.17) for more information.
720
+
721
+ #### One-click install:
722
+
723
+ [![Add MCP Server context7 to LM Studio](https://files.lmstudio.ai/deeplink/mcp-install-light.svg)](https://lmstudio.ai/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB1cHN0YXNoL2NvbnRleHQ3LW1jcCJdfQ%3D%3D)
724
+
725
+ #### Manual set-up:
726
+
727
+ 1. Navigate to `Program` (right side) > `Install` > `Edit mcp.json`.
728
+ 2. Paste the configuration given below:
729
+
730
+ ```json
731
+ {
732
+ "mcpServers": {
733
+ "Context7": {
734
+ "command": "npx",
735
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
736
+ }
737
+ }
738
+ }
739
+ ```
740
+
741
+ 3. Click `Save` to apply the changes.
742
+ 4. Toggle the MCP server on/off from the right hand side, under `Program`, or by clicking the plug icon at the bottom of the chat box.
743
+
744
+ </details>
745
+
746
+ <details>
747
+ <summary><b>Install in Visual Studio 2022</b></summary>
748
+
749
+ You can configure Context7 MCP in Visual Studio 2022 by following the [Visual Studio MCP Servers documentation](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).
750
+
751
+ Add this to your Visual Studio MCP config file (see the [Visual Studio docs](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022) for details):
752
+
753
+ ```json
754
+ {
755
+ "inputs": [],
756
+ "servers": {
757
+ "context7": {
758
+ "type": "sse",
759
+ "url": "https://mcp.context7.com/mcp",
760
+ "headers": {
761
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
762
+ }
763
+ }
764
+ }
765
+ }
766
+ ```
767
+
768
+ Or, for a local server:
769
+
770
+ ```json
771
+ {
772
+ "mcp": {
773
+ "servers": {
774
+ "context7": {
775
+ "type": "stdio",
776
+ "command": "npx",
777
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
778
+ }
779
+ }
780
+ }
781
+ }
782
+ ```
783
+
784
+ For more information and troubleshooting, refer to the [Visual Studio MCP Servers documentation](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).
785
+
786
+ </details>
787
+
788
+ <details>
789
+ <summary><b>Install in Crush</b></summary>
790
+
791
+ Add this to your Crush configuration file. See [Crush MCP docs](https://github.com/charmbracelet/crush#mcps) for more info.
792
+
793
+ #### Crush Remote Server Connection (HTTP)
794
+
795
+ ```json
796
+ {
797
+ "$schema": "https://charm.land/crush.json",
798
+ "mcp": {
799
+ "context7": {
800
+ "type": "http",
801
+ "url": "https://mcp.context7.com/mcp",
802
+ "headers": {
803
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
804
+ }
805
+ }
806
+ }
807
+ }
808
+ ```
809
+
810
+ #### Crush Remote Server Connection (SSE)
811
+
812
+ ```json
813
+ {
814
+ "$schema": "https://charm.land/crush.json",
815
+ "mcp": {
816
+ "context7": {
817
+ "type": "sse",
818
+ "url": "https://mcp.context7.com/sse",
819
+ "headers": {
820
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
821
+ }
822
+ }
823
+ }
824
+ }
825
+ ```
826
+
827
+ #### Crush Local Server Connection
828
+
829
+ ```json
830
+ {
831
+ "$schema": "https://charm.land/crush.json",
832
+ "mcp": {
833
+ "context7": {
834
+ "type": "stdio",
835
+ "command": "npx",
836
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
837
+ }
838
+ }
839
+ }
840
+ ```
841
+
842
+ </details>
843
+
844
+ <details>
845
+ <summary><b>Install in BoltAI</b></summary>
846
+
847
+ Open the "Settings" page of the app, navigate to "Plugins," and enter the following JSON:
848
+
849
+ ```json
850
+ {
851
+ "mcpServers": {
852
+ "context7": {
853
+ "command": "npx",
854
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
855
+ }
856
+ }
857
+ }
858
+ ```
859
+
860
+ Once saved, enter in the chat `get-library-docs` followed by your Context7 documentation ID (e.g., `get-library-docs /nuxt/ui`). More information is available on [BoltAI's Documentation site](https://docs.boltai.com/docs/plugins/mcp-servers). For BoltAI on iOS, [see this guide](https://docs.boltai.com/docs/boltai-mobile/mcp-servers).
861
+
862
+ </details>
863
+
864
+ <details>
865
+ <summary><b>Install in Rovo Dev CLI</b></summary>
866
+
867
+ Edit your Rovo Dev CLI MCP config by running the command below -
868
+
869
+ ```bash
870
+ acli rovodev mcp
871
+ ```
872
+
873
+ Example config -
874
+
875
+ #### Remote Server Connection
435
876
 
436
877
  ```json
437
878
  {
438
879
  "mcpServers": {
439
880
  "context7": {
440
- "type": "streamable-http",
441
881
  "url": "https://mcp.context7.com/mcp"
442
882
  }
443
883
  }
444
884
  }
445
885
  ```
446
886
 
447
- #### Roo Code Local Server Connection
887
+ #### Local Server Connection
448
888
 
449
889
  ```json
450
890
  {
451
891
  "mcpServers": {
452
892
  "context7": {
453
893
  "command": "npx",
454
- "args": ["-y", "@upstash/context7-mcp"]
894
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
455
895
  }
456
896
  }
457
897
  }
@@ -471,11 +911,8 @@ To configure Context7 MCP in Zencoder, follow these steps:
471
911
 
472
912
  ```json
473
913
  {
474
- "command": "npx",
475
- "args": [
476
- "-y",
477
- "@upstash/context7-mcp@latest"
478
- ]
914
+ "command": "npx",
915
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
479
916
  }
480
917
  ```
481
918
 
@@ -484,20 +921,63 @@ Once the MCP server is added, you can easily continue using it.
484
921
  </details>
485
922
 
486
923
  <details>
487
- <summary><b>Install in Amazon Q Developer CLI</b></summary>
924
+ <summary><b>Install in Qodo Gen</b></summary>
488
925
 
489
- Add this to your Amazon Q Developer CLI configuration file. See [Amazon Q Developer CLI docs](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html) for more details.
926
+ See [Qodo Gen docs](https://docs.qodo.ai/qodo-documentation/qodo-gen/qodo-gen-chat/agentic-mode/agentic-tools-mcps) for more details.
927
+
928
+ 1. Open Qodo Gen chat panel in VSCode or IntelliJ.
929
+ 2. Click Connect more tools.
930
+ 3. Click + Add new MCP.
931
+ 4. Add the following configuration:
932
+
933
+ #### Qodo Gen Local Server Connection
490
934
 
491
935
  ```json
492
936
  {
493
937
  "mcpServers": {
494
938
  "context7": {
495
939
  "command": "npx",
496
- "args": ["-y", "@upstash/context7-mcp@latest"]
940
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
941
+ }
942
+ }
943
+ }
944
+ ```
945
+
946
+ #### Qodo Gen Remote Server Connection
947
+
948
+ ```json
949
+ {
950
+ "mcpServers": {
951
+ "context7": {
952
+ "url": "https://mcp.context7.com/mcp"
497
953
  }
498
954
  }
499
955
  }
500
956
  ```
957
+
958
+ </details>
959
+
960
+ <details>
961
+ <summary><b>Install in Perplexity Desktop</b></summary>
962
+
963
+ See [Local and Remote MCPs for Perplexity](https://www.perplexity.ai/help-center/en/articles/11502712-local-and-remote-mcps-for-perplexity) for more information.
964
+
965
+ 1. Navigate `Perplexity` > `Settings`
966
+ 2. Select `Connectors`.
967
+ 3. Click `Add Connector`.
968
+ 4. Select `Advanced`.
969
+ 5. Enter Server Name: `Context7`
970
+ 6. Paste the following JSON in the text area:
971
+
972
+ ```json
973
+ {
974
+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
975
+ "command": "npx",
976
+ "env": {}
977
+ }
978
+ ```
979
+
980
+ 7. Click `Save`.
501
981
  </details>
502
982
 
503
983
  ## 🔨 Available Tools
@@ -513,6 +993,34 @@ Context7 MCP provides the following tools that LLMs can use:
513
993
  - `topic` (optional): Focus the docs on a specific topic (e.g., "routing", "hooks")
514
994
  - `tokens` (optional, default 10000): Max number of tokens to return. Values less than the default value of 10000 are automatically increased to 10000.
515
995
 
996
+ ## 🛟 Tips
997
+
998
+ ### Add a Rule
999
+
1000
+ > If you don’t want to add `use context7` to every prompt, you can define a simple rule in your `.windsurfrules` file in Windsurf or from `Cursor Settings > Rules` section in Cursor (or the equivalent in your MCP client) to auto-invoke Context7 on any code question:
1001
+ >
1002
+ > ```toml
1003
+ > [[calls]]
1004
+ > match = "when the user requests code examples, setup or configuration steps, or library/API documentation"
1005
+ > tool = "context7"
1006
+ > ```
1007
+ >
1008
+ > From then on you’ll get Context7’s docs in any related conversation without typing anything extra. You can add your use cases to the match part.
1009
+
1010
+ ### Use Library Id
1011
+
1012
+ > If you already know exactly which library you want to use, add its Context7 ID to your prompt. That way, Context7 MCP server can skip the library-matching step and directly continue with retrieving docs.
1013
+ >
1014
+ > ```txt
1015
+ > implement basic authentication with supabase. use library /supabase/supabase for api and docs
1016
+ > ```
1017
+ >
1018
+ > The slash syntax tells the MCP tool exactly which library to load docs for.
1019
+
1020
+ ### HTTPS Proxy
1021
+
1022
+ For users behind a http proxy, context7 should honor the standard https_proxy/HTTPS_PROXY environment variables.
1023
+
516
1024
  ## 💻 Development
517
1025
 
518
1026
  Clone the project and install dependencies:
@@ -537,8 +1045,9 @@ bun run dist/index.js
537
1045
 
538
1046
  `context7-mcp` accepts the following CLI flags:
539
1047
 
540
- - `--transport <stdio|http|sse>` – Transport to use (`stdio` by default).
541
- - `--port <number>` – Port to listen on when using `http` or `sse` transport (default `3000`).
1048
+ - `--transport <stdio|http>` – Transport to use (`stdio` by default). Note that HTTP transport automatically provides both HTTP and SSE endpoints.
1049
+ - `--port <number>` – Port to listen on when using `http` transport (default `3000`).
1050
+ - `--api-key <key>` – API key for authentication. You can get your API key by creating an account at [context7.com/dashboard](https://context7.com/dashboard).
542
1051
 
543
1052
  Example with http transport and port 8080:
544
1053
 
@@ -546,6 +1055,12 @@ Example with http transport and port 8080:
546
1055
  bun run dist/index.js --transport http --port 8080
547
1056
  ```
548
1057
 
1058
+ Another example with stdio transport:
1059
+
1060
+ ```bash
1061
+ bun run dist/index.js --transport stdio --api-key YOUR_API_KEY
1062
+ ```
1063
+
549
1064
  <details>
550
1065
  <summary><b>Local Configuration Example</b></summary>
551
1066
 
@@ -554,7 +1069,7 @@ bun run dist/index.js --transport http --port 8080
554
1069
  "mcpServers": {
555
1070
  "context7": {
556
1071
  "command": "npx",
557
- "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"]
1072
+ "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts", "--api-key", "YOUR_API_KEY"]
558
1073
  }
559
1074
  }
560
1075
  }
@@ -647,7 +1162,7 @@ Context7 projects are community-contributed and while we strive to maintain high
647
1162
 
648
1163
  Stay updated and join our community:
649
1164
 
650
- - 📢 Follow us on [X](https://x.com/contextai) for the latest news and updates
1165
+ - 📢 Follow us on [X](https://x.com/context7ai) for the latest news and updates
651
1166
  - 🌐 Visit our [Website](https://context7.com)
652
1167
  - 💬 Join our [Discord Community](https://upstash.com/discord)
653
1168