From 3a2e2485273a4dd1bfb5186ceee73fab8f8b8b9a Mon Sep 17 00:00:00 2001 From: cliffhall Date: Mon, 21 Apr 2025 11:40:01 -0400 Subject: [PATCH] Prettier --- client/src/lib/hooks/useConnection.ts | 6 ++++-- server/src/index.ts | 14 +++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/client/src/lib/hooks/useConnection.ts b/client/src/lib/hooks/useConnection.ts index 2577a41..1fe93ad 100644 --- a/client/src/lib/hooks/useConnection.ts +++ b/client/src/lib/hooks/useConnection.ts @@ -296,8 +296,10 @@ export function useConnection({ mcpProxyServerUrl.searchParams.append("url", sseUrl); break; } - (mcpProxyServerUrl as URL).searchParams.append("transportType", transportType); - + (mcpProxyServerUrl as URL).searchParams.append( + "transportType", + transportType, + ); try { // Inject auth manually instead of using SSEClientTransport, because we're diff --git a/server/src/index.ts b/server/src/index.ts index 08a88e7..cb01609 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -98,7 +98,7 @@ const createTransport = async (req: express.Request): Promise => { return transport; } else if (transportType === "streamable-http") { const headers: HeadersInit = { - Accept: "text/event-stream, application/json" + Accept: "text/event-stream, application/json", }; for (const key of STREAMABLE_HTTP_HEADERS_PASSTHROUGH) { @@ -129,7 +129,6 @@ const createTransport = async (req: express.Request): Promise => { let backingServerTransport: Transport | undefined; - app.get("/mcp", async (req, res) => { try { console.log("New streamable-http connection"); @@ -227,7 +226,9 @@ app.get("/stdio", async (req, res) => { console.log("Created web app transport"); await webAppTransport.start(); - (backingServerTransport as StdioClientTransport).stderr!.on("data", (chunk) => { + (backingServerTransport as StdioClientTransport).stderr!.on( + "data", + (chunk) => { webAppTransport.send({ jsonrpc: "2.0", method: "notifications/stderr", @@ -235,7 +236,8 @@ app.get("/stdio", async (req, res) => { content: chunk.toString(), }, }); - }); + }, + ); mcpProxy({ transportToClient: webAppTransport, @@ -251,7 +253,9 @@ app.get("/stdio", async (req, res) => { app.get("/sse", async (req, res) => { try { - console.log("New SSE connection. NOTE: The sse transport is deprecated and has been replaced by streamable-http"); + console.log( + "New SSE connection. NOTE: The sse transport is deprecated and has been replaced by streamable-http", + ); try { await backingServerTransport?.close();