Skip to content

Update check hardcodes registry.npmjs.org, ignoring user's npm registry configuration #1943

Description

@Yohanna

Is your feature request related to a problem? Please describe.

The update check script check-latest-version.ts uses a hardcoded URL:

const response = await fetch('https://registry.npmjs.org/chrome-devtools-mcp/latest');

This uses Node.js native fetch(), which completely bypasses the user's .npmrc registry configuration. For users behind corporate proxies or using private/internal registries (e.g. JFrog Artifactory), this request either gets blocked or fails silently on every startup.

Describe the solution you'd like

The script should respect the user's npm registry configuration instead of hardcoding the public registry. Some options:

  • Read the npm_config_registry environment variable (npm automatically sets this when invoked via npx)
  • Fall back to https://registry.npmjs.org only if no custom registry is configured

For example:

const registry = process.env.npm_config_registry?.replace(/\/$/, '') || 'https://registry.npmjs.org';
const response = await fetch(`${registry}/chrome-devtools-mcp/latest`);

Describe alternatives you've considered

  • Setting CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1 to disable the check entirely. This works but means losing update notifications.
  • Patching the script locally, but it gets overwritten whenever npx refreshes the package.

Additional context

The issue also affects users who configure npm registries via environment variables or project-level .npmrc files. The CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS env var serves as a workaround but shouldn't be necessary for users who simply have a different registry configured.

Activity

  1. added theissue type on Apr 22, 2026
  2. mathiasbynens commented on Apr 23, 2026

    @mathiasbynens
    Member

    Would the proposed solution help your specific use case? I ask because the npm_config_registry env var is only set when invoked as part of an npm script or via npx, so it won’t help in any other cases, e.g. when the CLI is invoked directly.

  3. Yohanna commented on Apr 23, 2026

    @Yohanna
    Author

    Would the proposed solution help your specific use case? I ask because the npm_config_registry env var is only set when invoked as part of an npm script or via npx

    Yes, I believe it will since the MCP server is invoked via npx (the recommended setup use npx chrome-devtools-mcp@latest), so npm_config_registry is set and inherited by the detached child process that runs check-latest-version.js. I confirmed this locally.

    it won’t help in any other cases, e.g. when the CLI is invoked directly

    For direct CLI invocation where npm_config_registry isn't set, a simpler approach that covers both cases would be to use npm config get registry, which reads .npmrc regardless of how the server was started:

    let registry;
    try {
      registry = execSync('npm config get registry', { encoding: 'utf8' }).trim().replace(/\/$/, '');
    } catch {
      // npm not on PATH, fall back to default
    }
    registry ||= 'https://registry.npmjs.org';

    Since the update check only runs once every 24 hours, the overhead of shelling out is negligible.

  4. added a commit that references this issue on May 12, 2026
    83a299f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions