tambahan
This commit is contained in:
@@ -17,7 +17,7 @@ function createStream(handler: (controller: ReadableStreamDefaultController) =>
|
|||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
controller.close();
|
controller.close();
|
||||||
} catch {}
|
} catch { }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -30,6 +30,21 @@ 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
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user