This commit is contained in:
bipproduction
2025-10-27 02:01:13 +08:00
parent 599dfe3f99
commit df6df16885

View File

@@ -29,6 +29,21 @@ function createStream(handler: (controller: ReadableStreamDefaultController) =>
export const MCPRoute = new Elysia({ export const MCPRoute = new Elysia({
prefix: "/mcp", prefix: "/mcp",
tags: ["mcp"], tags: ["mcp"],
})
.get("/", ({ set }) => {
set.headers["Content-Type"] = "application/json; charset=utf-8";
return {
jsonrpc: "2.0",
id: 1,
result: {
protocol: "2024-11-05",
capabilities: {
"tools/list": true,
"tools/call": true,
},
status: "MCP Server Ready",
},
};
}) })
/** /**
* ✅ GET /mcp/:id — streaming response untuk n8n + curl * ✅ GET /mcp/:id — streaming response untuk n8n + curl