update mcp endpoint

This commit is contained in:
Abhishek Kumar 2026-04-16 12:59:40 +05:30
parent d895ac0fba
commit 8040458c36
2 changed files with 5 additions and 3 deletions

View file

@ -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)

View file

@ -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(
{