mirror of
https://github.com/upstash/context7.git
synced 2025-11-30 09:00:13 +00:00
docs: add API key support for higher rate limits and authentication
This commit is contained in:
parent
7d4a2fa500
commit
6202ad81cb
98
README.md
98
README.md
@ -46,6 +46,7 @@ Check out our [project addition guide](./docs/adding-projects.md) to learn how t
|
||||
|
||||
- Node.js >= v18.0.0
|
||||
- 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>
|
||||
<summary><b>Installing via Smithery</b></summary>
|
||||
@ -77,7 +78,10 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i
|
||||
{
|
||||
"mcpServers": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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
|
||||
|
||||
```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:
|
||||
|
||||
```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
|
||||
|
||||
```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>
|
||||
@ -136,7 +140,10 @@ Add this to your Windsurf MCP config file. See [Windsurf MCP docs](https://docs.
|
||||
{
|
||||
"mcpServers": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"type": "stdio",
|
||||
"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": {
|
||||
"command": {
|
||||
"path": "npx",
|
||||
"args": ["-y", "@upstash/context7-mcp"]
|
||||
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
|
||||
},
|
||||
"settings": {}
|
||||
}
|
||||
@ -266,7 +276,7 @@ Once the MCP server is added, you can start using Context7's up-to-date code doc
|
||||
{
|
||||
"name": "context7",
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"type": "remote",
|
||||
"url": "https://mcp.context7.com/mcp",
|
||||
"headers": {
|
||||
"CONTEXT7_API_KEY": "YOUR_API_KEY"
|
||||
},
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
@ -392,7 +408,7 @@ Add this to your Opencode configuration file. See [Opencode MCP docs](https://op
|
||||
"mcp": {
|
||||
"context7": {
|
||||
"type": "local",
|
||||
"command": ["npx", "-y", "@upstash/context7-mcp"],
|
||||
"command": ["npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
@ -409,7 +425,7 @@ Add the following configuration to your OpenAI Codex MCP server settings:
|
||||
|
||||
```toml
|
||||
[mcp_servers.context7]
|
||||
args = ["-y", "@upstash/context7-mcp"]
|
||||
args = ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
|
||||
command = "npx"
|
||||
```
|
||||
|
||||
@ -430,7 +446,7 @@ See [JetBrains AI Assistant Documentation](https://www.jetbrains.com/help/ai-ass
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"Context7": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@upstash/context7-mcp"],
|
||||
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
|
||||
"env": {},
|
||||
"disabled": false,
|
||||
"autoApprove": []
|
||||
@ -494,7 +510,7 @@ For more details, visit the [Trae documentation](https://docs.trae.ai/ide/model-
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"github.com/upstash/context7-mcp": {
|
||||
"command": "cmd",
|
||||
"args": ["/c", "npx", "-y", "@upstash/context7-mcp"],
|
||||
"args": ["/c", "npx", "-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
|
||||
"disabled": false,
|
||||
"autoApprove": []
|
||||
}
|
||||
@ -637,7 +653,7 @@ Add this to your Amazon Q Developer CLI configuration file. See [Amazon Q Develo
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@upstash/context7-mcp"],
|
||||
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
|
||||
"env": {},
|
||||
"working_directory": null,
|
||||
"start_on_launch": true
|
||||
@ -684,6 +700,9 @@ Add the following configuration to the `mcp` section of your Copilot Coding Agen
|
||||
"context7": {
|
||||
"type": "http",
|
||||
"url": "https://mcp.context7.com/mcp",
|
||||
"headers": {
|
||||
"CONTEXT7_API_KEY": "YOUR_API_KEY"
|
||||
},
|
||||
"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": {
|
||||
"Context7": {
|
||||
"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": {
|
||||
"type": "stdio",
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"context7": {
|
||||
"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": {
|
||||
"type": "stdio",
|
||||
"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": {
|
||||
"context7": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@upstash/context7-mcp"]
|
||||
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -864,7 +889,7 @@ Example config -
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"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
|
||||
{
|
||||
"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": {
|
||||
"context7": {
|
||||
"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
|
||||
{
|
||||
"args": ["-y", "@upstash/context7-mcp"],
|
||||
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"],
|
||||
"command": "npx",
|
||||
"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.
|
||||
- `--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:
|
||||
|
||||
@ -1026,7 +1052,7 @@ bun run dist/index.js --transport http --port 8080
|
||||
Another example with stdio transport:
|
||||
|
||||
```bash
|
||||
bun run dist/index.js --transport stdio
|
||||
bun run dist/index.js --transport stdio --api-key YOUR_API_KEY
|
||||
```
|
||||
|
||||
<details>
|
||||
@ -1037,7 +1063,7 @@ bun run dist/index.js --transport stdio
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user