feat: add mcp sse endpoint
This commit is contained in:
@@ -47,6 +47,17 @@ const app = new Elysia()
|
|||||||
tags: ["MCP"],
|
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)
|
.get("*", html)
|
||||||
.listen(3000, () => {
|
.listen(3000, () => {
|
||||||
console.log("Server running at http://localhost:3000");
|
console.log("Server running at http://localhost:3000");
|
||||||
|
|||||||
Reference in New Issue
Block a user