File tree 3 files changed +6
-2
lines changed
3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @deco/mcp" ,
3
- "version" : " 0.3.2 " ,
3
+ "version" : " 0.3.3 " ,
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 @@ -282,6 +282,7 @@ function registerTools<TManifest extends AppManifest>(
282
282
} ) ;
283
283
}
284
284
285
+ const UNAUTHORIZED_PATHS = [ "/live/release" , "/.decofile" ] ;
285
286
const MESSAGES_ENDPOINT = "/mcp/messages" ;
286
287
export function mcpServer < TManifest extends AppManifest > (
287
288
deco : Deco < TManifest > ,
@@ -346,6 +347,9 @@ export function mcpServer<TManifest extends AppManifest>(
346
347
transport . close ( ) ; // Close the transport after handling the message
347
348
return response ;
348
349
}
350
+ if ( UNAUTHORIZED_PATHS . some ( ( p ) => path . startsWith ( p ) ) ) {
351
+ return c . json ( { error : "Unauthorized" } , 401 ) ;
352
+ }
349
353
await next ( ) ;
350
354
} ;
351
355
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export function dereferenceSchema(
29
29
const referencedSchema = definitions [ refId ] ;
30
30
31
31
// Save the original schema metadata (excluding $ref)
32
- const { $ref, ...originalMetadata } = schema ;
32
+ const { $ref : _ , ...originalMetadata } = schema ;
33
33
34
34
// Merge the original metadata with the dereferenced schema
35
35
return {
You can’t perform that action at this time.
0 commit comments