mcp-use TypeScript API
    Preparing search index...

    Function hostValidationMiddleware

    • Reject requests whose Host header is not on the allowlist.

      Parameters

      • hosts: string[]

        Allowed hostnames (port-agnostic).

      Returns FetchMiddleware