docs: add API key support for higher rate limits and authentication

This commit is contained in:
enesgules 2025-08-21 10:50:27 +03:00
parent 7d4a2fa500
commit 6202ad81cb

View File

@ -46,6 +46,7 @@ Check out our [project addition guide](./docs/adding-projects.md) to learn how t
- Node.js >= v18.0.0 - Node.js >= v18.0.0
- Cursor, Claude Code, VSCode, Windsurf or another MCP Client - Cursor, Claude Code, VSCode, Windsurf or another MCP Client
- Context7 API Key (Optional for higher rate limits) (Get yours by creating an account at [context7.com/dashboard](https://context7.com/dashboard))
<details> <details>
<summary><b>Installing via Smithery</b></summary> <summary><b>Installing via Smithery</b></summary>
@ -77,7 +78,10 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i
{ {
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"url": "https://mcp.context7.com/mcp" "url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
} }
} }
} }
@ -92,7 +96,7 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -108,19 +112,19 @@ Run this command. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/
#### Claude Code Remote Server Connection #### Claude Code Remote Server Connection
```sh ```sh
claude mcp add --transport http context7 https://mcp.context7.com/mcp claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: YOUR_API_KEY"
``` ```
Or using SSE transport: Or using SSE transport:
```sh ```sh
claude mcp add --transport sse context7 https://mcp.context7.com/sse claude mcp add --transport sse context7 https://mcp.context7.com/sse --header "CONTEXT7_API_KEY: YOUR_API_KEY"
``` ```
#### Claude Code Local Server Connection #### Claude Code Local Server Connection
```sh ```sh
claude mcp add context7 -- npx -y @upstash/context7-mcp claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
``` ```
</details> </details>
@ -136,7 +140,10 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.
{ {
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"serverUrl": "https://mcp.context7.com/mcp" "serverUrl": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
} }
} }
} }
@ -149,7 +156,7 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -172,7 +179,10 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
"servers": { "servers": {
"context7": { "context7": {
"type": "http", "type": "http",
"url": "https://mcp.context7.com/mcp" "url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
} }
} }
} }
@ -186,7 +196,7 @@ Add this to your VS Code MCP config file. See [VS Code MCP docs](https://code.vi
"context7": { "context7": {
"type": "stdio", "type": "stdio",
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -219,7 +229,7 @@ It can be installed via [Zed Extensions](https://zed.dev/extensions?query=Contex
"Context7": { "Context7": {
"command": { "command": {
"path": "npx", "path": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
}, },
"settings": {} "settings": {}
} }
@ -266,7 +276,7 @@ Once the MCP server is added, you can start using Context7's up-to-date code doc
{ {
"name": "context7", "name": "context7",
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
] ]
} }
@ -301,7 +311,7 @@ Add this to your Roo Code MCP configuration file. See [Roo Code MCP docs](https:
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -321,7 +331,10 @@ See [Gemini CLI Configuration](https://google-gemini.github.io/gemini-cli/docs/t
{ {
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"httpUrl": "https://mcp.context7.com/mcp" "httpUrl": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
} }
} }
} }
@ -334,7 +347,7 @@ Or, for a local server:
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -360,7 +373,7 @@ Open Claude Desktop developer settings and edit your `claude_desktop_config.json
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -380,6 +393,9 @@ Add this to your Opencode configuration file. See [Opencode MCP docs](https://op
"context7": { "context7": {
"type": "remote", "type": "remote",
"url": "https://mcp.context7.com/mcp", "url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
},
"enabled": true "enabled": true
} }
} }
@ -392,7 +408,7 @@ Add this to your Opencode configuration file. See [Opencode MCP docs](https://op
"mcp": { "mcp": {
"context7": { "context7": {
"type": "local", "type": "local",
"command": ["npx", "-y", "@upstash/context7-mcp"], "command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"enabled": true "enabled": true
} }
} }
@ -409,7 +425,7 @@ Add the following configuration to your OpenAI Codex MCP server settings:
```toml ```toml
[mcp_servers.context7] [mcp_servers.context7]
args = ["-y", "@upstash/context7-mcp"] args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
command = "npx" command = "npx"
``` ```
@ -430,7 +446,7 @@ See [JetBrains AI Assistant Documentation](https://www.jetbrains.com/help/ai-ass
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -456,7 +472,7 @@ See [Kiro Model Context Protocol Documentation](https://kiro.dev/docs/mcp/config
"mcpServers": { "mcpServers": {
"Context7": { "Context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"], "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"env": {}, "env": {},
"disabled": false, "disabled": false,
"autoApprove": [] "autoApprove": []
@ -494,7 +510,7 @@ For more details, visit the [Trae documentation](https://docs.trae.ai/ide/model-
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -514,7 +530,7 @@ Use these alternatives to run the local Context7 MCP server with other runtimes.
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "bunx", "command": "bunx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -617,7 +633,7 @@ The configuration on Windows is slightly different compared to Linux or macOS (_
"mcpServers": { "mcpServers": {
"github.com/upstash/context7-mcp": { "github.com/upstash/context7-mcp": {
"command": "cmd", "command": "cmd",
"args": ["/c", "npx", "-y", "@upstash/context7-mcp"], "args": ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"disabled": false, "disabled": false,
"autoApprove": [] "autoApprove": []
} }
@ -637,7 +653,7 @@ Add this to your Amazon Q Developer CLI configuration file. See [Amazon Q Develo
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -658,7 +674,7 @@ See [Warp Model Context Protocol Documentation](https://docs.warp.dev/knowledge-
{ {
"Context7": { "Context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"], "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"env": {}, "env": {},
"working_directory": null, "working_directory": null,
"start_on_launch": true "start_on_launch": true
@ -684,6 +700,9 @@ Add the following configuration to the `mcp` section of your Copilot Coding Agen
"context7": { "context7": {
"type": "http", "type": "http",
"url": "https://mcp.context7.com/mcp", "url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
},
"tools": ["get-library-docs", "resolve-library-id"] "tools": ["get-library-docs", "resolve-library-id"]
} }
} }
@ -713,7 +732,7 @@ See [LM Studio MCP Support](https://lmstudio.ai/blog/lmstudio-v0.3.17) for more
"mcpServers": { "mcpServers": {
"Context7": { "Context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -753,7 +772,7 @@ Or, for a local server:
"context7": { "context7": {
"type": "stdio", "type": "stdio",
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -777,7 +796,10 @@ Add this to your Crush configuration file. See [Crush MCP docs](https://github.c
"mcp": { "mcp": {
"context7": { "context7": {
"type": "http", "type": "http",
"url": "https://mcp.context7.com/mcp" "url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
} }
} }
} }
@ -791,7 +813,10 @@ Add this to your Crush configuration file. See [Crush MCP docs](https://github.c
"mcp": { "mcp": {
"context7": { "context7": {
"type": "sse", "type": "sse",
"url": "https://mcp.context7.com/sse" "url": "https://mcp.context7.com/sse",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
} }
} }
} }
@ -806,7 +831,7 @@ Add this to your Crush configuration file. See [Crush MCP docs](https://github.c
"context7": { "context7": {
"type": "stdio", "type": "stdio",
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -824,7 +849,7 @@ Open the "Settings" page of the app, navigate to "Plugins," and enter the follow
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -864,7 +889,7 @@ Example config -
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -885,7 +910,7 @@ To configure Context7 MCP in Zencoder, follow these steps:
```json ```json
{ {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
``` ```
@ -910,7 +935,7 @@ See [Qodo Gen docs](https://docs.qodo.ai/qodo-documentation/qodo-gen/qodo-gen-ch
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["-y", "@upstash/context7-mcp"] "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
} }
} }
} }
@ -944,7 +969,7 @@ See [Local and Remote MCPs for Perplexity](https://www.perplexity.ai/help-center
```json ```json
{ {
"args": ["-y", "@upstash/context7-mcp"], "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
"command": "npx", "command": "npx",
"env": {} "env": {}
} }
@ -1016,6 +1041,7 @@ bun run dist/index.js
- `--transport <stdio|http>` Transport to use (`stdio` by default). Note that HTTP transport automatically provides both HTTP and SSE endpoints. - `--transport <stdio|http>` Transport to use (`stdio` by default). Note that HTTP transport automatically provides both HTTP and SSE endpoints.
- `--port <number>` Port to listen on when using `http` transport (default `3000`). - `--port <number>` Port to listen on when using `http` transport (default `3000`).
- `--api-key <key>` API key for authentication. You can get your API key by creating an account at [context7.com/dashboard](https://context7.com/dashboard).
Example with http transport and port 8080: Example with http transport and port 8080:
@ -1026,7 +1052,7 @@ bun run dist/index.js --transport http --port 8080
Another example with stdio transport: Another example with stdio transport:
```bash ```bash
bun run dist/index.js --transport stdio bun run dist/index.js --transport stdio --api-key YOUR_API_KEY
``` ```
<details> <details>
@ -1037,7 +1063,7 @@ bun run dist/index.js --transport stdio
"mcpServers": { "mcpServers": {
"context7": { "context7": {
"command": "npx", "command": "npx",
"args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts"] "args": ["tsx", "/path/to/folder/context7-mcp/src/index.ts", "--api-key", "YOUR_API_KEY"]
} }
} }
} }