• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mongodb-js / mongodb-mcp-server / 16448311461

22 Jul 2025 03:10PM UTC coverage: 80.619% (+0.4%) from 80.233%
16448311461

Pull #389

github

web-flow
Merge 502ddf752 into f8e500004
Pull Request #389: chore: address more comments from #361

563 of 737 branches covered (76.39%)

Branch coverage included in aggregate %.

6 of 8 new or added lines in 2 files covered. (75.0%)

3110 of 3819 relevant lines covered (81.43%)

47.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

2.86
/src/index.ts
1
#!/usr/bin/env node
2✔
2

3
import logger, { LogId } from "./common/logger.js";
×
4
import { config } from "./common/config.js";
×
5
import { StdioRunner } from "./transports/stdio.js";
×
6
import { StreamableHttpRunner } from "./transports/streamableHttp.js";
×
7

8
async function main() {
×
9
    const transportRunner = config.transport === "stdio" ? new StdioRunner(config) : new StreamableHttpRunner(config);
×
10

11
    const shutdown = () => {
×
12
        logger.info(LogId.serverCloseRequested, "server", `Server close requested`);
×
13

14
        transportRunner
×
15
            .close()
×
16
            .then(() => {
×
17
                logger.info(LogId.serverClosed, "server", `Server closed`);
×
18
                process.exit(0);
×
19
            })
×
20
            .catch((error: unknown) => {
×
21
                logger.error(LogId.serverCloseFailure, "server", `Error closing server: ${error as string}`);
×
22
                process.exit(1);
×
23
            });
×
24
    };
×
25

26
    process.on("SIGINT", shutdown);
×
27
    process.on("SIGABRT", shutdown);
×
28
    process.on("SIGTERM", shutdown);
×
29
    process.on("SIGQUIT", shutdown);
×
30

31
    try {
×
32
        await transportRunner.start();
×
33
    } catch (error: unknown) {
×
NEW
34
        await transportRunner.close();
×
NEW
35
        throw error;
×
36
    }
×
37
}
×
38

39
main().catch((error: unknown) => {
×
40
    logger.emergency(LogId.serverStartFailure, "server", `Fatal error running server: ${error as string}`);
×
41
    process.exit(1);
×
42
});
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc