Skip to main content
← All rules

mcp-scan rule

Unknown external endpoint

network-egress-unknownmedium

What mcp-scan saw

An http, https, ws, or wss URL was collected from an argument or from the serialized server config, its host did not match any category in KNOWN_ENDPOINTS, and it is not localhost or 127.0.0.1. Every endpoint that is not a raw IP, not obfuscated, and not in the known telemetry, api, cdn, or suspicious lists lands here.

Why it fires

It is the inventory rule: the scanner is telling you it has no basis to classify this destination, not that the destination is bad. That distinction matters, because this is the rule that most often has a large count on a healthy config, and the fix is to teach the scanner rather than to change the server.

When this is a false positive

  • Your own company API. It is unknown to a hardcoded list and entirely expected in your config.
  • A documentation or homepage URL that lives in a description field. The scanner serializes the whole server config, so a link in prose is collected the same as an endpoint in args.
  • The URL regex is not global, so only the first URL in each scanned string is collected. One finding here can stand for several endpoints in the same argument, and the others are silently missed.
  • A registry or package URL that is part of the launch command rather than a runtime destination.

How to fix it

  1. Collect the hosts reported across your whole scan before changing anything, since this rule usually fires several times.
  2. Add every host you recognize to allowedDomains in .mcp-scan.json. Matching is on domain suffix, so example.com covers api.example.com and does not cover evil-example.com.
  3. Re-scan. What remains is the list worth actually reading.
  4. Remove documentation URLs from descriptions. They enter the model's context along with everything else in the tool catalog.
  5. For anything you still do not recognize, look it up before dismissing it. This rule not classifying a host is not the same as the host being fine.