1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3781],{4985:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/monitor/mcp-integration",function(){return n(40628)}])},40628:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ei}});var o=n(85893),r=n(67294),i=n(87357),a=n(98396),s=n(63093),l=n(39281),d=n(34386),c=n(17297),x=n(73563),p=n(89618),h=n(70299);let u=()=>"".concat("https://api.tabnav.com".replace(/\/+$/,"")).concat("/mcp/scanning"),g="tnv_your_api_key",m='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',f=[{key:"claudeCode",label:"Claude Code",lang:"bash"},{key:"claudeDesktop",label:"Claude Desktop",lang:"json"},{key:"cursor",label:"Cursor",lang:"json"},{key:"chatgpt",label:"ChatGPT",lang:"text"},{key:"curl",label:"cURL",lang:"bash"}],y=(e,t)=>'{\n "mcpServers": {\n "tabnav": {\n "type": "http",\n "url": "'.concat(e,'",\n "headers": {\n "Authorization": "Bearer ').concat(t,'"\n }\n }\n }\n}'),b=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return"claudeCode"===e?"claude mcp add --transport http tabnav ".concat(t,' \\\n --header "Authorization: Bearer ').concat(n,'"'):"chatgpt"===e?"Name: Tabnav\nMCP Server URL: ".concat(t,"\nAuthentication: API key\nHeader name: Authorization\nHeader value: Bearer ").concat(n):"curl"===e?"curl -X POST ".concat(t,' \\\n -H "Authorization: Bearer ').concat(n,'" \\\n -H "Content-Type: application/json" \\\n -H "Accept: application/json, text/event-stream" \\\n -d \'{"jsonrpc":"2.0","id":1,"method":"tools/list"}\''):y(t,n)},k={claudeCode:"Run this once in your terminal - Claude Code stores the server and header for you.",claudeDesktop:"Add this to claude_desktop_config.json, then restart Claude Desktop.",cursor:"Save this as .cursor/mcp.json in your project, or ~/.cursor/mcp.json to use it everywhere.",chatgpt:"Custom connectors need Developer Mode - enable it in Settings, then use these details when adding one.",curl:"A plain JSON-RPC call - handy for checking a key works before wiring up an agent."},j=[{key:"map",title:"Map a site",icon:"map",blurb:"Crawling a site to discover its routes comes before any scan."},{key:"scan",title:"Run scans",icon:"listSearch",blurb:"Start accessibility scans and follow them to completion."}
1,{key:"fix",title:"Read and fix findings",icon:"sparkles",blurb:"Walk the violations and push fixes and statuses back."},{key:"other",title:"Other tools",icon:"sliders",blurb:"Additional tools exposed by the server."}],Z={start_site_mapping:"map",list_site_mappings:"map",get_site_mapping:"map",get_site_mapping_routes:"map",select_scan_routes:"map",start_monitor_scan:"scan",list_monitor_scans:"scan",get_monitor_scan:"scan",list_scan_techniques:"fix",get_technique_issues:"fix",set_issue_status:"fix",get_issue_ai_context:"fix"},v=e=>{let t=new Map(j.map(e=>[e.key,[]]));return(e||[]).forEach(e=>{let n=Z[e.name]||"other";t.get(n).push(e)}),j.map(e=>({...e,tools:t.get(e.key)})).filter(e=>e.tools.length>0)},w=e=>"tnv_".concat("â¢".repeat(14)).concat(e||""),S=e=>!!(null==e?void 0:e.revokedAt),C=e=>(e||[]).slice().sort((e,t)=>{let n=Number(S(e))-Number(S(t));return 0!==n?n:new Date(t.createdAt||0)-new Date(e.createdAt||0)}),z=e=>({background:e.paper,border:"1px solid ".concat(e.border),borderRadius:"8px",overflow:"hidden"}),W=e=>({fontSize:11,fontWeight:700,letterSpacing:"0.09em",textTransform:"uppercase",color:e.txt4,margin:"0 0 10px 2px"});function I(e){let{t,eyebrow:n,tone:r,children:a,sx:l}=e;return(0,o.jsxs)(i.Z,{sx:{marginBottom:"26px",...l},children:[n?(0,o.jsx)(i.Z,{sx:{...W(t),...r?{color:r}:null},children:n}):null,(0,o.jsx)(i.Z,{sx:{...z(t),...r?{border:"1px solid ".concat((0,s.aJ)(r,.38))}:null},children:a})]})}function _(e){let{t,label:n,tone:r,soft:a}=e,l=r||t.primary;return(0,o.jsx)(i.Z,{component:"span",sx:{fontSize:10,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",padding:"3px 7px",borderRadius:"6px",whiteSpace:"nowrap",color:l,background:a||(0,s.aJ)(l,t.dark?.16:.1),border:"1px solid ".concat((0,s.aJ)(l,.3))},children:n})}function A(e){let{t,value:n,label:a="Copy",copiedLabel:s="Copied",ariaLabel:l,compact:d,primary:c}=e,[p,h]=(0,r.useState)(!1),u=(0,r.useRef)(null);(0,r.useEffect)(()=>()=>clearTimeout(u.current),[]);let g=async()=>{let e="function"==typeof n?n():n;if(e){try{await navigator.clipboard.writeText(e)}catch(n){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){document.body.removeChild(t);return}document.body.removeChild(t)}h(!0),clearTimeout(u.current),u.current=setTimeout(()=>h(!1),1800)}},m=c?t.onPrimary:t.txt2;return(0,o.jsxs)(i.Z,{component:"button",type:"button",onClick:g,"aria-label":l||a,sx:{display:"inline-flex",alignItems:"center",gap:"7px",flexShrink:0,padding:d?"7px 11px":"10px 16px",borderRadius:"6px",cursor:"pointer",whiteSpace:"nowrap",border:c?"none":"1px solid ".concat(t.border),background:c?t.primaryBtn:t.dark?"rgba(255,255,255,0.04)":"rgba(18,16,30,0.03)",color:m,fontSize:d?12:13,fontWeight:700,transition:"background 0.15s, border-color 0.15s, color 0.15s"},children:[(0,o.jsx)(x.Z,{name:p?"check":"copy",size:d?13:15,stroke:m}),p?s:a]})}function T(e){let{t,code:n,lang:r,copyAriaLabel:a,sx:s}=e;return(0,o.jsx)(i.Z,{sx:{position:"relative",...s},children:(0,o.jsxs)(i.Z,{sx:{borderRadius:"6px",border:"1px solid ".concat(t.border),background:t.dark?"rgba(0,0,0,0.28)":"rgba(18,16,30,0.03)",overflow:"hidden"},children:[(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 10px 8px 13px",borderBottom:"1px solid ".concat(t.divider)},children:[(0,o.jsx)(i.Z,{component:"span",sx:{fontSize:10.5,fontWeight:700,letterSpacing:"0.07em",textTransform:"uppercase",color:t.txt4},children:r}),(0,o.jsx)(i.Z,{sx:{marginLeft:"auto"},children:(0,o.jsx)(A,{t:t,value:n,compact:!0,ariaLabel:a||"Copy code"})})]}),(0,o.jsx)(i.Z,{component:"pre",sx:{margin:0,padding:"14px 15px",overflowX:"auto",fontFamily:m,fontSize:13,fontWeight:400,lineHeight:1.6,color:t.dark?"#FFFFFF":"#000000",whiteSpace:"pre",tabSize:2},children:(0,o.jsx)(i.Z,{component:"span",sx:{fontFamily:"inherit",color:"inherit"},children:n})})]})})}function R(e){let{t,value:n,ariaLabel:r,tone:a,sx:l}=e;return(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"10px",minWidth:0,padding:"4px 4px 4px 13px",borderRadius:"6px",border:"1px solid ".concat(a?(0,s.aJ)(a,.35):t.border),background:t.dark?"rgba(0,0,0,0.25)":"rgba(18,16,30,0.03)",...l},children:[(0,o.jsx)(i.Z,{component:"span",sx:{flex:1,minWidth:0,overflowX:"auto",whiteSpace:"nowrap",fontFamily:m,fontSize:12.5,color:t.txt1,scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},children:n}),(0,o.jsx)(A,{t:t,value:n,compact:!0,ariaLabel:r})]})}function P(e){let{t,isMobile:n,endpoint:r,activeKeyCount:a,toolCount:s,onGenerate:l}=e,u=(0,p.tu)();return(0,o.jsxs)(i.Z,{children:[(0,o.jsx)(c.Z,{styles:(0,h.x)(t)}),(0,o.jsx)(i.Z,{component:"section",sx:{marginBottom:"22px",padding:n?"2px 2px 18px":"4px 6px 20px",borderBottom:"1px solid ".concat(t.divider)},children:(0,o.jsxs)(i.Z,{sx:{maxWidth:880,margin:"0 auto"},children:[(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"flex-end",gap:"14px",flexWrap:"wrap"},children:[(0,o.jsxs)(i.Z,{sx:{minWidth:0,flex:1}
1,children:[(0,o.jsx)(i.Z,{component:"span",sx:{display:"inline-block",fontSize:11,fontWeight:700,letterSpacing:"0.09em",textTransform:"uppercase",color:t.txt4,marginBottom:"8px"},children:"Model Context Protocol"}),(0,o.jsx)(i.Z,{component:"h1",sx:{fontSize:n?24:28,fontWeight:700,letterSpacing:"-0.01em",lineHeight:1.2,color:t.txt1,margin:0},children:"MCP Integration"}),(0,o.jsxs)(i.Z,{sx:{fontSize:13.5,color:t.txt3,lineHeight:1.6,maxWidth:620,marginTop:"12px"},children:["Connect your own AI agent to Tabnav over MCP. It gets",s?" ".concat(s):""," tools to map sites, run accessibility scans, read the violations and push fixes back - all scoped to your team."]})]}),(0,o.jsx)(d.Z,{title:u?p.ir:"",placement:"top",children:(0,o.jsx)("span",{style:{display:"inline-flex",width:n?"100%":void 0},children:(0,o.jsxs)(i.Z,{component:"button",onClick:()=>{u||l()},disabled:u,"aria-disabled":u,sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"8px 17px",minHeight:42,borderRadius:"6px",flexShrink:0,width:n?"100%":void 0,border:"none",background:u?t.track:t.primaryBtn,color:u?t.txt4:t.onPrimary,fontSize:13.5,fontWeight:700,cursor:u?"not-allowed":"pointer",opacity:u?.7:1},children:[(0,o.jsx)(x.Z,{name:"key",size:16,stroke:u?t.txt4:t.onPrimary})," Generate API key"]})})})]}),(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"12px",flexWrap:"wrap",marginTop:"20px"},children:[(0,o.jsxs)(i.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:"7px",fontSize:11,fontWeight:700,letterSpacing:"0.09em",textTransform:"uppercase",color:t.txt4,flexShrink:0},children:[(0,o.jsx)(x.Z,{name:"link",size:14,stroke:t.txt4,style:{transform:"translateY(-1px)"}})," Server URL"]}),(0,o.jsx)(R,{t:t,value:r,ariaLabel:"Copy the MCP server URL",sx:{flex:1,minWidth:240}}),null!=a&&(0,o.jsxs)(i.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:"7px",flexShrink:0,fontSize:12.5,fontWeight:600,color:a?t.txt2:t.txt3},children:[(0,o.jsx)(i.Z,{component:"span","aria-hidden":"true",sx:{width:7,height:7,borderRadius:"50%",background:a?t.success:t.neutral}}),a?"".concat(a," active key").concat(1===a?"":"s"):"No active keys"]})]})]})})]})}var B=n(84747),F=n(55620);let M={fontSize:10.5,fontWeight:700,letterSpacing:"0.07em",textTransform:"uppercase"};function L(e){let{t,onGenerate:n}=e,r=(0,p.tu)();return(0,o.jsxs)(i.Z,{sx:{padding:"46px 24px",textAlign:"center"},children:[(0,o.jsx)(i.Z,{component:"span",sx:{display:"inline-flex",width:44,height:44,borderRadius:"6px",marginBottom:"14px",alignItems:"center",justifyContent:"center",background:t.dark?"rgba(255,255,255,0.04)":"rgba(18,16,30,0.03)",border:"1px solid ".concat(t.border)},children:(0,o.jsx)(x.Z,{name:"key",size:20,stroke:t.txt2})}),(0,o.jsx)(i.Z,{sx:{fontSize:15,fontWeight:700,color:t.txt1,marginBottom:"6px"},children:"No API keys yet"}),(0,o.jsx)(i.Z,{sx:{fontSize:12.5,color:t.txt3,maxWidth:400,margin:"0 auto 20px",lineHeight:1.6},children:"Generate a key to let an AI agent talk to the Tabnav MCP server on behalf of your team."}),(0,o.jsx)(d.Z,{title:r?p.ir:"",placement:"top",children:(0,o.jsx)("span",{children:(0,o.jsxs)(i.Z,{component:"button",onClick:()=>{r||n()},disabled:r,"aria-disabled":r,sx:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"11px 18px",borderRadius:"6px",cursor:r?"not-allowed":"pointer",opacity:r?.5:1,border:"none",background:t.primaryBtn,color:t.onPrimary,fontSize:13.5,fontWeight:700},children:[(0,o.jsx)(x.Z,{name:"plus",size:16,stroke:t.onPrimary})," Generate API key"]})})})]})}function H(e){let{t,apiKey:n,isMobile:r,onRevoke:a,revokingId:l}=e,c=(0,p.tu)(),h=S(n),u=l===n._id;return(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"12px",padding:"15px 20px",borderBottom:"1px solid ".concat(t.divider),flexWrap:r?"wrap":"nowrap",opacity:h?.62:1},children:[(0,o.jsxs)(i.Z,{sx:{flex:1,minWidth:170},children:[(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},children:[(0,o.jsx)(i.Z,{sx:{fontSize:13.5,fontWeight:700,color:t.txt1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:240},children:n.name||"API Key"}),h&&(0,o.jsx)(_,{t:t,label:"Revoked",tone:t.error})]}
1),(0,o.jsx)(i.Z,{component:"span",sx:{display:"inline-block",marginTop:"4px",fontFamily:m,fontSize:12,color:t.txt3,letterSpacing:"0.01em"},children:w(n.lastFour)})]}),(0,o.jsx)(i.Z,{sx:{width:r?"50%":150,flexShrink:0,fontSize:12.5,color:t.txt3},children:n.createdAt?(0,F.nb)(n.createdAt):"-"}),(0,o.jsx)(i.Z,{sx:{width:r?"50%":140,flexShrink:0,fontSize:12.5,color:t.txt3},children:n.lastUsedAt?(0,F.$n)(n.lastUsedAt):(0,o.jsx)(i.Z,{component:"span",sx:{color:t.txt4},children:"Never used"})}),(0,o.jsx)(i.Z,{sx:{width:r?"100%":118,flexShrink:0,display:"flex",justifyContent:r?"flex-start":"flex-end"},children:h?(0,o.jsx)(i.Z,{component:"span",sx:{fontSize:12,color:t.txt4},children:n.revokedAt?(0,F.$n)(n.revokedAt):""}):(0,o.jsx)(d.Z,{title:c?p.ir:"",placement:"top",children:(0,o.jsx)("span",{children:(0,o.jsxs)(i.Z,{component:"button",onClick:()=>{c||u||a(n)},disabled:c||u,"aria-disabled":c||u,sx:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"8px 12px",borderRadius:"6px",cursor:c||u?"not-allowed":"pointer",opacity:c?.5:1,whiteSpace:"nowrap",border:"1px solid ".concat((0,s.aJ)(t.error,.45)),background:t.errorSoft,color:t.error,fontSize:12,fontWeight:700},children:[(0,o.jsx)(x.Z,{name:"ban",size:13,stroke:t.error})," ",u?"Revokingâ¦":"Revoke"]})})})})]})}function D(e){let{t,isMobile:n,keys:r=[],loading:a,onGenerate:s,onRevoke:l,revokingId:d}=e;return(0,o.jsx)(I,{t:t,eyebrow:"API keys",children:a?(0,o.jsx)(i.Z,{sx:{padding:"18px 20px"},children:[0,1,2].map(e=>(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"12px",padding:"12px 0"},children:[(0,o.jsx)(B.Sk,{w:170,h:13}),(0,o.jsx)(B.Sk,{w:110,h:13,sx:{marginLeft:"auto"}}),(0,o.jsx)(B.Sk,{w:80,h:13})]},e))}):0===r.length?(0,o.jsx)(L,{t:t,onGenerate:s}):(0,o.jsxs)(i.Z,{children:[!n&&(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"12px",padding:"11px 20px",color:t.txt4,borderBottom:"1px solid ".concat(t.divider),...M},children:[(0,o.jsx)(i.Z,{component:"span",sx:{flex:1,minWidth:170},children:"Key"}),(0,o.jsx)(i.Z,{component:"span",sx:{width:150,flexShrink:0},children:"Created"}),(0,o.jsx)(i.Z,{component:"span",sx:{width:140,flexShrink:0},children:"Last used"}),(0,o.jsx)(i.Z,{component:"span",sx:{width:118,flexShrink:0}})]}),r.map(e=>(0,o.jsx)(H,{t:t,apiKey:e,isMobile:n,onRevoke:l,revokingId:d},e._id)),(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"9px",padding:"13px 20px",fontSize:12,color:t.txt4,lineHeight:1.55},children:[(0,o.jsx)(x.Z,{name:"lock",size:14,stroke:t.txt4,style:{flexShrink:0}}),"Keys are stored hashed - we only keep the last four characters. Lost a key? Revoke it and generate a new one."]})]})})}function N(e){let{t,isMobile:n,endpoint:a}=e,[s,l]=(0,r.useState)(f[0].key),d=f.find(e=>e.key===s)||f[0],c=b(d.key,a);return(0,o.jsx)(I,{t:t,eyebrow:"Connect your agent",children:(0,o.jsxs)(i.Z,{sx:{padding:"18px 20px"},children:[(0,o.jsxs)(i.Z,{sx:{fontSize:12.5,color:t.txt3,lineHeight:1.6,marginBottom:"15px"},children:["Point your MCP client at the server URL and send your key as a bearer token. Swap"," ",(0,o.jsx)(i.Z,{component:"span",sx:{fontFamily:m,fontSize:12,color:t.txt1},children:g})," ","for the key you generated above."]}),(0,o.jsx)(i.Z,{role:"tablist","aria-label":"MCP client",sx:{display:"flex",gap:"6px",flexWrap:"wrap",marginBottom:"14px"},children:f.map(e=>{let r=e.key===d.key;return(0,o.jsx)(i.Z,{component:"button",role:"tab","aria-selected":r,onClick:()=>l(e.key),sx:{padding:n?"7px 12px":"8px 14px",borderRadius:"6px",cursor:"pointer",whiteSpace:"nowrap",border:"1px solid ".concat(r?t.txt1:t.border),background:r?t.dark?"rgba(255,255,255,0.06)":"rgba(18,16,30,0.04)":"transparent",color:r?t.txt1:t.txt3,fontSize:12.5,fontWeight:r?700:600,transition:"background 0.15s, border-color 0.15s, color 0.15s"},children:e.label},e.key)})}),(0,o.jsx)(T,{t:t,code:c,lang:d.lang,copyAriaLabel:"Copy the ".concat(d.label," setup snippet")}),(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"flex-start",gap:"9px",marginTop:"13px",fontSize:12,color:t.txt3,lineHeight:1.55},children:[(0,o.jsx)(x.Z,{name:"help",size:14,stroke:t.txt4,style:{flexShrink:0,marginTop:1}}),k[d.key]]}
1),(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"flex-start",gap:"9px",marginTop:"13px",paddingTop:"13px",borderTop:"1px solid ".concat(t.divider),fontSize:12,color:t.txt3,lineHeight:1.55},children:[(0,o.jsx)(x.Z,{name:"bolt",size:14,stroke:t.txt4,style:{flexShrink:0,marginTop:1}}),(0,o.jsxs)(i.Z,{component:"span",children:["Want to scan a site before it's deployed? Install our local bridge â see"," ",(0,o.jsx)(i.Z,{component:"a",href:"https://www.npmjs.com/package/@tabnav/mcp-local-bridge",target:"_blank",rel:"noopener noreferrer",sx:{fontFamily:m,fontSize:11.5,color:t.primary,fontWeight:600,textDecoration:"none",wordBreak:"break-all","&:hover":{textDecoration:"underline"}},children:"@tabnav/mcp-local-bridge"})," ","on npm for setup."]})]})]})})}var K=n(71577),G=n(88144),J=n(98643);let O=["mcpTools"],q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,G.a)({queryKey:O,queryFn:async()=>{var e;let t=await J.Z.get("/mcp/scanning/tools");return Array.isArray(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.tools)?t.data.tools:[]},staleTime:3e5,...e})};function E(e){let{t,isMobile:n}=e,[a,s]=(0,r.useState)(!1),{data:l,isLoading:d,isError:c}=q(),p=(0,r.useMemo)(()=>v(l),[l]),h=(null==l?void 0:l.length)||0;return(0,o.jsxs)(I,{t:t,eyebrow:"Available tools",children:[(0,o.jsxs)(i.Z,{component:"button",onClick:()=>s(e=>!e),"aria-expanded":a,sx:{width:"100%",display:"flex",alignItems:"center",gap:"13px",padding:"18px 20px",cursor:"pointer",border:"none",background:"transparent",textAlign:"left"},children:[(0,o.jsx)(x.Z,{name:"sliders",size:18,stroke:t.neutral,style:{flexShrink:0}}),(0,o.jsxs)(i.Z,{sx:{flex:1,minWidth:0},children:[(0,o.jsx)(i.Z,{sx:{fontSize:14.5,fontWeight:700,color:t.txt1},children:"What your agent can do"}),(0,o.jsx)(i.Z,{sx:{fontSize:12.5,color:t.txt3,lineHeight:1.55,marginTop:"3px"},children:"The tools the Tabnav MCP server exposes, and what each one is for."})]}),(0,o.jsx)(i.Z,{component:"span",sx:{flexShrink:0,fontSize:12,fontWeight:700,color:t.txt1,minWidth:26,height:26,padding:"0 8px",borderRadius:"6px",display:"inline-flex",alignItems:"center",justifyContent:"center",background:t.dark?"rgba(255,255,255,0.06)":"rgba(18,16,30,0.05)",border:"1px solid ".concat(t.border)},children:d?(0,o.jsx)(B.Sk,{w:12,h:11}):h}),(0,o.jsx)(i.Z,{component:"span",sx:{width:28,height:28,borderRadius:"8px",flexShrink:0,display:"grid",placeItems:"center",transition:"transform 0.2s",transform:a?"rotate(180deg)":"none"},children:(0,o.jsx)(x.Z,{name:"chevDown",size:17,stroke:t.txt3})})]}),(0,o.jsx)(K.UO,{open:a,children:(0,o.jsx)(i.Z,{sx:{borderTop:"1px solid ".concat(t.divider)},children:d?(0,o.jsx)(i.Z,{sx:{padding:"18px 20px"},children:[0,1,2].map(e=>(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"12px",padding:"8px 0"},children:[(0,o.jsx)(B.Sk,{w:210,h:12}),(0,o.jsx)(B.Sk,{w:260,h:12})]},e))}):c?(0,o.jsx)(i.Z,{sx:{padding:"18px 20px",fontSize:12.5,color:t.txt3},children:"Could not load the tool list. Refresh the page to try again."}):0===p.length?(0,o.jsx)(i.Z,{sx:{padding:"18px 20px",fontSize:12.5,color:t.txt3},children:"No tools are registered yet."}):p.map((e,r)=>(0,o.jsxs)(i.Z,{sx:{borderBottom:r<p.length-1?"1px solid ".concat(t.divider):"none"},children:[(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"10px",padding:"14px 20px 10px"},children:[(0,o.jsx)(i.Z,{component:"span","aria-hidden":"true",sx:{width:26,height:26,borderRadius:"6px",flexShrink:0,display:"grid",placeItems:"center",background:t.dark?"rgba(255,255,255,0.04)":"rgba(18,16,30,0.03)",border:"1px solid ".concat(t.border)},children:(0,o.jsx)(x.Z,{name:e.icon,size:14,stroke:t.txt2})}),(0,o.jsxs)(i.Z,{sx:{minWidth:0},children:[(0,o.jsx)(i.Z,{sx:{fontSize:13,fontWeight:700,color:t.txt1},children:e.title}),(0,o.jsx)(i.Z,{sx:{fontSize:11.5,color:t.txt4,marginTop:"1px"},children:e.blurb})]})]}),e.tools.map(e=>(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:n?"flex-start":"baseline",gap:n?"4px":"14px",padding:n?"8px 20px 8px 56px":"7px 20px 7px 56px",flexDirection:n?"column":"row"},children:[(0,o.jsx)(i.Z,{component:"span",sx:{flexShrink:0,width:n?void 0:210,fontFamily:m,fontSize:12,color:t.txt1,wordBreak:"break-all"},children:e.name}),(0,o.jsx)(i.Z,{sx:{fontSize:12.5,color:t.txt3,lineHeight:1.55,minWidth:0},children:e.description||e.title})]},e.name)),(0,o.jsx)(i.Z,{sx:{height:8}})]},e.key))})})]})}function U(e){let{t,icon:n,titleId:r,title:a,body:s,maxWidth:l}=e;return(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"flex-start",ga
1p:"13px",marginBottom:"20px"},children:[(0,o.jsx)(i.Z,{component:"span",sx:{width:34,height:34,borderRadius:"6px",flexShrink:0,display:"grid",placeItems:"center",background:t.dark?"rgba(255,255,255,0.04)":"rgba(18,16,30,0.03)",border:"1px solid ".concat(t.border)},children:(0,o.jsx)(x.Z,{name:n,size:16,stroke:t.txt2})}),(0,o.jsxs)(i.Z,{sx:{minWidth:0,paddingTop:"2px"},children:[(0,o.jsx)(i.Z,{component:"h2",id:r,sx:{fontSize:16,fontWeight:700,color:t.txt1,marginBottom:"5px"},children:a}),(0,o.jsx)(i.Z,{component:"p",sx:{fontSize:12.5,lineHeight:1.6,color:t.txt3,maxWidth:l,margin:0},children:s})]})]})}function X(e){let{t,endpoint:n,created:a,creating:l,onCreate:d,onClose:c}=e,[p,h]=(0,r.useState)(""),u=e=>{e.preventDefault(),l||a||d(p.trim())};return a?(0,o.jsxs)(K.u_,{t:t,onClose:c,labelId:"mcp-key-created-title",maxWidth:620,children:[(0,o.jsx)(K.dg,{t:t,onClose:c}),(0,o.jsxs)(i.Z,{sx:{padding:"30px 28px 26px"},children:[(0,o.jsx)(U,{t:t,icon:"key",titleId:"mcp-key-created-title",title:"Your API key is ready",body:"We store it hashed, so this is the only place it's ever readable. You can reopen this view from this page until you leave or reload it - after that, only revoking and generating a new one will do."}),(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:"10px",padding:"5px 5px 5px 14px",borderRadius:"6px",border:"1px solid ".concat((0,s.aJ)(t.success,.42)),background:t.dark?"rgba(0,0,0,0.28)":(0,s.aJ)(t.success,.06),marginBottom:"13px"},children:[(0,o.jsx)(i.Z,{component:"span",sx:{flex:1,minWidth:0,overflowX:"auto",whiteSpace:"nowrap",fontFamily:m,fontSize:13,fontWeight:600,color:t.txt1,scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},children:a.key}),(0,o.jsx)(A,{t:t,value:a.key,label:"Copy key",copiedLabel:"Copied",ariaLabel:"Copy the API key",primary:!0})]}),(0,o.jsxs)(i.Z,{sx:{display:"flex",alignItems:"flex-start",gap:"9px",padding:"11px 13px",borderRadius:"6px",border:"1px solid ".concat((0,s.aJ)(t.warning,.35)),background:(0,s.aJ)(t.warning,t.dark?.12:.07),fontSize:12,color:t.txt2,lineHeight:1.55,marginBottom:"20px"},children:[(0,o.jsx)(x.Z,{name:"alert",size:15,stroke:t.warning,style:{flexShrink:0,marginTop:1}}),(0,o.jsx)(i.Z,{children:"Anyone holding this key can scan sites and read reports for your whole team. Keep it out of shared repos, screenshots and chat logs."})]}),(0,o.jsx)(i.Z,{sx:{fontSize:12,fontWeight:700,color:t.txt4,letterSpacing:"0.06em",textTransform:"uppercase",marginBottom:"9px"},children:"Ready-to-run setup"}),(0,o.jsx)(T,{t:t,code:b("claudeCode",n,a.key),lang:"bash",copyAriaLabel:"Copy the Claude Code setup command with this key"}),(0,o.jsx)(i.Z,{component:"button",onClick:c,sx:{width:"100%",marginTop:"20px",padding:"12px 0",borderRadius:"6px",border:"1px solid ".concat(t.border),background:"transparent",color:t.txt2,fontSize:14,fontWeight:600,cursor:"pointer"},children:"Done"})]})]}):(0,o.jsxs)(K.u_,{t:t,onClose:c,labelId:"mcp-key-new-title",maxWidth:470,children:[(0,o.jsx)(K.dg,{t:t,onClose:c}),(0,o.jsxs)(i.Z,{component:"form",onSubmit:u,sx:{padding:"30px 28px 26px"},children:[(0,o.jsx)(U,{t:t,icon:"key",titleId:"mcp-key-new-title",title:"Generate an API key",body:"Give it a name so you can tell your agents apart later. The key itself is shown once, right after it's created."}),(0,o.jsx)(i.Z,{component:"label",htmlFor:"mcp-key-name",sx:{display:"block",fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:t.txt4,marginBottom:"7px"},children:"Key name"}),(0,o.jsx)(i.Z,{component:"input",id:"mcp-key-name",value:p,maxLength:60,disabled:l,onChange:e=>h(e.target.value),placeholder:"Claude Code on my laptop",sx:{width:"100%",padding:"11px 13px",borderRadius:"6px",border:"1px solid ".concat(t.border),background:t.dark?"rgba(0,0,0,0.24)":"rgba(18,16,30,0.02)",color:t.txt1,fontSize:13.5,fontFamily:"inherit",outline:"none","&::placeholder":{color:t.txt4},"&:focus":{borderColor:(0,s.aJ)(t.primaryStrong,.6)}}}),(0,o.jsx)(i.Z,{sx:{fontSize:11.5,color:t.txt4,marginTop:"7px"},children:'Optional - we\'ll call it "API Key" if you leave it empty.'}),(0,o.jsxs)(i.Z,{sx:{display:"flex",gap:"11px",marginTop:"22px"},children:[(0,o.jsx)(i.Z,{component:"button",type:"button",onClick:c,sx:{flex:1,padding:"12px 0",borderRadius:"6px",border:"1px solid ".concat(t.border),background:"transparent",color:t.txt2,fontSize:14,fontWeight:600,cursor:"pointer"},children:"Cancel"}),(0,o.jsx)(i.Z,{component:"button",type:"submit",disabled:l,"aria-disabled":l,sx:{flex:1,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"12px 0",borderRadius:"6px",border:"none",background:t.primaryBtn,color:t.onPrimary,fontSize:14,fontWeight:700,cursor:l?"wait":"pointer",opacity:l?.8:1},children:l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(K.$j,{t:t,size:14,color:t.onPrimary})," Generatingâ¦"]}):"Generate key"})]})]})]})}function Y(e){let{t,name:n,onView:r,onDismiss:a}=e;return(0,o.jsxs)(i.Z,{role:"status",sx:{...z(t),borderLeft:"3px solid ".concat(t.success),marginBottom:"18px",display:"flex",alignItems:"center",gap:"14px",padding:"14px 16px 14px 18px",flexWrap:"wrap"},children:[(0,o.jsx)(x.Z,{name:"key",size:17,stroke:t.txt2,style:{flexShrink:0}}),(0,o.jsxs)(i.Z,{sx:{flex:1,minWidth:200},children:[(0,o.jsxs)(i.Z,{sx:{fontSize:13.5,fontWeight:700,color:t.txt1},children:['"',n||"API Key",'" was just generated']}),(0,o.jsx)(i.Z,{sx:{fontSize:12,color:t.txt3,marginTop:"2px"},children:"You can still view the raw key once more before you leave this page."})]}
1),(0,o.jsxs)(i.Z,{component:"button",onClick:r,sx:{display:"inline-flex",alignItems:"center",gap:"7px",padding:"9px 14px",borderRadius:"6px",cursor:"pointer",flexShrink:0,border:"1px solid ".concat(t.border),background:"transparent",color:t.txt1,fontSize:12.5,fontWeight:700},children:[(0,o.jsx)(x.Z,{name:"eye",size:14,stroke:t.txt1})," View key"]}),(0,o.jsx)(i.Z,{component:"button",onClick:a,"aria-label":"Dismiss",sx:{width:30,height:30,flexShrink:0,borderRadius:"6px",display:"grid",placeItems:"center",cursor:"pointer",border:"none",background:"transparent",color:t.txt3},children:(0,o.jsx)(x.Z,{name:"x",size:15,stroke:t.txt3})})]})}var $=n(30202),Q=n(98029);let V=["apiKeys"],ee=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,G.a)({queryKey:V,queryFn:async()=>{let e=await J.Z.get("/api/v1/api-keys");return Array.isArray(e.data)?e.data:[]},enabled:e,refetchOnWindowFocus:!0,...t})},et=()=>{let e=(0,$.NL)();return(0,Q.D)({mutationFn:async function(){let{name:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=await J.Z.post("/api/v1/api-keys",{name:e});return t.data},onSuccess:()=>{e.invalidateQueries({queryKey:V})}})},en=()=>{let e=(0,$.NL)();return(0,Q.D)({mutationFn:async e=>{let{id:t}=e,n=await J.Z.delete("/api/v1/api-keys/".concat(t));return n.data},onSuccess:()=>{e.invalidateQueries({queryKey:V})}})};var eo=n(33613);let er=()=>{var e;let t=(0,s.Fc)(),n=(0,p.tu)(),d=(0,a.Z)("(max-width:760px)"),[c,x]=(0,r.useState)(!1),[h,g]=(0,r.useState)(null),[m,f]=(0,r.useState)(null),{data:y,isLoading:b,isFetched:k}=ee(),j=et(),Z=en(),{data:v}=q(),w=(0,r.useMemo)(()=>u(),[]),z=(0,r.useMemo)(()=>C(y),[y]),W=(0,r.useMemo)(()=>z.filter(e=>!S(e)).length,[z]),I=(0,r.useCallback)(()=>{n||(g(null),x(!0))},[n]),_=(0,r.useCallback)(()=>{x(!1)},[]),A=(0,r.useCallback)(()=>{x(!0)},[]),T=(0,r.useCallback)(()=>{g(null)},[]),R=(0,r.useCallback)(async e=>{try{let t=await j.mutateAsync({name:e||void 0});if(!(null==t?void 0:t.key)){eo.C.error("The key was created but could not be read back â check the list below"),x(!1);return}g(t)}catch(e){var t,n;eo.C.error((null==e?void 0:null===(t=e.response)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.error)||"Could not generate an API key")}},[j]),B=(0,r.useCallback)(async()=>{if(f(null),null==m?void 0:m._id)try{await Z.mutateAsync({id:m._id}),(null==h?void 0:h.id)===m._id&&g(null),eo.C.success("API key revoked")}catch(n){var e,t;eo.C.error((null==n?void 0:null===(e=n.response)||void 0===e?void 0:null===(t=e.data)||void 0===t?void 0:t.error)||"Could not revoke the API key")}},[m,Z,h]);return(0,o.jsxs)(i.Z,{sx:{color:t.txt1,minHeight:"60vh",width:"100%",minWidth:0,maxWidth:"100%"},children:[(0,o.jsx)(P,{t:t,isMobile:d,endpoint:w,activeKeyCount:k?W:null,toolCount:null==v?void 0:v.length,onGenerate:I}),(0,o.jsxs)(i.Z,{className:"tnv-in",sx:{maxWidth:880,margin:"0 auto"},children:[h&&!c&&(0,o.jsx)(Y,{t:t,name:h.name,onView:A,onDismiss:T}),(0,o.jsx)(D,{t:t,isMobile:d,keys:z,loading:b||!k,onGenerate:I,onRevoke:f,revokingId:Z.isPending?null===(e=Z.variables)||void 0===e?void 0:e.id:null}),(0,o.jsx)(N,{t:t,isMobile:d,endpoint:w}),(0,o.jsx)(E,{t:t,isMobile:d})]}),c&&(0,o.jsx)(X,{t:t,endpoint:w,created:h,creating:j.isPending,onCreate:R,onClose:_}),m&&(0,o.jsx)(l.sm,{t:t,title:"Revoke this API key?",icon:"ban",tone:t.error,confirmLabel:"Revoke key",cancelLabel:"Keep it",body:'Any agent still using "'.concat(m.name||"API Key","\" will stop working immediately. This can't be undone â you'd need to generate a new key."),onConfirm:B,onClose:()=>f(null)})]})};var ei=er}},function(e){e.O(0,[1913,5437,9281,9774,2888,179],function(){return e(e.s=4985)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.