File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @deco/mcp" ,
3
- "version" : " 0.1.15 " ,
3
+ "version" : " 0.1.16 " ,
4
4
"exports" : " ./mod.ts" ,
5
5
"tasks" : {
6
6
"check" : " deno fmt && deno lint && deno check mod.ts"
Original file line number Diff line number Diff line change @@ -239,7 +239,8 @@ export function mcpServer<TManifest extends AppManifest>(
239
239
const path = new URL ( c . req . url ) . pathname ;
240
240
241
241
if (
242
- path === `${ options ?. basePath ?? "" } /mcp/ws` && c . req . raw . headers . get ( "upgrade" ) === "websocket"
242
+ path === `${ options ?. basePath ?? "" } /mcp/ws` &&
243
+ c . req . raw . headers . get ( "upgrade" ) === "websocket"
243
244
) {
244
245
const { response, socket } = Deno . upgradeWebSocket ( c . req . raw ) ;
245
246
@@ -252,7 +253,9 @@ export function mcpServer<TManifest extends AppManifest>(
252
253
}
253
254
254
255
if ( path === `${ options ?. basePath ?? "" } /mcp/sse` ) {
255
- const transport = new SSEServerTransport ( MESSAGES_ENDPOINT ) ;
256
+ const transport = new SSEServerTransport (
257
+ `${ options ?. basePath ?? "" } ${ MESSAGES_ENDPOINT } ` ,
258
+ ) ;
256
259
transports . set ( transport . sessionId , transport ) ;
257
260
258
261
transport . onclose = ( ) => {
You can’t perform that action at this time.
0 commit comments