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

mongodb-js / mongodb-mcp-server / 16905560379

12 Aug 2025 10:02AM UTC coverage: 81.998% (+0.2%) from 81.763%
16905560379

Pull #429

github

web-flow
Merge bec33709a into 974fa3623
Pull Request #429: chore: add arg-parser and put the config under test MCP-86

779 of 980 branches covered (79.49%)

Branch coverage included in aggregate %.

192 of 249 new or added lines in 6 files covered. (77.11%)

1 existing line in 1 file now uncovered.

4145 of 5025 relevant lines covered (82.49%)

129.58 hits per line

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

59.09
/src/resources/common/config.ts
1
import { ReactiveResource } from "../resource.js";
4✔
2
import { defaultDriverOptions } from "../../common/config.js";
4✔
3
import type { UserConfig } from "../../common/config.js";
4
import type { Telemetry } from "../../telemetry/telemetry.js";
5
import type { Session } from "../../lib.js";
6

7
export class ConfigResource extends ReactiveResource<UserConfig, readonly []> {
4✔
8
    constructor(session: Session, config: UserConfig, telemetry: Telemetry) {
4✔
9
        super({
148✔
10
            resourceConfiguration: {
148✔
11
                name: "config",
148✔
12
                uri: "config://config",
148✔
13
                config: {
148✔
14
                    description:
148✔
15
                        "Server configuration, supplied by the user either as environment variables or as startup arguments",
148✔
16
                },
148✔
17
            },
148✔
18
            options: {
148✔
19
                initial: { ...config },
148✔
20
                events: [],
148✔
21
            },
148✔
22
            session,
148✔
23
            config,
148✔
24
            telemetry,
148✔
25
        });
148✔
26
    }
148✔
27
    reduce(eventName: undefined, event: undefined): UserConfig {
4✔
28
        void eventName;
×
29
        void event;
×
30

31
        return this.current;
×
32
    }
×
33

34
    toOutput(): string {
4✔
35
        const result = {
×
36
            telemetry: this.current.telemetry,
×
37
            logPath: this.current.logPath,
×
38
            connectionString: this.current.connectionString
×
39
                ? "set; access to MongoDB tools are currently available to use"
×
40
                : "not set; before using any MongoDB tool, you need to configure a connection string, alternatively you can setup MongoDB Atlas access, more info at 'https://github.com/mongodb-js/mongodb-mcp-server'.",
×
NEW
41
            connectOptions: defaultDriverOptions,
×
42
            atlas:
×
43
                this.current.apiClientId && this.current.apiClientSecret
×
44
                    ? "set; MongoDB Atlas tools are currently available to use"
×
45
                    : "not set; MongoDB Atlas tools are currently unavailable, to have access to MongoDB Atlas tools like creating clusters or connecting to clusters make sure to setup credentials, more info at 'https://github.com/mongodb-js/mongodb-mcp-server'.",
×
46
        };
×
47

48
        return JSON.stringify(result);
×
49
    }
×
50
}
4✔
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

© 2025 Coveralls, Inc