Readonlyadd Additional Route Readonlyadd Annotated Function addAnnotatedFunction : < TIn extends Readonly < { [ s : string ]: JsonAble } > , TOut extends void | Readonly < { [ s : string ]: JsonAble } > , > ( annotatedFunction : NilAnnotatedFunction < TIn , TOut > , options ?: { description ?: string ; name ?: string } , ) => void
Type Declaration < TIn extends Readonly < { [ s : string ]: JsonAble } > , TOut extends void | Readonly < { [ s : string ]: JsonAble } > , > ( annotatedFunction : NilAnnotatedFunction < TIn , TOut > , options ?: { description ?: string ; name ?: string } , ) : void Type Parameters TIn extends Readonly < { [ s : string ]: JsonAble } > TOut extends void | Readonly < { [ s : string ]: JsonAble } > Parameters annotatedFunction : NilAnnotatedFunction < TIn , TOut > Optionaloptions : { description ?: string ; name ?: string } Optionaldescription ?: string Optionalname ?: string Returns void void
Readonlyadd Cross Layer Prop Middleware Readonlyadd Pre Route Middleware Readonlyget App getApp : < T extends Readonly < { "@node-in-layers/mcp-server" : { hiddenPaths ?: string [] ; hideComponents ?: { allModels ?: boolean ; domains ?: string [] ; paths ?: readonly string [] ; } ; logging ?: { requestLogGetData ?: ( req : Request ) => Record < string , any > ; requestLogLevel ?: LogLevelNames ; responseLogGetData ?: ( req : Request ) => Record < string , any > ; responseLogLevel ?: LogLevelNames ; } ; server : { connection : | Without < Readonly < { type : ... } > , Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , > & Readonly < { headers ?: (...) | (...); retry ?: (...) | (...); timeout ?: (...) | (...); type : "http" ; url : string ; } , > | Without < Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , Readonly < { type : ... } > , > & Readonly < { type : "cli" } > ; } ; startHere ?: { description ?: string ; examplesOfUse ?: readonly Readonly < { description ?: ...; details ?: ...; example ?: ...; name : ...; tags ?: ...; value ?: ...; } , > [] ; hideDefaultSystemEntries ?: boolean ; includeDomains ?: boolean ; includeFeatures ?: boolean ; name ?: string ; } ; stateful ?: boolean ; systemDescription ?: { description ?: string ; version ?: string } ; version ?: string ; } ; } , > & Readonly < { "@node-in-layers/core" : CoreConfig ; environment : string ; systemName : string ; } , > , > ( systemContext : any , options ?: Readonly < { jsonBodyParser ?: { limit ?: string ; strict ?: boolean } } , > , ) => Promise < Express >
Type Declaration < T extends Readonly < { "@node-in-layers/mcp-server" : { hiddenPaths ?: string [] ; hideComponents ?: { allModels ?: boolean ; domains ?: string [] ; paths ?: readonly string [] ; } ; logging ?: { requestLogGetData ?: ( req : Request ) => Record < string , any > ; requestLogLevel ?: LogLevelNames ; responseLogGetData ?: ( req : Request ) => Record < string , any > ; responseLogLevel ?: LogLevelNames ; } ; server : { connection : | Without < Readonly < { type : ... } > , Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , > & Readonly < { headers ?: (...) | (...); retry ?: (...) | (...); timeout ?: (...) | (...); type : "http" ; url : string ; } , > | Without < Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , Readonly < { type : ... } > , > & Readonly < { type : "cli" } > ; } ; startHere ?: { description ?: string ; examplesOfUse ?: readonly Readonly < { description ?: ...; details ?: ...; example ?: ...; name : ...; tags ?: ...; value ?: ...; } , > [] ; hideDefaultSystemEntries ?: boolean ; includeDomains ?: boolean ; includeFeatures ?: boolean ; name ?: string ; } ; stateful ?: boolean ; systemDescription ?: { description ?: string ; version ?: string } ; version ?: string ; } ; } , > & Readonly < { "@node-in-layers/core" : CoreConfig ; environment : string ; systemName : string ; } , > , > ( systemContext : any , options ?: Readonly < { jsonBodyParser ?: { limit ?: string ; strict ?: boolean } } , > , ) : Promise < Express > Type Parameters T extends Readonly < { "@node-in-layers/mcp-server" : { hiddenPaths ?: string [] ; hideComponents ?: { allModels ?: boolean ; domains ?: string [] ; paths ?: readonly string [] ; } ; logging ?: { requestLogGetData ?: ( req : Request ) => Record < string , any > ; requestLogLevel ?: LogLevelNames ; responseLogGetData ?: ( req : Request ) => Record < string , any > ; responseLogLevel ?: LogLevelNames ; } ; server : { connection : | Without < Readonly < { type : ... } > , Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ... } , > , > & Readonly < { headers ?: (...) | (...); retry ?: (...) | (...); timeout ?: (...) | (...); type : "http" ; url : string ; } , > | Without < Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ... } , > , Readonly < { type : ... } > , > & Readonly < { type : "cli" } > ; } ; startHere ?: { description ?: string ; examplesOfUse ?: readonly Readonly < { description ?: ...; details ?: ...; example ?: ...; name : ...; tags ?: ...; value ?: ...; } , > [] ; hideDefaultSystemEntries ?: boolean ; includeDomains ?: boolean ; includeFeatures ?: boolean ; name ?: string ; } ; stateful ?: boolean ; systemDescription ?: { description ?: string ; version ?: string } ; version ?: string ; } ; } , > & Readonly < { "@node-in-layers/core" : CoreConfig ; environment : string ; systemName : string ; } , > Parameters systemContext : any Optionaloptions : Readonly < { jsonBodyParser ?: { limit ?: string ; strict ?: boolean } } > Returns Promise < Express > Readonlyset set : ( key : string , value : any ) => void
Type Declaration ( key : string , value : any ) : void Returns void Readonlystart start : < T extends Readonly < { "@node-in-layers/mcp-server" : { hiddenPaths ?: string [] ; hideComponents ?: { allModels ?: boolean ; domains ?: string [] ; paths ?: readonly string [] ; } ; logging ?: { requestLogGetData ?: ( req : Request ) => Record < string , any > ; requestLogLevel ?: LogLevelNames ; responseLogGetData ?: ( req : Request ) => Record < string , any > ; responseLogLevel ?: LogLevelNames ; } ; server : { connection : | Without < Readonly < { type : ... } > , Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , > & Readonly < { headers ?: (...) | (...); retry ?: (...) | (...); timeout ?: (...) | (...); type : "http" ; url : string ; } , > | Without < Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , Readonly < { type : ... } > , > & Readonly < { type : "cli" } > ; } ; startHere ?: { description ?: string ; examplesOfUse ?: readonly Readonly < { description ?: ...; details ?: ...; example ?: ...; name : ...; tags ?: ...; value ?: ...; } , > [] ; hideDefaultSystemEntries ?: boolean ; includeDomains ?: boolean ; includeFeatures ?: boolean ; name ?: string ; } ; stateful ?: boolean ; systemDescription ?: { description ?: string ; version ?: string } ; version ?: string ; } ; } , > & Readonly < { "@node-in-layers/core" : CoreConfig ; environment : string ; systemName : string ; } , > , > ( systemContext : any , options ?: Readonly < { jsonBodyParser ?: { limit ?: string ; strict ?: boolean } } , > , ) => Promise < void >
Type Declaration < T extends Readonly < { "@node-in-layers/mcp-server" : { hiddenPaths ?: string [] ; hideComponents ?: { allModels ?: boolean ; domains ?: string [] ; paths ?: readonly string [] ; } ; logging ?: { requestLogGetData ?: ( req : Request ) => Record < string , any > ; requestLogLevel ?: LogLevelNames ; responseLogGetData ?: ( req : Request ) => Record < string , any > ; responseLogLevel ?: LogLevelNames ; } ; server : { connection : | Without < Readonly < { type : ... } > , Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , > & Readonly < { headers ?: (...) | (...); retry ?: (...) | (...); timeout ?: (...) | (...); type : "http" ; url : string ; } , > | Without < Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ...; } , > , Readonly < { type : ... } > , > & Readonly < { type : "cli" } > ; } ; startHere ?: { description ?: string ; examplesOfUse ?: readonly Readonly < { description ?: ...; details ?: ...; example ?: ...; name : ...; tags ?: ...; value ?: ...; } , > [] ; hideDefaultSystemEntries ?: boolean ; includeDomains ?: boolean ; includeFeatures ?: boolean ; name ?: string ; } ; stateful ?: boolean ; systemDescription ?: { description ?: string ; version ?: string } ; version ?: string ; } ; } , > & Readonly < { "@node-in-layers/core" : CoreConfig ; environment : string ; systemName : string ; } , > , > ( systemContext : any , options ?: Readonly < { jsonBodyParser ?: { limit ?: string ; strict ?: boolean } } , > , ) : Promise < void > Type Parameters T extends Readonly < { "@node-in-layers/mcp-server" : { hiddenPaths ?: string [] ; hideComponents ?: { allModels ?: boolean ; domains ?: string [] ; paths ?: readonly string [] ; } ; logging ?: { requestLogGetData ?: ( req : Request ) => Record < string , any > ; requestLogLevel ?: LogLevelNames ; responseLogGetData ?: ( req : Request ) => Record < string , any > ; responseLogLevel ?: LogLevelNames ; } ; server : { connection : | Without < Readonly < { type : ... } > , Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ... } , > , > & Readonly < { headers ?: (...) | (...); retry ?: (...) | (...); timeout ?: (...) | (...); type : "http" ; url : string ; } , > | Without < Readonly < { headers ?: ...; retry ?: ...; timeout ?: ...; type : ...; url : ... } , > , Readonly < { type : ... } > , > & Readonly < { type : "cli" } > ; } ; startHere ?: { description ?: string ; examplesOfUse ?: readonly Readonly < { description ?: ...; details ?: ...; example ?: ...; name : ...; tags ?: ...; value ?: ...; } , > [] ; hideDefaultSystemEntries ?: boolean ; includeDomains ?: boolean ; includeFeatures ?: boolean ; name ?: string ; } ; stateful ?: boolean ; systemDescription ?: { description ?: string ; version ?: string } ; version ?: string ; } ; } , > & Readonly < { "@node-in-layers/core" : CoreConfig ; environment : string ; systemName : string ; } , > Parameters systemContext : any Optionaloptions : Readonly < { jsonBodyParser ?: { limit ?: string ; strict ?: boolean } } > Returns Promise < void >
The public interface returned by
create()inmcp.tsand stored in the MCP layer of the Node-in-Layers system context.Typical usage: