Skip to content

Commit e35cb61

Browse files
enesgulesclaude
andauthored
feat(copilot-plugin): pass CONTEXT7_API_KEY from environment to MCP server (#2752)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 8bcad13 commit e35cb61

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"name": "context7",
1313
"source": "./plugins/copilot/context7",
1414
"description": "Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
15-
"version": "1.0.1"
15+
"version": "1.0.2"
1616
}
1717
]
1818
}

plugins/copilot/context7/.mcp.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"mcpServers": {
33
"context7": {
44
"type": "http",
5-
"url": "https://mcp.context7.com/mcp"
5+
"url": "https://mcp.context7.com/mcp",
6+
"headers": {
7+
"CONTEXT7_API_KEY": "${CONTEXT7_API_KEY:-}"
8+
}
69
}
710
}
811
}

plugins/copilot/context7/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ copilot plugin marketplace add upstash/context7
2020
copilot plugin install context7@context7-marketplace
2121
```
2222

23+
## API Key (Recommended)
24+
25+
Without an API key, the plugin connects anonymously and shares the anonymous rate limits. To use your own plan, create an API key in the [Context7 dashboard](https://context7.com/dashboard) and export it as an environment variable before launching Copilot CLI:
26+
27+
```bash
28+
# e.g. in ~/.zshrc or ~/.bashrc
29+
export CONTEXT7_API_KEY="your-api-key"
30+
```
31+
32+
The plugin's MCP server configuration picks up `CONTEXT7_API_KEY` automatically. Restart Copilot CLI after setting it, then verify the key is being used by checking your usage in the [dashboard](https://context7.com/dashboard).
33+
2334
## Available Tools
2435

2536
### resolve-library-id

plugins/copilot/context7/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "context7",
33
"description": "Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"author": {
66
"name": "Upstash"
77
},

0 commit comments

Comments
 (0)