Skip to content

Commit 8329f2a

Browse files
fix: "GET /" should not be intercepted
cause we want to serve the static file instead
1 parent 9509b39 commit 8329f2a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

netlify/edge-functions/mcp-server.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,17 @@ export default async function handler(req: Request, { url }: Context) {
134134
}
135135
}
136136

137-
export const config: Config = {
138-
path: ["/mcp", "/"],
139-
method: ["POST", "GET"],
140-
};
137+
export const config: Config = [
138+
{
139+
path: "/", // Intercept POST /
140+
method: "POST",
141+
},
142+
{
143+
path: "/mcp", // Intercept GET /mcp
144+
method: "GET",
145+
},
146+
{
147+
path: "/mcp", // Intercept POST /mcp
148+
method: "POST",
149+
},
150+
];

0 commit comments

Comments
 (0)