mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 13:21:55 +00:00
feat: prioritize COOLIFY_URL over MCP_PUBLIC_URL for inspector auto-connect URL
Added fallback to `process.env.COOLIFY_URL` before `MCP_PUBLIC_URL` when constructing the public URL for the MCP inspector, ensuring the correct base URL is used in environments where COOLIFY_URL is set.
This commit is contained in:
@@ -284,7 +284,7 @@ export async function main() {
|
||||
|
||||
// MCP Inspector at root path - auto-connects to /mcp
|
||||
// Mounted AFTER /mcp so specific routes take precedence
|
||||
const mcpPublicUrl = process.env.MCP_PUBLIC_URL || `http://localhost:${PORT}`;
|
||||
const mcpPublicUrl = process.env.COOLIFY_URL || process.env.MCP_PUBLIC_URL || `http://localhost:${PORT}`;
|
||||
mountInspector(app, {
|
||||
autoConnectUrl: `${mcpPublicUrl}/mcp`,
|
||||
devMode: process.env.NODE_ENV !== "production",
|
||||
|
||||
Reference in New Issue
Block a user