feat: add mcp sse endpoint

This commit is contained in:
bipproduction
2025-10-08 15:29:06 +08:00
parent 2366710ccd
commit d0e4ec60d8

View File

@@ -47,6 +47,17 @@ const app = new Elysia()
tags: ["MCP"],
}
})
.get("/mcp", ({ set }) => {
set.headers["Content-Type"] = "text/event-stream"
set.headers["Cache-Control"] = "no-cache"
set.headers["Connection"] = "keep-alive"
return (send: any) => send(`event: ready\ndata: {"ok":true}\n\n`)
}, {
detail: {
description: "MCP manifest",
tags: ["MCP"],
}
})
.get("*", html)
.listen(3000, () => {
console.log("Server running at http://localhost:3000");