Add .well-known/openai-apps-challenge route to MCP server

Serves the OPENAI_APPS_CHALLENGE secret as plain text for OpenAI Apps SDK domain verification at mcp.supermemory.ai/.well-known/openai-apps-challenge.
This commit is contained in:
Dhravya Shah 2026-07-30 21:05:53 -07:00
parent 04e5b4dccf
commit 433aa60cd3
2 changed files with 5 additions and 0 deletions

View file

@ -70,6 +70,10 @@ function resourceMetadata(c: Context<{ Bindings: Bindings }>) {
app.get("/.well-known/oauth-protected-resource", resourceMetadata)
app.get(PROTECTED_RESOURCE_METADATA_PATH, resourceMetadata)
app.get("/.well-known/openai-apps-challenge", (c) => {
return c.text(c.env.OPENAI_APPS_CHALLENGE || "")
})
app.get("/.well-known/oauth-authorization-server", async (c) => {
const apiUrl = c.env.API_URL || DEFAULT_API_URL

View file

@ -14,4 +14,5 @@ export interface ServerEnv {
ALLOWED_MCP_ORIGIN_HOSTNAMES?: string
POSTHOG_API_KEY?: string
POSTHOG_HOST?: string
OPENAI_APPS_CHALLENGE?: string
}