Skip to content

Package MCP servers: "Check" and save fail for every npm package against the public registry (502) #3616

Closed

Description

@integry

Problem

POST /api/instance/extensions/v1/packages/resolve with {"ecosystem":"npm","package":"left-pad","version":"1.3.0"} (header X-ProPR-Extensions: 1) returns 502 "Package registry unavailable" in 18–90 ms for real packages (left-pad 1.3.0, @modelcontextprotocol/server-filesystem 2025.8.21) as well as nonexistent ones. Saving a package server uses the same lookup, so a pinned npm package server cannot be added from Settings unless an operator mirror (PROPR_EXTENSION_NPM_REGISTRY) is configured.

Cause: packages/core/src/extensions/packageRegistry.ts registryGet() passes a custom lookup: (_host, _options, callback) => callback(null, address, family). On Node 22 the HTTPS agent calls lookup with all: true (autoSelectFamily) and expects an array of {address, family}; the single-address callback produces ERR_INVALID_IP_ADDRESS Invalid IP address: undefined, which is reported as 502.

Expected / acceptance criteria

  • Resolving an existing npm package at an exact version against the public registry returns its integrity value and executable; a nonexistent package or version returns a clear 4xx ("Package not found"), not 502.
  • The connection is still made only to the vetted public address (the SSRF protection is unchanged).
  • A regression test exercises registryGet through a real https/http request to a local test server using the custom lookup path, with options.all both true and false, on the Node version in CI; it fails on the current code.
  • Check every other custom lookup in the extensions code (endpoint probing, OAuth discovery, tool discovery) for the same defect and fix it the same way.

Implementation

Make the lookup callback honour options.all (return [{ address, family }] when it is set). Search packages/core/src/extensions for lookup:.

Notes

Do not weaken the public-address vetting or follow redirects.

Activity

  1. propr-dev commented on Nov 17, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3616/claude-opus-5-5-package-mcp-servers-check-20261117-0149-05p
    • Base Branch: 3616-epic-0-9-d8b
    • Worktree: issue-3616-20261117-0149-claude-opus-5-5-05p

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions