| 16471 | To remove from a specific scope, use: |
| 16472 | `),w.forEach((j)=>{process.stderr.write(` claude mcp remove "${q}" -s ${j} |
| 16473 | `)}),o3()}catch(Y){o3(Y.message)}}async function TaY(){d("tengu_mcp_list",{});let{servers:q}=await Iq6();if(Object.keys(q).length===0)console.log("No MCP servers configured. Use `claude mcp add` to add a server.");else{console.log(`Checking MCP server health... |
| 16474 | `);let K=Object.entries(q),_=await Bo6(K,async([z,Y])=>({name:z,server:Y,status:await Zq5(z,Y)}),{concurrency:KF1()});for(let{name:z,server:Y,status:$}of _)if(Y.type==="sse")console.log(`${z}: ${Y.url} (SSE) - ${$}`);else if(Y.type==="http")console.log(`${z}: ${Y.url} (HTTP) - ${$}`);else if(Y.type==="claudeai-proxy")console.log(`${z}: ${Y.url} - ${$}`);else if(!Y.type||Y.type==="stdio"){let A=Array.isArray(Y.args)?Y.args:[];console.log(`${z}: ${Y.command} ${A.join(" ")} - ${$}`)}}await xK(0)}async function vaY(q){d("tengu_mcp_get",{name:q});let K=EN(q);if(!K)o3(`No MCP server found with name: ${q}`);console.log(`${q}:`),console.log(` Scope: ${$a6(K.scope)}`);let _=await Zq5(q,K);if(console.log(` Status: ${_}`),K.type==="sse"){if(console.log(" Type: sse"),console.log(` URL: ${K.url}`),K.headers){console.log(" Headers:");for(let[z,Y]of Object.entries(K.headers))console.log(` ${z}: ${Y}`)}if(K.oauth?.clientId||K.oauth?.callbackPort){let z=[];if(K.oauth.clientId){if(z.push("client_id configured"),Ja6(q,K)?.clientSecret)z.push("client_secret configured")}if(K.oauth.callbackPort)z.push(`callback_port ${K.oauth.callbackPort}`);console.log(` OAuth: ${z.join(", ")}`)}}else if(K.type==="http"){if(console.log(" Type: http"),console.log(` URL: ${K.url}`),K.headers){console.log(" Headers:");for(let[z,Y]of Object.entries(K.headers))console.log(` ${z}: ${Y}`)}if(K.oauth?.clientId||K.oauth?.callbackPort){let z=[];if(K.oauth.clientId){if(z.push("client_id configured"),Ja6(q,K)?.clientSecret)z.push("client_secret configured")}if(K.oauth.callbackPort)z.push(`callback_port ${K.oauth.callbackPort}`);console.log(` OAuth: ${z.join(", ")}`)}}else if(K.type==="stdio"){console.log(" Type: stdio"),console.log(` Command: ${K.command}`);let z=Array.isArray(K.args)?K.args:[];if(console.log(` Args: ${z.join(" ")}`),K.env){console.log(" Environment:");for(let[Y,$]of Object.entries(K.env))console.log(` ${Y}=${$}`)}}console.log(` |
| 16475 | To remove this server, run: claude mcp remove "${q}" -s ${K.scope}`),await xK(0)}async function kaY(q,K,_){try{let z=XN6(_.scope),Y=m5(K),A=_.clientSecret&&Y&&typeof Y==="object"&&"type"in Y&&(Y.type==="sse"||Y.type==="http")&&"url"in Y&&typeof Y.url==="string"&&"oauth"in Y&&Y.oauth&&typeof Y.oauth==="object"&&"clientId"in Y.oauth?await ja6():void 0;await xq6(q,Y,z);let O=Y&&typeof Y==="object"&&"type"in Y?String(Y.type||"stdio"):"stdio";if(A&&Y&&typeof Y==="object"&&"type"in Y&&(Y.type==="sse"||Y.type==="http")&&"url"in Y&&typeof Y.url==="string")Ha6(q,{type:Y.type,url:Y.url},A);d("tengu_mcp_add",{scope:z,source:"json",type:O}),gA(`Added ${O} MCP server ${q} to ${z} config`)}catch(z){o3(z.message)}}async function VaY(q){try{let K=XN6(q.scope),_=Z1();d("tengu_mcp_add",{scope:K,platform:_,source:"desktop"});let{readClaudeDesktopMcpServers:z}=await Promise.resolve().then(() => (fq5(),Dq5)),Y=await z();if(Object.keys(Y).length===0)gA("No MCP servers found in Claude Desktop configuration or configuration file does not exist.");let{unmount:$}=await vu(Nl8.default.createElement(LJ,null,Nl8.default.createElement(WM,null,Nl8.default.createElement(jq5,{servers:Y,scope:K,onDone:()=>{$()}}))),{exitOnCtrlC:!0})}catch(K){o3(K.message)}}async function NaY(){d("tengu_mcp_reset_mcpjson_choices",{}),jw((q)=>({...q,enabledMcpjsonServers:[],disabledMcpjsonServers:[],enableAllProjectMcpServers:!1})),gA(`All project-scoped (.mcp.json) server approvals and rejections have been reset. |
| 16476 | You will be prompted for approval next time you start Claude Code.`)}var Nl8;var O36=y(()=>{np1();Hq5();s6();dU();k8();or();PD();f0();NJ();C7();V1();y8();RA();vO();vK();Nl8=O6(D6(),1)});var $x={};T8($x,{pluginValidateHandler:()=>EaY,pluginUpdateHandler:()=>maY,pluginUninstallHandler:()=>xaY,pluginListHandler:()=>LaY,pluginInstallHandler:()=>baY,pluginEnableHandler:()=>IaY,pluginDisableHandler:()=>uaY,marketplaceUpdateHandler:()=>CaY,marketplaceRemoveHandler:()=>SaY,marketplaceListHandler:()=>haY,marketplaceAddHandler:()=>RaY,handleMarketplaceError:()=>TK8,VALID_UPDATE_SCOPES:()=>rH6,VALID_INSTALLABLE_SCOPES:()=>e0});import{basename as yaY,dirname as Gq5}from"path";function TK8(q,K){H6(q),o3(`${t6.cross} Failed to ${K}: ${d6(q)}`)}function Tq5(q){if(q.errors.length>0)console.log(`${t6.cross} Found ${q.errors.length} ${A7(q.errors.length,"error")}: |
| 16477 | `),q.errors.forEach((K)=>{console.log(` ${t6.pointer} ${K.path}: ${K.message}`)}),console.log("");if(q.warnings.length>0)console.log(`${t6.warning} Found ${q.warnings.length} ${A7(q.warnings.length,"warning")}: |