@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.
- package/dist/index.js +4 -1
- 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
|
-
|
|
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()
|