This is page 1 of 3. Use http://codebase.md/upstash/context7-mcp?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .github
│ ├── dependabot.yml
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.yml
│ │ ├── documentation.yml
│ │ └── feature_request.yml
│ └── workflows
│ ├── check.yaml
│ ├── publish-mcp.yml
│ └── release.yml
├── .gitignore
├── bun.lock
├── Dockerfile
├── docs
│ ├── adding-projects.md
│ ├── README.ar.md
│ ├── README.de.md
│ ├── README.es.md
│ ├── README.fr.md
│ ├── README.id-ID.md
│ ├── README.it.md
│ ├── README.ja.md
│ ├── README.ko.md
│ ├── README.pt-BR.md
│ ├── README.ru.md
│ ├── README.tr.md
│ ├── README.uk.md
│ ├── README.vi.md
│ ├── README.zh-CN.md
│ └── README.zh-TW.md
├── eslint.config.js
├── gemini-extension.json
├── LICENSE
├── mcpb
│ ├── .mcpbignore
│ ├── context7.mcpb
│ └── manifest.json
├── package.json
├── prettier.config.mjs
├── public
│ ├── context7-icon-green.svg
│ ├── context7-icon.svg
│ ├── context7-logo.svg
│ ├── cover.png
│ └── icon.png
├── README.md
├── schema
│ └── context7.json
├── server.json
├── smithery.yaml
├── src
│ ├── index.ts
│ └── lib
│ ├── api.ts
│ ├── encryption.ts
│ ├── types.ts
│ └── utils.ts
└── tsconfig.json
```
# Files
--------------------------------------------------------------------------------
/mcpb/.mcpbignore:
--------------------------------------------------------------------------------
```
1 | schema/context7.json
2 | prettier.config.mjs
3 | smithery.yaml
4 | Dockerfile
5 | eslint.config.js
6 | *.md
7 | *.ts
8 | LICENSE
9 | public/*
```
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
```
1 | # Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
2 |
3 | # Logs
4 |
5 | logs
6 | _.log
7 | npm-debug.log_
8 | yarn-debug.log*
9 | yarn-error.log*
10 | lerna-debug.log*
11 | .pnpm-debug.log*
12 |
13 | # Caches
14 |
15 | .cache
16 |
17 | # Diagnostic reports (https://nodejs.org/api/report.html)
18 |
19 | report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
20 |
21 | # Runtime data
22 |
23 | pids
24 | _.pid
25 | _.seed
26 | *.pid.lock
27 |
28 | # Directory for instrumented libs generated by jscoverage/JSCover
29 |
30 | lib-cov
31 |
32 | # Coverage directory used by tools like istanbul
33 |
34 | coverage
35 | *.lcov
36 |
37 | # nyc test coverage
38 |
39 | .nyc_output
40 |
41 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
42 |
43 | .grunt
44 |
45 | # Bower dependency directory (https://bower.io/)
46 |
47 | bower_components
48 |
49 | # node-waf configuration
50 |
51 | .lock-wscript
52 |
53 | # Compiled binary addons (https://nodejs.org/api/addons.html)
54 |
55 | build/Release
56 |
57 | # Dependency directories
58 |
59 | node_modules/
60 | jspm_packages/
61 |
62 | # Snowpack dependency directory (https://snowpack.dev/)
63 |
64 | web_modules/
65 |
66 | # TypeScript cache
67 |
68 | *.tsbuildinfo
69 |
70 | # Optional npm cache directory
71 |
72 | .npm
73 |
74 | # Optional eslint cache
75 |
76 | .eslintcache
77 |
78 | # Optional stylelint cache
79 |
80 | .stylelintcache
81 |
82 | # Microbundle cache
83 |
84 | .rpt2_cache/
85 | .rts2_cache_cjs/
86 | .rts2_cache_es/
87 | .rts2_cache_umd/
88 |
89 | # Optional REPL history
90 |
91 | .node_repl_history
92 |
93 | # Output of 'npm pack'
94 |
95 | *.tgz
96 |
97 | # Yarn Integrity file
98 |
99 | .yarn-integrity
100 |
101 | # dotenv environment variable files
102 |
103 | .env
104 | .env.development.local
105 | .env.test.local
106 | .env.production.local
107 | .env.local
108 |
109 | # parcel-bundler cache (https://parceljs.org/)
110 |
111 | .parcel-cache
112 |
113 | # Next.js build output
114 |
115 | .next
116 | out
117 |
118 | # Nuxt.js build / generate output
119 |
120 | .nuxt
121 | dist
122 |
123 | # Gatsby files
124 |
125 | # Comment in the public line in if your project uses Gatsby and not Next.js
126 |
127 | # https://nextjs.org/blog/next-9-1#public-directory-support
128 |
129 | # public
130 |
131 | # vuepress build output
132 |
133 | .vuepress/dist
134 |
135 | # vuepress v2.x temp and cache directory
136 |
137 | .temp
138 |
139 | # Docusaurus cache and generated files
140 |
141 | .docusaurus
142 |
143 | # Serverless directories
144 |
145 | .serverless/
146 |
147 | # FuseBox cache
148 |
149 | .fusebox/
150 |
151 | # DynamoDB Local files
152 |
153 | .dynamodb/
154 |
155 | # TernJS port file
156 |
157 | .tern-port
158 |
159 | # Stores VSCode versions used for testing VSCode extensions
160 |
161 | .vscode-test
162 |
163 | # yarn v2
164 |
165 | .yarn/cache
166 | .yarn/unplugged
167 | .yarn/build-state.yml
168 | .yarn/install-state.gz
169 | .pnp.*
170 |
171 | # IntelliJ based IDEs
172 | .idea
173 |
174 | # Finder (MacOS) folder config
175 | .DS_Store
176 | package-lock.json
177 |
```
--------------------------------------------------------------------------------
/docs/README.es.md:
--------------------------------------------------------------------------------
```markdown
1 | # Context7 MCP - Documentación Actualizada Para Cualquier Prompt
2 |
3 | [](https://context7.com) [](https://smithery.ai/server/@upstash/context7-mcp) [<img alt="Instalar en VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Instalar%20Context7%20MCP&color=0098FF">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522context7%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540upstash%252Fcontext7-mcp%2540latest%2522%255D%257D%257D)
4 |
5 | ## ❌ Sin Context7
6 |
7 | Los LLMs dependen de información desactualizada o genérica sobre las bibliotecas que utilizas. Obtienes:
8 |
9 | - ❌ Ejemplos de código desactualizados y basados en datos de entrenamiento de hace un año
10 | - ❌ APIs inventadas que ni siquiera existen
11 | - ❌ Respuestas genéricas para versiones antiguas de paquetes
12 |
13 | ## ✅ Con Context7
14 |
15 | El Context7 MCP obtiene documentación y ejemplos de código actualizados y específicos de la versión directamente desde la fuente, y los coloca directamente en tu prompt.
16 |
17 | Añade `use context7` a tu prompt en Cursor:
18 |
19 | ```txt
20 | Crea un proyecto básico de Next.js con app router. use context7
21 | ```
22 |
23 | ```txt
24 | Crea un script para eliminar las filas donde la ciudad es "" dadas las credenciales de PostgreSQL. use context7
25 | ```
26 |
27 | Context7 obtiene ejemplos de código y documentación actualizados directamente en el contexto de tu LLM.
28 |
29 | - 1️⃣ Escribe tu prompt de forma natural
30 | - 2️⃣ Dile al LLM que `use context7`
31 | - 3️⃣ Obtén respuestas de código que funcionan
32 |
33 | Sin cambiar de pestaña, sin APIs inventadas que no existen, sin generaciones de código desactualizadas.
34 |
35 | ## 🛠️ Empezando
36 |
37 | ### Requisitos
38 |
39 | - Node.js >= v18.0.0
40 | - Cursor, Windsurf, Claude Desktop u otro Cliente MCP
41 |
42 | ### Instalando vía Smithery
43 |
44 | Para instalar Context7 MCP Server para Claude Desktop automáticamente vía [Smithery](https://smithery.ai/server/@upstash/context7-mcp):
45 |
46 | ```bash
47 | npx -y @smithery/cli install @upstash/context7-mcp --client claude
48 | ```
49 |
50 | ### Instalar en Cursor
51 |
52 | Ve a: `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`
53 |
54 | Pegar la siguiente configuración en tu archivo `~/.cursor/mcp.json` de Cursor es el metodo recomendado. Consulta la [documentación de MCP de Cursor](https://docs.cursor.com/context/model-context-protocol) para más información.
55 |
56 | ```json
57 | {
58 | "mcpServers": {
59 | "context7": {
60 | "command": "npx",
61 | "args": ["-y", "@upstash/context7-mcp@latest"]
62 | }
63 | }
64 | }
65 | ```
66 |
67 | <details>
68 | <summary>Alternativa: Usar Bun</summary>
69 |
70 | ```json
71 | {
72 | "mcpServers": {
73 | "context7": {
74 | "command": "bunx",
75 | "args": ["-y", "@upstash/context7-mcp@latest"]
76 | }
77 | }
78 | }
79 | ```
80 |
81 | </details>
82 |
83 | <details>
84 | <summary>Alternativa: Usar Deno</summary>
85 |
86 | ```json
87 | {
88 | "mcpServers": {
89 | "context7": {
90 | "command": "deno",
91 | "args": ["run", "--allow-net", "npm:@upstash/context7-mcp"]
92 | }
93 | }
94 | }
95 | ```
96 |
97 | </details>
98 |
99 | ### Instalar en Windsurf
100 |
101 | Añade esto a tu archivo de configuración MCP de Windsurf. Consulta la [documentación de MCP de Windsurf](https://docs.windsurf.com/windsurf/mcp) para más información.
102 |
103 | ```json
104 | {
105 | "mcpServers": {
106 | "context7": {
107 | "command": "npx",
108 | "args": ["-y", "@upstash/context7-mcp@latest"]
109 | }
110 | }
111 | }
112 | ```
113 |
114 | ### Instalar en VS Code
115 |
116 | [<img alt="Instalar en VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Instalar%20Context7%20MCP&color=0098FF">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522context7%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540upstash%252Fcontext7-mcp%2540latest%2522%255D%257D%257D)
117 | [<img alt="Instalar en VS Code Insiders (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Instalar%20Context7%20MCP&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522context7%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540upstash%252Fcontext7-mcp%2540latest%2522%255D%257D%257D)
118 |
119 | Añade esto a tu archivo de configuración MCP de VS Code. Consulta la [documentación de VS Code MCP](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) para más información.
120 |
121 | ```json
122 | {
123 | "servers": {
124 | "Context7": {
125 | "type": "stdio",
126 | "command": "npx",
127 | "args": ["-y", "@upstash/context7-mcp@latest"]
128 | }
129 | }
130 | }
131 | ```
132 |
133 | ### Instalar en Claude Code
134 |
135 | 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.
136 |
137 | ```sh
138 | claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
139 | ```
140 |
141 | ### Instalar en Claude Desktop
142 |
143 | Añade esto a tu archivo `claude_desktop_config.json` de Claude Desktop. Consulta la [documentación de MCP de Claude Desktop](https://modelcontextprotocol.io/quickstart/user) para más información.
144 |
145 | ```json
146 | {
147 | "mcpServers": {
148 | "Context7": {
149 | "command": "npx",
150 | "args": ["-y", "@upstash/context7-mcp@latest"]
151 | }
152 | }
153 | }
154 | ```
155 |
156 | ### Instalar en Copilot Coding Agent
157 |
158 | Agrega la siguiente configuración a la sección `mcp` de tu archivo de configuración de Copilot Coding Agent (Repository->Settings->Copilot->Coding agent->MCP configuration):
159 |
160 | ```json
161 | {
162 | "mcpServers": {
163 | "context7": {
164 | "type": "http",
165 | "url": "https://mcp.context7.com/mcp",
166 | "tools": ["get-library-docs", "resolve-library-id"]
167 | }
168 | }
169 | }
170 | ```
171 |
172 | Para más información, consulta la [documentación oficial de GitHub](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp).
173 |
174 | ### Instalar en Copilot CLI
175 |
176 | 1. Abre el archivo de configuración MCP de Copilot CLI. La ubicación es `~/.copilot/mcp-config.json` (donde `~` es tu directorio home).
177 | 2. Agrega lo siguiente al objeto `mcpServers` en tu archivo `mcp-config.json`:
178 |
179 | ```json
180 | {
181 | "mcpServers": {
182 | "context7": {
183 | "type": "http",
184 | "url": "https://mcp.context7.com/mcp",
185 | "headers": {
186 | "CONTEXT7_API_KEY": "YOUR_API_KEY"
187 | },
188 | "tools": [
189 | "get-library-docs",
190 | "resolve-library-id"
191 | ]
192 | }
193 | }
194 | }
195 | ```
196 |
197 | O, para un servidor local:
198 |
199 | ```json
200 | {
201 | "mcpServers": {
202 | "context7": {
203 | "type": "local",
204 | "command": "npx",
205 | "tools": [
206 | "get-library-docs",
207 | "resolve-library-id"
208 | ],
209 | "args": [
210 | "-y",
211 | "@upstash/context7-mcp",
212 | "--api-key",
213 | "YOUR_API_KEY"
214 | ]
215 | }
216 | }
217 | }
218 | ```
219 |
220 | Si el archivo `mcp-config.json` no existe, créalo.
221 |
222 | ### Herramientas Disponibles
223 |
224 | - `resolve-library-id`: Resuelve un nombre de una biblioteca general en un ID de biblioteca compatible con Context7.
225 | - `libraryName` (requerido)
226 | - `get-library-docs`: Obtiene documentación para una biblioteca utilizando un ID de biblioteca compatible con Context7.
227 | - `context7CompatibleLibraryID` (requerido)
228 | - `topic` (opcional): Enfoca la documentación en un tema específico (p. ej., "routing", "hooks")
229 | - `tokens` (opcional, por defecto 10000): Número máximo de tokens a devolver. Los valores inferiores a 10000 se aumentan automáticamente a 10000.
230 |
231 | ## Desarrollo
232 |
233 | Clona el proyecto e instala las dependencias:
234 |
235 | ```bash
236 | bun i
237 | ```
238 |
239 | Compila:
240 |
241 | ```bash
242 | bun run build
243 | ```
244 |
245 | ### Ejemplo de Configuración Local
246 |
247 | ```json
248 | {
249 | "mcpServers": {
250 | "context7": {
251 | "command": "npx",
252 | "args": ["tsx", "/ruta/a/la/carpeta/context7-mcp/src/index.ts"]
253 | }
254 | }
255 | }
256 | ```
257 |
258 | ### Probando con MCP Inspector
259 |
260 | ```bash
261 | npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp@latest
262 | ```
263 |
264 | ## Solución de Problemas
265 |
266 | ### ERR_MODULE_NOT_FOUND
267 |
268 | Si ves este error, intenta usar `bunx` en lugar de `npx`.
269 |
270 | ```json
271 | {
272 | "mcpServers": {
273 | "context7": {
274 | "command": "bunx",
275 | "args": ["-y", "@upstash/context7-mcp@latest"]
276 | }
277 | }
278 | }
279 | ```
280 |
281 | Esto a menudo resuelve problemas de resolución de módulos, especialmente en entornos donde `npx` no instala o resuelve paquetes correctamente.
282 |
283 | ### Errores del Cliente MCP
284 |
285 | 1. Intenta eliminar `@latest` del nombre del paquete.
286 |
287 | 2. Intenta usar `bunx` como alternativa.
288 |
289 | 3. Intenta usar `deno` como alternativa.
290 |
291 | ## Context7 en los Medios
292 |
293 | - [Better Stack: "Free Tool Makes Cursor 10x Smarter"](https://youtu.be/52FC3qObp9E)
294 | - [Cole Medin: "This is Hands Down the BEST MCP Server for AI Coding Assistants"](https://www.youtube.com/watch?v=G7gK8H6u7Rs)
295 | - [Income stream surfers: "Context7 + SequentialThinking MCPs: Is This AGI?"](https://www.youtube.com/watch?v=-ggvzyLpK6o)
296 | - [Julian Goldie SEO: "Context7: New MCP AI Agent Update"](https://www.youtube.com/watch?v=CTZm6fBYisc)
297 | - [JeredBlu: "Context 7 MCP: Get Documentation Instantly + VS Code Setup"](https://www.youtube.com/watch?v=-ls0D-rtET4)
298 | - [Income stream surfers: "Context7: The New MCP Server That Will CHANGE AI Coding"](https://www.youtube.com/watch?v=PS-2Azb-C3M)
299 |
300 | ## Historial de Estrellas
301 |
302 | [](https://www.star-history.com/#upstash/context7&Date)
303 |
304 | ## Licencia
305 |
306 | MIT
307 |
```
--------------------------------------------------------------------------------
/docs/README.de.md:
--------------------------------------------------------------------------------
```markdown
1 | # Context7 MCP - Aktuelle Dokumentation für jeden Prompt
2 |
3 | [](https://context7.com) [](https://smithery.ai/server/@upstash/context7-mcp) [<img alt="In VS Code installieren (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)
4 |
5 | ## ❌ Ohne Context7
6 |
7 | KI-Sprachmodelle (LLMs) greifen auf veraltete oder allgemeine Informationen über die von dir verwendeten Bibliotheken zurück. Das Ergebnis:
8 |
9 | - ❌ Codebeispiele sind veraltet und basieren auf Trainingsdaten, die Jahre alt sind
10 | - ❌ Halluzinierte APIs, die gar nicht existieren
11 | - ❌ Generische Antworten für alte Paketversionen
12 |
13 | ## ✅ Mit Context7
14 |
15 | Context7 MCP holt aktuelle, versionsspezifische Dokumentationen und Codebeispiele direkt aus der Quelle und fügt sie in deinen Prompt ein.
16 |
17 | Füge `use context7` zu deinem Prompt in Cursor hinzu:
18 |
19 | ```txt
20 | Erstelle ein einfaches Next.js-Projekt mit dem App Router. use context7
21 | ```
22 |
23 | ```txt
24 | Erstelle ein Skript zum Löschen der Zeilen, in denen die Stadt "" ist, mit PostgreSQL-Anmeldedaten. use context7
25 | ```
26 |
27 | Context7 holt aktuelle Codebeispiele und Dokumentationen direkt in den Kontext deines LLMs.
28 |
29 | - 1️⃣ Schreibe deinen Prompt auf natürliche Weise
30 | - 2️⃣ Weise das LLM an, context7 zu verwenden, mit `use context7`
31 | - 3️⃣ Erhalte funktionierende Codeantworten
32 |
33 | Kein Tab-Switching, keine halluzinierten APIs, die nicht existieren, keine veralteten Code-Generierungen.
34 |
35 | ## 🛠️ Erste Schritte
36 |
37 | ### Anforderungen
38 |
39 | - Node.js >= v18.0.0
40 | - Cursor, Windsurf, Claude Desktop oder ein anderer MCP-Client
41 |
42 | ### Installation über Smithery
43 |
44 | Um den Context7 MCP Server für Claude Desktop automatisch über [Smithery](https://smithery.ai/server/@upstash/context7-mcp) zu installieren:
45 |
46 | ```bash
47 | npx -y @smithery/cli install @upstash/context7-mcp --client claude
48 | ```
49 |
50 | ### Installation in Cursor
51 |
52 | Gehe zu: `Einstellungen` -> `Cursor-Einstellungen` -> `MCP` -> `Neuen globalen MCP-Server hinzufügen`
53 |
54 | Der empfohlene Ansatz ist die folgende Konfiguration in deine Cursor-Datei `~/.cursor/mcp.json` einzufügen. Siehe die [Cursor MCP Dokumentation](https://docs.cursor.com/context/model-context-protocol) für mehr Informationen.
55 |
56 | ```json
57 | {
58 | "mcpServers": {
59 | "context7": {
60 | "command": "npx",
61 | "args": ["-y", "@upstash/context7-mcp@latest"]
62 | }
63 | }
64 | }
65 | ```
66 |
67 | <details>
68 | <summary>Alternative: Bun verwenden</summary>
69 |
70 | ```json
71 | {
72 | "mcpServers": {
73 | "context7": {
74 | "command": "bunx",
75 | "args": ["-y", "@upstash/context7-mcp@latest"]
76 | }
77 | }
78 | }
79 | ```
80 |
81 | </details>
82 |
83 | <details>
84 | <summary>Alternative: Deno verwenden</summary>
85 |
86 | ```json
87 | {
88 | "mcpServers": {
89 | "context7": {
90 | "command": "deno",
91 | "args": ["run", "--allow-net", "npm:@upstash/context7-mcp"]
92 | }
93 | }
94 | }
95 | ```
96 |
97 | </details>
98 |
99 | ### Installation in Windsurf
100 |
101 | Füge dies zu deiner Windsurf MCP-Konfigurationsdatei hinzu. Siehe die [Windsurf MCP Dokumentation](https://docs.windsurf.com/windsurf/mcp) für mehr Informationen.
102 |
103 | ```json
104 | {
105 | "mcpServers": {
106 | "context7": {
107 | "command": "npx",
108 | "args": ["-y", "@upstash/context7-mcp@latest"]
109 | }
110 | }
111 | }
112 | ```
113 |
114 | ### Installation in VS Code
115 |
116 | [<img alt="In VS Code installieren (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)
117 | [<img alt="In VS Code Insiders installieren (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Context7%20MCP&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%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)
118 |
119 | Füge dies zu deiner VS Code MCP-Konfigurationsdatei hinzu. Siehe die [VS Code MCP Dokumentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) für mehr Informationen.
120 |
121 | ```json
122 | {
123 | "servers": {
124 | "Context7": {
125 | "type": "stdio",
126 | "command": "npx",
127 | "args": ["-y", "@upstash/context7-mcp@latest"]
128 | }
129 | }
130 | }
131 | ```
132 |
133 | ### Installation in Zed
134 |
135 | Es kann über [Zed Extensions](https://zed.dev/extensions?query=Context7) installiert werden oder du kannst dies zu deiner Zed `settings.json` hinzufügen. Siehe die [Zed Context Server Dokumentation](https://zed.dev/docs/assistant/context-servers) für mehr Informationen.
136 |
137 | ```json
138 | {
139 | "context_servers": {
140 | "Context7": {
141 | "command": {
142 | "path": "npx",
143 | "args": ["-y", "@upstash/context7-mcp@latest"]
144 | },
145 | "settings": {}
146 | }
147 | }
148 | }
149 | ```
150 |
151 | ### Installation in Claude Code
152 |
153 | Führe diesen Befehl aus. Siehe die [Claude Code MCP Dokumentation](https://docs.anthropic.com/de/docs/claude-code/mcp) für mehr Informationen.
154 |
155 | ```sh
156 | claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
157 | ```
158 |
159 | ### Installation in Claude Desktop
160 |
161 | Füge dies zu deiner Claude Desktop `claude_desktop_config.json` Datei hinzu. Siehe die [Claude Desktop MCP Dokumentation](https://modelcontextprotocol.io/quickstart/user) für mehr Informationen.
162 |
163 | ```json
164 | {
165 | "mcpServers": {
166 | "Context7": {
167 | "command": "npx",
168 | "args": ["-y", "@upstash/context7-mcp@latest"]
169 | }
170 | }
171 | }
172 | ```
173 |
174 | ### Installation im Copilot Coding Agent
175 |
176 | Füge die folgende Konfiguration zum Abschnitt `mcp` deiner Copilot Coding Agent-Konfigurationsdatei hinzu (Repository->Settings->Copilot->Coding agent->MCP configuration):
177 |
178 | ```json
179 | {
180 | "mcpServers": {
181 | "context7": {
182 | "type": "http",
183 | "url": "https://mcp.context7.com/mcp",
184 | "tools": ["get-library-docs", "resolve-library-id"]
185 | }
186 | }
187 | }
188 | ```
189 |
190 | Weitere Informationen findest du in der [offiziellen GitHub-Dokumentation](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp).
191 |
192 | ### Installation im Copilot CLI
193 |
194 | 1. Öffne die MCP-Konfigurationsdatei von Copilot CLI. Der Ort ist `~/.copilot/mcp-config.json` (wobei `~` dein Home-Verzeichnis ist).
195 | 2. Füge Folgendes zum `mcpServers`-Objekt in deiner `mcp-config.json`-Datei hinzu:
196 |
197 | ```json
198 | {
199 | "mcpServers": {
200 | "context7": {
201 | "type": "http",
202 | "url": "https://mcp.context7.com/mcp",
203 | "headers": {
204 | "CONTEXT7_API_KEY": "YOUR_API_KEY"
205 | },
206 | "tools": [
207 | "get-library-docs",
208 | "resolve-library-id"
209 | ]
210 | }
211 | }
212 | }
213 | ```
214 |
215 | Oder für einen lokalen Server:
216 |
217 | ```json
218 | {
219 | "mcpServers": {
220 | "context7": {
221 | "type": "local",
222 | "command": "npx",
223 | "tools": [
224 | "get-library-docs",
225 | "resolve-library-id"
226 | ],
227 | "args": [
228 | "-y",
229 | "@upstash/context7-mcp",
230 | "--api-key",
231 | "YOUR_API_KEY"
232 | ]
233 | }
234 | }
235 | }
236 | ```
237 |
238 | Falls die `mcp-config.json`-Datei nicht existiert, erstelle sie.
239 |
240 | ### Docker verwenden
241 |
242 | Wenn du den MCP-Server lieber in einem Docker-Container ausführen möchtest:
243 |
244 | 1. **Docker-Image erstellen:**
245 |
246 | Erstelle zunächst ein `Dockerfile` im Projekt-Root (oder an einem Ort deiner Wahl):
247 |
248 | <details>
249 | <summary>Klicke, um den Dockerfile-Inhalt zu sehen</summary>
250 |
251 | ```Dockerfile
252 | FROM node:18-alpine
253 |
254 | WORKDIR /app
255 |
256 | # Installiere die neueste Version global
257 | RUN npm install -g @upstash/context7-mcp@latest
258 |
259 | # Port freigeben, falls nötig (optional, abhängig von der MCP-Client-Interaktion)
260 | # EXPOSE 3000
261 |
262 | # Standardbefehl zum Ausführen des Servers
263 | CMD ["context7-mcp"]
264 | ```
265 |
266 | </details>
267 |
268 | Baue dann das Image mit einem Tag (z.B. `context7-mcp`). **Stelle sicher, dass Docker Desktop (oder der Docker-Daemon) läuft.** Führe den folgenden Befehl in dem Verzeichnis aus, in dem du das `Dockerfile` gespeichert hast:
269 |
270 | ```bash
271 | docker build -t context7-mcp .
272 | ```
273 |
274 | 2. **Konfiguriere deinen MCP-Client:**
275 |
276 | Aktualisiere die Konfiguration deines MCP-Clients, um den Docker-Befehl zu verwenden.
277 |
278 | _Beispiel für eine cline_mcp_settings.json:_
279 |
280 | ```json
281 | {
282 | "mcpServers": {
283 | "Сontext7": {
284 | "autoApprove": [],
285 | "disabled": false,
286 | "timeout": 60,
287 | "command": "docker",
288 | "args": ["run", "-i", "--rm", "context7-mcp"],
289 | "transportType": "stdio"
290 | }
291 | }
292 | }
293 | ```
294 |
295 | _Hinweis: Dies ist eine Beispielkonfiguration. Bitte beziehe dich auf die spezifischen Beispiele für deinen MCP-Client (wie Cursor, VS Code usw.), die weiter oben in dieser README beschrieben sind, um die Struktur anzupassen (z.B. `mcpServers` vs `servers`). Stelle außerdem sicher, dass der Bildname in `args` mit dem beim `docker build`-Befehl verwendeten Tag übereinstimmt._
296 |
297 | ### Verfügbare Tools
298 |
299 | - `resolve-library-id`: Löst einen allgemeinen Bibliotheksnamen in eine Context7-kompatible Bibliotheks-ID auf.
300 | - `libraryName` (erforderlich)
301 | - `get-library-docs`: Ruft die Dokumentation für eine Bibliothek mit einer Context7-kompatiblen Bibliotheks-ID ab.
302 | - `context7CompatibleLibraryID` (erforderlich)
303 | - `topic` (optional): Fokussiert die Dokumentation auf ein bestimmtes Thema (z.B. "routing", "hooks")
304 | - `tokens` (optional, Standard 10000): Maximale Anzahl von zurückzugebenden Tokens. Werte unter 10000 werden automatisch auf 10000 erhöht.
305 |
306 | ## Entwicklung
307 |
308 | Klone das Projekt und installiere die Abhängigkeiten:
309 |
310 | ```bash
311 | bun i
312 | ```
313 |
314 | Bauen:
315 |
316 | ```bash
317 | bun run build
318 | ```
319 |
320 | ### Lokales Konfigurationsbeispiel
321 |
322 | ```json
323 | {
324 | "mcpServers": {
325 | "context7": {
326 | "command": "npx",
327 | "args": ["tsx", "/pfad/zum/ordner/context7-mcp/src/index.ts"]
328 | }
329 | }
330 | }
331 | ```
332 |
333 | ### Testen mit MCP Inspector
334 |
335 | ```bash
336 | npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp@latest
337 | ```
338 |
339 | ## Fehlerbehebung
340 |
341 | ### ERR_MODULE_NOT_FOUND
342 |
343 | Wenn du diesen Fehler siehst, versuche `bunx` anstelle von `npx` zu verwenden.
344 |
345 | ```json
346 | {
347 | "mcpServers": {
348 | "context7": {
349 | "command": "bunx",
350 | "args": ["-y", "@upstash/context7-mcp@latest"]
351 | }
352 | }
353 | }
354 | ```
355 |
356 | Dies löst häufig Probleme bei der Modulauflösung, besonders in Umgebungen, in denen `npx` Pakete nicht ordnungsgemäß installiert oder auflöst.
357 |
358 | ### ESM-Auflösungsprobleme
359 |
360 | Wenn du einen Fehler wie `Error: Cannot find module 'uriTemplate.js'` bekommst, versuche mit dem Flag `--experimental-vm-modules` auszuführen:
361 |
362 | ```json
363 | {
364 | "mcpServers": {
365 | "context7": {
366 | "command": "npx",
367 | "args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]
368 | }
369 | }
370 | }
371 | ```
372 |
373 | ### MCP-Client-Fehler
374 |
375 | 1. Versuche, `@latest` aus dem Paketnamen zu entfernen.
376 |
377 | 2. Versuche, `bunx` als Alternative zu verwenden.
378 |
379 | 3. Versuche, `deno` als Alternative zu verwenden.
380 |
381 | 4. Stelle sicher, dass du Node v18 oder höher verwendest, um native Fetch-Unterstützung mit `npx` zu haben.
382 |
383 | ## Haftungsausschluss
384 |
385 | Context7-Projekte werden von der Community beigetragen, und obwohl wir uns bemühen, eine hohe Qualität aufrechtzuerhalten, können wir die Genauigkeit, Vollständigkeit oder Sicherheit aller Bibliotheksdokumentationen nicht garantieren. Die in Context7 aufgeführten Projekte werden von ihren jeweiligen Eigentümern entwickelt und gepflegt, nicht von Context7. Wenn du auf verdächtige, unangemessene oder potenziell schädliche Inhalte stößt, verwende bitte die Schaltfläche "Melden" auf der Projektseite, um uns sofort zu benachrichtigen. Wir nehmen alle Berichte ernst und werden gemeldete Inhalte umgehend überprüfen, um die Integrität und Sicherheit unserer Plattform zu gewährleisten. Durch die Nutzung von Context7 erkennst du an, dass du dies nach eigenem Ermessen und auf eigenes Risiko tust.
386 |
387 | ## Context7 in den Medien
388 |
389 | - [Better Stack: "Free Tool Makes Cursor 10x Smarter"](https://youtu.be/52FC3qObp9E)
390 | - [Cole Medin: "This is Hands Down the BEST MCP Server for AI Coding Assistants"](https://www.youtube.com/watch?v=G7gK8H6u7Rs)
391 | - [Income stream surfers: "Context7 + SequentialThinking MCPs: Is This AGI?"](https://www.youtube.com/watch?v=-ggvzyLpK6o)
392 | - [Julian Goldie SEO: "Context7: New MCP AI Agent Update"](https://www.youtube.com/watch?v=CTZm6fBYisc)
393 | - [JeredBlu: "Context 7 MCP: Get Documentation Instantly + VS Code Setup"](https://www.youtube.com/watch?v=-ls0D-rtET4)
394 | - [Income stream surfers: "Context7: The New MCP Server That Will CHANGE AI Coding"](https://www.youtube.com/watch?v=PS-2Azb-C3M)
395 |
396 | ## Verlauf der Sterne
397 |
398 | [](https://www.star-history.com/#upstash/context7&Date)
399 |
400 | ## Lizenz
401 |
402 | MIT
403 |
```
--------------------------------------------------------------------------------
/docs/README.it.md:
--------------------------------------------------------------------------------
```markdown
1 | # Context7 MCP - Documentazione aggiornata per qualsiasi prompt
2 |
3 | [](https://context7.com) [](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=Installa%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)
4 |
5 | [](./README.zh-CN.md) [](./README.ko.md) [](./README.es.md) [](./README.fr.md) [-purple>)](./README.pt-BR.md) [](./README.it.md)
6 |
7 | ## ❌ Senza Context7
8 |
9 | LLMs si affidano a informazioni obsolete o generiche sulle librerie che utilizzi. Ottieni:
10 |
11 | - ❌ Gli esempi di codice sono obsoleti e basati su dati di formazione vecchi di anni
12 | - ❌ Le API allucinate non esistono nemmeno
13 | - ❌ Risposte generiche per vecchie versioni del pacchetto
14 |
15 | ## ✅ Con Context7
16 |
17 | Context7 MCP recupera documentazione aggiornata, specifica per versione e esempi di codice direttamente dalla fonte — e li inserisce direttamente nel tuo prompt.
18 |
19 | Aggiungi `use context7` al prompt in Cursor:
20 |
21 | ```txt
22 | Crea un progetto Next.js di base con app router. Usa context7
23 | ```
24 |
25 | ```txt
26 | Creare uno script per eliminare le righe in cui la città è "", date le credenziali di PostgreSQL. usare context7
27 | ```
28 |
29 | Context7 recupera esempi di codice e documentazione aggiornati direttamente nel contesto del tuo LLM.
30 |
31 | - 1️⃣ Scrivi il tuo prompt in modo naturale
32 | - 2️⃣ Indica all'LLM di usare context7
33 | - 3️⃣ Ottieni risposte di codice funzionante
34 |
35 | Nessun cambio di tab, nessuna API allucinata che non esiste, nessuna generazione di codice obsoleta.
36 |
37 | ## 🛠️ Iniziare
38 |
39 | ### Requisiti
40 |
41 | - Node.js >= v18.0.0
42 | - Cursor, Windsurf, Claude Desktop o un altro client MCP
43 |
44 | ### Installazione tramite Smithery
45 |
46 | Per installare Context7 MCP Server per Claude Desktop automaticamente tramite [Smithery](https://smithery.ai/server/@upstash/context7-mcp):
47 |
48 | ```bash
49 | npx -y @smithery/cli install @upstash/context7-mcp --client claude
50 | ```
51 |
52 | ### Installare in Cursor
53 |
54 | Vai a: `Impostazioni` -> `Impostazioni cursore` -> `MCP` -> `Aggiungi nuovo server MCP globale`
55 |
56 | Incollare la seguente configurazione nel file `~/.cursor/mcp.json` di Cursor è l'approccio consigliato. Vedi [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) per ulteriori informazioni.
57 |
58 | ```json
59 | {
60 | "mcpServers": {
61 | "context7": {
62 | "command": "npx",
63 | "args": ["-y", "@upstash/context7-mcp@latest"]
64 | }
65 | }
66 | }
67 | ```
68 |
69 | <details>
70 | <summary>Alternativa: Usa Bun</summary>
71 |
72 | ```json
73 | {
74 | "mcpServers": {
75 | "context7": {
76 | "command": "bunx",
77 | "args": ["-y", "@upstash/context7-mcp@latest"]
78 | }
79 | }
80 | }
81 | ```
82 |
83 | </details>
84 |
85 | <details>
86 | <summary>Alternativa: Usa Deno</summary>
87 |
88 | ```json
89 | {
90 | "mcpServers": {
91 | "context7": {
92 | "command": "deno",
93 | "args": ["run", "--allow-net", "npm:@upstash/context7-mcp"]
94 | }
95 | }
96 | }
97 | ```
98 |
99 | </details>
100 |
101 | ### Installare in Windsurf
102 |
103 | Aggiungi questo al tuo file di configurazione Windsurf MCP. Vedi [Windsurf MCP docs](https://docs.windsurf.com/windsurf/mcp) per ulteriori informazioni.
104 |
105 | ```json
106 | {
107 | "mcpServers": {
108 | "context7": {
109 | "command": "npx",
110 | "args": ["-y", "@upstash/context7-mcp@latest"]
111 | }
112 | }
113 | }
114 | ```
115 |
116 | ### Installare in VS Code
117 |
118 | [<img alt="Installa in VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Installa%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)
119 | [<img alt="Installa in VS Code Insiders (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Installa%20Context7%20MCP&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%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)
120 |
121 | Aggiungi questo al tuo file di configurazione MCP di VS Code. Vedi [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) per ulteriori informazioni.
122 |
123 | ```json
124 | {
125 | "servers": {
126 | "Context7": {
127 | "type": "stdio",
128 | "command": "npx",
129 | "args": ["-y", "@upstash/context7-mcp@latest"]
130 | }
131 | }
132 | }
133 | ```
134 |
135 | ### Installare in Zed
136 |
137 | Può essere installato tramite [Zed Extensions](https://zed.dev/extensions?query=Context7) oppure puoi aggiungere questo al tuo `settings.json` di Zed. Vedi [Zed Context Server docs](https://zed.dev/docs/assistant/context-servers) per ulteriori informazioni.
138 |
139 | ```json
140 | {
141 | "context_servers": {
142 | "Context7": {
143 | "command": {
144 | "path": "npx",
145 | "args": ["-y", "@upstash/context7-mcp@latest"]
146 | },
147 | "settings": {}
148 | }
149 | }
150 | }
151 | ```
152 |
153 | ### Installare in Claude Code
154 |
155 | Esegui questo comando. Vedi [Claude Code MCP docs](https://docs.anthropic.com/it/docs/claude-code/mcp) per ulteriori informazioni.
156 |
157 | ```sh
158 | claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
159 | ```
160 |
161 | ### Installare in Claude Desktop
162 |
163 | Aggiungi questo al tuo file `claude_desktop_config.json` di Claude Desktop. Vedi [Claude Desktop MCP docs](https://modelcontextprotocol.io/quickstart/user) per ulteriori informazioni.
164 |
165 | ```json
166 | {
167 | "mcpServers": {
168 | "Context7": {
169 | "command": "npx",
170 | "args": ["-y", "@upstash/context7-mcp@latest"]
171 | }
172 | }
173 | }
174 | ```
175 |
176 | ### Installazione in Copilot Coding Agent
177 |
178 | Aggiungi la seguente configurazione alla sezione `mcp` del file di configurazione di Copilot Coding Agent (Repository->Settings->Copilot->Coding agent->MCP configuration):
179 |
180 | ```json
181 | {
182 | "mcpServers": {
183 | "context7": {
184 | "type": "http",
185 | "url": "https://mcp.context7.com/mcp",
186 | "tools": ["get-library-docs", "resolve-library-id"]
187 | }
188 | }
189 | }
190 | ```
191 |
192 | Per maggiori informazioni, consulta la [documentazione ufficiale GitHub](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp).
193 |
194 | ### Installazione in Copilot CLI
195 |
196 | 1. Apri il file di configurazione MCP di Copilot CLI. La posizione è `~/.copilot/mcp-config.json` (dove `~` è la tua home directory).
197 | 2. Aggiungi quanto segue all'oggetto `mcpServers` nel tuo file `mcp-config.json`:
198 |
199 | ```json
200 | {
201 | "mcpServers": {
202 | "context7": {
203 | "type": "http",
204 | "url": "https://mcp.context7.com/mcp",
205 | "headers": {
206 | "CONTEXT7_API_KEY": "YOUR_API_KEY"
207 | },
208 | "tools": [
209 | "get-library-docs",
210 | "resolve-library-id"
211 | ]
212 | }
213 | }
214 | }
215 | ```
216 |
217 | Oppure, per un server locale:
218 |
219 | ```json
220 | {
221 | "mcpServers": {
222 | "context7": {
223 | "type": "local",
224 | "command": "npx",
225 | "tools": [
226 | "get-library-docs",
227 | "resolve-library-id"
228 | ],
229 | "args": [
230 | "-y",
231 | "@upstash/context7-mcp",
232 | "--api-key",
233 | "YOUR_API_KEY"
234 | ]
235 | }
236 | }
237 | }
238 | ```
239 |
240 | Se il file `mcp-config.json` non esiste, crealo.
241 |
242 | ### Utilizzo di Docker
243 |
244 | Se preferisci eseguire il server MCP in un contenitore Docker:
245 |
246 | 1. **Costruisci l'immagine Docker:**
247 |
248 | Prima, crea un `Dockerfile` nella radice del progetto (o ovunque tu preferisca):
249 |
250 | <details>
251 | <summary>Clicca per visualizzare il contenuto del Dockerfile</summary>
252 |
253 | ```Dockerfile
254 | FROM node:18-alpine
255 |
256 | WORKDIR /app
257 |
258 | # Installa l ultima versione globalmente
259 | RUN npm install -g @upstash/context7-mcp@latest
260 |
261 | # Esponi la porta predefinita se necessario (opzionale, dipende dall interazione del client MCP)
262 | # EXPOSE 3000
263 |
264 | # Comando predefinito per eseguire il server
265 | CMD ["context7-mcp"]
266 | ```
267 |
268 | </details>
269 |
270 | Poi, costruisci l'immagine utilizzando un tag (ad esempio, `context7-mcp`). **Assicurati che Docker Desktop (o il demone Docker) sia in esecuzione.** Esegui il seguente comando nella stessa directory in cui hai salvato il `Dockerfile`:
271 |
272 | ```bash
273 | docker build -t context7-mcp .
274 | ```
275 |
276 | 2. **Configura il tuo client MCP:**
277 |
278 | Aggiorna la configurazione del tuo client MCP per utilizzare il comando Docker.
279 |
280 | _Esempio per un file cline_mcp_settings.json:_
281 |
282 | ```json
283 | {
284 | "mcpServers": {
285 | "Сontext7": {
286 | "autoApprove": [],
287 | "disabled": false,
288 | "timeout": 60,
289 | "command": "docker",
290 | "args": ["run", "-i", "--rm", "context7-mcp"],
291 | "transportType": "stdio"
292 | }
293 | }
294 | }
295 | ```
296 |
297 | _Nota: Questa è una configurazione di esempio. Consulta gli esempi specifici per il tuo client MCP (come Cursor, VS Code, ecc.) precedentemente in questo README per adattare la struttura (ad es., `mcpServers` vs `servers`). Inoltre, assicurati che il nome dell'immagine in `args` corrisponda al tag utilizzato durante il comando `docker build`._
298 |
299 | ### Strumenti Disponibili
300 |
301 | - `resolve-library-id`: Converte un nome generico di libreria in un ID di libreria compatibile con Context7.
302 | - `libraryName` (obbligatorio)
303 | - `get-library-docs`: Recupera la documentazione per una libreria utilizzando un ID di libreria compatibile con Context7.
304 | - `context7CompatibleLibraryID` (obbligatorio)
305 | - `topic` (opzionale): Concentra la documentazione su un argomento specifico (es., "routing", "hooks")
306 | - `tokens` (opzionale, predefinito 10000): Numero massimo di token da restituire. I valori inferiori a 10000 vengono automaticamente aumentati a 10000.
307 |
308 | ## Sviluppo
309 |
310 | Clona il progetto e installa le dipendenze:
311 |
312 | ```bash
313 | bun i
314 | ```
315 |
316 | Compila:
317 |
318 | ```bash
319 | bun run build
320 | ```
321 |
322 | ### Esempio di Configurazione Locale
323 |
324 | ```json
325 | {
326 | "mcpServers": {
327 | "context7": {
328 | "command": "npx",
329 | "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"]
330 | }
331 | }
332 | }
333 | ```
334 |
335 | ### Test con MCP Inspector
336 |
337 | ```bash
338 | npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp@latest
339 | ```
340 |
341 | ## Risoluzione dei problemi
342 |
343 | ### ERR_MODULE_NOT_FOUND
344 |
345 | Se vedi questo errore, prova a usare `bunx` invece di `npx`.
346 |
347 | ```json
348 | {
349 | "mcpServers": {
350 | "context7": {
351 | "command": "bunx",
352 | "args": ["-y", "@upstash/context7-mcp@latest"]
353 | }
354 | }
355 | }
356 | ```
357 |
358 | Questo spesso risolve i problemi di risoluzione dei moduli, specialmente negli ambienti dove `npx` non installa o risolve correttamente i pacchetti.
359 |
360 | ### Problemi di risoluzione ESM
361 |
362 | Se riscontri un errore come: `Error: Cannot find module 'uriTemplate.js'` prova a eseguire con il flag `--experimental-vm-modules`:
363 |
364 | ```json
365 | {
366 | "mcpServers": {
367 | "context7": {
368 | "command": "npx",
369 | "args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]
370 | }
371 | }
372 | }
373 | ```
374 |
375 | ### Errori del Client MCP
376 |
377 | 1. Prova a rimuovere `@latest` dal nome del pacchetto.
378 |
379 | 2. Prova a usare `bunx` come alternativa.
380 |
381 | 3. Prova a usare `deno` come alternativa.
382 |
383 | 4. Assicurati di utilizzare Node v18 o superiore per avere il supporto nativo di fetch con `npx`.
384 |
385 | ## Dichiarazione di non responsabilità
386 |
387 | I progetti Context7 sono contributi della comunità e, sebbene ci impegniamo a mantenere un'alta qualità, non possiamo garantire l'accuratezza, la completezza o la sicurezza di tutta la documentazione delle librerie. I progetti elencati in Context7 sono sviluppati e gestiti dai rispettivi proprietari, non da Context7. Se riscontri contenuti sospetti, inappropriati o potenzialmente dannosi, utilizza il pulsante "Segnala" sulla pagina del progetto per informarci immediatamente. Prendiamo sul serio tutte le segnalazioni e esamineremo prontamente i contenuti segnalati per mantenere l'integrità e la sicurezza della nostra piattaforma. Utilizzando Context7, riconosci di farlo a tua discrezione e a tuo rischio.
388 |
389 | ## Context7 nei Media
390 |
391 | - [Better Stack: "Free Tool Makes Cursor 10x Smarter"](https://youtu.be/52FC3qObp9E)
392 | - [Cole Medin: "This is Hands Down the BEST MCP Server for AI Coding Assistants"](https://www.youtube.com/watch?v=G7gK8H6u7Rs)
393 | - [Income stream surfers: "Context7 + SequentialThinking MCPs: Is This AGI?"](https://www.youtube.com/watch?v=-ggvzyLpK6o)
394 | - [Julian Goldie SEO: "Context7: New MCP AI Agent Update"](https://www.youtube.com/watch?v=CTZm6fBYisc)
395 | - [JeredBlu: "Context 7 MCP: Get Documentation Instantly + VS Code Setup"](https://www.youtube.com/watch?v=-ls0D-rtET4)
396 | - [Income stream surfers: "Context7: The New MCP Server That Will CHANGE AI Coding"](https://www.youtube.com/watch?v=PS-2Azb-C3M)
397 |
398 | ## Storico delle Stelle
399 |
400 | [](https://www.star-history.com/#upstash/context7&Date)
401 |
402 | ## Licenza
403 |
404 | MIT
405 |
```
--------------------------------------------------------------------------------
/docs/README.tr.md:
--------------------------------------------------------------------------------
```markdown
1 | # Context7 MCP - Herhangi Bir Prompt İçin Güncel Kod Belgeleri
2 |
3 | [](https://context7.com) [](https://smithery.ai/server/@upstash/context7-mcp) [<img alt="VS Code'da Yükle (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Context7%20MCP%20Y%C3%BCkle&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)
4 |
5 | [](./README.zh-CN.md) [](./README.ko.md) [](./README.es.md) [](./README.fr.md) [-purple>)](./README.pt-BR.md) [](./README.it.md) [](./README.id-ID.md) [](./README.de.md) [](./README.ru.md) [](./README.tr.md)
6 |
7 | ## ❌ Context7 Olmadan
8 |
9 | LLM'ler, kullandığınız kütüphaneler hakkında güncel olmayan veya genel bilgilere güvenir. Karşılaştığınız sorunlar:
10 |
11 | - ❌ Kod örnekleri eskidir ve bir yıllık eğitim verilerine dayanır
12 | - ❌ Halüsinasyon yapılan API'ler gerçekte mevcut değildir
13 | - ❌ Eski paket sürümleri için genel cevaplar alırsınız
14 |
15 | ## ✅ Context7 İle
16 |
17 | Context7 MCP, güncel ve sürüme özel belgeleri ve kod örneklerini doğrudan kaynağından çeker ve doğrudan prompt'unuza yerleştirir.
18 |
19 | Cursor'da prompt'unuza `use context7` ekleyin:
20 |
21 | ```txt
22 | Next.js ile app router kullanan basit bir proje oluştur. use context7
23 | ```
24 |
25 | ```txt
26 | PostgreSQL kimlik bilgileriyle şehir değeri "" olan satırları silmek için bir betik oluştur. use context7
27 | ```
28 |
29 | Context7, güncel kod örneklerini ve belgelerini doğrudan LLM'inizin içeriğine getirir.
30 |
31 | - 1️⃣ Prompt'unuzu doğal bir şekilde yazın
32 | - 2️⃣ LLM'e `use context7` kullanmasını söyleyin
33 | - 3️⃣ Çalışan kod cevapları alın
34 |
35 | Sekme değiştirme, var olmayan halüsinasyon API'ler, güncel olmayan kod üretimleri yok.
36 |
37 | ## 🛠️ Başlangıç
38 |
39 | ### Gereksinimler
40 |
41 | - Node.js >= v18.0.0
42 | - Cursor, Windsurf, Claude Desktop veya başka bir MCP İstemcisi
43 |
44 | ### Smithery aracılığıyla kurulum
45 |
46 | Context7 MCP Server'ı Claude Desktop için [Smithery](https://smithery.ai/server/@upstash/context7-mcp) aracılığıyla otomatik olarak kurmak için:
47 |
48 | ```bash
49 | npx -y @smithery/cli install @upstash/context7-mcp --client claude
50 | ```
51 |
52 | ### Cursor'da Kurulum
53 |
54 | Şu yolu izleyin: `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`
55 |
56 | Aşağıdaki yapılandırmayı Cursor `~/.cursor/mcp.json` dosyanıza yapıştırmanız önerilen yaklaşımdır. Ayrıca, proje klasörünüzde `.cursor/mcp.json` oluşturarak belirli bir projeye de kurabilirsiniz. Daha fazla bilgi için [Cursor MCP belgelerine](https://docs.cursor.com/context/model-context-protocol) bakabilirsiniz.
57 |
58 | ```json
59 | {
60 | "mcpServers": {
61 | "context7": {
62 | "command": "npx",
63 | "args": ["-y", "@upstash/context7-mcp@latest"]
64 | }
65 | }
66 | }
67 | ```
68 |
69 | <details>
70 | <summary>Alternatif: Bun Kullanın</summary>
71 |
72 | ```json
73 | {
74 | "mcpServers": {
75 | "context7": {
76 | "command": "bunx",
77 | "args": ["-y", "@upstash/context7-mcp@latest"]
78 | }
79 | }
80 | }
81 | ```
82 |
83 | </details>
84 |
85 | <details>
86 | <summary>Alternatif: Deno Kullanın</summary>
87 |
88 | ```json
89 | {
90 | "mcpServers": {
91 | "context7": {
92 | "command": "deno",
93 | "args": ["run", "--allow-net", "npm:@upstash/context7-mcp"]
94 | }
95 | }
96 | }
97 | ```
98 |
99 | </details>
100 |
101 | ### Windsurf'te Kurulum
102 |
103 | Bunu Windsurf MCP yapılandırma dosyanıza ekleyin. Daha fazla bilgi için [Windsurf MCP belgelerine](https://docs.windsurf.com/windsurf/mcp) bakabilirsiniz.
104 |
105 | ```json
106 | {
107 | "mcpServers": {
108 | "context7": {
109 | "command": "npx",
110 | "args": ["-y", "@upstash/context7-mcp@latest"]
111 | }
112 | }
113 | }
114 | ```
115 |
116 | ### VS Code'da Kurulum
117 |
118 | [<img alt="VS Code'da Yükle (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Context7%20MCP%20Y%C3%BCkle&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)
119 | [<img alt="VS Code Insiders'da Yükle (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Context7%20MCP%20Y%C3%BCkle&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%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)
120 |
121 | Bunu VS Code MCP yapılandırma dosyanıza ekleyin. Daha fazla bilgi için [VS Code MCP belgelerine](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) bakabilirsiniz.
122 |
123 | ```json
124 | {
125 | "servers": {
126 | "Context7": {
127 | "type": "stdio",
128 | "command": "npx",
129 | "args": ["-y", "@upstash/context7-mcp@latest"]
130 | }
131 | }
132 | }
133 | ```
134 |
135 | ### Zed'de Kurulum
136 |
137 | [Zed Uzantıları](https://zed.dev/extensions?query=Context7) aracılığıyla kurulabilir veya Zed `settings.json` dosyanıza ekleyebilirsiniz. Daha fazla bilgi için [Zed Context Server belgelerine](https://zed.dev/docs/assistant/context-servers) bakabilirsiniz.
138 |
139 | ```json
140 | {
141 | "context_servers": {
142 | "Context7": {
143 | "command": {
144 | "path": "npx",
145 | "args": ["-y", "@upstash/context7-mcp@latest"]
146 | },
147 | "settings": {}
148 | }
149 | }
150 | }
151 | ```
152 |
153 | ### Claude Code'da Kurulum
154 |
155 | 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.
156 |
157 | ```sh
158 | claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
159 | ```
160 |
161 | ### Claude Desktop'ta Kurulum
162 |
163 | Bunu Claude Desktop `claude_desktop_config.json` dosyanıza ekleyin. Daha fazla bilgi için [Claude Desktop MCP belgelerine](https://modelcontextprotocol.io/quickstart/user) bakabilirsiniz.
164 |
165 | ```json
166 | {
167 | "mcpServers": {
168 | "Context7": {
169 | "command": "npx",
170 | "args": ["-y", "@upstash/context7-mcp@latest"]
171 | }
172 | }
173 | }
174 | ```
175 |
176 | ### Copilot Coding Agent Kurulumu
177 |
178 | Aşağıdaki yapılandırmayı Copilot Coding Agent'ın `mcp` bölümüne ekleyin (Repository->Settings->Copilot->Coding agent->MCP configuration):
179 |
180 | ```json
181 | {
182 | "mcpServers": {
183 | "context7": {
184 | "type": "http",
185 | "url": "https://mcp.context7.com/mcp",
186 | "tools": ["get-library-docs", "resolve-library-id"]
187 | }
188 | }
189 | }
190 | ```
191 |
192 | Daha fazla bilgi için [resmi GitHub dokümantasyonuna](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp) bakabilirsiniz.
193 |
194 | ### Docker Kullanımı
195 |
196 | MCP sunucusunu bir Docker konteynerinde çalıştırmayı tercih ederseniz:
197 |
198 | 1. **Docker Görüntüsü Oluşturun:**
199 |
200 | Önce, proje kökünde (veya tercih ettiğiniz herhangi bir yerde) bir `Dockerfile` oluşturun:
201 |
202 | <details>
203 | <summary>Dockerfile içeriğini görmek için tıklayın</summary>
204 |
205 | ```Dockerfile
206 | FROM node:18-alpine
207 |
208 | WORKDIR /app
209 |
210 | # En son sürümü global olarak yükleyin
211 | RUN npm install -g @upstash/context7-mcp@latest
212 |
213 | # Gerekirse varsayılan portu açın (isteğe bağlı, MCP istemci etkileşimine bağlıdır)
214 | # EXPOSE 3000
215 |
216 | # Sunucuyu çalıştırmak için varsayılan komut
217 | CMD ["context7-mcp"]
218 | ```
219 |
220 | </details>
221 |
222 | Ardından, bir etiket (örneğin, `context7-mcp`) kullanarak görüntüyü oluşturun. **Docker Desktop'un (veya Docker daemon'un) çalıştığından emin olun.** `Dockerfile`'ı kaydettiğiniz dizinde aşağıdaki komutu çalıştırın:
223 |
224 | ```bash
225 | docker build -t context7-mcp .
226 | ```
227 |
228 | 2. **MCP İstemcinizi Yapılandırın:**
229 |
230 | MCP istemcinizin yapılandırmasını Docker komutunu kullanacak şekilde güncelleyin.
231 |
232 | _cline_mcp_settings.json için örnek:_
233 |
234 | ```json
235 | {
236 | "mcpServers": {
237 | "Сontext7": {
238 | "autoApprove": [],
239 | "disabled": false,
240 | "timeout": 60,
241 | "command": "docker",
242 | "args": ["run", "-i", "--rm", "context7-mcp"],
243 | "transportType": "stdio"
244 | }
245 | }
246 | }
247 | ```
248 |
249 | _Not: Bu bir örnek yapılandırmadır. Yapıyı uyarlamak için MCP istemcinize (Cursor, VS Code vb.) özel örneklere bakın (örneğin, `mcpServers` ve `servers` farkı). Ayrıca, `args` içindeki görüntü adının `docker build` komutu sırasında kullanılan etiketle eşleştiğinden emin olun._
250 |
251 | ### Çevre Değişkenleri
252 |
253 | - `DEFAULT_MINIMUM_TOKENS`: Belge alımı için minimum token sayısını ayarlayın (varsayılan: 10000).
254 |
255 | Örnekler:
256 |
257 | ```json
258 | {
259 | "mcpServers": {
260 | "context7": {
261 | "command": "npx",
262 | "args": ["-y", "@upstash/context7-mcp@latest"],
263 | "env": {
264 | "DEFAULT_MINIMUM_TOKENS": "10000"
265 | }
266 | }
267 | }
268 | }
269 | ```
270 |
271 | ### Kullanılabilir Araçlar
272 |
273 | - `resolve-library-id`: Genel bir kütüphane adını Context7 uyumlu bir kütüphane ID'sine dönüştürür.
274 | - `libraryName` (gerekli)
275 | - `get-library-docs`: Context7 uyumlu bir kütüphane ID'si kullanarak bir kütüphane için belgeleri getirir.
276 | - `context7CompatibleLibraryID` (gerekli)
277 | - `topic` (isteğe bağlı): Belgeleri belirli bir konuya odaklayın (örn. "routing", "hooks")
278 | - `tokens` (isteğe bağlı, varsayılan 10000): Döndürülecek maksimum token sayısı. Yapılandırılmış `DEFAULT_MINIMUM_TOKENS` değerinden veya varsayılan 10000 değerinden düşük değerler otomatik olarak o değere yükseltilir.
279 |
280 | ## Geliştirme
281 |
282 | Projeyi klonlayın ve bağımlılıkları yükleyin:
283 |
284 | ```bash
285 | bun i
286 | ```
287 |
288 | Derleyin:
289 |
290 | ```bash
291 | bun run build
292 | ```
293 |
294 | ### Yerel Yapılandırma Örneği
295 |
296 | ```json
297 | {
298 | "mcpServers": {
299 | "context7": {
300 | "command": "npx",
301 | "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"]
302 | }
303 | }
304 | }
305 | ```
306 |
307 | ### MCP Inspector ile Test Etme
308 |
309 | ```bash
310 | npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp@latest
311 | ```
312 |
313 | ## Sorun Giderme
314 |
315 | ### ERR_MODULE_NOT_FOUND
316 |
317 | Bu hatayı görürseniz, `npx` yerine `bunx` kullanmayı deneyin.
318 |
319 | ```json
320 | {
321 | "mcpServers": {
322 | "context7": {
323 | "command": "bunx",
324 | "args": ["-y", "@upstash/context7-mcp@latest"]
325 | }
326 | }
327 | }
328 | ```
329 |
330 | Bu, özellikle `npx`'in paketleri düzgün şekilde yüklemediği veya çözemediği ortamlarda modül çözümleme sorunlarını genellikle çözer.
331 |
332 | ### ESM Çözümleme Sorunları
333 |
334 | `Error: Cannot find module 'uriTemplate.js'` gibi bir hatayla karşılaşırsanız, `--experimental-vm-modules` bayrağıyla çalıştırmayı deneyin:
335 |
336 | ```json
337 | {
338 | "mcpServers": {
339 | "context7": {
340 | "command": "npx",
341 | "args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]
342 | }
343 | }
344 | }
345 | ```
346 |
347 | ### MCP İstemci Hataları
348 |
349 | 1. Paket adından `@latest` ifadesini kaldırmayı deneyin.
350 |
351 | 2. Alternatif olarak `bunx` kullanmayı deneyin.
352 |
353 | 3. Alternatif olarak `deno` kullanmayı deneyin.
354 |
355 | 4. `npx` ile yerel fetch desteğine sahip olmak için Node v18 veya daha yüksek bir sürüm kullandığınızdan emin olun.
356 |
357 | ## Sorumluluk Reddi
358 |
359 | Context7 projeleri topluluk katkılıdır ve yüksek kaliteyi korumaya çalışsak da, tüm kütüphane belgelerinin doğruluğunu, eksiksizliğini veya güvenliğini garanti edemeyiz. Context7'de listelenen projeler, Context7 tarafından değil, ilgili sahipleri tarafından geliştirilmekte ve sürdürülmektedir. Şüpheli, uygunsuz veya potansiyel olarak zararlı içerikle karşılaşırsanız, lütfen bizi hemen bilgilendirmek için proje sayfasındaki "Bildir" düğmesini kullanın. Tüm bildirimleri ciddiye alıyoruz ve platformumuzun bütünlüğünü ve güvenliğini korumak için işaretlenen içeriği hızla inceleyeceğiz. Context7'yi kullanarak, bunu kendi takdirinizle ve riskinizle yaptığınızı kabul etmiş olursunuz.
360 |
361 | ## Context7 Medyada
362 |
363 | - [Better Stack: "Ücretsiz Araç Cursor'u 10 Kat Daha Akıllı Yapıyor"](https://youtu.be/52FC3qObp9E)
364 | - [Cole Medin: "Bu, Tartışmasız AI Kodlama Asistanları İçin EN İYİ MCP Sunucusudur"](https://www.youtube.com/watch?v=G7gK8H6u7Rs)
365 | - [Income stream surfers: "Context7 + SequentialThinking MCP'leri: Bu AGI mi?"](https://www.youtube.com/watch?v=-ggvzyLpK6o)
366 | - [Julian Goldie SEO: "Context7: Yeni MCP AI Aracı Güncellemesi"](https://www.youtube.com/watch?v=CTZm6fBYisc)
367 | - [JeredBlu: "Context 7 MCP: Belgeleri Anında Alın + VS Code Kurulumu"](https://www.youtube.com/watch?v=-ls0D-rtET4)
368 | - [Income stream surfers: "Context7: AI Kodlamayı DEĞİŞTİRECEK Yeni MCP Sunucusu"](https://www.youtube.com/watch?v=PS-2Azb-C3M)
369 | - [AICodeKing: "Context7 + Cline & RooCode: Bu MCP Sunucusu CLINE'ı 100 KAT DAHA ETKİLİ YAPIYOR!"](https://www.youtube.com/watch?v=qZfENAPMnyo)
370 | - [Sean Kochel: "Vibe Kodlama İhtişamı İçin 5 MCP Sunucusu (Tak ve Çalıştır)"](https://www.youtube.com/watch?v=LqTQi8qexJM)
371 |
372 | ## Yıldız Geçmişi
373 |
374 | [](https://www.star-history.com/#upstash/context7&Date)
375 |
376 | ## Lisans
377 |
378 | MIT
379 |
```
--------------------------------------------------------------------------------
/docs/README.fr.md:
--------------------------------------------------------------------------------
```markdown
1 | # Context7 MCP - Documentation à jour pour vos prompts
2 |
3 | [](https://context7.com) [](https://smithery.ai/server/@upstash/context7-mcp) [<img alt="Installer dans VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Installer%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)
4 |
5 | ## ❌ Sans Context7
6 |
7 | Les LLMs s’appuient sur des informations obsolètes ou génériques concernant les bibliothèques que vous utilisez. Vous obtenez :
8 |
9 | - ❌ Des exemples de code obsolètes, basés sur des données d’entraînement vieilles d’un an
10 | - ❌ Des APIs inventées qui n’existent même pas
11 | - ❌ Des réponses génériques pour d’anciennes versions de packages
12 |
13 | ## ✅ Avec Context7
14 |
15 | Context7 MCP récupère la documentation et les exemples de code à jour, spécifiques à la version, directement à la source — et les place dans votre prompt.
16 |
17 | Ajoutez `use context7` à votre prompt dans Cursor :
18 |
19 | ```txt
20 | Crée un projet Next.js basique avec app router. use context7
21 | ```
22 |
23 | ```txt
24 | Crée un script pour supprimer les lignes où la ville est "" avec des identifiants PostgreSQL. use context7
25 | ```
26 |
27 | Context7 apporte des exemples de code et de la documentation à jour directement dans le contexte de votre LLM.
28 |
29 | - 1️⃣ Rédigez votre prompt naturellement
30 | - 2️⃣ Dites au LLM `use context7`
31 | - 3️⃣ Obtenez des réponses de code qui fonctionnent
32 |
33 | Plus besoin de changer d’onglet, plus d’APIs inventées, plus de code obsolète.
34 |
35 | ## 🛠️ Démarrage
36 |
37 | ### Prérequis
38 |
39 | - Node.js >= v18.0.0
40 | - Cursor, Windsurf, Claude Desktop ou un autre client MCP
41 |
42 | ### Installation via Smithery
43 |
44 | Pour installer Context7 MCP Server pour Claude Desktop automatiquement via [Smithery](https://smithery.ai/server/@upstash/context7-mcp) :
45 |
46 | ```bash
47 | npx -y @smithery/cli install @upstash/context7-mcp --client claude
48 | ```
49 |
50 | ### Installation dans Cursor
51 |
52 | Allez dans : `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`
53 |
54 | La méthode recommandée est de coller la configuration suivante dans votre fichier `~/.cursor/mcp.json`. Voir la [documentation Cursor MCP](https://docs.cursor.com/context/model-context-protocol) pour plus d’informations.
55 |
56 | ```json
57 | {
58 | "mcpServers": {
59 | "context7": {
60 | "command": "npx",
61 | "args": ["-y", "@upstash/context7-mcp@latest"]
62 | }
63 | }
64 | }
65 | ```
66 |
67 | <details>
68 | <summary>Alternative : Utiliser Bun</summary>
69 |
70 | ```json
71 | {
72 | "mcpServers": {
73 | "context7": {
74 | "command": "bunx",
75 | "args": ["-y", "@upstash/context7-mcp@latest"]
76 | }
77 | }
78 | }
79 | ```
80 |
81 | </details>
82 |
83 | <details>
84 | <summary>Alternative : Utiliser Deno</summary>
85 |
86 | ```json
87 | {
88 | "mcpServers": {
89 | "context7": {
90 | "command": "deno",
91 | "args": ["run", "--allow-net", "npm:@upstash/context7-mcp"]
92 | }
93 | }
94 | }
95 | ```
96 |
97 | </details>
98 |
99 | ### Installation dans Windsurf
100 |
101 | Ajoutez ceci à votre fichier de configuration MCP Windsurf. Voir la [documentation Windsurf MCP](https://docs.windsurf.com/windsurf/mcp) pour plus d’informations.
102 |
103 | ```json
104 | {
105 | "mcpServers": {
106 | "context7": {
107 | "command": "npx",
108 | "args": ["-y", "@upstash/context7-mcp@latest"]
109 | }
110 | }
111 | }
112 | ```
113 |
114 | ### Installation dans VS Code
115 |
116 | [<img alt="Installer dans VS Code (npx)" src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Installer%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)
117 | [<img alt="Installer dans VS Code Insiders (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Installer%20Context7%20MCP&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%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)
118 |
119 | Ajoutez ceci à votre fichier de configuration MCP VS Code. Voir la [documentation VS Code MCP](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) pour plus d'informations.
120 |
121 | ```json
122 | {
123 | "servers": {
124 | "Context7": {
125 | "type": "stdio",
126 | "command": "npx",
127 | "args": ["-y", "@upstash/context7-mcp@latest"]
128 | }
129 | }
130 | }
131 | ```
132 |
133 | ### Installation dans Zed
134 |
135 | Peut être installé via [Zed Extensions](https://zed.dev/extensions?query=Context7) ou en ajoutant ceci à votre `settings.json` Zed. Voir la [documentation Zed Context Server](https://zed.dev/docs/assistant/context-servers).
136 |
137 | ```json
138 | {
139 | "context_servers": {
140 | "Context7": {
141 | "command": {
142 | "path": "npx",
143 | "args": ["-y", "@upstash/context7-mcp@latest"]
144 | },
145 | "settings": {}
146 | }
147 | }
148 | }
149 | ```
150 |
151 | ### Installation dans Claude Code
152 |
153 | Exécutez cette commande. Voir la [documentation Claude Code MCP](https://docs.anthropic.com/fr/docs/claude-code/mcp).
154 |
155 | ```sh
156 | claude mcp add context7 -- npx -y @upstash/context7-mcp@latest
157 | ```
158 |
159 | ### Installation dans Claude Desktop
160 |
161 | Ajoutez ceci à votre fichier `claude_desktop_config.json`. Voir la [documentation Claude Desktop MCP](https://modelcontextprotocol.io/quickstart/user).
162 |
163 | ```json
164 | {
165 | "mcpServers": {
166 | "Context7": {
167 | "command": "npx",
168 | "args": ["-y", "@upstash/context7-mcp@latest"]
169 | }
170 | }
171 | }
172 | ```
173 |
174 | ### Installation dans BoltAI
175 |
176 | Ouvrez la page "Settings" de l'application, naviguez jusqu'à "Plugins", et entrez le JSON suivant :
177 |
178 | ```json
179 | {
180 | "mcpServers": {
181 | "context7": {
182 | "command": "npx",
183 | "args": ["-y", "@upstash/context7-mcp@latest"]
184 | }
185 | }
186 | }
187 | ```
188 |
189 | Une fois enregistré, saisissez dans le chat `get-library-docs` suivi de votre ID de documentation Context7 (par exemple, `get-library-docs /nuxt/ui`). Plus d'informations sont disponibles sur le [site de documentation BoltAI](https://docs.boltai.com/docs/plugins/mcp-servers). Pour BoltAI sur iOS, [consultez ce guide](https://docs.boltai.com/docs/boltai-mobile/mcp-servers).
190 |
191 | ### Installation dans Copilot Coding Agent
192 |
193 | Ajoutez la configuration suivante à la section `mcp` de votre fichier de configuration Copilot Coding Agent (Repository->Settings->Copilot->Coding agent->MCP configuration) :
194 |
195 | ```json
196 | {
197 | "mcpServers": {
198 | "context7": {
199 | "type": "http",
200 | "url": "https://mcp.context7.com/mcp",
201 | "tools": ["get-library-docs", "resolve-library-id"]
202 | }
203 | }
204 | }
205 | ```
206 |
207 | Pour plus d'informations, consultez la [documentation officielle GitHub](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp).
208 |
209 | ### Installation dans Copilot CLI
210 |
211 | 1. Ouvrez le fichier de configuration MCP de Copilot CLI. L'emplacement est `~/.copilot/mcp-config.json` (où `~` est votre répertoire personnel).
212 | 2. Ajoutez ce qui suit à l'objet `mcpServers` dans votre fichier `mcp-config.json` :
213 |
214 | ```json
215 | {
216 | "mcpServers": {
217 | "context7": {
218 | "type": "http",
219 | "url": "https://mcp.context7.com/mcp",
220 | "headers": {
221 | "CONTEXT7_API_KEY": "YOUR_API_KEY"
222 | },
223 | "tools": [
224 | "get-library-docs",
225 | "resolve-library-id"
226 | ]
227 | }
228 | }
229 | }
230 | ```
231 |
232 | Ou, pour un serveur local :
233 |
234 | ```json
235 | {
236 | "mcpServers": {
237 | "context7": {
238 | "type": "local",
239 | "command": "npx",
240 | "tools": [
241 | "get-library-docs",
242 | "resolve-library-id"
243 | ],
244 | "args": [
245 | "-y",
246 | "@upstash/context7-mcp",
247 | "--api-key",
248 | "YOUR_API_KEY"
249 | ]
250 | }
251 | }
252 | }
253 | ```
254 |
255 | Si le fichier `mcp-config.json` n'existe pas, créez-le.
256 |
257 | ### Utilisation avec Docker
258 |
259 | Si vous préférez exécuter le serveur MCP dans un conteneur Docker :
260 |
261 | 1. **Construisez l’image Docker :**
262 |
263 | Créez un `Dockerfile` à la racine du projet (ou ailleurs) :
264 |
265 | <details>
266 | <summary>Voir le contenu du Dockerfile</summary>
267 |
268 | ```Dockerfile
269 | FROM node:18-alpine
270 |
271 | WORKDIR /app
272 |
273 | # Installer la dernière version en global
274 | RUN npm install -g @upstash/context7-mcp@latest
275 |
276 | # Exposer le port par défaut si besoin (optionnel)
277 | # EXPOSE 3000
278 |
279 | # Commande par défaut
280 | CMD ["context7-mcp"]
281 | ```
282 |
283 | </details>
284 |
285 | Puis, construisez l’image :
286 |
287 | ```bash
288 | docker build -t context7-mcp .
289 | ```
290 |
291 | 2. **Configurez votre client MCP :**
292 |
293 | Mettez à jour la configuration de votre client MCP pour utiliser la commande Docker.
294 |
295 | _Exemple pour un fichier cline_mcp_settings.json :_
296 |
297 | ```json
298 | {
299 | "mcpServers": {
300 | "Сontext7": {
301 | "autoApprove": [],
302 | "disabled": false,
303 | "timeout": 60,
304 | "command": "docker",
305 | "args": ["run", "-i", "--rm", "context7-mcp"],
306 | "transportType": "stdio"
307 | }
308 | }
309 | }
310 | ```
311 |
312 | _Note : Ceci est un exemple. Adaptez la structure selon votre client MCP (voir plus haut dans ce README). Assurez-vous que le nom de l’image dans `args` correspond au tag utilisé lors du build._
313 |
314 | ### Installation sous Windows
315 |
316 | La configuration sous Windows est légèrement différente par rapport à Linux ou macOS (_`Cline` est utilisé dans l'exemple_). Le même principe s'applique à d'autres éditeurs; référez-vous à la configuration de `command` et `args`.
317 |
318 | ```json
319 | {
320 | "mcpServers": {
321 | "github.com/upstash/context7-mcp": {
322 | "command": "cmd",
323 | "args": ["/c", "npx", "-y", "@upstash/context7-mcp@latest"],
324 | "disabled": false,
325 | "autoApprove": []
326 | }
327 | }
328 | }
329 | ```
330 |
331 | ### Variables d'environnement
332 |
333 | - `DEFAULT_MINIMUM_TOKENS`: Définissez le nombre minimum de tokens pour la récupération de documentation (par défaut: 10000).
334 |
335 | Exemples:
336 |
337 | ```json
338 | {
339 | "mcpServers": {
340 | "context7": {
341 | "command": "npx",
342 | "args": ["-y", "@upstash/context7-mcp@latest"],
343 | "env": {
344 | "DEFAULT_MINIMUM_TOKENS": "10000"
345 | }
346 | }
347 | }
348 | }
349 | ```
350 |
351 | ### Outils disponibles
352 |
353 | - `resolve-library-id` : Résout un nom de bibliothèque général en un ID compatible Context7.
354 | - `libraryName` (obligatoire)
355 | - `get-library-docs` : Récupère la documentation d’une bibliothèque via un ID Context7.
356 | - `context7CompatibleLibraryID` (obligatoire)
357 | - `topic` (optionnel) : Focaliser la doc sur un sujet précis (ex : "routing", "hooks")
358 | - `tokens` (optionnel, par défaut 10000) : Nombre max de tokens à retourner. Les valeurs < 10000 sont automatiquement augmentées à 10000.
359 |
360 | ## Développement
361 |
362 | Clonez le projet et installez les dépendances :
363 |
364 | ```bash
365 | bun i
366 | ```
367 |
368 | Build :
369 |
370 | ```bash
371 | bun run build
372 | ```
373 |
374 | ### Exemple de configuration locale
375 |
376 | ```json
377 | {
378 | "mcpServers": {
379 | "context7": {
380 | "command": "npx",
381 | "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"]
382 | }
383 | }
384 | }
385 | ```
386 |
387 | ### Tester avec MCP Inspector
388 |
389 | ```bash
390 | npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp@latest
391 | ```
392 |
393 | ## Dépannage
394 |
395 | ### ERR_MODULE_NOT_FOUND
396 |
397 | Si vous voyez cette erreur, essayez d’utiliser `bunx` à la place de `npx`.
398 |
399 | ```json
400 | {
401 | "mcpServers": {
402 | "context7": {
403 | "command": "bunx",
404 | "args": ["-y", "@upstash/context7-mcp@latest"]
405 | }
406 | }
407 | }
408 | ```
409 |
410 | Cela résout souvent les problèmes de résolution de modules, surtout si `npx` n’installe ou ne résout pas correctement les packages.
411 |
412 | ### Problèmes de résolution ESM
413 |
414 | Si vous rencontrez une erreur comme : `Error: Cannot find module 'uriTemplate.js'` essayez d'exécuter avec le drapeau `--experimental-vm-modules` :
415 |
416 | ```json
417 | {
418 | "mcpServers": {
419 | "context7": {
420 | "command": "npx",
421 | "args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]
422 | }
423 | }
424 | }
425 | ```
426 |
427 | ### Erreurs client MCP
428 |
429 | 1. Essayez de retirer `@latest` du nom du package.
430 | 2. Essayez d'utiliser `bunx` comme alternative.
431 | 3. Essayez d'utiliser `deno` comme alternative.
432 | 4. Assurez-vous d'utiliser Node v18 ou supérieur pour avoir le support natif de fetch avec `npx`.
433 |
434 | ## Clause de non-responsabilité
435 |
436 | Les projets Context7 sont des contributions de la communauté, et bien que nous nous efforcions de maintenir une haute qualité, nous ne pouvons garantir l'exactitude, l'exhaustivité ou la sécurité de toute la documentation des bibliothèques. Les projets listés dans Context7 sont développés et maintenus par leurs propriétaires respectifs, et non par Context7. Si vous rencontrez un contenu suspect, inapproprié ou potentiellement nuisible, veuillez utiliser le bouton "Signaler" sur la page du projet pour nous le faire savoir immédiatement. Nous prenons tous les signalements au sérieux et examinerons rapidement les contenus signalés pour maintenir l'intégrité et la sécurité de notre plateforme. En utilisant Context7, vous reconnaissez que vous le faites à votre propre discrétion et à vos risques et périls.
437 |
438 | ## Context7 dans les médias
439 |
440 | - [Better Stack: "Free Tool Makes Cursor 10x Smarter"](https://youtu.be/52FC3qObp9E)
441 | - [Cole Medin: "This is Hands Down the BEST MCP Server for AI Coding Assistants"](https://www.youtube.com/watch?v=G7gK8H6u7Rs)
442 | - [Income stream surfers: "Context7 + SequentialThinking MCPs: Is This AGI?"](https://www.youtube.com/watch?v=-ggvzyLpK6o)
443 | - [Julian Goldie SEO: "Context7: New MCP AI Agent Update"](https://www.youtube.com/watch?v=CTZm6fBYisc)
444 | - [JeredBlu: "Context 7 MCP: Get Documentation Instantly + VS Code Setup"](https://www.youtube.com/watch?v=-ls0D-rtET4)
445 | - [Income stream surfers: "Context7: The New MCP Server That Will CHANGE AI Coding"](https://www.youtube.com/watch?v=PS-2Azb-C3M)
446 | - [AICodeKing: "Context7 + Cline & RooCode: This MCP Server Makes CLINE 100X MORE EFFECTIVE!"](https://www.youtube.com/watch?v=qZfENAPMnyo)
447 | - [Sean Kochel: "5 MCP Servers For Vibe Coding Glory (Just Plug-In & Go)"](https://www.youtube.com/watch?v=LqTQi8qexJM)
448 |
449 | ## Historique des stars
450 |
451 | [](https://www.star-history.com/#upstash/context7&Date)
452 |
453 | ## Licence
454 |
455 | MIT
456 |
```
--------------------------------------------------------------------------------
/docs/README.id-ID.md:
--------------------------------------------------------------------------------
```markdown
1 | # Context7 MCP - Dokumentasi Kode Terkini Untuk Setiap Permintaan
2 |
3 | [](https://context7.com) [](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)
4 | [](../README.md) [](./README.zh-TW.md) [](./README.zh-CN.md) [](./README.ja.md) [](./README.ko.md) [](./README.es.md) [](./README.fr.md) [-purple>)](./README.pt-BR.md) [](./README.it.md) [](./README.id-ID.md) [](./README.de.md) [](./README.ru.md) [](./README.uk.md) [](./README.tr.md) [](./README.ar.md)
5 |
6 | ## ❌ Tanpa Context7
7 |
8 | LLM bergantung pada informasi yang sudah usang atau generik tentang pustaka yang Anda gunakan. Anda mendapatkan:
9 |
10 | - ❌ Contoh kode yang sudah usang dan berdasarkan data pelatihan dari tahun lalu
11 | - ❌ API yang diimajinasikan tidak pernah ada
12 | - ❌ Jawaban generik untuk versi paket yang lama
13 |
14 | ## ✅ Dengan Context7
15 |
16 | Context7 MCP mengambil dokumentasi dan contoh kode terkini yang spesifik versi langsung dari sumbernya — dan menempatkannya langsung ke dalam prompt Anda.
17 | Tambahkan `use context7` ke prompt Anda di Cursor:
18 |
19 | ```txt
20 | Buat middleware Next.js yang memeriksa JWT valid di cookie dan mengarahkan pengguna yang tidak terautentikasi ke `/login`. use context7
21 | ```
22 |
23 | ```txt
24 | Konfigurasikan skrip Cloudflare Worker untuk menyimpan respons API JSON selama lima menit. use context7
25 | ```
26 |
27 | Context7 mengambil contoh kode dan dokumentasi terkini langsung ke konteks LLM.
28 |
29 | - 1️⃣ Tulis permintaan Anda secara alami
30 | - 2️⃣ Beri tahu LLM untuk `use context7`
31 | - 3️⃣ Dapatkan jawaban kode yang berfungsi
32 | Tidak perlu berpindah tab, tidak ada API yang diimajinasikan yang tidak ada, tidak ada hasil kode usang.
33 |
34 | ## 📚 Menambahkan Proyek
35 |
36 | Kunjungi [panduan penambahan proyek](./adding-projects.md) untuk mempelajari cara menambahkan (atau memperbarui) pustaka favorit Anda ke Context7.
37 |
38 | ## 🛠️ Instalasi
39 |
40 | ### Persyaratan
41 |
42 | - Node.js >= v18.0.0
43 | - Cursor, Windsurf, Claude Desktop, atau klien MCP lainnya
44 |
45 | <details>
46 | <summary><b>Menginstal melalui Smithery</b></summary>
47 | Untuk menginstal Context7 MCP Server untuk klien apa pun secara otomatis melalui [Smithery](https://smithery.ai/server/@upstash/context7-mcp):
48 | ```bash
49 | npx -y @smithery/cli@latest install @upstash/context7-mcp --client <NAMA_KLIEN> --key <KUNCI_SMITHERY_ANDA>
50 | ```
51 | Anda dapat menemukan kunci Smithery Anda di [halaman web Smithery.ai](https://smithery.ai/server/@upstash/context7-mcp).
52 | </details>
53 |
54 | <details>
55 | <summary><b>Instal di Cursor</b></summary>
56 | Pergi ke: `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`
57 | Menyalin konfigurasi berikut ke file `~/.cursor/mcp.json` Anda adalah pendekatan yang direkomendasikan. Anda juga dapat menginstalnya di proyek tertentu dengan membuat `.cursor/mcp.json` di folder proyek Anda. Lihat [dokumentasi Cursor MCP](https://docs.cursor.com/context/model-context-protocol) untuk info lebih lanjut.
58 | > Sejak Cursor 1.0, Anda dapat mengklik tombol instal di bawah untuk instalasi satu klik instan.
59 |
60 | #### Koneksi Server Remote Cursor
61 |
62 | [](https://cursor.com/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D)
63 |
64 | ```json
65 | {
66 | "mcpServers": {
67 | "context7": {
68 | "url": "https://mcp.context7.com/mcp"
69 | }
70 | }
71 | }
72 | ```
73 |
74 | #### Koneksi Server Lokal Cursor
75 |
76 | [](https://cursor.com/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IC15IEB1cHN0YXNoL2NvbnRleHQ3LW1jcCJ9)
77 |
78 | ```json
79 | {
80 | "mcpServers": {
81 | "context7": {
82 | "command": "npx",
83 | "args": ["-y", "@upstash/context7-mcp"]
84 | }
85 | }
86 | }
87 | ```
88 |
89 | <details>
90 | <summary>Alternatif: Gunakan Bun</summary>
91 | [](https://cursor.com/install-mcp?name=context7&config=eyJjb21tYW5kIjoiYnVueCAteSBAdXBzdGFzaC9jb250ZXh0Ny1tY3AifQ%3D%3D)
92 | ```json
93 | {
94 | "mcpServers": {
95 | "context7": {
96 | "command": "bunx",
97 | "args": ["-y", "@upstash/context7-mcp"]
98 | }
99 | }
100 | }
101 | ```
102 | </details>
103 |
104 | <details>
105 | <summary>Alternatif: Gunakan Deno</summary>
106 | [](https://cursor.com/install-mcp?name=context7&config=eyJjb21tYW5kIjoiZGVubyBydW4gLS1hbGxvdy1lbnYgLS1hbGxvdy1uZXQgbnBtOkB1cHN0YXNoL2NvbnRleHQ3LW1jcCJ9)
107 | ```json
108 | {
109 | "mcpServers": {
110 | "context7": {
111 | "command": "deno",
112 | "args": ["run", "--allow-env=NO_DEPRECATION,TRACE_DEPRECATION", "--allow-net", "npm:@upstash/context7-mcp"]
113 | }
114 | }
115 | }
116 | ```
117 | </details>
118 | </details>
119 |
120 | <details>
121 | <summary><b>Instal di Windsurf</b></summary>
122 | Tambahkan ini ke file konfigurasi MCP Windsurf Anda. Lihat [dokumentasi MCP Windsurf](https://docs.windsurf.com/windsurf/mcp) untuk info lebih lanjut.
123 |
124 | #### Koneksi Server Remote Windsurf
125 |
126 | ```json
127 | {
128 | "mcpServers": {
129 | "context7": {
130 | "serverUrl": "https://mcp.context7.com/mcp"
131 | }
132 | }
133 | }
134 | ```
135 |
136 | #### Koneksi Server Lokal Windsurf
137 |
138 | ```json
139 | {
140 | "mcpServers": {
141 | "context7": {
142 | "command": "npx",
143 | "args": ["-y", "@upstash/context7-mcp"]
144 | }
145 | }
146 | }
147 | ```
148 |
149 | </details>
150 |
151 | <details>
152 | <summary><b>Instal di Trae</b></summary>
153 | Gunakan fitur Tambah secara manual dan isi informasi konfigurasi JSON untuk server MCP tersebut.
154 | Untuk detail lebih lanjut, kunjungi [dokumentasi Trae](https://docs.trae.ai/ide/model-context-protocol?_lang=en).
155 |
156 | #### Koneksi Server Remote Trae
157 |
158 | ```json
159 | {
160 | "mcpServers": {
161 | "context7": {
162 | "url": "https://mcp.context7.com/mcp"
163 | }
164 | }
165 | }
166 | ```
167 |
168 | #### Koneksi Server Lokal Trae
169 |
170 | ```json
171 | {
172 | "mcpServers": {
173 | "context7": {
174 | "command": "npx",
175 | "args": ["-y", "@upstash/context7-mcp"]
176 | }
177 | }
178 | }
179 | ```
180 |
181 | </details>
182 |
183 | <details>
184 | <summary><b>Instal di VS Code</b></summary>
185 | [<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)
186 | [<img alt="Install in VS Code Insiders (npx)" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Context7%20MCP&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%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)
187 |
188 | Tambahkan ini ke file konfigurasi MCP VS Code Anda. Lihat [dokumentasi MCP VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) untuk info lebih lanjut.
189 |
190 | #### Koneksi Server Remote VS Code
191 |
192 | ```json
193 | "mcp": {
194 | "servers": {
195 | "context7": {
196 | "type": "http",
197 | "url": "https://mcp.context7.com/mcp"
198 | }
199 | }
200 | }
201 | ```
202 |
203 | #### Koneksi Server Lokal VS Code
204 |
205 | ```json
206 | "mcp": {
207 | "servers": {
208 | "context7": {
209 | "type": "stdio",
210 | "command": "npx",
211 | "args": ["-y", "@upstash/context7-mcp"]
212 | }
213 | }
214 | }
215 | ```
216 |
217 | </details>
218 |
219 | <details>
220 | <summary><b>Instal di Visual Studio 2022</b></summary>
221 | Anda dapat mengonfigurasi Context7 MCP di Visual Studio 2022 dengan mengikuti [dokumentasi Server MCP Visual Studio](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).
222 | Tambahkan ini ke file konfigurasi MCP Visual Studio Anda (lihat [dokumentasi Visual Studio](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022) untuk detailnya):
223 | ```json
224 | {
225 | "mcp": {
226 | "servers": {
227 | "context7": {
228 | "type": "http",
229 | "url": "https://mcp.context7.com/mcp"
230 | }
231 | }
232 | }
233 | }
234 | ```
235 | Atau, untuk server lokal:
236 | ```json
237 | {
238 | "mcp": {
239 | "servers": {
240 | "context7": {
241 | "type": "stdio",
242 | "command": "npx",
243 | "args": ["-y", "@upstash/context7-mcp"]
244 | }
245 | }
246 | }
247 | }
248 | ```
249 | Untuk informasi dan pemecahan masalah lebih lanjut, lihat [dokumentasi Server MCP Visual Studio](https://learn.microsoft.com/visualstudio/ide/mcp-servers?view=vs-2022).
250 | </details>
251 |
252 | <details>
253 | <summary><b>Instal di Zed</b></summary>
254 | Dapat diinstal melalui [Ekstensi Zed](https://zed.dev/extensions?query=Context7) atau Anda dapat menambahkan ini ke `settings.json` Zed Anda. Lihat [dokumentasi Server Konteks Zed](https://zed.dev/docs/assistant/context-servers) untuk info lebih lanjut.
255 | ```json
256 | {
257 | "context_servers": {
258 | "Context7": {
259 | "command": {
260 | "path": "npx",
261 | "args": ["-y", "@upstash/context7-mcp"]
262 | },
263 | "settings": {}
264 | }
265 | }
266 | }
267 | ```
268 | </details>
269 |
270 | <details>
271 | <summary><b>Instal di Gemini CLI</b></summary>
272 | Lihat [Konfigurasi Gemini CLI](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md) untuk detailnya.
273 | 1. Buka file pengaturan Gemini CLI. Lokasinya adalah `~/.gemini/settings.json` (di mana `~` adalah direktori home Anda).
274 | 2. Tambahkan berikut ini ke objek `mcpServers` di file `settings.json` Anda:
275 | ```json
276 | {
277 | "mcpServers": {
278 | "context7": {
279 | "httpUrl": "https://mcp.context7.com/mcp"
280 | }
281 | }
282 | }
283 | ```
284 | Atau, untuk server lokal:
285 | ```json
286 | {
287 | "mcpServers": {
288 | "context7": {
289 | "command": "npx",
290 | "args": ["-y", "@upstash/context7-mcp"]
291 | }
292 | }
293 | }
294 | ```
295 | Jika objek `mcpServers` tidak ada, buatlah.
296 | </details>
297 |
298 | <details>
299 | <summary><b>Instal di Claude Code</b></summary>
300 | Jalankan perintah ini. Lihat [dokumentasi MCP Claude Code](https://docs.anthropic.com/id/docs/claude-code/mcp) untuk info lebih lanjut.
301 |
302 | #### Koneksi Server Remote Claude Code
303 |
304 | ```sh
305 | claude mcp add --transport http context7 https://mcp.context7.com/mcp
306 | ```
307 |
308 | #### Koneksi Server Lokal Claude Code
309 |
310 | ```sh
311 | claude mcp add context7 -- npx -y @upstash/context7-mcp
312 | ```
313 |
314 | </details>
315 |
316 | <details>
317 | <summary><b>Instal di Claude Desktop</b></summary>
318 | Tambahkan ini ke file `claude_desktop_config.json` Claude Desktop Anda. Lihat [dokumentasi MCP Claude Desktop](https://modelcontextprotocol.io/quickstart/user) untuk info lebih lanjut.
319 | ```json
320 | {
321 | "mcpServers": {
322 | "Context7": {
323 | "command": "npx",
324 | "args": ["-y", "@upstash/context7-mcp"]
325 | }
326 | }
327 | }
328 | ```
329 | </details>
330 |
331 | <details>
332 | <summary>
333 | <b>Instal di Cline</b>
334 | </summary>
335 | Anda dapat dengan mudah menginstal Context7 melalui [Pasar Server MCP Cline](https://cline.bot/mcp-marketplace) dengan mengikuti petunjuk berikut:
336 | 1. Buka **Cline**.
337 | 2. Klik ikon menu hamburger (☰) untuk masuk ke bagian **Server MCP**.
338 | 3. Gunakan bilah pencarian di tab **Marketplace** untuk menemukan *Context7*.
339 | 4. Klik tombol **Instal**.
340 | </details>
341 |
342 | <details>
343 | <summary><b>Instal di BoltAI</b></summary>
344 | Buka halaman "Pengaturan" aplikasi, navigasikan ke "Plugin," dan masukkan JSON berikut:
345 | ```json
346 | {
347 | "mcpServers": {
348 | "context7": {
349 | "command": "npx",
350 | "args": ["-y", "@upstash/context7-mcp"]
351 | }
352 | }
353 | }
354 | ```
355 | Setelah disimpan, masukkan di obrolan `get-library-docs` diikuti oleh ID dokumentasi Context7 Anda (contoh: `get-library-docs /nuxt/ui`). Informasi lebih lanjut tersedia di [situs dokumentasi BoltAI](https://docs.boltai.com/docs/plugins/mcp-servers). Untuk BoltAI di iOS, [lihat panduan ini](https://docs.boltai.com/docs/boltai-mobile/mcp-servers).
356 | </details>
357 |
358 | <details>
359 | <summary><b>Menggunakan Docker</b></summary>
360 | Jika Anda lebih suka menjalankan server MCP dalam wadah Docker:
361 | 1. **Bangun Gambar Docker:**
362 | Pertama, buat `Dockerfile` di direktori utama proyek (atau di mana pun Anda inginkan):
363 | <details>
364 | <summary>Klik untuk melihat isi Dockerfile</summary>
365 | ```Dockerfile
366 | FROM node:18-alpine
367 | WORKDIR /app
368 | # Instal versi terbaru secara global
369 | RUN npm install -g @upstash/context7-mcp
370 | # Ekspor port default jika diperlukan (opsional, tergantung pada interaksi klien MCP)
371 | # EXPOSE 3000
372 | # Perintah default untuk menjalankan server
373 | CMD ["context7-mcp"]
374 | ```
375 | </details>
376 | Kemudian, bangun gambar menggunakan tag (contoh: `context7-mcp`). **Pastikan Docker Desktop (atau daemon Docker) berjalan.** Jalankan perintah berikut di direktori yang sama tempat Anda menyimpan `Dockerfile`:
377 | ```bash
378 | docker build -t context7-mcp .
379 | ```
380 | 2. **Konfigurasikan Klien MCP Anda:**
381 | Perbarui konfigurasi klien MCP Anda untuk menggunakan perintah Docker.
382 | _Contoh untuk cline_mcp_settings.json:_
383 | ```json
384 | {
385 | "mcpServers": {
386 | "Сontext7": {
387 | "autoApprove": [],
388 | "disabled": false,
389 | "timeout": 60,
390 | "command": "docker",
391 | "args": ["run", "-i", "--rm", "context7-mcp"],
392 | "transportType": "stdio"
393 | }
394 | }
395 | }
396 | ```
397 | _Catatan: Ini adalah contoh konfigurasi. Silakan merujuk ke contoh spesifik untuk klien MCP Anda (seperti Cursor, VS Code, dll.) sebelumnya di README ini untuk menyesuaikan struktur (misalnya, `mcpServers` vs `servers`). Juga, pastikan nama gambar di `args` sesuai dengan tag yang digunakan saat perintah `docker build`._
398 | </details>
399 |
400 | <details>
401 | <summary><b>Instal di Windows</b></summary>
402 | Konfigurasi di Windows sedikit berbeda dibandingkan Linux atau macOS (_`Cline` digunakan sebagai contoh_). Prinsip yang sama berlaku untuk editor lainnya; lihat konfigurasi `command` dan `args`.
403 | ```json
404 | {
405 | "mcpServers": {
406 | "github.com/upstash/context7-mcp": {
407 | "command": "cmd",
408 | "args": ["/c", "npx", "-y", "@upstash/context7-mcp@latest"],
409 | "disabled": false,
410 | "autoApprove": []
411 | }
412 | }
413 | }
414 | ```
415 | </details>
416 |
417 | <details>
418 | <summary><b>Instal di Augment Code</b></summary>
419 | Untuk mengonfigurasi Context7 MCP di Augment Code, Anda dapat menggunakan antarmuka grafis atau konfigurasi manual.
420 |
421 | ### **A. Menggunakan UI Augment Code**
422 |
423 | 1. Klik menu hamburger.
424 | 2. Pilih **Pengaturan**.
425 | 3. Navigasikan ke bagian **Alat**.
426 | 4. Klik tombol **+ Tambah MCP**.
427 | 5. Masukkan perintah berikut:
428 | ```
429 | npx -y @upstash/context7-mcp@latest
430 | ```
431 | 6. Beri nama MCP: **Context7**.
432 | 7. Klik tombol **Tambah**.
433 | Setelah server MCP ditambahkan, Anda dapat mulai menggunakan fitur dokumentasi kode terkini Context7 langsung di Augment Code.
434 |
435 | ---
436 |
437 | ### **B. Konfigurasi Manual**
438 |
439 | 1. Tekan Cmd/Ctrl Shift P atau pergi ke menu hamburger di panel Augment
440 | 2. Pilih Edit Pengaturan
441 | 3. Di bawah Lanjutan, klik Edit di settings.json
442 | 4. Tambahkan konfigurasi server ke array `mcpServers` di objek `augment.advanced`
443 |
444 | ```json
445 | "augment.advanced": {
446 | "mcpServers": [
447 | {
448 | "name": "context7",
449 | "command": "npx",
450 | "args": ["-y", "@upstash/context7-mcp"]
451 | }
452 | ]
453 | }
454 | ```
455 |
456 | Setelah server MCP ditambahkan, restart editor Anda. Jika Anda menerima kesalahan, periksa sintaks untuk memastikan tanda kurung atau koma penutup tidak hilang.
457 |
458 | </details>
459 |
460 | <details>
461 | <summary><b>Instal di Roo Code</b></summary>
462 | Tambahkan ini ke file konfigurasi MCP Roo Code Anda. Lihat [dokumentasi MCP Roo Code](https://docs.roocode.com/features/mcp/using-mcp-in-roo) untuk info lebih lanjut.
463 |
464 | #### Koneksi Server Remote Roo Code
465 |
466 | ```json
467 | {
468 | "mcpServers": {
469 | "context7": {
470 | "type": "streamable-http",
471 | "url": "https://mcp.context7.com/mcp"
472 | }
473 | }
474 | }
475 | ```
476 |
477 | #### Koneksi Server Lokal Roo Code
478 |
479 | ```json
480 | {
481 | "mcpServers": {
482 | "context7": {
483 | "command": "npx",
484 | "args": ["-y", "@upstash/context7-mcp"]
485 | }
486 | }
487 | }
488 | ```
489 |
490 | </details>
491 |
492 | <details>
493 | <summary><b>Instal di Zencoder</b></summary>
494 | Untuk mengonfigurasi Context7 MCP di Zencoder, ikuti langkah-langkah berikut:
495 | 1. Pergi ke menu Zencoder (...)
496 | 2. Dari menu dropdown, pilih Alat Agen
497 | 3. Klik Tambah MCP Kustom
498 | 4. Tambahkan nama dan konfigurasi server dari bawah, dan pastikan untuk menekan tombol Instal
499 | ```json
500 | {
501 | "command": "npx",
502 | "args": [
503 | "-y",
504 | "@upstash/context7-mcp@latest"
505 | ]
506 | }
507 | ```
508 | Setelah server MCP ditambahkan, Anda dapat dengan mudah terus menggunakannya.
509 | </details>
510 |
511 | <details>
512 | <summary><b>Instal di Amazon Q Developer CLI</b></summary>
513 | Tambahkan ini ke file konfigurasi Amazon Q Developer CLI Anda. Lihat [dokumentasi Amazon Q Developer CLI](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-configuration.html) untuk detail lebih lanjut.
514 | ```json
515 | {
516 | "mcpServers": {
517 | "context7": {
518 | "command": "npx",
519 | "args": ["-y", "@upstash/context7-mcp@latest"]
520 | }
521 | }
522 | }
523 | ```
524 | </details>
525 |
526 | <details>
527 | <summary><b>Instal di Qodo Gen</b></summary>
528 | Lihat [dokumentasi Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen/qodo-gen-chat/agentic-mode/agentic-tools-mcps) untuk detail lebih lanjut.
529 | 1. Buka panel obrolan Qodo Gen di VSCode atau IntelliJ.
530 | 2. Klik Hubungkan lebih banyak alat.
531 | 3. Klik + Tambah MCP baru.
532 | 4. Tambahkan konfigurasi berikut:
533 | ```json
534 | {
535 | "mcpServers": {
536 | "context7": {
537 | "url": "https://mcp.context7.com/mcp"
538 | }
539 | }
540 | }
541 | ```
542 | </details>
543 |
544 | <details>
545 | <summary><b>Instal di JetBrains AI Assistant</b></summary>
546 | Lihat [Dokumentasi JetBrains AI Assistant](https://www.jetbrains.com/help/ai-assistant/configure-an-mcp-server.html) untuk detail lebih lanjut.
547 | 1. Di IDE JetBrains pergi ke `Pengaturan` -> `Alat` -> `Asisten AI` -> `Protokol Konteks Model (MCP)`
548 | 2. Klik `+ Tambah`.
549 | 3. Klik pada `Perintah` di pojok kiri atas dialog dan pilih opsi Sebagai JSON dari daftar
550 | 4. Tambahkan konfigurasi ini dan klik `OK`
551 | ```json
552 | {
553 | "mcpServers": {
554 | "context7": {
555 | "command": "npx",
556 | "args": ["-y", "@upstash/context7-mcp"]
557 | }
558 | }
559 | }
560 | ```
561 | 5. Klik `Terapkan` untuk menyimpan perubahan.
562 | 6. Dengan cara yang sama context7 dapat ditambahkan untuk JetBrains Junie di `Pengaturan` -> `Alat` -> `Junie` -> `Pengaturan MCP`
563 | </details>
564 |
565 | <details>
566 | <summary><b>Instal di Warp</b></summary>
567 | Lihat [Dokumentasi Protokol Konteks Model Warp](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server) untuk detail.
568 | 1. Navigasikan `Pengaturan` > `AI` > `Kelola server MCP`.
569 | 2. Tambahkan server MCP baru dengan mengklik tombol `+ Tambah`.
570 | 3. Tempel konfigurasi yang diberikan di bawah:
571 | ```json
572 | {
573 | "Context7": {
574 | "command": "npx",
575 | "args": [
576 | "-y",
577 | "@upstash/context7-mcp"
578 | ],
579 | "env": {},
580 | "working_directory": null,
581 | "start_on_launch": true
582 | }
583 | }
584 | ```
585 | 4. Klik `Simpan` untuk menerapkan perubahan.
586 | </details>
587 |
588 | <details>
589 | <summary><b>Instal di Opencode</b></summary>
590 | Tambahkan ini ke file konfigurasi Opencode Anda. Lihat [dokumentasi MCP Opencode](https://opencode.ai/docs/mcp-servers) untuk info lebih lanjut.
591 |
592 | #### Koneksi Server Remote Opencode
593 |
594 | ```json
595 | "mcp": {
596 | "context7": {
597 | "type": "remote",
598 | "url": "https://mcp.context7.com/mcp",
599 | "enabled": true
600 | }
601 | }
602 | ```
603 |
604 | #### Koneksi Server Lokal Opencode
605 |
606 | ```json
607 | {
608 | "mcp": {
609 | "context7": {
610 | "type": "local",
611 | "command": ["npx", "-y", "@upstash/context7-mcp"],
612 | "enabled": true
613 | }
614 | }
615 | }
616 | ```
617 |
618 | </details>
619 |
620 | <details>
621 | <summary><b>Instal di Copilot Coding Agent</b></summary>
622 | ## Menggunakan Context7 dengan Copilot Coding Agent
623 | Tambahkan konfigurasi berikut ke bagian `mcp` file konfigurasi Copilot Coding Agent Anda Repositori->Pengaturan->Copilot->Coding agent->Konfigurasi MCP:
624 | ```json
625 | {
626 | "mcpServers": {
627 | "context7": {
628 | "type": "http",
629 | "url": "https://mcp.context7.com/mcp",
630 | "tools": [
631 | "get-library-docs",
632 | "resolve-library-id"
633 | ]
634 | }
635 | }
636 | }
637 | ```
638 | Untuk informasi lebih lanjut, lihat [dokumentasi resmi GitHub](https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/agents/copilot-coding-agent/extending-copilot-coding-agent-with-mcp).
639 | </details>
640 |
641 | <details>
642 | <summary><b>Instal di Copilot CLI</b></summary>
643 |
644 | 1. Buka file konfigurasi MCP Copilot CLI. Lokasinya adalah `~/.copilot/mcp-config.json` (di mana `~` adalah direktori home Anda).
645 | 2. Tambahkan yang berikut ke objek `mcpServers` di file `mcp-config.json` Anda:
646 |
647 | ```json
648 | {
649 | "mcpServers": {
650 | "context7": {
651 | "type": "http",
652 | "url": "https://mcp.context7.com/mcp",
653 | "headers": {
654 | "CONTEXT7_API_KEY": "YOUR_API_KEY"
655 | },
656 | "tools": [
657 | "get-library-docs",
658 | "resolve-library-id"
659 | ]
660 | }
661 | }
662 | }
663 | ```
664 |
665 | Atau, untuk server lokal:
666 |
667 | ```json
668 | {
669 | "mcpServers": {
670 | "context7": {
671 | "type": "local",
672 | "command": "npx",
673 | "tools": [
674 | "get-library-docs",
675 | "resolve-library-id"
676 | ],
677 | "args": [
678 | "-y",
679 | "@upstash/context7-mcp",
680 | "--api-key",
681 | "YOUR_API_KEY"
682 | ]
683 | }
684 | }
685 | }
686 | ```
687 |
688 | Jika file `mcp-config.json` tidak ada, buatlah.
689 |
690 | </details>
691 |
692 | <details>
693 | <summary><b>Instal di Kiro</b></summary>
694 | Lihat [Dokumentasi Protokol Konteks Model Kiro](https://kiro.dev/docs/mcp/configuration/) untuk detail.
695 | 1. Navigasikan `Kiro` > `Server MCP`
696 | 2. Tambahkan server MCP baru dengan mengklik tombol `+ Tambah`.
697 | 3. Tempel konfigurasi yang diberikan di bawah:
698 | ```json
699 | {
700 | "mcpServers": {
701 | "Context7": {
702 | "command": "npx",
703 | "args": [
704 | "-y",
705 | "@upstash/context7-mcp"
706 | ],
707 | "env": {},
708 | "disabled": false,
709 | "autoApprove": []
710 | }
711 | }
712 | }
713 | ```
714 | 4. Klik `Simpan` untuk menerapkan perubahan.
715 | </details>
716 |
717 | <details>
718 | <summary><b>Instal di OpenAI Codex</b></summary>
719 | Lihat [OpenAI Codex](https://github.com/openai/codex) untuk informasi lebih lanjut.
720 | Tambahkan konfigurasi berikut ke pengaturan server MCP OpenAI Codex Anda:
721 |
722 | #### Koneksi Server Lokal
723 |
724 | ```toml
725 | [mcp_servers.context7]
726 | args = ["-y", "@upstash/context7-mcp"]
727 | command = "npx"
728 | ```
729 |
730 | #### Koneksi Server Jarak Jauh
731 |
732 | ```toml
733 | [mcp_servers.context7]
734 | url = "https://mcp.context7.com/mcp"
735 | http_headers = { "CONTEXT7_API_KEY" = "YOUR_API_KEY" }
736 | ```
737 |
738 | </details>
739 |
740 | <details>
741 | <summary><b>Instal di LM Studio</b></summary>
742 | Lihat [Dukungan MCP LM Studio](https://lmstudio.ai/blog/lmstudio-v0.3.17) untuk informasi lebih lanjut.
743 |
744 | #### Instal satu klik:
745 |
746 | [](https://lmstudio.ai/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB1cHN0YXNoL2NvbnRleHQ3LW1jcCJdfQ%3D%3D)
747 |
748 | #### Pengaturan manual:
749 |
750 | 1. Navigasikan ke `Program` (sisi kanan) > `Instal` > `Edit mcp.json`.
751 | 2. Tempel konfigurasi yang diberikan di bawah:
752 |
753 | ```json
754 | {
755 | "mcpServers": {
756 | "Context7": {
757 | "command": "npx",
758 | "args": ["-y", "@upstash/context7-mcp"]
759 | }
760 | }
761 | }
762 | ```
763 |
764 | 3. Klik `Simpan` untuk menerapkan perubahan.
765 | 4. Aktifkan/nonaktifkan server MCP dari sisi kanan, di bawah `Program`, atau dengan mengklik ikon colokan di bagian bawah kotak obrolan.
766 | </details>
767 |
768 | ## 🔨 Alat yang Tersedia
769 |
770 | Context7 MCP menyediakan alat berikut yang dapat digunakan oleh LLM:
771 |
772 | - `resolve-library-id`: Mengubah nama pustaka umum menjadi ID pustaka yang kompatibel dengan Context7.
773 | - `libraryName` (wajib): Nama pustaka yang ingin dicari
774 | - `get-library-docs`: Mengambil dokumentasi untuk pustaka menggunakan ID pustaka yang kompatibel dengan Context7.
775 | - `context7CompatibleLibraryID` (wajib): ID pustaka yang kompatibel dengan Context7 (contoh: `/mongodb/docs`, `/vercel/next.js`)
776 | - `topic` (opsional): Fokuskan dokumen pada topik tertentu (contoh: "routing", "hooks")
777 | - `tokens` (opsional, default 10000): Jumlah maksimum token yang dikembalikan. Nilai kurang dari nilai default 10000 secara otomatis dinaikkan menjadi 10000.
778 |
779 | ## 🛟 Tips
780 |
781 | ### Tambahkan Aturan
782 |
783 | > Jika Anda tidak ingin menambahkan `use context7` ke setiap permintaan, Anda dapat menentukan aturan sederhana di file `.windsurfrules` Anda di Windsurf atau dari bagian `Cursor Settings > Rules` di Cursor (atau yang setara di klien MCP Anda) untuk memanggil Context7 secara otomatis pada setiap pertanyaan kode:
784 | >
785 | > ```toml
786 | > [[calls]]
787 | > match = "when the user requests code examples, setup or configuration steps, or library/API documentation"
788 | > tool = "context7"
789 | > ```
790 | >
791 | > Mulai saat itu, Anda akan mendapatkan dokumen Context7 dalam setiap percakapan terkait tanpa mengetik sesuatu tambahan. Anda dapat menambahkan kasus penggunaan Anda ke bagian match.
792 |
793 | ### Gunakan ID Pustaka
794 |
795 | > Jika Anda sudah tahu persis pustaka mana yang ingin digunakan, tambahkan ID Context7-nya ke permintaan Anda. Dengan begitu, server MCP Context7 dapat melewati langkah pencocokan pustaka dan langsung mengambil dokumen.
796 | >
797 | > ```txt
798 | > implementasikan otentikasi dasar dengan supabase. gunakan pustaka /supabase/supabase untuk api dan docs
799 | > ```
800 | >
801 | > Sintaks garis miring memberi tahu alat MCP pustaka mana yang harus dimuat dokumennya.
802 |
803 | ## 💻 Pengembangan
804 |
805 | Salin proyek dan instal dependensi:
806 |
807 | ```bash
808 | bun i
809 | ```
810 |
811 | Bangun:
812 |
813 | ```bash
814 | bun run build
815 | ```
816 |
817 | Jalankan server:
818 |
819 | ```bash
820 | bun run dist/index.js
821 | ```
822 |
823 | ### Argumen CLI
824 |
825 | `context7-mcp` menerima bendera CLI berikut:
826 |
827 | - `--transport <stdio|http>` – Transportasi yang digunakan (`stdio` secara default).
828 | - `--port <number>` – Port yang didengarkan saat menggunakan transport `http` (default `3000`).
829 | Contoh dengan transport http dan port 8080:
830 |
831 | ```bash
832 | bun run dist/index.js --transport http --port 8080
833 | ```
834 |
835 | <details>
836 | <summary><b>Contoh Konfigurasi Lokal</b></summary>
837 | ```json
838 | {
839 | "mcpServers": {
840 | "context7": {
841 | "command": "npx",
842 | "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"]
843 | }
844 | }
845 | }
846 | ```
847 | </details>
848 |
849 | <details>
850 | <summary><b>Pengujian dengan MCP Inspector</b></summary>
851 | ```bash
852 | npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp
853 | ```
854 | </details>
855 |
856 | ## 🚨 Pemecahan Masalah
857 |
858 | <details>
859 | <summary><b>Kesalahan Modul Tidak Ditemukan</b></summary>
860 | Jika Anda mengalami `ERR_MODULE_NOT_FOUND`, coba gunakan `bunx` alih-alih `npx`:
861 | ```json
862 | {
863 | "mcpServers": {
864 | "context7": {
865 | "command": "bunx",
866 | "args": ["-y", "@upstash/context7-mcp"]
867 | }
868 | }
869 | }
870 | ```
871 | Ini sering menyelesaikan masalah penyelesaian modul di lingkungan di mana `npx` tidak menginstal atau menyelesaikan paket dengan benar.
872 | </details>
873 |
874 | <details>
875 | <summary><b>Masalah Resolusi ESM</b></summary>
876 | Untuk kesalahan seperti `Error: Cannot find module 'uriTemplate.js'`, coba gunakan bendera `--experimental-vm-modules`:
877 | ```json
878 | {
879 | "mcpServers": {
880 | "context7": {
881 | "command": "npx",
882 | "args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]
883 | }
884 | }
885 | }
886 | ```
887 | </details>
888 |
889 | <details>
890 | <summary><b>Masalah TLS/Sertifikat</b></summary>
891 | Gunakan bendera `--experimental-fetch` untuk melewati masalah terkait TLS:
892 | ```json
893 | {
894 | "mcpServers": {
895 | "context7": {
896 | "command": "npx",
897 | "args": ["-y", "--node-options=--experimental-fetch", "@upstash/context7-mcp"]
898 | }
899 | }
900 | }
901 | ```
902 | </details>
903 |
904 | <details>
905 | <summary><b>Kesalahan Umum Klien MCP</b></summary>
906 | 1. Coba tambahkan `@latest` ke nama paket
907 | 2. Gunakan `bunx` sebagai alternatif `npx`
908 | 3. Pertimbangkan menggunakan `deno` sebagai alternatif lain
909 | 4. Pastikan Anda menggunakan Node.js v18 atau lebih tinggi untuk dukungan fetch native
910 | </details>
911 |
912 | ## ⚠️ Penafian
913 |
914 | Proyek Context7 dikontribusikan oleh komunitas dan meskipun kami berusaha menjaga kualitas tinggi, kami tidak dapat menjamin keakuratan, kelengkapan, atau keamanan semua dokumentasi pustaka. Proyek yang terdaftar di Context7 dikembangkan dan dikelola oleh pemilik masing-masing, bukan oleh Context7. Jika Anda menemukan konten yang mencurigakan, tidak pantas, atau berpotensi membahayakan, gunakan tombol "Laporkan" di halaman proyek untuk segera memberi tahu kami. Kami memperlakukan semua laporan dengan serius dan akan segera meninjau konten yang dilaporkan untuk menjaga integritas dan keamanan platform kami. Dengan menggunakan Context7, Anda mengakui bahwa Anda melakukannya atas kebijaksanaan dan risiko Anda sendiri.
915 |
916 | ## 🤝 Terhubung dengan Kami
917 |
918 | Tetap terbaru dan bergabunglah dengan komunitas kami:
919 |
920 | - 📢 Ikuti kami di [X](https://x.com/context7ai) untuk berita dan pembaruan terbaru
921 | - 🌐 Kunjungi [Situs Web](https://context7.com) kami
922 | - 💬 Bergabunglah dengan [Komunitas Discord](https://upstash.com/discord) kami
923 |
924 | ## 📺 Context7 Di Media
925 |
926 | - [Better Stack: "Free Tool Makes Cursor 10x Smarter"](https://youtu.be/52FC3qObp9E)
927 | - [Cole Medin: "This is Hands Down the BEST MCP Server for AI Coding Assistants"](https://www.youtube.com/watch?v=G7gK8H6u7Rs)
928 | - [Income Stream Surfers: "Context7 + SequentialThinking MCPs: Is This AGI?"](https://www.youtube.com/watch?v=-ggvzyLpK6o)
929 | - [Julian Goldie SEO: "Context7: New MCP AI Agent Update"](https://www.youtube.com/watch?v=CTZm6fBYisc)
930 | - [JeredBlu: "Context 7 MCP: Get Documentation Instantly + VS Code Setup"](https://www.youtube.com/watch?v=-ls0D-rtET4)
931 | - [Income Stream Surfers: "Context7: The New MCP Server That Will CHANGE AI Coding"](https://www.youtube.com/watch?v=PS-2Azb-C3M)
932 | - [AICodeKing: "Context7 + Cline & RooCode: This MCP Server Makes CLINE 100X MORE EFFECTIVE!"](https://www.youtube.com/watch?v=qZfENAPMnyo)
933 | - [Sean Kochel: "5 MCP Servers For Vibe Coding Glory (Just Plug-In & Go)"](https://www.youtube.com/watch?v=LqTQi8qexJM)
934 |
935 | ## ⭐ Sejarah Bintang
936 |
937 | [](https://www.star-history.com/#upstash/context7&Date)
938 |
939 | ## 📄 Lisensi
940 |
941 | MIT
942 |
```