Context7 Platform -- Up-to-date docs for AI agents
feat: increase default minimum tokens from 5000 to 10000 and update documentation
Abdusshh99a74eb5eee6
diff --git a/README.md b/README.mdindex b8d0d708..d24e8f1f 100644--- a/README.md+++ b/README.md@@ -232,7 +232,7 @@ If you prefer to run the MCP server in a Docker container:### Environment Variables-- `DEFAULT_MINIMUM_TOKENS`: Set the minimum token count for documentation retrieval (default: 5000).+- `DEFAULT_MINIMUM_TOKENS`: Set the minimum token count for documentation retrieval (default: 10000).Examples:@@ -257,7 +257,7 @@ Examples:- `get-library-docs`: Fetches documentation for a library using a Context7-compatible library ID.- `context7CompatibleLibraryID` (required)- `topic` (optional): Focus the docs on a specific topic (e.g., "routing", "hooks")- - `tokens` (optional, default 5000): Max number of tokens to return. Values less than the configured `DEFAULT_MINIMUM_TOKENS` value are automatically increased to that value.+ - `tokens` (optional, default 10000): Max number of tokens to return. Values less than the configured `DEFAULT_MINIMUM_TOKENS` value or the default value of 10000 are automatically increased to that value.## Developmentdiff --git a/docs/README.de.md b/docs/README.de.mdindex 111cf4ae..8a4fa8f6 100644--- a/docs/README.de.md+++ b/docs/README.de.md@@ -234,7 +234,7 @@ Wenn du den MCP-Server lieber in einem Docker-Container ausführen möchtest:- `get-library-docs`: Ruft die Dokumentation für eine Bibliothek mit einer Context7-kompatiblen Bibliotheks-ID ab.- `context7CompatibleLibraryID` (erforderlich)- `topic` (optional): Fokussiert die Dokumentation auf ein bestimmtes Thema (z.B. "routing", "hooks")- - `tokens` (optional, Standard 5000): Maximale Anzahl von zurückzugebenden Tokens. Werte unter 5000 werden automatisch auf 5000 erhöht.+ - `tokens` (optional, Standard 10000): Maximale Anzahl von zurückzugebenden Tokens. Werte unter 10000 werden automatisch auf 10000 erhöht.## Entwicklungdiff --git a/docs/README.es.md b/docs/README.es.mdindex 8b34b6bd..145742e8 100644--- a/docs/README.es.md+++ b/docs/README.es.md@@ -160,7 +160,7 @@ Añade esto a tu archivo `claude_desktop_config.json` de Claude Desktop. Consult- `get-library-docs`: Obtiene documentación para una biblioteca utilizando un ID de biblioteca compatible con Context7.- `context7CompatibleLibraryID` (requerido)- `topic` (opcional): Enfoca la documentación en un tema específico (p. ej., "routing", "hooks")- - `tokens` (opcional, por defecto 5000): Número máximo de tokens a devolver. Los valores inferiores a 5000 se aumentan automáticamente a 5000.+ - `tokens` (opcional, por defecto 10000): Número máximo de tokens a devolver. Los valores inferiores a 10000 se aumentan automáticamente a 10000.## Desarrollodiff --git a/docs/README.fr.md b/docs/README.fr.mdindex a586e4f1..77b42f03 100644--- a/docs/README.fr.md+++ b/docs/README.fr.md@@ -234,7 +234,7 @@ Si vous préférez exécuter le serveur MCP dans un conteneur Docker :- `get-library-docs` : Récupère la documentation d’une bibliothèque via un ID Context7.- `context7CompatibleLibraryID` (obligatoire)- `topic` (optionnel) : Focaliser la doc sur un sujet précis (ex : "routing", "hooks")- - `tokens` (optionnel, par défaut 5000) : Nombre max de tokens à retourner. Les valeurs < 5000 sont automatiquement augmentées à 5000.+ - `tokens` (optionnel, par défaut 10000) : Nombre max de tokens à retourner. Les valeurs < 10000 sont automatiquement augmentées à 10000.## Développementdiff --git a/docs/README.id-ID.md b/docs/README.id-ID.mdindex a1f53f70..33627c2d 100644--- a/docs/README.id-ID.md+++ b/docs/README.id-ID.md@@ -238,7 +238,7 @@ Jika Anda lebih suka menjalankan server MCP dalam kontainer Docker:- `get-library-docs`: Mengambil dokumentasi untuk library menggunakan ID library yang kompatibel dengan Context7.- `context7CompatibleLibraryID` (wajib)- `topic` (opsional): Fokuskan dokumentasi pada topik tertentu (misalnya, "routing", "hooks")- - `tokens` (opsional, default 5000): Jumlah maksimum token yang akan dihasilkan. Nilai kurang dari 5000 secara otomatis ditingkatkan menjadi 5000.+ - `tokens` (opsional, default 10000): Jumlah maksimum token yang akan dihasilkan. Nilai kurang dari 10000 secara otomatis ditingkatkan menjadi 10000.## Pengembangandiff --git a/docs/README.it.md b/docs/README.it.mdindex c02ae4e7..6c386d58 100644--- a/docs/README.it.md+++ b/docs/README.it.md@@ -237,7 +237,7 @@ Se preferisci eseguire il server MCP in un contenitore Docker:- `get-library-docs`: Recupera la documentazione per una libreria utilizzando un ID di libreria compatibile con Context7.- `context7CompatibleLibraryID` (obbligatorio)- `topic` (opzionale): Concentra la documentazione su un argomento specifico (es., "routing", "hooks")-- `tokens` (opzionale, predefinito 5000): Numero massimo di token da restituire. I valori inferiori a 5000 vengono automaticamente aumentati a 5000.+- `tokens` (opzionale, predefinito 10000): Numero massimo di token da restituire. I valori inferiori a 10000 vengono automaticamente aumentati a 10000.## Sviluppodiff --git a/docs/README.ko.md b/docs/README.ko.mdindex d661cce5..3227c4a9 100644--- a/docs/README.ko.md+++ b/docs/README.ko.md@@ -156,7 +156,7 @@ Claude Desktop의 `claude_desktop_config.json` 파일에 다음을 추가하세- `get-library-docs`: Context7이 인식하는 라이브러리 ID를 사용하여 해당 라이브러리의 문서를 가져옵니다.- `context7CompatibleLibraryID` (필수)- `topic` (선택): 특정 주제의 문서만 가져오기 (예: "routing", "hooks")- - `tokens` (선택, 기본값 5000): 가져올 문서의 최대 토큰 수. 5000 미만으로 설정하면 자동으로 5000으로 조정됨+ - `tokens` (선택, 기본값 10000): 가져올 문서의 최대 토큰 수. 10000 미만으로 설정하면 자동으로 10000으로 조정됨## 개발diff --git a/docs/README.pt-BR.md b/docs/README.pt-BR.mdindex 49e477c9..87f7f8ea 100644--- a/docs/README.pt-BR.md+++ b/docs/README.pt-BR.md@@ -237,7 +237,7 @@ Se você preferir executar o servidor MCP em um contêiner Docker:- `get-library-docs`: Busca documentação para uma biblioteca usando um ID de biblioteca compatível com Context7.- `context7CompatibleLibraryID` (obrigatório)- `topic` (opcional): Concentra a documentação em um tópico específico (por exemplo, "routing", "hooks")- - `tokens` (opcional, padrão 5000): Número máximo de tokens a retornar. Valores menores que 5000 são automaticamente aumentados para 5000.+ - `tokens` (opcional, padrão 10000): Número máximo de tokens a retornar. Valores menores que 10000 são automaticamente aumentados para 10000.## Desenvolvimentodiff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.mdindex e9b79cda..26d23ef0 100644--- a/docs/README.zh-CN.md+++ b/docs/README.zh-CN.md@@ -216,7 +216,7 @@ claude mcp add context7 -- npx -y @upstash/context7-mcp@latest- `get-library-docs`: 使用Context7兼容的库ID获取库的文档。- `context7CompatibleLibraryID` (必需)- `topic` (可选): 将文档集中在特定主题上(例如"routing"、"hooks")- - `tokens` (可选,默认5000): 返回的最大令牌数。小于5000的值会自动增加到5000。+ - `tokens` (可选,默认10000): 返回的最大令牌数。小于10000的值会自动增加到10000。## 开发diff --git a/src/index.ts b/src/index.tsindex 328160a8..d41baa01 100644--- a/src/index.ts+++ b/src/index.ts@@ -11,14 +11,14 @@ import dotenv from "dotenv";dotenv.config();// Get DEFAULT_MINIMUM_TOKENS from environment variable or use default-let DEFAULT_MINIMUM_TOKENS = 5000;+let DEFAULT_MINIMUM_TOKENS = 10000;if (process.env.DEFAULT_MINIMUM_TOKENS) {const parsedValue = parseInt(process.env.DEFAULT_MINIMUM_TOKENS, 10);if (!isNaN(parsedValue) && parsedValue > 0) {DEFAULT_MINIMUM_TOKENS = parsedValue;} else {- console.error(- `Warning: Invalid DEFAULT_MINIMUM_TOKENS value provided in environment variable. Using default value of 5000`+ console.warn(+ `Warning: Invalid DEFAULT_MINIMUM_TOKENS value provided in environment variable. Using default value of 10000`);}}