Skip to content

Commit 98c9f57

Browse files
committed
minor fix on debug outputs
1 parent bdd3f3b commit 98c9f57

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

mcp-openapi/src/server.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,11 +1474,16 @@ export class MCPOpenAPIServer {
14741474
});
14751475
});
14761476

1477-
this.app.listen(serverPort, () => {
1477+
const server = this.app.listen(serverPort, () => {
14781478
// HTTP server startup - use info level
1479+
const address = server.address();
1480+
const host = typeof address === 'object' && address ?
1481+
(address.family === 'IPv6' ? `[${address.address}]` : address.address) :
1482+
'localhost';
1483+
14791484
this.info(`🚀 MCP OpenAPI Server running on port ${serverPort}`);
1480-
this.info(`📊 Health check: http://localhost:${serverPort}/health`);
1481-
this.info(`ℹ️ Server info: http://localhost:${serverPort}/info`);
1485+
this.info(`📊 Health check: http://${host}:${serverPort}/health`);
1486+
this.info(`ℹ️ Server info: http://${host}:${serverPort}/info`);
14821487

14831488
this.debug(`📋 Loaded ${this.specs.size} specs, ${this.tools.length} tools, ${this.resources.length} resources, ${this.prompts.size} prompts`);
14841489
});

0 commit comments

Comments
 (0)