You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "How to set up Context7 MCP in Visual Studio Code"
4
+
authors: ypechorkin
5
+
tags: [context7, MCP]
6
+
description: "Context7 MCP installation guide"
7
+
---
8
+
9
+
This guide shows how you can set up Context7 MCP in your Visual Studio Code IDE (VS Code)
10
+
<!-- truncate -->
11
+
12
+
### Preparation
13
+
14
+
First of all, you'll need to update VS Code to version 1.105.1 or higher. To check your version, go to `Help -> About`.
15
+
16
+
If you used a `.deb` file to install VS Code, just run these commands in the terminal to install updates:
17
+
```bash
18
+
sudo apt update
19
+
sudo apt install code
20
+
```
21
+
22
+
Before opening VS Code, we need to get the Context7 API key. For this, go to https://context7.com/dashboard, create a new account, and copy the API key.
23
+
24
+
### Setup
25
+
26
+
Now we can proceed with the setup:
27
+
1) After opening VS Code, go to the extensions tab, where you'll see the new `MCP SERVERS` tab. Click on `Enable MCP Servers Marketplace`.
28
+

29
+
30
+
2) Find Context7 in the list and press `Install`:
31
+

32
+
33
+
3) Go to `Show Configuration JSON`:
34
+

35
+
36
+
4) Click `Edit`:
37
+

38
+
39
+
5) Insert your API key:
40
+

41
+
42
+
The installation is complete. You can now use it.
43
+
44
+
### Example: Installation of the Bulk-ai-flow Plugin
45
+
46
+
Here is an example prompt you can use to add the adminforth bulk-ai-flow plugin:
47
+
48
+
**Prompt:**
49
+
`Add adminforth bulk-ai-flow plugin to this file using Context7 MCP`
50
+
51
+
**Generated Code:**
52
+

53
+
54
+
**Result:**
55
+

56
+
57
+
As we can see, the generation works really well.
58
+
59
+
### Tips
60
+
If you don’t want to add `use context7` to every prompt, you can [define a simple rule in your MCP client's rule section](https://github.com/upstash/context7?tab=readme-ov-file#-tips).
61
+
62
+
If you're using github copilot, you can:
63
+
1) In the root of your repository, create the .github directory if it does not already exist.
64
+
2) create a file named `.github/copilot-instructions.md`
65
+
3) Inside of new file add:
66
+
67
+
```txt
68
+
Always use context7 when I need code generation, setup or configuration steps, or
69
+
library/API documentation. This means you should automatically use the Context7 MCP
70
+
tools to resolve library id and get library docs without me having to explicitly ask.
0 commit comments