var c=Object.defineProperty;var l=(n)=>n;function r(n,e){this[n]=l.bind(null,e)}var u=(n,e)=>{for(var t in e)c(n,t,{get:e[t],enumerable:!0,configurable:!0,set:r.bind(e,t)})};var d=(n,e)=>()=>(n&&(e=n(n=0)),e);var o=["application/json","text/event-stream"];function a(n){return!n||n.includes("*/*")||n.includes("application/*")||o.some((e)=>n.includes(e))}function f(n){if(n.method!=="POST")return n;let e=n.headers.get("accept");if(!a(e))return n;let t=o.filter((s)=>!e?.includes(s));if(t.length===0)return n;let i=new Headers(n.headers);return i.set("accept",[e,...t].filter(Boolean).join(", ")),new Request(n,{headers:i})}export{f as normalizeMcpRequest};
