This commit is contained in:
bipproduction
2025-10-26 21:05:34 +08:00
parent 48e4478d25
commit 8838cc3152

View File

@@ -2,7 +2,7 @@ import { Elysia } from "elysia";
import { t } from "elysia";
export const MCPRoute = new Elysia({ prefix: "/mcp-server", tags: ["mcp-server"] })
.post("/mcp", async ({ body, set }) => {
.all("/mcp", async ({ body, set }) => {
const { id, method, params } = body;
set.headers['Content-Type'] = 'application/json';
set.headers['Transfer-Encoding'] = 'chunked'; // ✅ Streaming-required for n8n