Skip to content

Commit b027a86

Browse files
committed
fix: remove incorrect ES module check preventing server startup
The conditional check for import.meta.url was preventing main() from being called, causing connection closed errors in MCP clients. MCP servers should always start when the module loads.
1 parent 514708b commit b027a86

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/git-metrics.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,7 @@ async function main() {
273273
});
274274
}
275275

276-
if (import.meta.url === `file://${process.argv[1]}`) {
277-
main().catch((error) => {
278-
log('ERROR', 'Server startup failed', { error: error.message });
279-
process.exit(1);
280-
});
281-
}
276+
main().catch((error) => {
277+
log('ERROR', 'Server startup failed', { error: error.message });
278+
process.exit(1);
279+
});

0 commit comments

Comments
 (0)