File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export const streamableHTTPApp = (options: McpOptions) => {
8383export const launchStreamableHTTPServer = async (
8484 options : McpOptions ,
8585 endpoints : Endpoint [ ] ,
86- port : number | undefined ,
86+ port : number | string | undefined ,
8787) => {
8888 const app = streamableHTTPApp ( options ) ;
8989 const server = app . listen ( port ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ async function main() {
2626 await launchStdioServer ( options , selectedTools ) ;
2727 break ;
2828 case 'http' :
29- await launchStreamableHTTPServer ( options , selectedTools , options . port ) ;
29+ await launchStreamableHTTPServer ( options , selectedTools , options . port ?? options . socket ) ;
3030 break ;
3131 }
3232}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export type CLIOptions = McpOptions & {
77 list : boolean ;
88 transport : 'stdio' | 'http' ;
99 port : number | undefined ;
10+ socket : string | undefined ;
1011} ;
1112
1213export type McpOptions = {
@@ -141,6 +142,10 @@ export function parseOptions(): CLIOptions {
141142 type : 'number' ,
142143 description : 'Port to serve on if using http transport' ,
143144 } )
145+ . option ( 'socket' , {
146+ type : 'string' ,
147+ description : 'Unix socket to serve on if using http transport' ,
148+ } )
144149 . help ( ) ;
145150
146151 for ( const [ command , desc ] of examples ( ) ) {
@@ -262,6 +267,7 @@ export function parseOptions(): CLIOptions {
262267 list : argv . list || false ,
263268 transport,
264269 port : argv . port ,
270+ socket : argv . socket ,
265271 } ;
266272}
267273
You can’t perform that action at this time.
0 commit comments