From 413eb3e3c0fed5869c653ebac9e36906479b0348 Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Thu, 4 Jun 2026 21:44:24 -0400 Subject: [PATCH] Allow MCP API route through proxy --- src/proxy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/proxy.ts b/src/proxy.ts index cb181eb..970e0cd 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -14,7 +14,7 @@ export function proxy(request: NextRequest) { const publicRoutes = ["/", "/auth/signin", "/auth/register"]; // Define API routes that should be handled separately - const apiRoutes = ["/api/auth", "/api/trpc"]; + const apiRoutes = ["/api/auth", "/api/trpc", "/api/mcp"]; // Allow API routes to pass through if (apiRoutes.some((route) => pathname.startsWith(route))) { @@ -48,11 +48,12 @@ export const config = { /* * Match all request paths except for the ones starting with: * - api/auth (Auth.js API routes) + * - api/mcp (MCP API route) * - _next/static (static files) * - _next/image (image optimization files) * - favicon.ico (favicon file) * - public folder files */ - "/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.png$|.*\\.jpg$|.*\\.jpeg$|.*\\.gif$|.*\\.svg$).*)", + "/((?!api/auth|api/mcp|_next/static|_next/image|favicon.ico|.*\\.png$|.*\\.jpg$|.*\\.jpeg$|.*\\.gif$|.*\\.svg$).*)", ], };