@upstash/context7-mcp 4.0.6 → 4.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22,7 +22,10 @@ function getPluginFromRequest(req) {
22
22
  }
23
23
  function requiresAuthentication(req, plugin) {
24
24
  // The MCP routes live on a router mounted at /mcp, so req.path is relative to it.
25
- return `${req.baseUrl}${req.path}` === "/mcp/oauth" || Boolean(plugin);
25
+ const isOAuthEndpoint = `${req.baseUrl}${req.path}` === "/mcp/oauth";
26
+ // The current official Claude plugin expands an unset API key to an empty header.
27
+ const hasEmptyPluginAuthorization = plugin === CLAUDE_CODE_PLUGIN && req.headers.authorization === "";
28
+ return isOAuthEndpoint || (Boolean(plugin) && !hasEmptyPluginAuthorization);
26
29
  }
27
30
  // Parse CLI arguments using commander
28
31
  const program = new Command()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upstash/context7-mcp",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "mcpName": "io.github.upstash/context7",
5
5
  "description": "MCP server for Context7",
6
6
  "repository": {