File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @vercel/mcp-adapter " : patch
3+ ---
4+
5+ Fix allowing both async and non async handlers
Original file line number Diff line number Diff line change @@ -152,8 +152,8 @@ export function calculateEndpoints({
152152 sseEndpoint : fullSseEndpoint ,
153153 sseMessageEndpoint : fullSseMessageEndpoint ,
154154 } = basePath != null
155- ? deriveEndpointsFromBasePath ( basePath )
156- : {
155+ ? deriveEndpointsFromBasePath ( basePath )
156+ : {
157157 streamableHttpEndpoint,
158158 sseEndpoint,
159159 sseMessageEndpoint,
@@ -203,7 +203,9 @@ async function initializeRedis({
203203}
204204
205205export function initializeMcpApiHandler (
206- initializeServer : ( server : McpServer ) => Promise < void > ,
206+ initializeServer :
207+ | ( ( server : McpServer ) => Promise < void > )
208+ | ( ( server : McpServer ) => void ) ,
207209 serverOptions : ServerOptions = { } ,
208210 config : Config = {
209211 redisUrl : process . env . REDIS_URL || process . env . KV_URL ,
@@ -633,7 +635,7 @@ function createFakeIncomingMessage(
633635
634636 // Create a readable stream that will be used as the base for IncomingMessage
635637 const readable = new Readable ( ) ;
636- readable . _read = ( ) : void => { } ; // Required implementation
638+ readable . _read = ( ) : void => { } ; // Required implementation
637639
638640 // Add the body content if provided
639641 if ( body ) {
You can’t perform that action at this time.
0 commit comments