different-ai/openwork · error · Error

An enterprise MCP server URL cannot contain credentials or a

Error message

An enterprise MCP server URL cannot contain credentials or a fragment.

What it means

Error "An enterprise MCP server URL cannot contain credentials or a fragment." thrown in different-ai/openwork.

Source

Thrown at packages/enterprise-mcp-client/src/requirements-discovery.ts:193

    requirements.unshift({
      code: "oauth_client_registration",
      label: "Register an OAuth client",
      reason: "The authorization server does not advertise client metadata documents or dynamic registration.",
      required: true,
    })
  }
  return requirements
}

export async function discoverConnectionRequirements(
  input: DiscoverEnterpriseMcpConnectionRequirementsInput,
): Promise<EnterpriseMcpConnectionRequirements> {
  const serverUrl = new URL(input.serverUrl)
  if (serverUrl.protocol !== "http:" && serverUrl.protocol !== "https:") {
    throw new Error("An enterprise MCP server URL must use HTTP or HTTPS.")
  }
  if (serverUrl.username || serverUrl.password || serverUrl.hash) {
    throw new Error("An enterprise MCP server URL cannot contain credentials or a fragment.")
  }

  const controller = new AbortController()
  const timeout = setTimeout(() => controller.abort(new Error("MCP requirements discovery timed out.")), input.timeoutMs ?? DEFAULT_TIMEOUT_MS)
  let lastStatus: number | undefined
  let resourceMetadataUrl: URL | undefined
  let challengeScope: string | undefined
  const fetch = scopedFetch({
    fetch: input.fetch,
    signal: controller.signal,
    observe: (response) => {
      lastStatus = response.status
      if (response.status !== 401 && response.status !== 403) return
      const challenge = extractWWWAuthenticateParams(response)
      resourceMetadataUrl = challenge.resourceMetadataUrl ?? resourceMetadataUrl
      challengeScope = challenge.scope ?? challengeScope
    },
  })

View on GitHub (pinned to 2b7df46e8a)

When it happens

Trigger: Thrown at packages/enterprise-mcp-client/src/requirements-discovery.ts:193 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01). Data as JSON: /api/errors/90a7904a50456910. Report an issue: GitHub.