Skip to content

Context7 Platform -- Up-to-date docs for AI agents

Update installation commands across multiple languages to include the `--scope user` flag for Context7 in Claude Code.

enesgulesd2c34b04c31d
diff --git a/docs/clients/claude-code.mdx b/docs/clients/claude-code.mdx
index e7f76412..fb98062d 100644
--- a/docs/clients/claude-code.mdx
+++ b/docs/clients/claude-code.mdx
@@ -16,7 +16,7 @@ No dependencies required. Connects to Context7's hosted server.
Run this command in your terminal:
```bash
-claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
```
</Tab>
<Tab title="With OAuth">
@@ -25,7 +25,7 @@ claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http contex
Run this command in your terminal:
```bash
-claude mcp add --transport http context7 https://mcp.context7.com/mcp/oauth
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp/oauth
```
</Step>
<Step title="Authenticate with Context7">
@@ -43,7 +43,7 @@ This will open your browser for authorization. After you authorize, tokens are s
Run this command in your terminal:
```bash
-claude mcp add --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
```
</Tab>
</Tabs>
@@ -56,7 +56,7 @@ Runs on your machine. Requires Node.js 18+.
Run this command in your terminal:
```bash
-claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
<Tip>
@@ -67,7 +67,7 @@ Instead of passing the API key in the command, you can set `CONTEXT7_API_KEY` as
Run this command in your terminal:
```bash
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
</Tab>
</Tabs>
diff --git a/docs/resources/all-clients.mdx b/docs/resources/all-clients.mdx
index dc757d60..56fe55ba 100644
--- a/docs/resources/all-clients.mdx
+++ b/docs/resources/all-clients.mdx
@@ -20,13 +20,13 @@ Run this command. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/
#### Local Server Connection
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
#### Remote Server Connection
```sh
-claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
```
</Accordion>
diff --git a/i18n/README.ar.md b/i18n/README.ar.md
index dc5fc230..6d4d713c 100644
--- a/i18n/README.ar.md
+++ b/i18n/README.ar.md
@@ -131,7 +131,7 @@ npx -y @smithery/cli install @upstash/context7-mcp --client claude
### التثبيت في Claude Code
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest
```
### التثبيت في Claude Desktop
diff --git a/i18n/README.de.md b/i18n/README.de.md
index 9c9c1881..6d49cdcf 100644
--- a/i18n/README.de.md
+++ b/i18n/README.de.md
@@ -137,7 +137,7 @@ Es kann über [Zed Extensions](https://zed.dev/extensions?query=Context7) instal
### Installation in Claude Code
Führe diesen Befehl aus. Siehe die [Claude Code MCP Dokumentation](https://docs.anthropic.com/de/docs/claude-code/mcp) für mehr Informationen.
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest
```
### Installation in Claude Desktop
diff --git a/i18n/README.es.md b/i18n/README.es.md
index fe81590d..2374e361 100644
--- a/i18n/README.es.md
+++ b/i18n/README.es.md
@@ -123,7 +123,7 @@ Añade esto a tu archivo de configuración MCP de VS Code. Consulta la [document
### Instalar en Claude Code
Ejecuta este comando. Consulta la [documentación de MCP de Claude Code](https://docs.anthropic.com/es/docs/claude-code/mcp) para más información.
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest
```
### Instalar en Claude Desktop
diff --git a/i18n/README.fr.md b/i18n/README.fr.md
index 67af111f..460ba303 100644
--- a/i18n/README.fr.md
+++ b/i18n/README.fr.md
@@ -137,7 +137,7 @@ Peut être installé via [Zed Extensions](https://zed.dev/extensions?query=Conte
### Installation dans Claude Code
Exécutez cette commande. Voir la [documentation Claude Code MCP](https://docs.anthropic.com/fr/docs/claude-code/mcp).
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest
```
### Installation dans Claude Desktop
diff --git a/i18n/README.id-ID.md b/i18n/README.id-ID.md
index 2504b5d8..3b0e5a64 100644
--- a/i18n/README.id-ID.md
+++ b/i18n/README.id-ID.md
@@ -305,13 +305,13 @@ Jalankan perintah ini. Lihat [dokumentasi MCP Claude Code](https://docs.anthropi
#### Koneksi Server Lokal Claude Code
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
#### Koneksi Server Remote Claude Code
```sh
-claude mcp add --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.it.md b/i18n/README.it.md
index ada01ea9..2a2bc59e 100644
--- a/i18n/README.it.md
+++ b/i18n/README.it.md
@@ -138,7 +138,7 @@ Può essere installato tramite [Zed Extensions](https://zed.dev/extensions?query
### Installare in Claude Code
Esegui questo comando. Vedi [Claude Code MCP docs](https://docs.anthropic.com/it/docs/claude-code/mcp) per ulteriori informazioni.
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest
```
### Installare in Claude Desktop
diff --git a/i18n/README.ja.md b/i18n/README.ja.md
index d4bfe6c7..12940f9c 100644
--- a/i18n/README.ja.md
+++ b/i18n/README.ja.md
@@ -274,13 +274,13 @@ Smithery キーは [Smithery.ai Web ページ](https://smithery.ai/server/@upsta
#### Claude Code ローカルサーバー接続
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
#### Claude Code リモートサーバー接続
```sh
-claude mcp add --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.ko.md b/i18n/README.ko.md
index 3fea6d08..006719ec 100644
--- a/i18n/README.ko.md
+++ b/i18n/README.ko.md
@@ -88,13 +88,13 @@ Cursor의 `~/.cursor/mcp.json` 파일에 다음 설정을 붙여넣는 것이
#### Claude Code 로컬 서버 연결
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
#### Claude Code 원격 서버 연결
```sh
-claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.pt-BR.md b/i18n/README.pt-BR.md
index 8dfb156b..c5be4a2e 100644
--- a/i18n/README.pt-BR.md
+++ b/i18n/README.pt-BR.md
@@ -96,13 +96,13 @@ Execute este comando. Veja mais em [Claude Code MCP docs](https://docs.anthropic
#### Conexão Local do Servidor Claude Code
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
#### Conexão Remota do Servidor Claude Code
```sh
-claude mcp add --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.ru.md b/i18n/README.ru.md
index faf5ec10..eb7f0ef5 100644
--- a/i18n/README.ru.md
+++ b/i18n/README.ru.md
@@ -137,7 +137,7 @@ npx -y @smithery/cli install @upstash/context7-mcp --client claude
### Установка в Claude Code
Запустите следующую команду для установки. Смотрите [документацию Claude Code MCP](https://docs.anthropic.com/ru/docs/claude-code/mcp) для получения дополнительной информации.
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
### Установка в Claude Desktop
diff --git a/i18n/README.tr.md b/i18n/README.tr.md
index 933e5f83..56166d4f 100644
--- a/i18n/README.tr.md
+++ b/i18n/README.tr.md
@@ -138,7 +138,7 @@ Bunu VS Code MCP yapılandırma dosyanıza ekleyin. Daha fazla bilgi için [VS C
### Claude Code'da Kurulum
Bu komutu çalıştırın. Daha fazla bilgi için [Claude Code MCP belgelerine](https://docs.anthropic.com/en/docs/claude-code/mcp) bakabilirsiniz.
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp@latest
```
### Claude Desktop'ta Kurulum
diff --git a/i18n/README.uk.md b/i18n/README.uk.md
index cb7a566c..2b42ef60 100644
--- a/i18n/README.uk.md
+++ b/i18n/README.uk.md
@@ -356,13 +356,13 @@ npx -y @smithery/cli@latest install @upstash/context7-mcp --client <CLIENT_NAME>
#### Підключення до локального сервера Claude Code
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
#### Підключення до віддаленого сервера Claude Code
```sh
-claude mcp add --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.vi.md b/i18n/README.vi.md
index 9ef1e5f2..c4787f3c 100644
--- a/i18n/README.vi.md
+++ b/i18n/README.vi.md
@@ -310,13 +310,13 @@ Chạy lệnh này. Xem [tài liệu Claude Code MCP](https://docs.anthropic.com
#### Kết nối Claude Code Local Server
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
```
#### Kết nối Claude Code Remote Server
```sh
-claude mcp add --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.zh-CN.md b/i18n/README.zh-CN.md
index 18589e52..ed2e14a6 100644
--- a/i18n/README.zh-CN.md
+++ b/i18n/README.zh-CN.md
@@ -90,13 +90,13 @@ Context7将最新的代码示例和文档直接获取到你的LLM上下文中。
#### Claude Code本地服务器连接
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
#### Claude Code远程服务器连接
```sh
-claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/i18n/README.zh-TW.md b/i18n/README.zh-TW.md
index 41b4fef2..dd20fec5 100644
--- a/i18n/README.zh-TW.md
+++ b/i18n/README.zh-TW.md
@@ -90,13 +90,13 @@ Context7 將最新的程式碼範例與文件直接取得到你的 LLM 上下文
#### Claude Code 本地伺服器連線
```sh
-claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
+claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```
#### Claude Code 遠端伺服器連線
```sh
-claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
+claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
```
</details>
diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts
index ee403361..1a2223d4 100644
--- a/packages/mcp/src/index.ts
+++ b/packages/mcp/src/index.ts
@@ -305,6 +305,7 @@ async function main() {
return header;
};
+
const extractApiKey = (req: express.Request): string | undefined => {
return (
extractBearerToken(req.headers.authorization) ||