Skip to content

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

@Yohanna

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions