cleanup mcp server too

This commit is contained in:
Mateusz Burzyński
2026-01-08 11:21:23 +01:00
parent 2bd12b9553
commit 317ebd3431
3 changed files with 125 additions and 131 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ async function findAvailablePort(startPort: number): Promise<number> {
*/
export async function startMcpHttpServer(
ctx: ToolContext
): Promise<{ url: string; close: () => Promise<void> }> {
): Promise<{ url: string; [Symbol.asyncDispose]: () => Promise<void> }> {
const server = new FastMCP({
name: ghPullfrogMcpName,
version: "0.0.1",
@@ -119,7 +119,7 @@ export async function startMcpHttpServer(
return {
url,
close: async () => {
[Symbol.asyncDispose]: async () => {
await server.stop();
},
};