@modelcontextprotocol/sdk
    Preparing search index...

    Function checkResourceAllowed

    • Checks if a requested resource URL matches a configured resource URL. A requested resource matches if it has the same scheme, domain, port, and its path starts with the configured resource's path.

      Parameters

      • requestedResource: { configuredResource: string | URL; requestedResource: string | URL }

        The resource URL being requested

      Returns boolean

      true if the requested resource matches the configured resource, false otherwise