Context7 Platform -- Up-to-date docs for AI agents
feat: improve documentation clarity
enesgulesd26d5deacbaa
diff --git a/docs/adding-libraries.mdx b/docs/adding-libraries.mdxindex 55814ac8..08d0b5c4 100644--- a/docs/adding-libraries.mdx+++ b/docs/adding-libraries.mdx@@ -48,17 +48,17 @@ Here's an example `context7.json` file with all available options:## Field Descriptions-- **`projectTitle`** (string): Suggested display name for your project in Context7. Only used when LLM can not generate a name with high confidence.+- **`projectTitle`** (string): Suggested display name for your project in Context7. Only used when the LLM cannot generate a name with high confidence.-- **`description`** (string): Suggested description for your project in Context7. Only used when LLM can not generate a name with high confidence.+- **`description`** (string): Suggested description for your project in Context7. Only used when the LLM cannot generate a description with high confidence.- **`branch`** (string): The name of the git branch to parse. If not provided, the default branch will be used.-- **`folders`** (array): Specific folder paths to include when parsing documentation. If empty, Context7 will scan the entire repository for relevant documentation files. Note: Root-level markdown files are always included regardless of this setting.+- **`folders`** (array): Specific folder paths to include when parsing. If empty, Context7 scans the entire repository. Root-level markdown files are always included.-- **`excludeFolders`** (array): Patterns to exclude folders and paths from documentation parsing. Supports simple names, paths, and glob patterns (see Exclusion Patterns section below).+- **`excludeFolders`** (array): Patterns to exclude from documentation parsing. Supports simple names, paths, and glob patterns (see Exclusion Patterns below).-- **`excludeFiles`** (array): Specific file names to exclude from documentation parsing. Only include the filename (not the path). Useful for excluding files like `CHANGELOG.md`, license files, or other non-documentation content.+- **`excludeFiles`** (array): Specific file names to exclude. Use only the filename, not the full path. Examples: `CHANGELOG.md`, license files, or non-documentation content.- **`rules`** (array): Best practices or important guidelines that coding agents should follow when using your library. These appear as recommendations in the documentation context provided to coding agents.@@ -122,10 +122,10 @@ These defaults help ensure that coding agents receive relevant, current document## Best Practices-1. **Keep descriptions concise**: Aim for one clear sentence that explains your library's purpose to coding agents-2. **Exclude irrelevant folders**: Use `excludeFolders` to avoid indexing source code, tests, or build artifacts-3. **Add helpful rules**: Include common gotchas or best practices that coding agents should know when generating code-4. **Maintain version history**: Keep important previous versions accessible for projects that need older APIs+1. **Keep descriptions concise**: One sentence explaining your library's purpose. Example: "Serverless Redis SDK for edge and browser environments."+2. **Exclude irrelevant folders**: Use `excludeFolders` to skip source code, tests, or build artifacts. Example: `["src", "test", "dist", "node_modules"]`+3. **Add helpful rules**: Include common gotchas or best practices. Example: "Always call `.close()` on Redis connections" or "Use environment variables for API keys, never hardcode them"+4. **Maintain version history**: Keep important previous versions accessible. Users on v1.x still need v1.x documentation, not just the latest v2.x## Adding a Version@@ -151,9 +151,9 @@ To add a new version to your existing library:Keep documentation helpful for agents:-- Review the rendered documentation at least once per release.-- Trim noisy sections (e.g., large changelogs) with `excludeFiles` or `excludeFolders`.-- Update `rules` when best practices change so AI assistants surface the right guidance.+- Review the rendered documentation after each release+- Trim noisy sections (e.g., large changelogs) with `excludeFiles` or `excludeFolders`+- Update `rules` when best practices change so AI assistants surface current guidance## Need Help?diff --git a/docs/api-guide.mdx b/docs/api-guide.mdxindex 524ee61a..83cf5fd9 100644--- a/docs/api-guide.mdx+++ b/docs/api-guide.mdx@@ -14,8 +14,7 @@ Authorization: Bearer CONTEXT7_API_KEYGet your API key at [context7.com/dashboard](https://context7.com/dashboard).<Warning>- Treat your API key like a password. Store it in an environment variable or secret manager and- rotate it immediately if you suspect it has leaked.+ Store your API key in an environment variable or secret manager. Rotate it if compromised.</Warning>## Rate Limits@@ -36,17 +35,17 @@ When you exceed rate limits, the API returns a `429` status code with a `retryAf## Best Practices-### 1. Use Appropriate Token Limits+### Use Appropriate Token LimitsRequest only the amount of documentation you need to minimize token usage and response times:```bash-# Request only 2000 tokens for quick lookups+# Fetches 2000 tokens of documentationcurl "https://context7.com/api/v1/vercel/next.js?tokens=2000" \-H "Authorization: Bearer CONTEXT7_API_KEY"```-### 2. Specify Topics+### Specify TopicsUse the `topic` parameter to get more relevant results and reduce unnecessary content:@@ -56,11 +55,11 @@ curl "https://context7.com/api/v1/vercel/next.js?topic=routing" \-H "Authorization: Bearer CONTEXT7_API_KEY"```-### 3. Cache Responses+### Cache ResponsesStore documentation locally to reduce API calls and improve performance. Documentation updates are relatively infrequent, so caching for several hours or days is usually appropriate.-### 4. Handle Rate Limits+### Handle Rate LimitsImplement exponential backoff for rate limit errors:@@ -82,9 +81,9 @@ def fetch_with_retry(url, headers, max_retries=3):raise Exception("Max retries exceeded")```-### 5. Use Specific Versions+### Use Specific Versions-When possible, specify exact versions for consistent results across deployments:+Specify exact versions for consistent results across deployments:```bash# Pin to a specific versiondiff --git a/docs/contact.mdx b/docs/contact.mdxindex 3a8693ec..0aaeb6b4 100644--- a/docs/contact.mdx+++ b/docs/contact.mdx@@ -3,13 +3,13 @@ title: Contact & SupportsidebarTitle: Contact----Need help or have questions? We're here to support you.+Get help and support for Context7.## Community Support### Discord-Join our vibrant community on Discord for:+Join our Discord community for:- Quick answers to common questions- Tips and best practices from other users- Announcements about new features and updates@@ -63,10 +63,8 @@ We take all security reports seriously and will respond promptly.## Feedback-We value your feedback! Help us improve Context7:+Help improve Context7:- Use the thumbs rating on documentation pages- Suggest edits directly on any page- Raise issues for bugs or feature requests--Your input helps us build a better product for everyone.diff --git a/docs/installation.mdx b/docs/installation.mdxindex 7eed1adf..f46b5bea 100644--- a/docs/installation.mdx+++ b/docs/installation.mdx@@ -7,10 +7,10 @@ Get Context7 MCP up and running in your favorite AI coding assistant in minutes.## Requirements-Before you begin, make sure you have:+Before you begin:- **MCP Client**: Cursor, Claude Code, VS Code, Windsurf, or another MCP-compatible IDE-- **API Key** (Recommended): For higher rate limits and private repositories. Get yours at [context7.com/dashboard](https://context7.com/dashboard)+- **API Key (Recommended)**: For higher rate limits and private repositories. Get yours at [context7.com/dashboard](https://context7.com/dashboard)<Warning>**SSE Protocol Removed**@@ -29,7 +29,7 @@ Install Context7 MCP automatically for any client via [Smithery](https://smithernpx -y @smithery/cli@latest install @upstash/context7-mcp --client <CLIENT_NAME> --key <YOUR_SMITHERY_KEY>```-Find your Smithery key at [smithery.ai](https://smithery.ai/server/@upstash/context7-mcp).+Get your Smithery key from your account at [smithery.ai](https://smithery.ai/server/@upstash/context7-mcp).## Client-Specific Installation@@ -37,7 +37,7 @@ Find your Smithery key at [smithery.ai](https://smithery.ai/server/@upstash/cont<Accordion title="Cursor" icon="code">Go to: `Settings` → `Cursor Settings` → `MCP` → `Add new global MCP server`- Since Cursor 1.0, you can use one-click installation or manually add to `~/.cursor/mcp.json`.+ In Cursor 1.0 and later, use the one-click button below or manually edit `~/.cursor/mcp.json`.**Remote Server (Recommended)**:diff --git a/docs/overview.mdx b/docs/overview.mdxindex f3f7f13f..7e7415f0 100644--- a/docs/overview.mdx+++ b/docs/overview.mdx@@ -7,7 +7,7 @@ Context7 brings up-to-date, version-specific documentation and code examples dir## ❌ Without Context7-LLMs rely on outdated or generic information about the libraries you use. You get:+LLMs rely on outdated or generic information about the libraries you use:- ❌ Code examples are outdated and based on year-old training data- ❌ Hallucinated APIs that don't even exist@@ -30,7 +30,7 @@ Configure a Cloudflare Worker script to cache JSON API responses for five minuteContext7 fetches up-to-date code examples and documentation right into your LLM's context.- 1️⃣ Write your prompt naturally-- 2️⃣ Tell the LLM to `use context7`-- 3️⃣ Get working code answers+- 2️⃣ Add `use context7` to your prompt+- 3️⃣ Get working code with current APIsNo tab-switching, no hallucinated APIs that don't exist, no outdated code generation.diff --git a/docs/plans-pricing.mdx b/docs/plans-pricing.mdxindex 59cef6dd..f7bc15b4 100644--- a/docs/plans-pricing.mdx+++ b/docs/plans-pricing.mdx@@ -75,17 +75,20 @@ Pick the plan that matches how you work today and scale when your needs grow.<AccordionGroup><Accordion title="How do you keep the privacy of my queries?" icon="shield">- No user queries are sent to our servers. Instead, only generic topics are transmitted. Your actual prompts and code remain private on your local machine.+ The MCP client sends only generic topics to our servers, not your actual queries. Your prompts and code remain private on your local machine.</Accordion><Accordion title="How do you ensure the code snippets are safe?" icon="check">- We follow several processes to ensure safety: - Run an LLM-based model to detect injection- attempts before storing code - Assign a trustScore to repository authors - Allow users to filter- trusted libraries by organization and repository - Regular security audits and monitoring+ We follow several processes to ensure safety:++ - Run an LLM-based model to detect injection attempts before storing code+ - Assign a trustScore to repository authors+ - Allow users to filter trusted libraries by organization and repository+ - Regular security audits and monitoring</Accordion><Accordion title="What are your security practices?" icon="lock">- We are part of Upstash Inc., a four-year-old Silicon Valley company. You can review our certifications and practices on our [Trust page](https://trust.upstash.com). We follow SOC-2 compliance standards and industry best practices.+ We are part of Upstash Inc., based in Silicon Valley since 2020. Review our certifications and practices on our [Trust page](https://trust.upstash.com). We follow SOC-2 compliance standards and industry best practices.</Accordion></AccordionGroup>diff --git a/docs/security.mdx b/docs/security.mdxindex 34f6d993..eb4ee438 100644--- a/docs/security.mdx+++ b/docs/security.mdx@@ -148,10 +148,10 @@ For European users, Context7 provides:## Reporting Security Issues-If you discover a security vulnerability, please report it responsibly:+If you discover a security vulnerability:1. **Do not** publicly disclose the issue-2. Email security details to: [GitHub Security](https://github.com/upstash/context7/security)+2. Report via: [GitHub Security](https://github.com/upstash/context7/security)3. Include detailed steps to reproduce the issue4. Allow reasonable time for us to address the issuediff --git a/docs/troubleshooting.mdx b/docs/troubleshooting.mdxindex b7f031bd..80c6505e 100644--- a/docs/troubleshooting.mdx+++ b/docs/troubleshooting.mdx@@ -29,11 +29,11 @@ If you encounter `ERR_MODULE_NOT_FOUND`, try using `bunx` instead of `npx`:}```-This often resolves module resolution issues in environments where `npx` doesn't properly install or resolve packages.+Use this when you see module resolution errors with npx.### ESM Resolution Issues-For errors like `Error: Cannot find module 'uriTemplate.js'`, try the `--experimental-vm-modules` flag:+For errors such as `Error: Cannot find module 'uriTemplate.js'`, try the `--experimental-vm-modules` flag:```json{@@ -61,9 +61,7 @@ Use the `--experimental-fetch` flag to bypass TLS-related problems:}```-## General Solutions--### Quick Fixes+## Quick Fixes1. **Try adding `@latest`** to the package name to ensure you're using the most recent version:@@ -326,11 +324,11 @@ Test the remote server is reachable:curl https://mcp.context7.com/mcp/ping```-Should return: `{"status": "ok", "message": "pong"}`+Expected response: `{"status": "ok", "message": "pong"}`-## Still Having Issues?+## Additional Support-If none of these solutions work:+If these solutions don't resolve your issue:1. **Check GitHub Issues**: Search for similar problems at [github.com/upstash/context7/issues](https://github.com/upstash/context7/issues)2. **Create a new issue**: Include your:diff --git a/docs/usage.mdx b/docs/usage.mdxindex 8d18b483..73336d3a 100644--- a/docs/usage.mdx+++ b/docs/usage.mdx@@ -2,19 +2,19 @@title: How-To Guides----Learn practical techniques to maximize your Context7 experience.+Practical techniques for using Context7 effectively.## Quick Wins- [Auto-invoke Context7](#auto-invoke-context7) so you never forget to pull fresh docs- [Target the exact library ID](#use-specific-library-ids) to skip search steps- [Tune networking and proxies](#configure-https-proxy) for locked-down environments-- [Control token usage](#optimize-token-usage) to keep responses snappy+- [Control token usage](#control-token-usage) to keep responses snappy- [Bring in private repositories](#work-with-private-repositories) for internal docs## Auto-Invoke Context7-Stop adding "use context7" to every prompt by setting up an automatic rule.+Stop adding `use context7` to every prompt by setting up an automatic rule.### Add a Rule to Your MCP Client@@ -50,8 +50,7 @@ Stop adding "use context7" to every prompt by setting up an automatic rule.</AccordionGroup><Tip>- Customize the rule to match your workflow. For example, only auto-invoke for specific libraries or- frameworks.+ Customize the rule for your workflow. Examples: "Auto-invoke only for Next.js questions" or "Use context7 when the prompt mentions 'API' or 'documentation'."</Tip>## Use Specific Library IDs@@ -153,9 +152,9 @@ Both lowercase and uppercase environment variables are supported.connectivity before restarting your IDE.</Tip>-## Optimize Token Usage+## Control Token Usage-Control documentation size to manage costs and response times.+Manage documentation size to control costs and response times.### Set Token Limits in Dashboard@@ -182,7 +181,7 @@ curl "https://context7.com/api/v1/vercel/next.js?tokens=3000&topic=routing" \-H "Authorization: Bearer YOUR_API_KEY"```-Lower token counts = faster responses and lower costs.+Lower token counts result in faster responses and lower costs.## Work with Private Repositories@@ -309,28 +308,28 @@ Visit the [Dashboard](https://context7.com/dashboard) to monitor your usage and### Security-- Never commit API keys to version control-- Use environment variables for keys-- Rotate keys regularly-- Give team members minimum required permissions+- Never commit API keys to version control - Use `.env` files and add them to `.gitignore`+- Use environment variables for keys - `export CONTEXT7_API_KEY=your_key_here`+- Rotate keys regularly - Rotate every 90 days or immediately if compromised+- Give team members minimum required permissions - Use "Developer" role for non-adminsSee [Security](/security) for comprehensive security guidelines.### Performance-- Use specific library IDs when possible-- Set appropriate token limits-- Use topic filtering to focus results-- Cache frequently-used documentation locally+- Use specific library IDs when possible - `/vercel/next.js` instead of "next.js docs"+- Set appropriate token limits - small amounts for quick lookups, higher amounts for comprehensive docs+- Use topic filtering to focus results - Add specific topics like "authentication" or "routing"+- Cache frequently-used documentation locally - Cache for 6-24 hours to reduce API calls### Library Management-- Keep `context7.json` up to date in your repositories-- Exclude unnecessary folders (tests, build artifacts)-- Add helpful rules for AI agents-- Maintain version tags for important releases+- Keep `context7.json` up to date in your repositories - Update when adding new docs or changing structure+- Exclude unnecessary folders (tests, build artifacts) - `excludeFolders: ["test", "dist", "node_modules"]`+- Add helpful rules for AI agents - Example: "Always validate user input" or "Use TypeScript strict mode"+- Maintain version tags for important releases - Keep v1.x docs available even after releasing v2.x-See [Library Owners](/library-owners) for configuration details.+See [Library Owners](/adding-libraries) for configuration details.## Need Help?