File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @deco/mcp" ,
3- "version" : " 0.5.6 " ,
3+ "version" : " 0.6.0 " ,
44 "exports" : {
55 "." : " ./mod.ts" ,
66 "./http" : " ./mcp/http.ts"
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ export interface Options<TManifest extends AppManifest> {
5151 exclude ?: Array < keyof ( TManifest [ "actions" ] & TManifest [ "loaders" ] ) > ;
5252 blocks ?: Array < keyof TManifest > ;
5353 basePath ?: string ;
54+ /**
55+ * Custom path for MCP messages endpoint. Defaults to /mcp/messages if not provided.
56+ */
57+ mcpPath ?: string ;
5458 middlewares ?: {
5559 listTools ?: ListToolsMiddleware [ ] ;
5660 callTool ?: CallToolMiddleware [ ] ;
@@ -328,7 +332,8 @@ export function mcpServer<TManifest extends AppManifest>(
328332 }
329333
330334 // Main message endpoint - handles both stateless requests and SSE upgrades
331- if ( path === `${ options ?. basePath ?? "" } ${ MESSAGES_ENDPOINT } ` ) {
335+ const mcpPath = options ?. mcpPath ?? MESSAGES_ENDPOINT ;
336+ if ( path === `${ options ?. basePath ?? "" } ${ mcpPath } ` ) {
332337 // For stateless transport
333338 const transport = new HttpServerTransport ( ) ;
334339 await mcp . server . connect ( transport ) ;
You can’t perform that action at this time.
0 commit comments