MongoDB MCP Server ignores VSCode/MongoDB Extension telemetry settings and defaults to 'enabled'

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
    • None
    • Developer Tools

      Bug Report

      Current Behavior

      The newly introduced MongoDB MCP (Model Context Protocol) server ignores the global VSCode telemetry settings (`telemetry.telemetryLevel: off`) and the specific MongoDB extension telemetry settings. Even when all tracking is disabled in the UI, the output logs explicitly show the MCP controller starting with telemetry: 'enabled' and the Segment analytics service being activated with a unique anonymousId.

      Code/Gist

      Output -> MongoDB (Logs):

      2026-03-07 14:14:02.676 [info] [mcp-controller] Starting MCP server with config [
        {
          ...
          telemetry: 'enabled',
          ...
        }
      ]
      2026-03-07 14:14:02.676 [info] [telemetry] Segment analytics activated [
        {
          anonymousId: '81d1b791-872e-4fff-90fb-793eb042f5e1',
          traits: {
            device_id: 'a9989eb762dcf5a4c1bded2c7dd474a018a0b1f221c6274fcf864ac4ab0c9c1f',
            app_name: 'Visual Studio Code'
          }
        }
      ] 

      Expected Behavior/Code

      The MongoDB MCP server should respect the user's privacy settings. If telemetry.telemetryLevel is set to off in VSCode, the MCP controller should initialize with telemetry: 'disabled' and the Segment analytics service should not be activated.

      Environment

      • node.js / npm versions: v22.22.0 (Extension Bundle)
      • OS: Pop!_OS 22.04 LTS (Linux x64)
      • Extension Version: mongodb.mongodb-vscode v1.14.6

      Possible Solution

      Update the mcp-controller initialization logic to pull the telemetry state from the VSCode workspace.getConfiguration('telemetry') and mongodb.telemetry settings before spawning the MCP server process. Ensure the MDB_MCP_TELEMETRY environment variable is set to disabled by default if the user has opted out of tracking.

      Additional Context/Screenshots

      This issue was discovered while auditing VSCode Output logs for privacy compliance. Despite toggling all available "Telemetry" and "Enable Telemetry" checkboxes in the VSCode settings menu to false or off, the MCP server continues to generate a device ID and activate a tracking session on startup.

            Assignee:
            Nikola Irinchev
            Reporter:
            David Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: