Sep 3, 2026

Building an MCP App? Do not use <base href> to point a resource's root-relative script src at your CDN. Claude Desktop hardcodes base-uri self and silently ignores your CSP's baseUriDomains - the tag just gets blocked, no error thrown. Rewrite the URLs to absolute instead.

function absolutizeRootRelativeUrls( html, origin ) {
  return html.replace( /((?:src|href)=")\/(?!\/)/g, `$1${origin}/` );
}
Back to Notes