Skip to content

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

cli updates

enesakarce63d4b00c65
diff --git a/README.md b/README.md
index f0778f0b..69c6126d 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,7 @@ LLMs rely on outdated or generic information about the libraries you use. You ge
## ✅ With Context7
-Context7 MCP pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt.
-
-Add `use context7` to your prompt (or [set up a rule](#add-a-rule) to auto-invoke):
+Context7 pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt.
```txt
Create a Next.js middleware that checks for a valid JWT in cookies
@@ -32,183 +30,74 @@ Configure a Cloudflare Worker script to cache
JSON API responses for five minutes. use context7
```
+```txt
+Show me the Supabase auth API for email/password sign-up. use context7
+```
+
Context7 fetches up-to-date code examples and documentation right into your LLM's context. No tab-switching, no hallucinated APIs that don't exist, no outdated code generation.
+Works in two modes:
+- **CLI + Skills** — installs a skill that guides your agent to fetch docs using `ctx7` CLI commands (no MCP required)
+- **MCP** — registers a Context7 MCP server so your agent can call documentation tools natively
+
## Installation
> [!NOTE]
> **API Key Recommended**: Get a free API key at [context7.com/dashboard](https://context7.com/dashboard) for higher rate limits.
-<details>
-<summary><b>Install in Cursor</b></summary>
-
-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. See [Cursor MCP docs](https://docs.cursor.com/context/model-context-protocol) for more info.
-
-> Since Cursor 1.0, you can click the install button below for instant one-click installation.
-
-#### Cursor Remote Server Connection
-
-[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D)
-
-```json
-{
- "mcpServers": {
- "context7": {
- "url": "https://mcp.context7.com/mcp",
- "headers": {
- "CONTEXT7_API_KEY": "YOUR_API_KEY"
- }
- }
- }
-}
-```
-
-#### Cursor Local Server Connection
-
-[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IC15IEB1cHN0YXNoL2NvbnRleHQ3LW1jcCJ9)
-
-```json
-{
- "mcpServers": {
- "context7": {
- "command": "npx",
- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
- }
- }
-}
-```
-
-</details>
-
-<details>
-<summary><b>Install in Claude Code</b></summary>
-
-Run this command. See [Claude Code MCP docs](https://code.claude.com/docs/en/mcp) for more info.
-
-#### Claude Code Local Server Connection
-
-```sh
-claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
-```
-
-#### Claude Code Remote Server Connection
-
-```sh
-claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
-```
-
-> Remove `--scope user` to install for the current project only.
-
-</details>
-
-<details>
-<summary><b>Install in Opencode</b></summary>
-
-Add this to your Opencode configuration file. See [Opencode MCP docs](https://opencode.ai/docs/mcp-servers) for more info.
-
-#### Opencode Remote Server Connection
-
-```json
-"mcp": {
- "context7": {
- "type": "remote",
- "url": "https://mcp.context7.com/mcp",
- "headers": {
- "CONTEXT7_API_KEY": "YOUR_API_KEY"
- },
- "enabled": true
- }
-}
-```
-
-#### Opencode Local Server Connection
-
-```json
-{
- "mcp": {
- "context7": {
- "type": "local",
- "command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
- "enabled": true
- }
- }
-}
-```
-
-</details>
-
-<details>
-<summary><b>Install with ctx7 setup</b></summary>
-
-Set up Context7 MCP for your coding agents:
+Set up Context7 for your coding agents with a single command:
```bash
npx ctx7 setup
```
-Authenticates via OAuth, generates an API key, and configures the MCP server and rule for your agents. Use `--cursor`, `--claude`, or `--opencode` to target a specific agent.
+Authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI + Skills or MCP mode. Use `--cursor`, `--claude`, or `--opencode` to target a specific agent.
+**[Manual Installation / Other Clients →](https://context7.com/docs/resources/all-clients)**
-</details>
+## Important Tips
-**[Other IDEs and Clients →](https://context7.com/docs/resources/all-clients)**
+### Use Library Id
-<details>
-<summary><b>OAuth Authentication</b></summary>
+If you already know exactly which library you want to use, add its Context7 ID to your prompt. That way, Context7 can skip the library-matching step and directly retrieve docs.
-Context7 MCP server supports OAuth 2.0 authentication for MCP clients that implement the [MCP OAuth specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization).
+```txt
+Implement basic authentication with Supabase. use library /supabase/supabase for API and docs.
+```
-To use OAuth, change the endpoint from `/mcp` to `/mcp/oauth` in your client configuration:
+The slash syntax tells Context7 exactly which library to load docs for.
-```diff
-- "url": "https://mcp.context7.com/mcp"
-+ "url": "https://mcp.context7.com/mcp/oauth"
-```
+### Specify a Version
-OAuth is only available for remote HTTP connections. For local MCP connections using stdio transport, use API key authentication instead.
+To get documentation for a specific library version, just mention the version in your prompt:
-</details>
+```txt
+How do I set up Next.js 14 middleware? use context7
+```
-## Important Tips
+Context7 will automatically match the appropriate version.
### Add a Rule
-To avoid typing `use context7` in every prompt, add a rule to your MCP client to automatically invoke Context7 for code-related questions:
+If you installed via `ctx7 setup`, a skill is configured automatically that triggers Context7 for library-related questions. To set up a rule manually instead, add one to your coding agent:
- **Cursor**: `Cursor Settings > Rules`
- **Claude Code**: `CLAUDE.md`
-- Or the equivalent in your MCP client
+- Or the equivalent in your coding agent
**Example rule:**
```txt
-Always use Context7 MCP when I need library/API documentation, code generation, setup or configuration steps without me having to explicitly ask.
-```
-
-### Use Library Id
-
-If you already know exactly which library you want to use, add its Context7 ID to your prompt. That way, Context7 MCP server can skip the library-matching step and directly continue with retrieving docs.
-
-```txt
-Implement basic authentication with Supabase. use library /supabase/supabase for API and docs.
+Always use Context7 when I need library/API documentation, code generation, setup or configuration steps without me having to explicitly ask.
```
-The slash syntax tells the MCP tool exactly which library to load docs for.
-
-### Specify a Version
-
-To get documentation for a specific library version, just mention the version in your prompt:
-
-```txt
-How do I set up Next.js 14 middleware? use context7
-```
+## Available Tools
-Context7 will automatically match the appropriate version.
+### CLI Commands
-## Available Tools
+- `ctx7 library <name> <query>`: Searches the Context7 index by library name and returns matching libraries with their IDs.
+- `ctx7 docs <libraryId> <query>`: Retrieves documentation for a library using a Context7-compatible library ID (e.g., `/mongodb/docs`, `/vercel/next.js`).
-Context7 MCP provides the following tools that LLMs can use:
+### MCP Tools
- `resolve-library-id`: Resolves a general library name into a Context7-compatible library ID.
- `query` (required): The user's question or task (used to rank results by relevance)
@@ -220,7 +109,8 @@ Context7 MCP provides the following tools that LLMs can use:
## More Documentation
-- [More MCP Clients](https://context7.com/docs/resources/all-clients) - Installation for 30+ clients
+- [CLI Reference](https://context7.com/docs/clients/cli) - Full CLI documentation
+- [MCP Clients](https://context7.com/docs/resources/all-clients) - Manual MCP installation for 30+ clients
- [Adding Libraries](https://context7.com/docs/adding-libraries) - Submit your library to Context7
- [Troubleshooting](https://context7.com/docs/resources/troubleshooting) - Common issues and solutions
- [API Reference](https://context7.com/docs/api-guide) - REST API documentation
diff --git a/docs/clients/claude-code.mdx b/docs/clients/claude-code.mdx
index fb98062d..94f0dd75 100644
--- a/docs/clients/claude-code.mdx
+++ b/docs/clients/claude-code.mdx
@@ -3,105 +3,25 @@ title: Claude Code
description: Using Context7 with Claude Code
---
-Context7 integrates with Claude Code to provide current library documentation instead of relying on training data. Beyond the basic MCP connection, Claude Code supports skills, agents, and commands that make documentation lookups more powerful.
+Context7 integrates with Claude Code to provide current library documentation instead of relying on training data. Claude Code supports skills, agents, and commands that make documentation lookups more powerful.
## Installation
-<Tabs>
-<Tab title="Remote Server (Recommended)" icon="cloud">
-No dependencies required. Connects to Context7's hosted server.
-
-<Tabs>
-<Tab title="With API Key (Recommended)">
-Run this command in your terminal:
-
-```bash
-claude mcp add --scope user --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
-```
-</Tab>
-<Tab title="With OAuth">
-<Steps>
-<Step title="Add the Context7 MCP server">
-Run this command in your terminal:
-
-```bash
-claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp/oauth
-```
-</Step>
-<Step title="Authenticate with Context7">
-Run `/mcp` in Claude Code, select Context7, and click "Authenticate" to start the OAuth flow:
-
-<Frame>
- <img src="/images/clients/claude-code/mcp-unauthenticated.png" alt="Claude Code OAuth Authentication" />
-</Frame>
-
-This will open your browser for authorization. After you authorize, tokens are stored securely and refresh automatically. See [OAuth authentication](/howto/oauth) for details.
-</Step>
-</Steps>
-</Tab>
-<Tab title="Without API Key">
-Run this command in your terminal:
-
-```bash
-claude mcp add --scope user --transport http context7 https://mcp.context7.com/mcp
-```
-</Tab>
-</Tabs>
-</Tab>
-<Tab title="Local Server" icon="computer">
-Runs on your machine. Requires Node.js 18+.
-
-<Tabs>
-<Tab title="With API Key (Recommended)">
-Run this command in your terminal:
-
-```bash
-claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
-```
-
-<Tip>
-Instead of passing the API key in the command, you can set `CONTEXT7_API_KEY` as an environment variable and omit the `--api-key` flag.
-</Tip>
-</Tab>
-<Tab title="Without API Key">
-Run this command in your terminal:
+Run the setup command to configure Context7 for Claude Code:
```bash
-claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp
+npx ctx7 setup --claude
```
-</Tab>
-</Tabs>
-</Tab>
-</Tabs>
-
-### Verifying the Connection
-
-Run `/mcp` in Claude Code to see all servers and manage authentication:
-
-<Frame>
- <img src="/images/clients/claude-code/mcp-list.png" alt="Claude Code MCP List" />
-</Frame>
-Select a server to see details including status, authentication, and available tools:
+Authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI or MCP mode.
-<Frame>
- <img src="/images/clients/claude-code/mcp-details.png" alt="Claude Code MCP Details" />
-</Frame>
-
-You can also run `claude mcp list` in your terminal:
-
-```bash
-$ claude mcp list
-Checking MCP server health...
-
-context7: https://mcp.context7.com/mcp (HTTP) - ✓ Connected
-```
+For manual MCP installation or other configuration options, see [All MCP Clients](/resources/all-clients).
---
## Using Context7
-Add "use context7" to your prompts to fetch current documentation:
+With `ctx7 setup`, a skill is installed that triggers automatically when you ask about libraries — no need to say "use context7". You can also invoke it explicitly:
```
use context7 to show me how to set up middleware in Next.js 15
@@ -117,7 +37,7 @@ use context7 with /vercel/next.js for app router setup
```
<Tip>
-With the [Context7 plugin](#the-context7-plugin) installed, the skill triggers automatically — no need to say "use context7".
+With the [Context7 plugin](#the-context7-plugin) installed, you get additional agents and commands on top of the skill.
</Tip>
---
diff --git a/docs/clients/cursor.mdx b/docs/clients/cursor.mdx
index 7306e3e8..e855fa4d 100644
--- a/docs/clients/cursor.mdx
+++ b/docs/clients/cursor.mdx
@@ -3,213 +3,25 @@ title: Cursor
description: Using Context7 with Cursor
---
-export const InstallOption = ({ title, children, recommended }) => {
- return (
- <div className="p-5 rounded-xl border border-zinc-200 dark:border-zinc-700 bg-zinc-50/50 dark:bg-zinc-800/50">
- <div className="flex items-center gap-2 mb-3">
- <span className="font-semibold text-zinc-900 dark:text-zinc-100">{title}</span>
- {recommended && (
- <span className="px-2 py-0.5 text-xs font-medium rounded-full bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400">
- Recommended
- </span>
- )}
- </div>
- <div className="text-zinc-600 dark:text-zinc-400">{children}</div>
- </div>
- );
-};
-
-export const CursorInstallButton = ({ url, type = "remote" }) => {
- return (
- <a
- href={url}
- target="_blank"
- rel="noopener noreferrer"
- className="group inline-flex items-center gap-3 px-5 py-3 rounded-xl border-2 border-zinc-900 dark:border-zinc-100 bg-zinc-900 dark:bg-zinc-100 hover:bg-zinc-800 dark:hover:bg-zinc-200 transition-all duration-200 no-underline w-fit"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 21 22"
- className="w-6 h-6 text-white dark:text-zinc-900"
- fill="currentColor"
- >
- <path d="M19.162 5.452 10.698.565a.88.88 0 0 0-.879 0L1.356 5.452a.74.74 0 0 0-.37.64v9.853a.74.74 0 0 0 .37.64l8.464 4.887a.879.879 0 0 0 .879 0l8.464-4.886a.74.74 0 0 0 .37-.64V6.091a.74.74 0 0 0-.37-.64Zm-.531 1.035L10.46 20.639c-.055.095-.201.056-.201-.055v-9.266a.52.52 0 0 0-.26-.45L1.975 6.237c-.096-.056-.057-.202.054-.202h16.34c.233 0 .378.252.262.453Z" />
- </svg>
- <span className="text-sm font-semibold text-white dark:text-zinc-900">
- Add to Cursor
- </span>
- <svg
- className="w-4 h-4 text-white/70 dark:text-zinc-900/70 group-hover:translate-x-0.5 transition-transform"
- fill="none"
- viewBox="0 0 24 24"
- stroke="currentColor"
- strokeWidth={2}
- >
- <path strokeLinecap="round" strokeLinejoin="round" d="M9 5l7 7-7 7" />
- </svg>
- </a>
- );
-};
-
-export const Divider = ({ text }) => {
- return (
- <div className="flex items-center gap-4 my-6">
- <div className="flex-1 h-px bg-zinc-200 dark:bg-zinc-700" />
- <span className="text-sm text-zinc-500 dark:text-zinc-400 font-medium">{text}</span>
- <div className="flex-1 h-px bg-zinc-200 dark:bg-zinc-700" />
- </div>
- );
-};
-
Context7 brings up-to-date library documentation directly into Cursor. Instead of getting outdated code examples from training data, you get current documentation from source repositories.
## Installation
-<Tabs>
-<Tab title="Remote Server (Recommended)" icon="cloud">
-No dependencies required. Connects to Context7's hosted server.
-
-<InstallOption title="One-Click Install" recommended>
-Click the button to add Context7 to Cursor automatically:
-
-<div className="mt-3">
-<CursorInstallButton url="https://cursor.com/en/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIiwiaGVhZGVycyI6eyJDT05URVhUN19BUElfS0VZIjoiWU9VUl9BUElfS0VZIn19" type="remote" />
-</div>
-</InstallOption>
-
-<Divider text="or" />
-
-<InstallOption title="Manual Installation">
-<Steps>
-<Step title="Open Cursor Settings">
-Go to `Cursor` → `Settings...` → `Cursor Settings` → `MCP`.
-
-You can also press `Cmd+Shift+P` (or `Ctrl+Shift+P` on Windows/Linux) and type "Cursor Settings".
-
-<Frame>
- <img src="/images/clients/cursor/mcp-settings.png" alt="Cursor MCP Settings" />
-</Frame>
-</Step>
-<Step title="Add Context7 Server">
-Click "Add a Custom MCP Server" or edit `~/.cursor/mcp.json` directly:
-
-<CodeGroup>
-```json With API Key
-{
- "mcpServers": {
- "context7": {
- "url": "https://mcp.context7.com/mcp",
- "headers": {
- "CONTEXT7_API_KEY": "YOUR_API_KEY"
- }
- }
- }
-}
-```
-
-```json With OAuth
-{
- "mcpServers": {
- "context7": {
- "url": "https://mcp.context7.com/mcp/oauth"
- }
- }
-}
-```
-
-```json Without API Key
-{
- "mcpServers": {
- "context7": {
- "url": "https://mcp.context7.com/mcp"
- }
- }
-}
-```
-</CodeGroup>
-
-<Tip>
-Using OAuth? You'll be redirected to sign in the first time you connect. After that, tokens refresh automatically. See [OAuth authentication](/howto/oauth) for details.
-</Tip>
-</Step>
-</Steps>
-</InstallOption>
-</Tab>
-<Tab title="Local Server" icon="computer">
-Runs on your machine. Requires Node.js 18+.
-
-<InstallOption title="One-Click Install" recommended>
-Click the button to add Context7 to Cursor automatically:
-
-<div className="mt-3">
-<CursorInstallButton
- url="https://cursor.com/en/install-mcp?name=context7&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB1cHN0YXNoL2NvbnRleHQ3LW1jcCIsIi0tYXBpLWtleSIsIllPVVJfQVBJX0tFWSJdfQ=="
- type="local"
-/>
-</div>
-</InstallOption>
-
-<Divider text="or" />
-
-<InstallOption title="Manual Installation">
-<Steps>
-<Step title="Open Cursor Settings">
-Go to `Cursor` → `Settings...` → `Cursor Settings` → `MCP`.
-
-You can also press `Cmd+Shift+P` (or `Ctrl+Shift+P` on Windows/Linux) and type "Cursor Settings".
-
-<Frame>
- <img src="/images/clients/cursor/mcp-settings.png" alt="Cursor MCP Settings" />
-</Frame>
-</Step>
-<Step title="Add Context7 Server">
-Click "Add a Custom MCP Server" or edit `~/.cursor/mcp.json` directly:
-
-<CodeGroup>
-```json With API Key
-{
- "mcpServers": {
- "context7": {
- "command": "npx",
- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
- }
- }
-}
-```
+Run the setup command to configure Context7 for Cursor:
-```json Without API Key
-{
- "mcpServers": {
- "context7": {
- "command": "npx",
- "args": ["-y", "@upstash/context7-mcp"]
- }
- }
-}
+```bash
+npx ctx7 setup --cursor
```
-</CodeGroup>
-</Step>
-</Steps>
-</InstallOption>
-</Tab>
-</Tabs>
-
-### Project-Level Configuration
-
-You can also configure Context7 for a specific project by creating `.cursor/mcp.json` in your project folder. This is useful when:
-
-- Different projects need different API keys
-- You want to share the config with your team via version control
-- A project requires specific Context7 settings
+Authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI or MCP mode.
-The project config uses the same format as the global config.
+For manual MCP installation or other configuration options, see [All MCP Clients](/resources/all-clients).
---
## Setting Up Rules
-To make Context7 trigger automatically (without typing "use context7" every time), add a rule in Cursor.
+With `ctx7 setup`, a skill is installed that triggers Context7 automatically. If you prefer to use a rule instead, add one in Cursor.
<Tabs>
<Tab title="Cursor Settings" icon="settings">
diff --git a/docs/clients/opencode.mdx b/docs/clients/opencode.mdx
index d8280e68..d990776a 100644
--- a/docs/clients/opencode.mdx
+++ b/docs/clients/opencode.mdx
@@ -11,166 +11,21 @@ For more details on MCP server configuration in OpenCode, see the [OpenCode MCP
## Installation
-<Tabs>
-<Tab title="Remote Server (Recommended)" icon="cloud">
-No dependencies required. Connects to Context7's hosted server.
-
-<Steps>
-<Step title="Open your OpenCode config">
-Create or edit `opencode.json` in your project root, or `~/.config/opencode/opencode.json` for global config. See the [OpenCode config docs](https://opencode.ai/docs/config/) for more details.
-
-```bash
-# Global config
-vim ~/.config/opencode/opencode.json
-
-# Or project level config
-vim opencode.json
-```
-</Step>
-<Step title="Add Context7 MCP server">
-Add the Context7 MCP server to the `mcp` section:
-
-<Tabs>
-<Tab title="With API Key (Recommended)">
-Add this to your config file:
-
-```json
-{
- "mcp": {
- "context7": {
- "type": "remote",
- "url": "https://mcp.context7.com/mcp",
- "headers": {
- "CONTEXT7_API_KEY": "YOUR_API_KEY"
- },
- "enabled": true
- }
- }
-}
-```
-
-<Tip>
-You can use environment variable syntax for your API key: `"CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"`. This reads from your environment instead of hardcoding the key.
-</Tip>
-</Tab>
-<Tab title="With OAuth">
-Add this to your config file:
-
-```json
-{
- "mcp": {
- "context7": {
- "type": "remote",
- "url": "https://mcp.context7.com/mcp/oauth",
- "enabled": true
- }
- }
-}
-```
-
-Then run the following command in your terminal to authenticate:
-
-```bash
-opencode mcp auth context7
-```
-
-This will open your browser for authorization. After you authorize, tokens are stored securely and refresh automatically. See [OAuth authentication](/howto/oauth) for details.
-
-**Other OAuth commands**
+Run the setup command to configure Context7 for OpenCode:
```bash
-# List all MCP servers and their auth status
-opencode mcp auth list
-
-# Remove stored credentials
-opencode mcp logout context7
-```
-</Tab>
-<Tab title="Without API Key">
-Add this to your config file:
-
-```json
-{
- "mcp": {
- "context7": {
- "type": "remote",
- "url": "https://mcp.context7.com/mcp",
- "enabled": true
- }
- }
-}
+npx ctx7 setup --opencode
```
-</Tab>
-</Tabs>
-</Step>
-</Steps>
-</Tab>
-<Tab title="Local Server" icon="computer">
-Runs on your machine. Requires Node.js 18+.
-
-<Steps>
-<Step title="Open your OpenCode config">
-Create or edit `opencode.json` in your project root, or `~/.config/opencode/opencode.json` for global config. See the [OpenCode config docs](https://opencode.ai/docs/config/) for more details.
-```bash
-# Global config
-vim ~/.config/opencode/opencode.json
-
-# Or project level config
-vim opencode.json
-```
-</Step>
-<Step title="Add Context7 MCP server">
-Add the Context7 MCP server to the `mcp` section:
-
-<Tabs>
-<Tab title="With API Key (Recommended)">
-Add this to your config file:
-
-```json
-{
- "mcp": {
- "context7": {
- "type": "local",
- "command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
- "enabled": true
- }
- }
-}
-```
-
-<Tip>
-Instead of passing the API key in the command, you can set `CONTEXT7_API_KEY` as an environment variable and omit the `--api-key` flag.
-</Tip>
-</Tab>
-<Tab title="Without API Key">
-Add this to your config file:
-
-```json
-{
- "mcp": {
- "context7": {
- "type": "local",
- "command": ["npx", "-y", "@upstash/context7-mcp"],
- "enabled": true
- }
- }
-}
-```
-</Tab>
-</Tabs>
-</Step>
-</Steps>
-</Tab>
-</Tabs>
+Authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI or MCP mode.
-See the [OpenCode MCP documentation](https://opencode.ai/docs/mcp-servers) for more details on MCP server configuration.
+For manual MCP installation or other configuration options, see [All MCP Clients](/resources/all-clients).
---
## Using Context7
-Add "use context7" to your prompts to fetch current documentation:
+With `ctx7 setup`, a skill is installed that triggers automatically when you ask about libraries. You can also invoke it explicitly:
```
use context7 to show me how to set up middleware in Next.js 15
@@ -185,10 +40,10 @@ use context7 with /supabase/supabase for authentication docs
use context7 with /vercel/next.js for app router setup
```
-You can also add instructions to your `AGENTS.md` file for automatic Context7 usage:
+You can also add instructions to your `AGENTS.md` file:
```markdown AGENTS.md
-When you need to search docs, use `context7` tools.
+When you need to search docs, use Context7.
```
---
diff --git a/docs/resources/all-clients.mdx b/docs/resources/all-clients.mdx
index 56fe55ba..78a153a1 100644
--- a/docs/resources/all-clients.mdx
+++ b/docs/resources/all-clients.mdx
@@ -1,16 +1,33 @@
---
-title: All MCP Clients
+title: MCP Clients
description: Installation examples for MCP clients
---
Context7 supports all MCP clients. Below are configuration examples for popular clients. If your client isn't listed, check its documentation for MCP server installation.
+<Tip>
+Looking for the easiest way to get started? Use `npx ctx7 setup` to configure Context7 automatically. See the [CLI docs](/clients/cli) for more details.
+</Tip>
+
<Note>
For detailed guides including rules, skills, agents, and best practices, see the dedicated client pages:
- [Cursor](/clients/cursor) - Rules setup, Composer integration, tips
- [Claude Code](/clients/claude-code) - Skills, agents, commands, plugin installation
</Note>
+## OAuth Authentication
+
+Context7 MCP server supports OAuth 2.0 authentication for MCP clients that implement the [MCP OAuth specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization).
+
+To use OAuth, change the endpoint from `/mcp` to `/mcp/oauth` in your client configuration:
+
+```diff
+- "url": "https://mcp.context7.com/mcp"
++ "url": "https://mcp.context7.com/mcp/oauth"
+```
+
+OAuth is only available for remote HTTP connections. For local MCP connections using stdio transport, use API key authentication instead.
+
<AccordionGroup>
<Accordion title="Claude Code">