@upstash/context7-mcp 2.2.0 → 2.2.1
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 +11 -1
- package/dist/lib/constants.js +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import express from "express";
|
|
|
9
9
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
10
10
|
import { Command } from "commander";
|
|
11
11
|
import { AsyncLocalStorage } from "async_hooks";
|
|
12
|
-
import { SERVER_VERSION, RESOURCE_URL, AUTH_SERVER_URL } from "./lib/constants.js";
|
|
12
|
+
import { SERVER_VERSION, RESOURCE_URL, AUTH_SERVER_URL, OPENAI_APPS_CHALLENGE_TOKEN, } from "./lib/constants.js";
|
|
13
13
|
/** Default HTTP server port */
|
|
14
14
|
const DEFAULT_PORT = 3000;
|
|
15
15
|
// Parse CLI arguments using commander
|
|
@@ -373,6 +373,16 @@ async function main() {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
|
+
// OpenAI Apps SDK domain verification challenge
|
|
377
|
+
app.get("/.well-known/openai-apps-challenge", (_req, res) => {
|
|
378
|
+
if (!OPENAI_APPS_CHALLENGE_TOKEN) {
|
|
379
|
+
return res.status(404).json({
|
|
380
|
+
error: "not_found",
|
|
381
|
+
message: "Endpoint not found.",
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
res.type("text/plain").send(OPENAI_APPS_CHALLENGE_TOKEN);
|
|
385
|
+
});
|
|
376
386
|
// Catch-all 404 handler - must be after all other routes
|
|
377
387
|
app.use((_req, res) => {
|
|
378
388
|
res.status(404).json({
|
package/dist/lib/constants.js
CHANGED
|
@@ -10,3 +10,4 @@ export const CLERK_DOMAIN = "clerk.context7.com";
|
|
|
10
10
|
export const CONTEXT7_API_BASE_URL = process.env.CONTEXT7_API_URL || `${CONTEXT7_BASE_URL}/api`;
|
|
11
11
|
export const RESOURCE_URL = process.env.RESOURCE_URL || MCP_RESOURCE_URL;
|
|
12
12
|
export const AUTH_SERVER_URL = process.env.AUTH_SERVER_URL || CONTEXT7_BASE_URL;
|
|
13
|
+
export const OPENAI_APPS_CHALLENGE_TOKEN = process.env.OPENAI_APPS_CHALLENGE_TOKEN;
|