From 8040458c36ea5bc626b095f2be9fe1a7b7ab8866 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 16 Apr 2026 12:59:40 +0530 Subject: [PATCH] update mcp endpoint --- api/app.py | 6 ++++-- ui/src/components/MCPSection.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/app.py b/api/app.py index 70657ef..973c08c 100644 --- a/api/app.py +++ b/api/app.py @@ -100,6 +100,8 @@ api_router.include_router(main_router) # main router with api prefix app.include_router(api_router, prefix=API_PREFIX) -# Mount the MCP server — agents reach it at /mcp over Streamable HTTP, +# Mount the MCP server — agents reach it at /api/v1/mcp over Streamable HTTP, # authenticating with the same X-API-Key header used by the REST API. -app.mount("/mcp", mcp_app) +# Mounted under /api/v1 so existing reverse-proxy rules (nginx etc.) route it +# without any extra configuration. +app.mount(f"{API_PREFIX}/mcp", mcp_app) diff --git a/ui/src/components/MCPSection.tsx b/ui/src/components/MCPSection.tsx index 90b516e..b89d2f6 100644 --- a/ui/src/components/MCPSection.tsx +++ b/ui/src/components/MCPSection.tsx @@ -11,7 +11,7 @@ export function MCPSection() { const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || (typeof window !== "undefined" ? window.location.origin : ""); - const endpoint = `${backendUrl}/mcp/`; + const endpoint = `${backendUrl}/api/v1/mcp/`; const clientConfig = JSON.stringify( {