Context7 Platform -- Up-to-date docs for AI agents
update pages
enesakard5e35e58c7f7
diff --git a/docs/api.mdx b/docs/api.mdxindex 7164ca23..9dfbd8fb 100644--- a/docs/api.mdx+++ b/docs/api.mdx@@ -1,10 +1,7 @@---title: Public API-description: Context7 Public API V1 documentation----# Context7 Public API - V1-The Context7 Public API provides programmatic access to library documentation and search functionality.## Base URL@@ -23,6 +20,10 @@ 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.+</Warning>+## Endpoints### Get Context@@ -95,6 +96,26 @@ Retrieve documentation and code examples for a specific library.Returns documentation content in the specified format (`txt` or `json`).+- `txt` (default) delivers a plain-text block optimised for feeding into LLM contexts.+- `json` provides a structured payload with metadata, snippets, and sections.++```json+{+ "library": "/vercel/next.js",+ "version": "v15.1.8",+ "topic": "routing",+ "tokens": 2950,+ "chunks": [+ {+ "title": "Middleware overview",+ "content": "Next.js middleware runs before a request is completed...",+ "source": "docs/app/building-your-application/routing/middleware.mdx",+ "url": "https://nextjs.org/docs/app/building-your-application/routing/middleware"+ }+ ]+}+```+---### Search Libraries@@ -282,10 +303,13 @@ Submit a new library to Context7 for indexing.}```+The `status` field transitions through `processing → finalized`. Poll the library detail view or call the `/v1/search` endpoint to confirm when parsing completes.+## Rate Limits- **Without API key**: Limited requests per IP- **With API key**: Higher limits based on your plan+- View current usage and reset windows in the [dashboard](https://context7.com/dashboard).## Error Codes@@ -297,6 +321,14 @@ Submit a new library to Context7 for indexing.| 429 | Too Many Requests - Rate limit exceeded || 500 | Internal Server Error |+```json+{+ "error": "Too many requests",+ "status": 429,+ "retryAfterSeconds": 60+}+```+## Best Practices1. **Use appropriate token limits**: Request only the amount of documentation you needdiff --git a/docs/dashboard.mdx b/docs/dashboard.mdxnew file mode 100644index 00000000..40f8c4d1--- /dev/null+++ b/docs/dashboard.mdx@@ -0,0 +1,362 @@+---+title: Dashboard+---++Your central hub for managing documentation access, team collaboration, and usage monitoring.++Access your dashboard at [context7.com/dashboard](https://context7.com/dashboard)++## Quick Actions++- Copy your API key or regenerate it from **Overview → API Connection**+- Monitor rate limits and token usage in **Overview → Usage Statistics**+- Control access to libraries and repositories in **Libraries**+- Invite teammates and manage roles in **Members**+- Upgrade your plan or manage billing directly from the Dashboard sidebar++## Dashboard Overview++The dashboard has three main tabs for managing different aspects of your project.++### Overview Tab++Your project's command center.++**Usage Statistics**:+View your last 30 days of activity:+- **Search requests**: How many library searches you've performed+- **Query/fetch requests**: Documentation retrieval count+- **Query tokens**: Total tokens returned in responses+- **Parsing tokens**: Tokens used when adding/refreshing libraries++**API Connection**:+- Copy your API key (starts with `ctx7sk`)+- View rate limits for your current plan+- See example configurations for MCP and REST API++**Project Settings**:+- Rename your project+- Delete team projects (if no private repos exist)+- View project metadata++### Libraries Tab++Control which libraries your project can access.++**Public Library Access**:++Choose your access level:+- **All Libraries** (default): Access all public documentation+- **Select Libraries**: Whitelist specific libraries only+- **Disabled**: Block all public library access++**Token Limits**:+Set maximum tokens per API request (default: 10,000). Lower limits = faster responses and lower costs for large libraries.++**Private Repositories** (Pro/Team only):+- Add private GitHub/GitLab repositories+- View all private repos with access+- Remove private repositories+- See parsing status and token count++### Members Tab++Manage your team and API access (Team projects only).++**Team Members**:+- View all members and their roles+- Invite new members via email+- Update member roles (Owner, Admin, Developer)+- Remove team members+- View pending invitations++**API Keys**:+Each member gets their own API key with 60 req/hour. Regenerate keys for security.++**Billing Estimate**:+View your monthly costs:+- Member seats: $7/month each+- Parse tokens: $15 per 1M tokens++## Personal vs Team Projects++| Feature | Personal Project | Team Project |+|---------|------------------|--------------|+| Members | You only | Up to 20 |+| Private repos | ❌ | ✅ |+| Billing | Free | Usage-based |+| Can delete | No | Yes* |+| Rate limits | 60 req/hr | 60 req/hr per member |++*Team projects can only be deleted if they have no private repositories.++### Personal Projects++Every user gets one personal project automatically:+- Always free+- Access to all public libraries+- Cannot be deleted+- Single user access+- Perfect for individual development++### Team Projects++Create up to 5 team projects for collaboration:+- Invite team members+- Add private repositories+- Role-based access control+- Usage-based billing+- Shared API access++## Getting Your API Key++1. Go to **Dashboard → Overview**+2. Find the **API Connection** section+3. Click to copy your API key+4. Keep it secure - treat it like a password++### Using Your API Key++**MCP Server**:+```json+{+ "mcpServers": {+ "context7": {+ "url": "https://mcp.context7.com/mcp",+ "headers": {+ "CONTEXT7_API_KEY": "YOUR_API_KEY"+ }+ }+ }+}+```++**REST API**:+```bash+curl "https://context7.com/api/v1/vercel/next.js" \+ -H "Authorization: Bearer YOUR_API_KEY"+```++## Managing Libraries++### Adding Public Libraries++Public libraries are submitted through the web interface, not the dashboard.++1. Go to [context7.com/add-library](https://context7.com/add-library)+2. Enter repository URL+3. Configure parsing options+4. Submit for processing++See [Library Owners](/library-owners) for detailed configuration.++### Adding Private Repositories++<Note>+Requires Pro or Team plan. See [Plans & Pricing](/plans-pricing).+</Note>++1. Navigate to **Dashboard → Libraries → Private Repositories**+2. Click **Add Private Repository**+3. Enter repository URL+4. Provide access token:+ - GitHub: Personal Access Token with `repo` scope+ - GitLab: Personal Access Token with `read_repository` scope+5. Configure folders and exclusions (optional)+6. Submit++**Cost**: $15 per 1M tokens parsed (one-time when adding, incremental when refreshing).++### Refreshing Libraries++Update library documentation:++1. Visit [context7.com/refresh-library](https://context7.com/refresh-library)+2. Enter library ID (e.g., `/vercel/next.js`)+3. Submit++Private repos: You only pay for new/changed content.++## Team Collaboration++### Creating a Team Project++1. Click **Create Team Project** in the dashboard+2. Enter project name+3. You're automatically set as Owner++### Inviting Team Members++1. Go to **Dashboard → Members**+2. Click **Invite Member**+3. Enter email address+4. Select role:+ - **Owner**: Full control, billing access, cannot be removed+ - **Admin**: Manage members, libraries, and settings+ - **Developer**: API access and documentation viewing only+5. Send invitation++Members receive an email invite to join.++### Managing Roles++Change member roles from the Members tab. Only Owners can modify other Owners.++### Removing Members++1. Go to **Dashboard → Members**+2. Click remove icon next to member+3. Confirm removal++Their API key is immediately revoked.++## Usage Monitoring++### Understanding Metrics++**Search Requests**:+Times you searched for libraries via API (`/v1/search` endpoint).++**Query/Fetch Requests**:+Times you retrieved documentation (`/v1/{owner}/{repo}` endpoint).++**Query Tokens**:+Total tokens returned in API responses. Doesn't affect billing directly.++**Parsing Tokens**:+Tokens processed when adding or refreshing private repositories. **This is what you're billed for** on Pro plans.++### Cost Calculation++**Free Plan**: $0 (always)++**Pro Plan**:+- Base: $7/month per team member+- Plus: $15 per 1M parsing tokens (private repos only)++**Example**:+- 3 team members = $21/month+- Added 750K token private repo = $11.25 one-time+- Refreshed with 50K new content = $0.75+- Monthly total = $21 + usage++See [Plans & Pricing](/plans-pricing) for detailed pricing.++### Viewing Logs++Check parsing status and errors:++1. Visit any library page (e.g., `context7.com/upstash/docs`)+2. Click **View Logs**+3. See real-time parsing progress and any errors++## Security Best Practices++### API Key Security++- ❌ Never commit to version control+- ✅ Use environment variables+- ✅ Rotate keys regularly+- ✅ Revoke compromised keys immediately+- ✅ Use separate keys for different environments++### Access Management++- Give team members minimum required role+- Review team members regularly+- Remove members who no longer need access+- Monitor usage for unusual patterns++### Private Repository Security++- Use tokens with minimum required scopes+- Rotate repository tokens periodically+- Remove unused private repositories+- Audit access regularly++See [Security](/security) for comprehensive guidelines.++## Billing and Payments++### Adding Payment Method++1. Click **Add Payment Method** in Dashboard+2. Enter card details via Stripe+3. Submit securely++Your card is charged monthly for team seats and parsing usage.++### Viewing Invoices++Invoices are emailed monthly and include:+- Member seat charges+- Parse token usage+- Total amount++Download from your email or request from support.++### Downgrading++To downgrade from Pro to Free:++1. Remove all team members except yourself+2. Delete all private repositories+3. Visit [Plans & Pricing](https://context7.com/plans)+4. Click **Choose Free Plan**++<Warning>+Downgrading removes team collaboration and private repository access.+</Warning>++## Troubleshooting++### Common Issues++**"Not authorized to access this project"**+- Verify you're logged in with the correct account+- Check you're a member of the project+- Ask the project owner to invite you++**"Rate limit exceeded"**+- Wait for your hourly limit to reset (60 req/hr)+- Pro plan: Each team member gets their own 60 req/hr+- Enterprise: Contact us for custom limits++**"Private repository access denied"**+- Verify your access token is valid and not expired+- Check token has required scopes (`repo` for GitHub)+- Ensure you're on a Pro or Team plan++**"Library not found"**+- Verify the library ID format (`/owner/repo`)+- Check the library exists at [context7.com](https://context7.com)+- Try searching for it first++See [Troubleshooting](/troubleshooting) for more solutions.++## Next Steps++<CardGroup cols={2}>+ <Card title="Learn Best Practices" icon="lightbulb" href="/how-to">+ Practical guides for optimizing your Context7 usage+ </Card>++ <Card title="Add Your Library" icon="plus" href="/library-owners">+ Submit your library to Context7+ </Card>++ <Card title="View API Docs" icon="code" href="/api">+ Complete REST API reference+ </Card>++ <Card title="Upgrade Plan" icon="arrow-up" href="/plans-pricing">+ Unlock team features and private repos+ </Card>+</CardGroup>++## Support++- **Documentation**: Browse all docs at [docs.context7.com](https://docs.context7.com)+- **GitHub**: Report issues at [github.com/upstash/context7](https://github.com/upstash/context7/issues)+- **Discord**: Join [upstash.com/discord](https://upstash.com/discord)+- **Email**: Pro and Enterprise customers can email supportdiff --git a/docs/docs.json b/docs/docs.jsonindex d90e13bb..296543f6 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -11,11 +11,14 @@"navigation": {"pages": ["getting-started",+ "dashboard",+ "plans-pricing","how-to","library-owners","api","mcp",- "security"+ "security",+ "troubleshooting"]},"logo": {@@ -36,7 +39,7 @@],"primary": {"type": "button",- "label": "Install MCP",+ "label": "Dashboard","href": "https://context7.com"}},diff --git a/docs/getting-started.mdx b/docs/getting-started.mdxindex 1b534c89..5033012e 100644--- a/docs/getting-started.mdx+++ b/docs/getting-started.mdx@@ -1,72 +1,50 @@----title: Getting Started-description: Up-to-date code docs for any prompt+title: Getting Started with Context7+sidebarTitle: Getting Started----# Context7 MCP--Context7 MCP pulls up-to-date, version-specific documentation and code examples straight from the source and places them directly into your prompt.+Context7 brings up-to-date, version-specific documentation and code examples directly into your AI coding assistant. No more outdated examples or hallucinated APIs.## Why Context7?-### Without Context7--LLMs rely on outdated or generic information about the libraries you use. You get:--- Code examples are outdated and based on year-old training data-- Hallucinated APIs that don't even exist-- Generic answers for old package versions--### With Context7+**The Problem:**+- LLMs use outdated training data from months or years ago+- Hallucinated APIs that don't actually exist+- Generic answers that don't match your library version-Context7 MCP pulls up-to-date, version-specific documentation and code examples straight from the source and places them directly into your prompt.+**The Solution:**+Context7 fetches current documentation in real-time, so your AI assistant always has the latest information.-Add `use context7` to your prompt in Cursor:+## Quick Example-```txt-Create a Next.js middleware that checks for a valid JWT in cookies and redirects unauthenticated users to `/login`. use context7-```+Instead of hoping your AI knows the latest API:```txt-Configure a Cloudflare Worker script to cache JSON API responses for five minutes. use context7+Create a Next.js middleware that checks for a valid JWT in cookies. use context7```-Context7 fetches up-to-date code examples and documentation right into your LLM's context.+Context7 automatically pulls the current Next.js documentation into the AI's context.-1. Write your prompt naturally-2. Tell the LLM to `use context7`-3. Get working code answers+## Three Steps to Get Started-No tab-switching, no hallucinated APIs that don't exist, no outdated code generation.+### Before You Begin-## Installation+- Sign up or log in at [context7.com](https://context7.com) to access the dashboard+- (Optional) Generate an API key for higher rate limits+- Confirm your MCP client (Cursor, Claude Code, Windsurf, etc.) is on the latest version+- Ensure Node.js v18+ is installed if you plan to run the local MCP server-### Requirements+### 1. Install Context7 MCP-- Node.js >= v18.0.0-- Cursor, Claude Code, VSCode, Windsurf or another MCP Client-- Context7 API Key (Optional) for higher rate limits and private repositories (Get yours at [context7.com/dashboard](https://context7.com/dashboard))+Choose your preferred client below for installation instructions.<AccordionGroup>- <Accordion title="Install via Smithery" icon="sparkles">- To install Context7 MCP Server for any client automatically via [Smithery](https://smithery.ai/server/@upstash/context7-mcp):+ <Accordion title="Cursor" icon="cursor">+ **One-Click Install** (Cursor 1.0+):- ```bash- npx -y @smithery/cli@latest install @upstash/context7-mcp --client <CLIENT_NAME> --key <YOUR_SMITHERY_KEY>- ```-- You can find your Smithery key in the [Smithery.ai webpage](https://smithery.ai/server/@upstash/context7-mcp).- </Accordion>-- <Accordion title="Install in Cursor" icon="cursor">- Go to: `Settings` � `Cursor Settings` � `MCP` � `Add new global MCP server`-- Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file is the recommended approach. You may also install in a specific project by creating `.cursor/mcp.json` in your project folder.-- Since Cursor 1.0, you can click the install button below for instant one-click installation.-- **Cursor Remote Server Connection**+ Click → `Settings` → `Cursor Settings` → `MCP` → `Add new global MCP server`+ **Remote Server (Recommended)**:```json{"mcpServers": {@@ -80,88 +58,24 @@ No tab-switching, no hallucinated APIs that don't exist, no outdated code genera}```- **Cursor Local Server Connection**-- ```json- {- "mcpServers": {- "context7": {- "command": "npx",- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]- }- }- }- ```+ Or add to `~/.cursor/mcp.json` manually.</Accordion>- <Accordion title="Install in Claude Code" icon="code">- Run this command:-- **Claude Code Remote Server Connection**-- ```sh- claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: YOUR_API_KEY"+ <Accordion title="Claude Code" icon="code">+ **Remote Server**:+ ```bash+ claude mcp add --transport http context7 https://mcp.context7.com/mcp \+ --header "CONTEXT7_API_KEY: YOUR_API_KEY"```- **Claude Code Local Server Connection**-- ```sh+ **Local Server**:+ ```bashclaude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY```</Accordion>- <Accordion title="Install in Amp" icon="bolt">- Run this command in your terminal:-- **Without API Key (Basic Usage)**-- ```sh- amp mcp add context7 https://mcp.context7.com/mcp- ```-- **With API Key (Higher Rate Limits & Private Repos)**-- ```sh- amp mcp add context7 --header "CONTEXT7_API_KEY=YOUR_API_KEY" https://mcp.context7.com/mcp- ```- </Accordion>-- <Accordion title="Install in Windsurf" icon="wind">- Add this to your Windsurf MCP config file:-- **Windsurf Remote Server Connection**-- ```json- {- "mcpServers": {- "context7": {- "serverUrl": "https://mcp.context7.com/mcp",- "headers": {- "CONTEXT7_API_KEY": "YOUR_API_KEY"- }- }- }- }- ```-- **Windsurf Local Server Connection**-- ```json- {- "mcpServers": {- "context7": {- "command": "npx",- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]- }- }- }- ```- </Accordion>-- <Accordion title="Install in VS Code" icon="code">- Add this to your VS Code MCP config file:-- **VS Code Remote Server Connection**+ <Accordion title="VS Code" icon="code">+ Add to your VS Code MCP config:```json"mcp": {@@ -176,40 +90,16 @@ No tab-switching, no hallucinated APIs that don't exist, no outdated code genera}}```-- **VS Code Local Server Connection**-- ```json- "mcp": {- "servers": {- "context7": {- "type": "stdio",- "command": "npx",- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]- }- }- }- ```</Accordion>- <Accordion title="Install in Cline" icon="robot">- You can easily install Context7 through the [Cline MCP Server Marketplace](https://cline.bot/mcp-marketplace):-- 1. Open **Cline**- 2. Click the hamburger menu icon (0) to enter the **MCP Servers** section- 3. Use the search bar within the **Marketplace** tab to find _Context7_- 4. Click the **Install** button-- Or you can directly edit MCP servers configuration:-+ <Accordion title="Windsurf" icon="wind">```json{"mcpServers": {"context7": {- "url": "https://mcp.context7.com/mcp",- "type": "streamableHttp",+ "serverUrl": "https://mcp.context7.com/mcp","headers": {- "Authorization": "Bearer YOUR_API_KEY"+ "CONTEXT7_API_KEY": "YOUR_API_KEY"}}}@@ -217,35 +107,104 @@ No tab-switching, no hallucinated APIs that don't exist, no outdated code genera```</Accordion>- <Accordion title="Install in Zed" icon="zap">- It can be installed via [Zed Extensions](https://zed.dev/extensions?query=Context7) or you can add this to your Zed `settings.json`:-- ```json- {- "context_servers": {- "Context7": {- "source": "custom",- "command": "npx",- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]- }- }- }- ```- </Accordion>-<Accordion title="Other Clients" icon="ellipsis">- Context7 supports many more clients including:- - Augment Code- - Roo Code- - Gemini CLI- - Claude Desktop- - Opencode- - OpenAI Codex+ Context7 supports 25+ MCP clients including:+ - Zed, Cline, Amp- JetBrains AI Assistant- - Kiro- - Trae+ - OpenAI Codex, Gemini CLI+ - LM Studio, Perplexity- And many more...- Check our [GitHub repository](https://github.com/upstash/context7) for detailed installation instructions for each client.+ See the [README](https://github.com/upstash/context7) for detailed instructions.</Accordion></AccordionGroup>++<Note>+**API Key**: Get yours at [context7.com/dashboard](https://context7.com/dashboard) for higher rate limits. Works without a key for basic usage.+</Note>++### 2. Try It Out++Add `use context7` to any coding prompt:++```txt+Build a Redis rate limiter with sliding window. use context7+```++```txt+Set up Supabase auth with Next.js middleware. use context7+```++Context7 automatically finds and retrieves the relevant documentation.++### 3. Optimize Your Workflow++**Auto-invoke Context7** by adding a rule to your AI:++<Tabs>+ <Tab title="Cursor">+ Go to `Cursor Settings` → `Rules` and add:+ ```txt+ Always use context7 for code generation and library documentation.+ ```+ </Tab>+ <Tab title="Windsurf">+ Add to `.windsurfrules` in your project:+ ```txt+ Use context7 for all code and API questions.+ ```+ </Tab>+ <Tab title="Claude Code">+ Add to `CLAUDE.md` in your project:+ ```txt+ Use context7 when generating code or explaining APIs.+ ```+ </Tab>+</Tabs>++Now you don't need to type "use context7" every time!++## How It Works++1. **You prompt your AI** with a coding question+2. **Context7 MCP intercepts** library names from your prompt+3. **Documentation is fetched** in real-time from Context7's database+4. **AI responds** with current, accurate information++All happening seamlessly in the background.++## Requirements++- **Node.js**: v18.0.0 or higher+- **MCP Client**: Cursor, Claude Code, VS Code, or another MCP-supported IDE+- **API Key**: Optional, but recommended for higher rate limits++<Tip>+Not sure everything is wired up? Run `npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp` to validate the connection before you jump back into coding.+</Tip>++## What's Next?++<CardGroup cols={2}>+ <Card title="Explore the Dashboard" icon="gauge" href="/dashboard">+ Manage your API keys, monitor usage, and set up team collaboration+ </Card>++ <Card title="View Pricing" icon="tag" href="/plans-pricing">+ Free for public repos, Pro for teams and private repositories+ </Card>++ <Card title="Add Your Library" icon="plus" href="/library-owners">+ Submit your own library to make it available in Context7+ </Card>++ <Card title="How-To Guides" icon="book" href="/how-to">+ Learn advanced techniques and best practices+ </Card>+</CardGroup>++## Troubleshooting++Having issues? Check our [Troubleshooting Guide](/troubleshooting) for common solutions.++Need help? Join our [Discord Community](https://upstash.com/discord) or open an issue on [GitHub](https://github.com/upstash/context7/issues).diff --git a/docs/how-to.mdx b/docs/how-to.mdxindex 778d4e94..797cbe2b 100644--- a/docs/how-to.mdx+++ b/docs/how-to.mdx@@ -1,119 +1,94 @@----title: How To-description: Learn how to get the most out of Context7+title: How-To Guides----# How To Use Context7+Learn practical techniques to maximize your Context7 experience.-Learn how to maximize Context7's capabilities with these practical guides.+## Quick Wins-## Adding a Project+- [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+- [Bring in private repositories](#work-with-private-repositories) for internal docs-You can add your favorite libraries and frameworks to Context7 to help developers get up-to-date documentation.+## Auto-Invoke Context7-### Quick Method+Stop adding "use context7" to every prompt by setting up an automatic rule.-The easiest way to add a library is through our web interface:+### Add a Rule to Your MCP Client-1. Visit [context7.com/add-library](https://context7.com/add-library?tab=github)-2. Provide the GitHub repository URL-3. Context7 will automatically parse and index the project's documentation--### Advanced Configuration--For more control over how Context7 parses your library, add a `context7.json` file to your repository root:--```json-{- "$schema": "https://context7.com/schema/context7.json",- "projectTitle": "Your Library Name",- "description": "Brief description of your library",- "folders": ["docs", "guides"],- "excludeFolders": ["src", "tests"],- "excludeFiles": ["CHANGELOG.md"],- "rules": ["Best practice or guideline here"],- "previousVersions": [- {- "tag": "v1.0.0",- "title": "version 1.0.0"- }- ]-}-```--See the [Library Owners](/library-owners) guide for detailed configuration options.--## Add Rule to Use Context7 in Your Agent--If you don't want to add `use context7` to every prompt, you can define a simple rule in your MCP client's rule section to auto-invoke Context7 on any code question.+<AccordionGroup>+ <Accordion title="Cursor" icon="cursor">+ 1. Open `Cursor Settings` → `Rules`+ 2. Add this rule:-### Where to Add Rules+ ```txt+ Always use context7 when I need code generation, setup steps, or library documentation.+ Automatically use Context7 MCP tools without me having to ask.+ ```+ </Accordion>-<AccordionGroup><Accordion title="Windsurf" icon="wind">- Add your rule to the `.windsurfrules` file in your project root.- </Accordion>+ Create or edit `.windsurfrules` in your project root:- <Accordion title="Cursor" icon="cursor">- Go to `Cursor Settings` � `Rules` and add your rule there.+ ```txt+ Use context7 for all code generation and API documentation questions.+ ```</Accordion><Accordion title="Claude Code" icon="code">- Add your rule to the `CLAUDE.md` file in your project root.+ Create or edit `CLAUDE.md` in your project root:++ ```txt+ Automatically use context7 for code generation and library documentation.+ ```</Accordion></AccordionGroup>-### Example Rule+<Tip>+Customize the rule to match your workflow. For example, only auto-invoke for specific libraries or frameworks.+</Tip>-```txt-Always use context7 when I need code generation, setup or configuration steps, or-library/API documentation. This means you should automatically use the Context7 MCP-tools to resolve library id and get library docs without me having to explicitly ask.-```+## Use Specific Library IDs-<Note>-You can customize this rule to match your specific use cases and workflow preferences.-</Note>+Skip the search step and get documentation instantly by specifying exact library IDs.-## Using a Special Library ID+### How to Find Library IDs-If you already know exactly which library you want to use, add its Context7 ID to your prompt. This allows Context7 MCP server to skip the library-matching step and directly retrieve documentation.+1. Visit [context7.com](https://context7.com)+2. Search for your library+3. The ID is shown in the format `/owner/repository`-### How to Use Library IDs--Include the library ID in your prompt with the `/` prefix:+### Use in Your Prompts```txt-Implement basic authentication with Supabase. use library /supabase/supabase for API and docs.+Implement JWT auth with Supabase. use library /supabase/supabase``````txt-Create a rate limiter using Redis. use library /upstash/ratelimit for implementation.+Build a rate limiter. use library /upstash/ratelimit``````txt-Set up a Next.js API route with middleware. use library /vercel/next.js for documentation.+Set up Next.js middleware. use library /vercel/next.js/v15.1.0```-### Benefits--- **Faster responses**: Skips the library resolution step-- **Precise documentation**: Ensures you get docs for the exact library you need-- **Better context**: LLM knows exactly which library's conventions to follow--### Finding Library IDs+<Note>+You can even specify versions: `/owner/repo/v1.0.0`+</Note>-1. Search for your library on [context7.com](https://context7.com)-2. The library ID is shown in the URL and on the library page-3. Format: `/owner/repository` (e.g., `/mongodb/docs`, `/facebook/react`)+### Benefits-## Using HTTPS Proxy+- **Faster**: No library resolution needed+- **Precise**: Get docs for the exact library and version+- **Reliable**: No ambiguity about which library to use-If you are behind an HTTP proxy, Context7 uses the standard `https_proxy` / `HTTPS_PROXY` environment variables.+## Configure HTTPS Proxy-### Configuration+If you're behind a corporate proxy, configure Context7 to route through it.-Set the environment variable before starting your MCP client:+### Set Environment Variables<AccordionGroup><Accordion title="Linux/macOS" icon="terminal">@@ -122,7 +97,7 @@ Set the environment variable before starting your MCP client:export HTTPS_PROXY=http://proxy.example.com:8080```- For authentication:+ With authentication:```bashexport https_proxy=http://username:[email protected]:8080```@@ -134,7 +109,7 @@ Set the environment variable before starting your MCP client:set HTTPS_PROXY=http://proxy.example.com:8080```- For authentication:+ With authentication:```cmdset https_proxy=http://username:[email protected]:8080```@@ -145,33 +120,215 @@ Set the environment variable before starting your MCP client:$env:https_proxy = "http://proxy.example.com:8080"$env:HTTPS_PROXY = "http://proxy.example.com:8080"```-- For authentication:- ```powershell- $env:https_proxy = "http://username:[email protected]:8080"- ```</Accordion>+</AccordionGroup>++### Or Configure in MCP Settings++Add proxy directly to your MCP configuration:- <Accordion title="MCP Configuration" icon="gear">- You can also add proxy settings directly in your MCP configuration:-- ```json- {- "mcpServers": {- "context7": {- "command": "npx",- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],- "env": {- "https_proxy": "http://proxy.example.com:8080",- "HTTPS_PROXY": "http://proxy.example.com:8080"- }- }+```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],+ "env": {+ "https_proxy": "http://proxy.example.com:8080",+ "HTTPS_PROXY": "http://proxy.example.com:8080"}}- ```- </Accordion>-</AccordionGroup>+ }+}+```++Both lowercase and uppercase environment variables are supported.++<Tip>+After updating proxy settings, run `curl https://mcp.context7.com/mcp/ping` to confirm outbound connectivity before restarting your IDE.+</Tip>++## Optimize Token Usage++Control documentation size to manage costs and response times.++### Set Token Limits in Dashboard++1. Go to [Dashboard → Libraries](https://context7.com/dashboard)+2. Set "Maximum tokens per request"+3. Default is 10,000, adjust based on your needs++### Use Topic Filtering++Focus documentation on specific topics:++```txt+Explain Next.js middleware authentication patterns. use context7+```++Context7 automatically extracts "authentication" as a topic and ranks relevant docs higher.++### Direct API Usage++When using the API directly, specify tokens:++```bash+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.++## Work with Private Repositories++Access your private documentation with Context7 Pro.++### Requirements++- Pro plan ($7/seat/month)+- GitHub or GitLab personal access token+- Repository access permissions++### Add a Private Repository++1. Go to [Dashboard → Libraries → Private Repositories](https://context7.com/dashboard)+2. Click **Add Private Repository**+3. Enter repository URL+4. Provide access token:+ - **GitHub**: Token with `repo` scope+ - **GitLab**: Token with `read_repository` scope+5. Configure folders and exclusions (optional)+6. Submit++### Cost++- **Adding**: $15 per 1M tokens parsed (one-time)+- **Refreshing**: Only pay for new/changed content+- **Querying**: Free (covered by seat cost)++See [Plans & Pricing](/plans-pricing#parse-token-pricing) for examples.++## Set Up Team Collaboration++Share Context7 access with your team.++### Create a Team Project++1. Visit [Dashboard](https://context7.com/dashboard)+2. Click **Create Team Project**+3. Name your project++### Invite Team Members++1. Go to **Dashboard → Members**+2. Click **Invite Member**+3. Enter email and select role:+ - **Owner**: Full control+ - **Admin**: Manage team and settings+ - **Developer**: API access only++Members receive an email invitation.++### Manage API Keys++Each team member gets their own API key with independent rate limits (60 req/hour per member).++Regenerate keys from the Members tab if compromised.++See [Dashboard → Team Collaboration](/dashboard#team-collaboration) for details.++## Refresh Library Documentation++Keep your documentation up to date.++### Web Interface++1. Go to [context7.com/refresh-library](https://context7.com/refresh-library)+2. Enter library ID (e.g., `/vercel/next.js`)+3. Submit++### API++```bash+POST https://context7.com/api/v1/refresh+Content-Type: application/json+Authorization: Bearer YOUR_API_KEY++{+ "docsRepoUrl": "https://github.com/vercel/next.js"+}+```++### When to Refresh++- After major version releases+- When documentation is updated+- When you notice outdated information<Note>-Both lowercase `https_proxy` and uppercase `HTTPS_PROXY` are supported. Context7 will check both.-</Note>\ No newline at end of file+For private repos, you only pay for new/changed content during refresh.+</Note>++## Monitor Usage++Track your Context7 usage and costs.++### View Statistics++Go to [Dashboard → Overview](https://context7.com/dashboard) to see:++- **Search requests**: Library searches+- **Query/fetch requests**: Documentation retrievals+- **Query tokens**: Tokens returned in responses+- **Parsing tokens**: Tokens processed when adding/refreshing++All stats show the last 30 days.++### Understand Costs++**Free Plan**: Always $0++**Pro Plan**:+- **Seats**: $7/month × team members+- **Parse tokens**: $15 per 1M tokens (private repos only)++**Example**:+- 4 team members: $28/month+- Added 800K token private repo: $12 one-time+- Monthly total: $40++See [Dashboard → Usage Monitoring](/dashboard#usage-monitoring) for more details.++## Best Practices++### Security++- Never commit API keys to version control+- Use environment variables for keys+- Rotate keys regularly+- Give team members minimum required permissions++See [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++### 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++See [Library Owners](/library-owners) for configuration details.++## Need Help?++- **Troubleshooting**: [Common issues and solutions](/troubleshooting)+- **API Reference**: [Complete API documentation](/api)+- **MCP Details**: [Technical MCP server info](/mcp)+- **Community**: [Join our Discord](https://upstash.com/discord)diff --git a/docs/library-owners.mdx b/docs/library-owners.mdxindex bba8586a..54ddda81 100644--- a/docs/library-owners.mdx+++ b/docs/library-owners.mdx@@ -1,19 +1,20 @@---title: Library Owners-description: Add your library to Context7 and help developers get up-to-date documentation----# Adding Projects to Context7--Context7 allows you to add your favorite libraries and frameworks to help developers get up-to-date documentation directly in their coding environment.+Context7 allows you to add your favorite libraries and frameworks so developers always receive current, trustworthy documentation inside their coding environment.## Quick Submission-The easiest way to add a library is through our web interface:+The fastest way to add a library is through our web interface:++**[Submit a Library ->](https://context7.com/add-library?tab=github)**-**[Submit a Library �](https://context7.com/add-library?tab=github)**+1. Paste the GitHub repository URL.+2. (Optional) Adjust folders and exclusions.+3. Submit and let Context7 parse and index the documentation.-Simply provide the GitHub repository URL and Context7 will automatically parse and index the project's documentation.+You'll receive an email notification when parsing finishes. You can also monitor progress from the library detail page (e.g., `context7.com/owner/repo`).## Advanced Configuration with `context7.json`@@ -143,7 +144,16 @@ To add a new version to your existing library:</Note>2. **Refresh your library**: Go to your library page on Context7 and trigger a refresh to index the new version.+3. **Confirm availability**: Search for the new version or run `resolve-library-id` from an MCP client to confirm it appears in results.++## Monitor Parsing and Quality++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.## Need Help?-If you encounter issues or need assistance adding your project, please [report an issue](https://context7.com/add-library?tab=github) or reach out to our community.+If you encounter issues or need assistance adding your project, please [open an issue](https://github.com/upstash/context7/issues/new/choose) or reach out to our community.diff --git a/docs/mcp.mdx b/docs/mcp.mdxindex 1ee3308f..0655e066 100644--- a/docs/mcp.mdx+++ b/docs/mcp.mdx@@ -1,16 +1,19 @@---title: MCP Server-description: Technical documentation for Context7 MCP Server implementation----# MCP Server-Context7 implements the Model Context Protocol (MCP) to provide up-to-date library documentation directly to AI coding assistants.## OverviewThe Context7 MCP Server is a lightweight service that bridges AI assistants with Context7's documentation database. It provides two main tools that work together to fetch relevant, version-specific documentation.+## Quick Start++- **Remote (recommended)**: Point your IDE to `https://mcp.context7.com/mcp` and supply your API key in the headers.+- **Local**: Run `npx -y @upstash/context7-mcp --transport stdio --api-key YOUR_API_KEY` and connect over stdio.+- **Validate**: Use `npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp` to confirm connectivity and tool availability.+### Server Information- **Name**: Context7diff --git a/docs/plans-pricing.mdx b/docs/plans-pricing.mdxnew file mode 100644index 00000000..05ccbe53--- /dev/null+++ b/docs/plans-pricing.mdx@@ -0,0 +1,311 @@+---+title: Plans & Pricing+---++Pick the plan that matches how you work today and scale when your needs grow.++## Compare Plans++<CardGroup cols={3}>+ <Card title="Free" icon="gift">+ **$0**++ Perfect for individual developers++ **Features:**+ - Public Repositories+ - Access Control+ - API Usage (60 req/hr)+ - Community Support++ [Get Started Free →](https://context7.com/dashboard)+ </Card>++ <Card title="Pro" icon="star">+ **$7 per seat / month**++ For teams that need private repos++ **Free Features +**+ - Private Repositories+ - Team Collaboration+ - $15/1M parse tokens+ - Email Support++ [Choose Pro →](https://context7.com/plans)+ </Card>++ <Card title="Enterprise" icon="building">+ **Custom Pricing**++ For large teams with custom needs++ **Pro Features +**+ - SOC-2 Compliance+ - SSO (SAML, OAuth, OIDC)+ - Custom Rate Limits+ - Dedicated Support++ [Contact Us →](https://context7.com/contact)+ </Card>+</CardGroup>++## Plan Details++### Free Plan++The Free plan is perfect for individual developers who want to access public documentation.++**What's Included:**+- Access to all public repositories+- Basic access control+- 60 API requests per hour+- MCP server integration+- Community support via Discord and GitHub++**Limitations:**+- No private repository access+- No team collaboration+- Single user only++**Best For:**+- Individual developers+- Personal projects+- Learning and experimentation+- Public documentation needs++### Pro Plan++The Pro plan adds private repository access and team collaboration capabilities.++**Pricing:**+- **$7 per seat per month**: Each team member counts as one seat+- **$15 per 1M parse tokens**: For parsing private repositories (adding or refreshing)++**What's Included:**+- Everything in Free plan+- Private repository access+- Team collaboration (up to 20 members per project)+- 60 requests/hour per team member+- Email support+- Usage analytics and monitoring++**How Billing Works:**+1. **Member Seats**: Charged monthly based on the number of team members+2. **Parse Tokens**: Charged when adding or refreshing private repositories+3. **Pro-rated Charges**: Billed based on days in the current billing period+4. **Cached Pages**: Free when refreshing (only new/changed content is charged)++<Note>+Parse tokens measure how much *documentation* Context7 processes during ingestion—querying already-indexed docs stays free.+</Note>++**Example Costs:**+- 3 team members: $21/month (3 × $7)+- Adding a 500K token private repo: $7.50 one-time (0.5M × $15)+- Total first month: $28.50++**Best For:**+- Development teams+- Projects with private repositories+- Organizations needing collaboration+- Teams with proprietary documentation++### Enterprise Plan++The Enterprise plan provides custom solutions for large organizations.++**Custom Pricing:**+Contact us at [[email protected]](mailto:[email protected]) for customized pricing based on your needs.++**What's Included:**+- Everything in Pro plan+- SOC-2 Type II compliance+- SSO authentication (SAML, OAuth 2.0, OIDC)+- Custom rate limits+- Dedicated support team+- Priority feature requests+- Custom SLA+- Regular check-ins+- Advanced security features++**Best For:**+- Large enterprises+- Organizations requiring SOC-2 compliance+- Teams with high-volume API usage+- Companies needing SSO integration++## Pricing Details++### Parse Token Pricing++When you add or refresh a private repository, you're charged $15 per 1 million tokens parsed.++**What Counts as Parsing:**+- Initial addition of a private repository+- Refreshing a private repository (only new/changed content)+- Processing documentation and code examples++**What's Free:**+- Cached pages during refresh (unchanged content)+- Public repository access+- Querying documentation via API (covered by seat cost)++**Example Scenarios:**++<AccordionGroup>+ <Accordion title="Adding a Private Repository">+ - Repository documentation size: 750K tokens+ - Cost: $11.25 (0.75M × $15)+ - This is a one-time charge when adding the repository+ </Accordion>++ <Accordion title="Refreshing a Repository">+ - Previous size: 750K tokens+ - New content: 50K tokens+ - Cached (unchanged): 700K tokens+ - Cost: $0.75 (0.05M × $15)+ - You only pay for the new/changed content+ </Accordion>++ <Accordion title="Monthly Team Cost">+ - Team members: 5+ - Seat cost: $35/month (5 × $7)+ - Added 2 private repos: $30 (2M tokens × $15)+ - Refreshed repos: $5 (0.33M new tokens × $15)+ - Total: $70 for the month+ </Accordion>+</AccordionGroup>++### Rate Limits++| Plan | Rate Limit | Notes |+|------|------------|-------|+| Free | 60 req/hour | Per API key |+| Pro | 60 req/hour | Per team member |+| Enterprise | Custom | Based on your needs |++Rate limits are calculated using a sliding window algorithm and reset hourly.++## Frequently Asked Questions++### General Questions++<AccordionGroup>+ <Accordion title="What's included in the Free plan?" icon="gift">+ The Free plan includes access to public repositories, basic access control, and API usage with rate limits. It's perfect for individual developers who don't need private repositories or team collaboration.+ </Accordion>++ <Accordion title="How does the Pro plan pricing work?" icon="credit-card">+ Pro plan costs $7 per seat per month. Each team member counts as a seat, and you're billed based on the number of members in your team. You also pay for parse tokens used when adding or refreshing private repositories.+ </Accordion>++ <Accordion title="How much does parsing private libraries cost?" icon="dollar-sign">+ In addition to $7 per seat per month, you are charged $15 per 1M tokens for parsing private repositories. This charge applies when you add a new private repository or refresh an existing one. The cached pages (while refreshing private repositories) are free.+ </Accordion>++ <Accordion title="Can I access private repositories on the Free plan?" icon="lock">+ No, private repository access is only available on Pro and Enterprise plans. You'll need to upgrade to work with private repositories and collaborate with your team.+ </Accordion>+</AccordionGroup>++### Plan Management++<AccordionGroup>+ <Accordion title="How do I downgrade from Pro to Free?" icon="arrow-down">+ To downgrade, you must first remove all team projects and private repositories from your personal project. Once done, you can switch to the Free plan from the plans page.+ </Accordion>++ <Accordion title="Can I cancel my Pro subscription at any time?" icon="xmark">+ Yes, you can downgrade to the Free plan at any time. You will be charged a pro-rated amount for the days of your current billing period.+ </Accordion>++ <Accordion title="What's the difference between Pro and Enterprise?" icon="building">+ Enterprise plans include additional features like SOC-2 compliance, SSO (Single Sign-On), dedicated support, and custom rate limits. Contact us to discuss your specific enterprise needs.+ </Accordion>++ <Accordion title="How much does the Enterprise plan cost?" icon="envelope">+ Enterprise pricing is customized based on your specific needs and usage requirements. Please contact us at [[email protected]](mailto:[email protected]) to discuss pricing and features.+ </Accordion>+</AccordionGroup>++### Security & Privacy++<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.+ </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+ </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.+ </Accordion>+</AccordionGroup>++### API Usage++<AccordionGroup>+ <Accordion title="Is API usage unlimited?" icon="infinity">+ No, we have different rate limits for each plan. The Free plan has lower rate limits, while the Pro plan offers higher limits per team member. If you need custom rate limits for high-volume usage, please contact us at [[email protected]](mailto:[email protected]) to discuss Enterprise plan options.+ </Accordion>+</AccordionGroup>++## Getting Started++### Free Plan++1. Sign up at [context7.com](https://context7.com)+2. Access your dashboard at [context7.com/dashboard](https://context7.com/dashboard)+3. Get your API key+4. Start using Context7 with public libraries++### Pro Plan++1. Start with a Free account+2. Go to [Plans & Pricing](https://context7.com/plans)+3. Click "Choose Pro Plan"+4. Add payment method via Stripe+5. Create team projects and add members+6. Add private repositories++### Enterprise Plan++1. Contact us at [[email protected]](mailto:[email protected])+2. Discuss your requirements+3. Receive custom pricing proposal+4. Get onboarding support+5. Start using enterprise features++## Need Help Choosing?++**Choose Free if:**+- You're an individual developer+- You only need public documentation+- You're just getting started++**Choose Pro if:**+- You need private repository access+- You're working in a team+- You need collaboration features++**Choose Enterprise if:**+- You're a large organization+- You need SOC-2 compliance+- You require SSO integration+- You have high-volume API usage++Still not sure? [Contact us](https://context7.com/contact) and we'll help you choose the right plan.++## Additional Resources++- [Dashboard Guide →](/dashboard)+- [API Documentation →](/api)+- [Security & Privacy →](/security)+- [Getting Started →](/getting-started)diff --git a/docs/security.mdx b/docs/security.mdxindex 57244d7a..9525a1b5 100644--- a/docs/security.mdx+++ b/docs/security.mdx@@ -1,12 +1,16 @@---title: Security-description: Security and privacy practices for Context7----# Security and Privacy-Context7 takes security and privacy seriously. This page outlines our security practices, data handling, and compliance measures.+## Highlights++- Queries stay on your device; Context7 only receives derived topics for retrieval+- Documentation is indexed inside SOC 2 compliant infrastructure operated by Upstash+- API keys are encrypted, rate limited, and easy to rotate from your dashboard+- Enterprise customers can enable SSO (SAML, OAuth, OIDC) and receive dedicated audit trails+## Privacy-First Architecture### Query Privacydiff --git a/docs/troubleshooting.mdx b/docs/troubleshooting.mdxnew file mode 100644index 00000000..9c2c8347--- /dev/null+++ b/docs/troubleshooting.mdx@@ -0,0 +1,354 @@+---+title: Troubleshooting+---++This guide helps you resolve common issues when setting up or using Context7 MCP.++## Quick Checklist++- Confirm Node.js v18+ is installed (`node --version`)+- Update to the latest Context7 MCP package (`@upstash/context7-mcp@latest`)+- Verify connectivity with `curl https://mcp.context7.com/mcp/ping`+- Add your API key to the configuration if you hit rate limits+- Enable debug logs (`DEBUG=*`) before collecting support information++## Installation Issues++### Module Not Found Errors++If you encounter `ERR_MODULE_NOT_FOUND`, try using `bunx` instead of `npx`:++```json+{+ "mcpServers": {+ "context7": {+ "command": "bunx",+ "args": ["-y", "@upstash/context7-mcp"]+ }+ }+}+```++This often resolves module resolution issues in environments where `npx` doesn't properly install or resolve packages.++### ESM Resolution Issues++For errors like `Error: Cannot find module 'uriTemplate.js'`, try the `--experimental-vm-modules` flag:++```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",+ "args": ["-y", "--node-options=--experimental-vm-modules", "@upstash/[email protected]"]+ }+ }+}+```++### TLS/Certificate Issues++Use the `--experimental-fetch` flag to bypass TLS-related problems:++```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",+ "args": ["-y", "--node-options=--experimental-fetch", "@upstash/context7-mcp"]+ }+ }+}+```++## General Solutions++### Quick Fixes++1. **Try adding `@latest`** to the package name to ensure you're using the most recent version:++```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",+ "args": ["-y", "@upstash/context7-mcp@latest", "--api-key", "YOUR_API_KEY"]+ }+ }+}+```++2. **Use `bunx` as an alternative** to `npx`:++```json+{+ "mcpServers": {+ "context7": {+ "command": "bunx",+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]+ }+ }+}+```++3. **Consider using `deno`** as another alternative runtime:++```json+{+ "mcpServers": {+ "context7": {+ "command": "deno",+ "args": [+ "run",+ "--allow-env=NO_DEPRECATION,TRACE_DEPRECATION",+ "--allow-net",+ "npm:@upstash/context7-mcp"+ ]+ }+ }+}+```++4. **Ensure you're using Node.js v18 or higher** for native fetch support:++```bash+node --version+```++If you're on an older version, upgrade Node.js to v18 or later.++## Platform-Specific Issues++### Windows Issues++#### Request Timeout Errors++On Windows, some users may encounter request timeout errors with the default configuration. Try using the full path to Node.js and the installed package:++```json+{+ "mcpServers": {+ "context7": {+ "command": "C:\\Program Files\\nodejs\\node.exe",+ "args": [+ "C:\\Users\\yourname\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js",+ "--transport",+ "stdio",+ "--api-key",+ "YOUR_API_KEY"+ ]+ }+ }+}+```++Alternatively, use this configuration with `cmd`:++```json+{+ "mcpServers": {+ "context7": {+ "command": "cmd",+ "args": [+ "/c",+ "npx",+ "-y",+ "@upstash/context7-mcp",+ "--api-key",+ "YOUR_API_KEY"+ ]+ }+ }+}+```++### macOS Issues++#### Request Timeout Errors++On macOS, some users may encounter the same request timeout errors. Use the full path to Node.js and the installed package:++```json+{+ "mcpServers": {+ "context7": {+ "command": "/Users/yourname/.nvm/versions/node/v22.14.0/bin/node",+ "args": [+ "/Users/yourname/.nvm/versions/node/v22.14.0/lib/node_modules/@upstash/context7-mcp/dist/index.js",+ "--transport",+ "stdio",+ "--api-key",+ "YOUR_API_KEY"+ ]+ }+ }+}+```++<Note>+Replace `yourname` and the Node.js version (`v22.14.0`) with your actual username and installed Node.js version.+</Note>++## API and Connection Issues++### Rate Limiting++If you encounter rate limit errors:++- **Get an API key**: Sign up at [context7.com/dashboard](https://context7.com/dashboard) for higher rate limits+- **Add API key to your configuration**:++```json+{+ "mcpServers": {+ "context7": {+ "url": "https://mcp.context7.com/mcp",+ "headers": {+ "CONTEXT7_API_KEY": "YOUR_API_KEY"+ }+ }+ }+}+```++### Authentication Errors++If you see `401 Unauthorized` errors:++1. **Verify your API key** is correct and starts with `ctx7sk`+2. **Check the header format** - ensure the API key is properly set:++For HTTP transport:+```json+{+ "headers": {+ "CONTEXT7_API_KEY": "YOUR_API_KEY"+ }+}+```++For stdio transport:+```json+{+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]+}+```++### Library Not Found++If you get `404 Not Found` errors:++1. **Verify the library ID** format is correct: `/owner/repo` or `/owner/repo/version`+2. **Search for the library** first using `resolve-library-id` tool+3. **Check if the library exists** at [context7.com](https://context7.com)++## MCP Client-Specific Issues++### Cursor++- Make sure you're using Cursor 1.0 or later for best MCP support+- Try both global (`~/.cursor/mcp.json`) and project-specific (`.cursor/mcp.json`) configurations+- Restart Cursor after changing MCP configuration++### VS Code++- Ensure you have the latest version of VS Code with MCP support+- Check that the Copilot extension is installed and updated+- Restart VS Code after configuration changes++### Claude Code++- Verify the MCP server is added correctly with `claude mcp list`+- Check logs with `claude mcp logs context7`+- Try removing and re-adding the server++## Proxy Issues++If you're behind a corporate proxy:++1. **Set environment variables** before starting your MCP client:++```bash+export https_proxy=http://proxy.example.com:8080+export HTTPS_PROXY=http://proxy.example.com:8080+```++2. **Or add to your MCP configuration**:++```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],+ "env": {+ "https_proxy": "http://proxy.example.com:8080",+ "HTTPS_PROXY": "http://proxy.example.com:8080"+ }+ }+ }+}+```++See [How To - Using HTTPS Proxy](/how-to#using-https-proxy) for more details.++## Debugging Tips++### Enable Verbose Logging++Add debug output to your configuration:++```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",+ "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],+ "env": {+ "DEBUG": "*"+ }+ }+ }+}+```++### Test with MCP Inspector++Test your setup independently:++```bash+npx -y @modelcontextprotocol/inspector npx @upstash/context7-mcp+```++This opens an interactive inspector to test Context7 tools.++### Check Server Status++Test the remote server is reachable:++```bash+curl https://mcp.context7.com/mcp/ping+```++Should return: `{"status": "ok", "message": "pong"}`++## Still Having Issues?++If none of these solutions work:++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:+ - Operating system and version+ - Node.js version (`node --version`)+ - MCP client and version+ - Configuration (remove sensitive data like API keys)+ - Error messages and logs+3. **Join Discord**: Get help from the community at [upstash.com/discord](https://upstash.com/discord)++## Additional Resources++- [Getting Started Guide](/getting-started)+- [Installation Instructions](/getting-started#installation)+- [MCP Documentation](/mcp)+- [API Documentation](/api)+- [Security & Privacy](/security)