@@ -148,7 +148,7 @@ describe('MCP Server HTTP Server Tests', () => {
148148 ) ;
149149
150150 const transport = new SSEClientTransport (
151- new URL ( `http://localhost :${ port } /sse` ) ,
151+ new URL ( `http://127.0.0.1 :${ port } /sse` ) ,
152152 ) ;
153153
154154 await client . connect ( transport ) ;
@@ -371,7 +371,7 @@ describe('MCP Server HTTP Server Tests', () => {
371371
372372 it ( 'should handle health check endpoint via custom middleware' , async ( ) => {
373373 const response = await fetch (
374- `http://localhost :${ customMiddlewarePort } /health` ,
374+ `http://127.0.0.1 :${ customMiddlewarePort } /health` ,
375375 ) ;
376376
377377 expect ( response . status ) . toBe ( 200 ) ;
@@ -440,7 +440,7 @@ describe('MCP Server HTTP Server Tests', () => {
440440 } ) ;
441441
442442 try {
443- const response = await fetch ( `http://localhost :${ middlewarePort } /mcp` , {
443+ const response = await fetch ( `http://127.0.0.1 :${ middlewarePort } /mcp` , {
444444 method : 'POST' ,
445445 headers : { 'Content-Type' : 'application/json' } ,
446446 body : JSON . stringify ( {
@@ -530,7 +530,7 @@ describe('MCP Server HTTP Server Tests', () => {
530530
531531 try {
532532 const response = await fetch (
533- `http://localhost :${ statefulTestPort } /mcp` ,
533+ `http://127.0.0.1 :${ statefulTestPort } /mcp` ,
534534 {
535535 method : 'POST' ,
536536 headers : {
0 commit comments