imcp 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +23 -0
  2. package/dist/__mocks__/strip-json-comments.d.ts +1 -0
  3. package/dist/__mocks__/strip-json-comments.js +2 -0
  4. package/dist/__mocks__/strip-json-comments.js.map +1 -0
  5. package/dist/cli/commands/tui.d.ts +2 -0
  6. package/dist/cli/commands/tui.js +2 -0
  7. package/dist/cli/commands/tui.js.map +1 -0
  8. package/dist/cli/index.js +1 -1
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/cli/tui/App.d.ts +1 -0
  11. package/dist/cli/tui/App.js +2 -0
  12. package/dist/cli/tui/App.js.map +1 -0
  13. package/dist/cli/tui/components/ClientSelector.d.ts +11 -0
  14. package/dist/cli/tui/components/ClientSelector.js +2 -0
  15. package/dist/cli/tui/components/ClientSelector.js.map +1 -0
  16. package/dist/cli/tui/components/Header.d.ts +1 -0
  17. package/dist/cli/tui/components/Header.js +2 -0
  18. package/dist/cli/tui/components/Header.js.map +1 -0
  19. package/dist/cli/tui/components/InstallProgress.d.ts +8 -0
  20. package/dist/cli/tui/components/InstallProgress.js +2 -0
  21. package/dist/cli/tui/components/InstallProgress.js.map +1 -0
  22. package/dist/cli/tui/components/Panel.d.ts +8 -0
  23. package/dist/cli/tui/components/Panel.js +2 -0
  24. package/dist/cli/tui/components/Panel.js.map +1 -0
  25. package/dist/cli/tui/components/SearchBar.d.ts +11 -0
  26. package/dist/cli/tui/components/SearchBar.js +2 -0
  27. package/dist/cli/tui/components/SearchBar.js.map +1 -0
  28. package/dist/cli/tui/components/ServerList.d.ts +16 -0
  29. package/dist/cli/tui/components/ServerList.js +2 -0
  30. package/dist/cli/tui/components/ServerList.js.map +1 -0
  31. package/dist/cli/tui/components/StepIndicator.d.ts +7 -0
  32. package/dist/cli/tui/components/StepIndicator.js +2 -0
  33. package/dist/cli/tui/components/StepIndicator.js.map +1 -0
  34. package/dist/cli/tui/hooks/useInstall.d.ts +18 -0
  35. package/dist/cli/tui/hooks/useInstall.js +2 -0
  36. package/dist/cli/tui/hooks/useInstall.js.map +1 -0
  37. package/dist/cli/tui/hooks/useServers.d.ts +18 -0
  38. package/dist/cli/tui/hooks/useServers.js +2 -0
  39. package/dist/cli/tui/hooks/useServers.js.map +1 -0
  40. package/dist/cli/tui/utils/fuzzySearch.d.ts +9 -0
  41. package/dist/cli/tui/utils/fuzzySearch.js +2 -0
  42. package/dist/cli/tui/utils/fuzzySearch.js.map +1 -0
  43. package/package.json +7 -1
package/README.md CHANGED
@@ -66,6 +66,29 @@ npx -y imcp@latest serve --feed-file ./custom-feed.json --schemas-directory ./fe
66
66
  npx -y imcp@latest serve --repo https://github.com/ai-microsoft/imcp-feed --branch main
67
67
  ```
68
68
 
69
+ ### tui
70
+
71
+ Launch an interactive terminal UI for browsing, searching, and installing/uninstalling MCP servers.
72
+
73
+ ```bash
74
+ imcp tui
75
+ ```
76
+
77
+ Features:
78
+ - **Fuzzy search**: Type to filter servers instantly
79
+ - **Multi-select**: Choose multiple servers to install/uninstall at once
80
+ - **Install/Uninstall modes**: Press `Tab` to switch between modes
81
+ - **Client targeting**: Select which clients (GithubCopilot, MSRooCode, Cline, etc.) to install to
82
+ - **Installation status**: See which servers are already installed and on which clients
83
+
84
+ Controls:
85
+ - `↑↓` — Navigate servers/clients
86
+ - `Space` — Toggle selection
87
+ - `Tab` — Switch between Install/Uninstall mode (step 1) or focus areas
88
+ - `Enter` — Proceed to next step / Execute
89
+ - `Esc` — Go back / Clear search
90
+ - `q` — Quit
91
+
69
92
  ### install
70
93
 
71
94
  Install MCP servers directly from the CLI, either by specifying a single server or by providing a JSON payload that mirrors the web API.
@@ -0,0 +1 @@
1
+ export default function stripJsonComments(jsonString: string): string;
@@ -0,0 +1,2 @@
1
+ export default function stripJsonComments(e){return e.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}
2
+ //# sourceMappingURL=strip-json-comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["stripJsonComments","jsonString","replace"],"sources":["../../src/__mocks__/strip-json-comments.ts"],"mappings":"eACc,SAAUA,kBAAkBC,GAEtC,OAAOA,EACFC,QAAQ,YAAa,IACrBA,QAAQ,oBAAqB,GACtC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function createTuiCommand(): Command;
@@ -0,0 +1,2 @@
1
+ import{Command}from"commander";import React from"react";import{render}from"ink";import{App}from"../tui/App.js";export function createTuiCommand(){return new Command("tui").description("Interactive TUI for browsing and installing MCP servers").action((async()=>{const{waitUntilExit:r}=render(React.createElement(App));await r()}))}
2
+ //# sourceMappingURL=tui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Command","React","render","App","createTuiCommand","description","action","async","waitUntilExit","createElement"],"sources":["../../../src/cli/commands/tui.ts"],"mappings":"OAASA,YAAe,mBACjBC,UAAW,eACTC,WAAc,aACdC,QAAW,uBAEd,SAAUC,mBACd,OAAO,IAAIJ,QAAQ,OAChBK,YAAY,2DACZC,QAAOC,UACN,MAAMC,cAAEA,GAAkBN,OAAOD,MAAMQ,cAAcN,YAC/CK,GAAe,GAE3B","ignoreList":[]}
package/dist/cli/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{Command}from"commander";import{createServeCommand}from"./commands/serve.js";import{createListCommand}from"./commands/list.js";import{createInstallCommand}from"./commands/install.js";import{createUninstallCommand}from"./commands/uninstall.js";import{createPullCommand}from"./commands/pull.js";import{Logger}from"../utils/logger.js";import{checkForUpdates}from"../utils/versionUtils.js";async function main(){const o=new Command;o.name("imcp").description("IMCP (Install Model Context Protocol) CLI").option("--verbose","Show detailed logs for all commands"),o.parseOptions(process.argv);const e=o.opts();Logger.setVerbose(!!e.verbose),o.addCommand(createServeCommand()),o.addCommand(createInstallCommand()),o.addCommand(createListCommand()),o.addCommand(createUninstallCommand()),o.addCommand(createPullCommand()),o.exitOverride(),await checkForUpdates();try{await o.parseAsync(process.argv)}catch(o){const e=o;"commander.help"===e.code||"commander.version"===e.code?process.exit(0):(console.error("Error:",e.message||"An unknown error occurred"),process.exit(1))}}process.on("unhandledRejection",(o=>{o instanceof Error?console.error("Unhandled promise rejection:",o.message):console.error("Unhandled promise rejection:",o),process.exit(1)})),main().catch((o=>{o instanceof Error?console.error("Fatal error:",o.message):console.error("Fatal error:",o),process.exit(1)}));
2
+ import{Command}from"commander";import{createServeCommand}from"./commands/serve.js";import{createListCommand}from"./commands/list.js";import{createInstallCommand}from"./commands/install.js";import{createUninstallCommand}from"./commands/uninstall.js";import{createPullCommand}from"./commands/pull.js";import{createTuiCommand}from"./commands/tui.js";import{Logger}from"../utils/logger.js";import{checkForUpdates}from"../utils/versionUtils.js";async function main(){const o=new Command;o.name("imcp").description("IMCP (Install Model Context Protocol) CLI").option("--verbose","Show detailed logs for all commands"),o.parseOptions(process.argv);const e=o.opts();Logger.setVerbose(!!e.verbose),o.addCommand(createServeCommand()),o.addCommand(createInstallCommand()),o.addCommand(createListCommand()),o.addCommand(createUninstallCommand()),o.addCommand(createPullCommand()),o.addCommand(createTuiCommand()),o.exitOverride(),await checkForUpdates();try{await o.parseAsync(process.argv)}catch(o){const e=o;"commander.help"===e.code||"commander.version"===e.code?process.exit(0):(console.error("Error:",e.message||"An unknown error occurred"),process.exit(1))}}process.on("unhandledRejection",(o=>{o instanceof Error?console.error("Unhandled promise rejection:",o.message):console.error("Unhandled promise rejection:",o),process.exit(1)})),main().catch((o=>{o instanceof Error?console.error("Fatal error:",o.message):console.error("Fatal error:",o),process.exit(1)}));
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Command","createServeCommand","createListCommand","createInstallCommand","createUninstallCommand","createPullCommand","Logger","checkForUpdates","async","main","program","name","description","option","parseOptions","process","argv","opts","setVerbose","verbose","addCommand","exitOverride","parseAsync","error","commanderError","code","exit","console","message","on","Error","catch"],"sources":["../../src/cli/index.ts"],"mappings":";OAESA,YAAe,mBACfC,uBAA0B,6BAC1BC,sBAAyB,4BACzBC,yBAA4B,+BAC5BC,2BAA8B,iCAC9BC,sBAAyB,4BACzBC,WAAc,4BACdC,oBAAuB,2BAOhCC,eAAeC,OAIb,MAAMC,EAAU,IAAIV,QACpBU,EACGC,KAAK,QACLC,YAAY,6CACZC,OAAO,YAAa,uCAGvBH,EAAQI,aAAaC,QAAQC,MAC7B,MAAMC,EAAOP,EAAQO,OACrBX,OAAOY,aAAaD,EAAKE,SAGzBT,EAAQU,WAAWnB,sBACnBS,EAAQU,WAAWjB,wBACnBO,EAAQU,WAAWlB,qBACnBQ,EAAQU,WAAWhB,0BACnBM,EAAQU,WAAWf,qBAGnBK,EAAQW,qBAGFd,kBAEN,UACQG,EAAQY,WAAWP,QAAQC,KACnC,CAAE,MAAOO,GACP,MAAMC,EAAiBD,EAEK,mBAAxBC,EAAeC,MAGgB,sBAAxBD,EAAeC,KADxBV,QAAQW,KAAK,IAKbC,QAAQJ,MAAM,SAAUC,EAAeI,SAAW,6BAClDb,QAAQW,KAAK,GAEjB,CACF,CAGAX,QAAQc,GAAG,sBAAuBN,IAC5BA,aAAiBO,MACnBH,QAAQJ,MAAM,+BAAgCA,EAAMK,SAEpDD,QAAQJ,MAAM,+BAAgCA,GAEhDR,QAAQW,KAAK,EAAE,IAIjBjB,OAAOsB,OAAOR,IACRA,aAAiBO,MACnBH,QAAQJ,MAAM,eAAgBA,EAAMK,SAEpCD,QAAQJ,MAAM,eAAgBA,GAEhCR,QAAQW,KAAK,EAAE","ignoreList":[]}
1
+ {"version":3,"names":["Command","createServeCommand","createListCommand","createInstallCommand","createUninstallCommand","createPullCommand","createTuiCommand","Logger","checkForUpdates","async","main","program","name","description","option","parseOptions","process","argv","opts","setVerbose","verbose","addCommand","exitOverride","parseAsync","error","commanderError","code","exit","console","message","on","Error","catch"],"sources":["../../src/cli/index.ts"],"mappings":";OAESA,YAAe,mBACfC,uBAA0B,6BAC1BC,sBAAyB,4BACzBC,yBAA4B,+BAC5BC,2BAA8B,iCAC9BC,sBAAyB,4BACzBC,qBAAwB,2BACxBC,WAAc,4BACdC,oBAAuB,2BAOhCC,eAAeC,OAIb,MAAMC,EAAU,IAAIX,QACpBW,EACGC,KAAK,QACLC,YAAY,6CACZC,OAAO,YAAa,uCAGvBH,EAAQI,aAAaC,QAAQC,MAC7B,MAAMC,EAAOP,EAAQO,OACrBX,OAAOY,aAAaD,EAAKE,SAGzBT,EAAQU,WAAWpB,sBACnBU,EAAQU,WAAWlB,wBACnBQ,EAAQU,WAAWnB,qBACnBS,EAAQU,WAAWjB,0BACnBO,EAAQU,WAAWhB,qBACnBM,EAAQU,WAAWf,oBAGnBK,EAAQW,qBAGFd,kBAEN,UACQG,EAAQY,WAAWP,QAAQC,KACnC,CAAE,MAAOO,GACP,MAAMC,EAAiBD,EAEK,mBAAxBC,EAAeC,MAGgB,sBAAxBD,EAAeC,KADxBV,QAAQW,KAAK,IAKbC,QAAQJ,MAAM,SAAUC,EAAeI,SAAW,6BAClDb,QAAQW,KAAK,GAEjB,CACF,CAGAX,QAAQc,GAAG,sBAAuBN,IAC5BA,aAAiBO,MACnBH,QAAQJ,MAAM,+BAAgCA,EAAMK,SAEpDD,QAAQJ,MAAM,+BAAgCA,GAEhDR,QAAQW,KAAK,EAAE,IAIjBjB,OAAOsB,OAAOR,IACRA,aAAiBO,MACnBH,QAAQJ,MAAM,eAAgBA,EAAMK,SAEpCD,QAAQJ,MAAM,eAAgBA,GAEhCR,QAAQW,KAAK,EAAE","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare function App(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useState,useMemo,useCallback}from"react";import{Box,Text,useApp,useInput,useStdout}from"ink";import Spinner from"ink-spinner";import{Header}from"./components/Header.js";import{StepIndicator}from"./components/StepIndicator.js";import{ServerList}from"./components/ServerList.js";import{ClientSelector}from"./components/ClientSelector.js";import{InstallProgress}from"./components/InstallProgress.js";import{SearchBar}from"./components/SearchBar.js";import{useServers}from"./hooks/useServers.js";import{useInstall}from"./hooks/useInstall.js";import{createServerSearcher,filterServers}from"./utils/fuzzySearch.js";import{SUPPORTED_CLIENT_NAMES}from"../../core/metadatas/constants.js";export function App(){const{exit:e}=useApp(),{stdout:r}=useStdout(),s=r?.rows||24,{loading:t,error:n,servers:o,categories:l,installedInfo:i}=useServers(),{installing:c,progress:a,completed:d,operation:x,install:u,uninstall:m,reset:f}=useInstall(),[h,p]=useState("install"),[S,j]=useState(1),[_,C]=useState(""),[g,v]=useState(new Set),[T,I]=useState(new Set),[B,y]=useState(0),[b,w]=useState(0),z=useMemo((()=>createServerSearcher(o)),[o]),k=useMemo((()=>filterServers(o,_,z)),[o,_,z]),A=k.length,D=useMemo((()=>{const e=new Set;if(0===g.size)return e;const r=Array.from(g);if("install"===h){const s=r[0],t=i[s]?.clients||[];for(const s of t){r.every((e=>i[e]?.clients?.includes(s)))&&e.add(s)}}else for(const s of r){const r=i[s]?.clients||[];for(const s of r)e.add(s)}return e}),[g,i,h]),E=useCallback((e=>{v((r=>{const s=new Set(r);return s.has(e)?s.delete(e):s.add(e),s}))}),[]),M=useCallback((e=>{"install"===h&&D.has(e)||("uninstall"!==h||D.has(e))&&I((r=>{const s=new Set(r);return s.has(e)?s.delete(e):s.add(e),s}))}),[h,D]),P=useCallback((e=>{y((r=>{const s=r+e;return s<0?0:s>=A?Math.max(0,A-1):s}))}),[A]),L=useCallback((e=>{w((r=>{const s=r+e,t=SUPPORTED_CLIENT_NAMES.length-1;return s<0?0:s>t?t:s}))}),[]),H=useCallback((()=>{if(0===g.size||0===T.size)return;const e=Array.from(g).map((e=>{const[r,s]=e.split(":");return{category:r,serverName:s}}));j(3),"install"===h?u(e,Array.from(T)):m(e,Array.from(T))}),[g,T,h,u,m]),N=useCallback(((e,r)=>{1===S&&(r.backspace||r.delete?(C((e=>e.slice(0,-1))),y(0)):r.ctrl||r.meta||!e||r.return||r.tab||r.upArrow||r.downArrow||" "===e||"q"===e||(C((r=>r+e)),y(0)))}),[S]);useInput(((r,s)=>{if(N(r,s),!c||d)if("q"===r||s.ctrl&&"c"===r)e();else{if(d)return f(),j(1),v(new Set),void I(new Set);if(1===S){if(s.tab)return p((e=>"install"===e?"uninstall":"install")),void v(new Set);if(s.return&&g.size>0)return j(2),void I(new Set);if(s.escape&&_)return C(""),void y(0)}if(2===S){if(s.escape)return void j(1);if(s.return&&T.size>0)return void H()}}}));const U=s-4-3-(2===S?SUPPORTED_CLIENT_NAMES.length+4:0)-2;if(t)return _jsxs(Box,{flexDirection:"column",padding:1,children:[_jsx(Header,{}),_jsxs(Box,{children:[_jsx(Text,{color:"cyan",children:_jsx(Spinner,{type:"dots"})}),_jsx(Text,{children:" Loading servers..."})]})]});if(n)return _jsxs(Box,{flexDirection:"column",padding:1,children:[_jsx(Header,{}),_jsxs(Text,{color:"red",children:["Error: ",n]})]});if(3===S)return _jsxs(Box,{flexDirection:"column",padding:1,children:[_jsx(Header,{}),_jsx(StepIndicator,{step:3,selectedServerCount:g.size,selectedClientCount:T.size}),_jsx(InstallProgress,{progress:a,completed:d,operation:x}),d&&_jsx(Box,{marginTop:1,children:_jsx(Text,{dimColor:!0,italic:!0,children:"Press any key to continue..."})})]});if(1===S){const e=g.size>0?`${g.size} selected · enter next · q quit`:"tab switch mode · ↑↓ nav · space select";return _jsxs(Box,{flexDirection:"column",padding:1,height:s,children:[_jsx(Header,{}),_jsxs(Box,{marginBottom:1,children:[_jsx(Text,{color:"install"===h?"green":"gray",bold:"install"===h,underline:"install"===h,children:"Install"}),_jsx(Text,{dimColor:!0,children:" / "}),_jsx(Text,{color:"uninstall"===h?"red":"gray",bold:"uninstall"===h,underline:"uninstall"===h,children:"Uninstall"}),_jsx(Text,{dimColor:!0,children:" (Tab to switch)"})]}),_jsx(StepIndicator,{step:1,selectedServerCount:g.size,selectedClientCount:0}),_jsxs(Box,{flexDirection:"column",flexGrow:1,children:[_jsx(Text,{color:"cyan",bold:!0,children:"install"===h?"Select Servers to Install":"Select Servers to Uninstall"}),_jsx(ServerList,{categories:l,filteredServers:k,selectedServers:g,installedInfo:i,cursorIndex:B,onToggle:E,onCursorMove:P,focus:!0,height:U})]}),_jsx(SearchBar,{value:_,onChange:C,focus:!0,hint:e})]})}const q="install"===h?"install":"uninstall",O=T.size>0?`${T.size} client(s) · enter ${q} · esc back`:"↑↓ nav · space select · esc back";return _jsxs(Box,{flexDirection:"column",padding:1,height:s,children:[_jsx(Header,{}),_jsx(StepIndicator,{step:2,selectedServerCount:g.size,selectedClientCount:T.size}),_jsxs(Box,{flexDirection:"column",marginBottom:1,children:[_jsx(Text,{color:"cyan",bold:!0,children:"Selected Servers:"}),_jsxs(Box,{flexDirection:"column",paddingLeft:1,children:[Array.from(g).slice(0,3).map((e=>{const[,r]=e.split(":");return _jsxs(Text,{dimColor:!0,children:["• ",r]},e)})),g.size>3&&_jsxs(Text,{dimColor:!0,children:[" ...and ",g.size-3," more"]})]})]}),_jsxs(Box,{flexDirection:"column",flexGrow:1,children:[_jsx(Text,{color:"install"===h?"cyan":"red",bold:!0,children:"install"===h?"Choose Target Clients":"Choose Clients to Uninstall From"}),_jsx(Text,{dimColor:!0,children:"install"===h?"Select which clients to install the servers to:":"Select which clients to remove the servers from:"}),_jsx(Box,{marginTop:1,children:_jsx(ClientSelector,{selectedClients:T,alreadyInstalledClients:D,onToggle:M,cursorIndex:b,onCursorMove:L,focus:!0,mode:h})})]}),_jsxs(Box,{flexDirection:"column",children:[_jsx(Box,{children:_jsx(Text,{color:"gray",children:"─".repeat(60)})}),_jsx(Box,{justifyContent:"flex-end",children:_jsx(Text,{dimColor:!0,children:O})})]})]})}
2
+ //# sourceMappingURL=App.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","useMemo","useCallback","Box","Text","useApp","useInput","useStdout","Spinner","Header","StepIndicator","ServerList","ClientSelector","InstallProgress","SearchBar","useServers","useInstall","createServerSearcher","filterServers","SUPPORTED_CLIENT_NAMES","App","exit","stdout","terminalHeight","rows","loading","error","servers","categories","installedInfo","installing","progress","completed","operation","install","uninstall","reset","mode","setMode","step","setStep","searchQuery","setSearchQuery","selectedServers","setSelectedServers","Set","selectedClients","setSelectedClients","serverCursor","setServerCursor","clientCursor","setClientCursor","searcher","filteredServers","filteredServerCount","length","relevantClients","clients","size","selectedKeys","Array","from","firstKey","firstInstalled","client","every","key","includes","add","installed","toggleServer","prev","next","has","delete","toggleClient","moveServerCursor","delta","Math","max","moveClientCursor","startOperation","items","map","category","serverName","split","handleSearchInput","input","backspace","slice","ctrl","meta","return","tab","upArrow","downArrow","escape","availableHeight","_jsxs","flexDirection","padding","children","_jsx","color","type","selectedServerCount","selectedClientCount","marginTop","dimColor","italic","hint","height","marginBottom","bold","underline","flexGrow","cursorIndex","onToggle","onCursorMove","focus","value","onChange","actionLabel","paddingLeft","name","alreadyInstalledClients","repeat","justifyContent"],"sources":["../../../src/cli/tui/App.tsx"],"mappings":"gEAAgBA,SAAUC,QAASC,gBAAmB,eAC7CC,IAAKC,KAAMC,OAAQC,SAAUC,cAAiB,aAChDC,YAAa,qBACXC,WAAc,gCACdC,kBAAqB,uCACrBC,eAAgC,oCAChCC,mBAAsB,wCACtBC,oBAAuB,yCACvBC,cAAiB,mCACjBC,eAAkB,+BAClBC,eAA+B,+BAC/BC,qBAAsBC,kBAAqB,gCAC3CC,2BAA8B,2CAKjC,SAAUC,MACd,MAAMC,KAAEA,GAAShB,UACXiB,OAAEA,GAAWf,YACbgB,EAAiBD,GAAQE,MAAQ,IAEjCC,QAAEA,EAAOC,MAAEA,EAAKC,QAAEA,EAAOC,WAAEA,EAAUC,cAAEA,GAAkBd,cACzDe,WAAEA,EAAUC,SAAEA,EAAQC,UAAEA,EAASC,UAAEA,EAASC,QAAEA,EAAOC,UAAEA,EAASC,MAAEA,GAAUpB,cAG3EqB,EAAMC,G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,aAAcvC,EACdwC,OAAO,EACPnF,KAAMA,SAKZ8D,MAAChG,IAAG,CAACiG,cAAc,SAAQE,SAAA,CACzBC,KAACpG,IAAG,CAAAmG,SACFC,KAACnG,KAAI,CAACoG,MAAM,OAAMF,SAAE,IAAIyB,OAAO,QAEjCxB,KAACpG,IAAG,CAAC6H,eAAe,WAAU1B,SAC5BC,KAACnG,KAAI,CAACyG,UAAQ,EAAAP,SAAES,WAK1B","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ selectedClients: Set<string>;
3
+ alreadyInstalledClients: Set<string>;
4
+ onToggle: (client: string) => void;
5
+ cursorIndex: number;
6
+ onCursorMove: (delta: number) => void;
7
+ focus?: boolean;
8
+ mode: 'install' | 'uninstall';
9
+ }
10
+ export declare function ClientSelector({ selectedClients, alreadyInstalledClients, onToggle, cursorIndex, onCursorMove, focus, mode, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{Box,Text,useInput}from"ink";import{SUPPORTED_CLIENT_NAMES}from"../../../core/metadatas/constants.js";const CLIENT_ICONS={MSRooCode:"🦘",RooCode:"🦘",Cline:"🤖",GithubCopilot:"🐙",ClaudeCode:"🧠",VisualStudio:"💜"};export function ClientSelector({selectedClients:e,alreadyInstalledClients:o,onToggle:r,cursorIndex:s,onCursorMove:l,focus:n=!1,mode:t}){const i=SUPPORTED_CLIENT_NAMES;return useInput(((e,o)=>{if(n)if(o.upArrow)l(-1);else if(o.downArrow)l(1);else if(" "===e){const e=i[s];e&&r(e)}}),{isActive:n}),_jsx(Box,{flexDirection:"column",children:i.map(((r,l)=>{const i=e.has(r),d=o.has(r),a=n&&l===s,c=CLIENT_ICONS[r]||"📦",x="install"===t?d:!d;return _jsxs(Box,{children:[_jsx(Text,{color:a?"cyan":void 0,children:a?"❯ ":" "}),_jsxs(_Fragment,x?{children:[_jsx(Text,{color:"gray",dimColor:!0,children:"○ "}),_jsxs(Text,{dimColor:!0,children:[c," ",r]}),_jsx(Text,{color:"install"===t?"green":"gray",dimColor:!0,children:"install"===t?" (already installed)":" (not installed)"})]}:{children:[_jsxs(Text,{color:i?"install"===t?"green":"red":"gray",children:[i?"●":"○"," "]}),_jsxs(Text,{color:i?"install"===t?"green":"red":a?"white":void 0,bold:i||a,children:[c," ",r]})]})]},r)}))})}
2
+ //# sourceMappingURL=ClientSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Box","Text","useInput","SUPPORTED_CLIENT_NAMES","CLIENT_ICONS","MSRooCode","RooCode","Cline","GithubCopilot","ClaudeCode","VisualStudio","ClientSelector","selectedClients","alreadyInstalledClients","onToggle","cursorIndex","onCursorMove","focus","mode","clients","input","key","upArrow","downArrow","client","isActive","_jsx","flexDirection","children","map","idx","isSelected","has","isInstalled","isCursor","icon","isDisabled","_jsxs","color","undefined","_Fragment","dimColor","bold"],"sources":["../../../../src/cli/tui/components/ClientSelector.tsx"],"mappings":"sFACSA,IAAKC,KAAMC,aAAgB,aAC3BC,2BAA8B,uCAYvC,MAAMC,aAAuC,CAC3CC,UAAa,KACbC,QAAW,KACXC,MAAS,KACTC,cAAiB,KACjBC,WAAc,KACdC,aAAgB,aAGZ,SAAUC,gBAAeC,gBAC7BA,EAAeC,wBACfA,EAAuBC,SACvBA,EAAQC,YACRA,EAAWC,aACXA,EAAYC,MACZA,GAAQ,EAAKC,KACbA,IAEA,MAAMC,EAAUhB,uBAiBhB,OAfAD,UAAS,CAACkB,EAAeC,KACvB,GAAKJ,EAEL,GAAII,EAAIC,QACNN,GAAc,QACT,GAAIK,EAAIE,UACbP,EAAa,QACR,GAAc,MAAVI,EAAe,CACxB,MAAMI,EAASL,EAAQJ,GACnBS,GACFV,EAASU,EAEb,IACC,CAAEC,SAAUR,IAGbS,KAAC1B,IAAG,CAAC2B,cAAc,SAAQC,SACxBT,EAAQU,KAAI,CAACL,EAAQM,KACpB,MAAMC,EAAanB,EAAgBoB,IAAIR,GACjCS,EAAcpB,EAAwBmB,IAAIR,GAC1CU,EAAWjB,GAASa,IAAQf,EAC5BoB,EAAO/B,aAAaoB,IAAW,KAI/BY,EAAsB,YAATlB,EAAqBe,GAAeA,EAEvD,OACEI,MAACrC,IAAG,CAAA4B,SAAA,CACFF,KAACzB,KAAI,CAACqC,MAAOJ,EAAW,YAASK,EAASX,SACvCM,EAAW,KAAO,OAGnBG,MAAAG,UADDJ,EACC,CAAAR,SAAA,CACEF,KAACzB,KAAI,CAACqC,MAAM,OAAOG,UAAQ,EAAAb,SAAA,OAC3BS,MAACpC,KAAI,CAACwC,UAAQ,EAAAb,SAAA,CAAEO,EAAI,IAAGX,KACvBE,KAACzB,KAAI,CAACqC,MAAgB,YAATpB,EAAqB,QAAU,OAAQuB,UAAQ,EAAAb,SAChD,YAATV,EAAqB,uBAAyB,uBAInD,CAAAU,SAAA,CACES,MAACpC,KAAI,CAACqC,MAAOP,EAAuB,YAATb,EAAqB,QAAU,MAAS,OAAMU,SAAA,CACtEG,EAAa,IAAM,IAAK,OAE3BM,MAACpC,KAAI,CACHqC,MAAOP,EAAuB,YAATb,EAAqB,QAAU,MAASgB,EAAW,aAAUK,EAClFG,KAAMX,GAAcG,EAAQN,SAAA,CAE3BO,EAAI,IAAGX,UArBNA,EA0BX,KAIT","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export declare function Header(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Box,Text}from"ink";export function Header(){return _jsxs(Box,{flexDirection:"column",marginBottom:1,children:[_jsxs(Box,{children:[_jsx(Text,{color:"cyan",bold:!0,children:"⚡ IMCP"}),_jsx(Text,{dimColor:!0,children:" — "}),_jsx(Text,{color:"white",children:"Install Model Context Protocol"})]}),_jsx(Box,{children:_jsx(Text,{dimColor:!0,children:" Browse, search, and install MCP servers interactively"})}),_jsx(Box,{marginTop:0,children:_jsx(Text,{color:"gray",children:"─".repeat(60)})})]})}
2
+ //# sourceMappingURL=Header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Box","Text","Header","_jsxs","flexDirection","marginBottom","children","_jsx","color","bold","dimColor","marginTop","repeat"],"sources":["../../../../src/cli/tui/components/Header.tsx"],"mappings":"gEACSA,IAAKC,SAAY,aAEpB,SAAUC,SACd,OACEC,MAACH,IAAG,CAACI,cAAc,SAASC,aAAc,EAACC,SAAA,CACzCH,MAACH,IAAG,CAAAM,SAAA,CACFC,KAACN,KAAI,CAACO,MAAM,OAAOC,MAAI,EAAAH,SAAA,WACvBC,KAACN,KAAI,CAACS,UAAQ,EAAAJ,SAAA,QACdC,KAACN,KAAI,CAACO,MAAM,QAAOF,SAAA,sCAErBC,KAACP,IAAG,CAAAM,SACFC,KAACN,KAAI,CAACS,UAAQ,EAAAJ,SAAA,8DAEhBC,KAACP,IAAG,CAACW,UAAW,EAACL,SACfC,KAACN,KAAI,CAACO,MAAM,OAAMF,SAAE,IAAIM,OAAO,UAIvC","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import type { InstallProgress as ProgressType } from '../hooks/useInstall.js';
2
+ interface Props {
3
+ progress: ProgressType[];
4
+ completed: boolean;
5
+ operation: 'install' | 'uninstall';
6
+ }
7
+ export declare function InstallProgress({ progress, completed, operation }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Box,Text}from"ink";import Spinner from"ink-spinner";export function InstallProgress({progress:s,completed:e,operation:l}){const r=s.filter((s=>"success"===s.status)).length,t=s.filter((s=>"failed"===s.status)).length,n="install"===l?"installed":"uninstalled";return _jsxs(Box,{flexDirection:"column",children:[_jsx(Box,{marginBottom:1,children:_jsx(Text,{color:"cyan",bold:!0,children:"install"===l?"Installing":"Uninstalling"})}),s.map((s=>_jsxs(Box,{children:[_jsx(Text,{children:" "}),"installing"===s.status?_jsx(Text,{color:"cyan",children:_jsx(Spinner,{type:"dots"})}):"success"===s.status?_jsx(Text,{color:"green",children:"✓"}):"failed"===s.status?_jsx(Text,{color:"red",children:"✗"}):_jsx(Text,{dimColor:!0,children:"○"}),_jsx(Text,{children:" "}),_jsx(Text,{color:"success"===s.status?"green":"failed"===s.status?"red":void 0,bold:"installing"===s.status,children:s.serverName}),s.message&&"failed"===s.status&&_jsxs(Text,{dimColor:!0,children:[" — ",s.message]})]},s.serverName))),e&&_jsx(Box,{marginTop:1,children:_jsxs(Text,0===t?{color:"green",bold:!0,children:["✨ All ",r," server(s) ",n,"!"]}:{color:"yellow",bold:!0,children:["⚠ ",r," ok, ",t," failed"]})})]})}
2
+ //# sourceMappingURL=InstallProgress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Box","Text","Spinner","InstallProgress","progress","completed","operation","successCount","filter","p","status","length","failedCount","opDone","_jsxs","flexDirection","children","_jsx","marginBottom","color","bold","map","item","type","dimColor","undefined","serverName","message","marginTop"],"sources":["../../../../src/cli/tui/components/InstallProgress.tsx"],"mappings":"gEACSA,IAAKC,SAAY,aACnBC,YAAa,qBASd,SAAUC,iBAAgBC,SAAEA,EAAQC,UAAEA,EAASC,UAAEA,IACrD,MAAMC,EAAeH,EAASI,QAAOC,GAAkB,YAAbA,EAAEC,SAAsBC,OAC5DC,EAAcR,EAASI,QAAOC,GAAkB,WAAbA,EAAEC,SAAqBC,OAE1DE,EAAuB,YAAdP,EAA0B,YAAc,cAEvD,OACEQ,MAACd,IAAG,CAACe,cAAc,SAAQC,SAAA,CACzBC,KAACjB,IAAG,CAACkB,aAAc,EAACF,SAClBC,KAAChB,KAAI,CAACkB,MAAM,OAAOC,MAAI,EAAAJ,SANC,YAAdV,EAA0B,aAAe,mBASpDF,EAASiB,KAAKC,GACbR,MAACd,IAAG,CAAAgB,SAAA,CACFC,KAAChB,KAAI,CAAAe,SAAA,OACY,eAAhBM,EAAKZ,OACJO,KAAChB,KAAI,CAACkB,MAAM,OAAMH,SAACC,KAACf,QAAO,CAACqB,KAAK,WACf,YAAhBD,EAAKZ,OACPO,KAAChB,KAAI,CAACkB,MAAM,QAAOH,SAAA,MACD,WAAhBM,EAAKZ,OACPO,KAAChB,KAAI,CAACkB,MAAM,MAAKH,SAAA,MAEjBC,KAAChB,KAAI,CAACuB,UAAQ,EAAAR,SAAA,MAEhBC,KAAChB,KAAI,CAAAe,SAAA,MACLC,KAAChB,KAAI,CACHkB,MAAuB,YAAhBG,EAAKZ,OAAuB,QAA0B,WAAhBY,EAAKZ,OAAsB,WAAQe,EAChFL,KAAsB,eAAhBE,EAAKZ,OAAuBM,SAEjCM,EAAKI,aAEPJ,EAAKK,SAA2B,WAAhBL,EAAKZ,QACpBI,MAACb,KAAI,CAACuB,UAAQ,EAAAR,SAAA,OAAKM,EAAKK,aAnBlBL,EAAKI,cAwBhBrB,GACCY,KAACjB,IAAG,CAAC4B,UAAW,EAACZ,SAEbF,MAACb,KADc,IAAhBW,EACM,CAACO,MAAM,QAAQC,MAAI,EAAAJ,SAAA,UAAQT,EAAY,cAAaM,EAAM,MAE1D,CAACM,MAAM,SAASC,MAAI,EAAAJ,SAAA,MAAIT,EAAY,QAAOK,EAAW,iBAMvE","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ title: string;
4
+ children: React.ReactNode;
5
+ dimTitle?: boolean;
6
+ }
7
+ export declare function Panel({ title, children, dimTitle }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Box,Text}from"ink";export function Panel({title:e,children:i,dimTitle:r=!1}){return _jsxs(Box,{flexDirection:"column",children:[_jsx(Box,{children:_jsx(Text,{color:r?"gray":"cyan",bold:!r,children:e})}),_jsx(Box,{flexDirection:"column",paddingLeft:1,children:i})]})}
2
+ //# sourceMappingURL=Panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Box","Text","Panel","title","children","dimTitle","_jsxs","flexDirection","_jsx","color","bold","paddingLeft"],"sources":["../../../../src/cli/tui/components/Panel.tsx"],"mappings":"gEACSA,IAAKC,SAAY,aAQpB,SAAUC,OAAMC,MAAEA,EAAKC,SAAEA,EAAQC,SAAEA,GAAW,IAClD,OACEC,MAACN,IAAG,CAACO,cAAc,SAAQH,SAAA,CACzBI,KAACR,IAAG,CAAAI,SACFI,KAACP,KAAI,CAACQ,MAAOJ,EAAW,OAAS,OAAQK,MAAOL,EAAQD,SACrDD,MAGLK,KAACR,IAAG,CAACO,cAAc,SAASI,YAAa,EAACP,SACvCA,MAIT","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ interface Props {
2
+ step: 1 | 2 | 3;
3
+ }
4
+ export declare function HelpBar({ step }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export declare function SearchBar({ value, onChange, focus, hint, }: {
6
+ value: string;
7
+ onChange: (v: string) => void;
8
+ focus: boolean;
9
+ hint: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Box,Text}from"ink";export function HelpBar({step:e}){return _jsx(Box,{children:_jsx(Text,{color:"gray",children:"─".repeat(60)})})}export function SearchBar({value:e,onChange:r,focus:o,hint:x}){return _jsxs(Box,{flexDirection:"column",children:[_jsx(Box,{children:_jsx(Text,{color:"gray",children:"─".repeat(60)})}),_jsxs(Box,{justifyContent:"space-between",children:[_jsxs(Box,{children:[_jsx(Text,{color:"yellow",children:"🔍 "}),_jsx(Text,e?{color:"white",children:e}:{dimColor:!0,children:"Search servers..."}),o&&_jsx(Text,{color:"cyan",children:"▎"})]}),_jsx(Box,{children:_jsx(Text,{dimColor:!0,children:x})})]})]})}
2
+ //# sourceMappingURL=SearchBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Box","Text","HelpBar","step","_jsx","children","color","repeat","SearchBar","value","onChange","focus","hint","_jsxs","flexDirection","justifyContent","dimColor"],"sources":["../../../../src/cli/tui/components/SearchBar.tsx"],"mappings":"gEACSA,IAAKC,SAAY,aAMpB,SAAUC,SAAQC,KAAEA,IAOxB,OACEC,KAACJ,IAAG,CAAAK,SACFD,KAACH,KAAI,CAACK,MAAM,OAAMD,SAAE,IAAIE,OAAO,OAGrC,QAEM,SAAUC,WAAUC,MACxBA,EAAKC,SACLA,EAAQC,MACRA,EAAKC,KACLA,IAOA,OACEC,MAACb,IAAG,CAACc,cAAc,SAAQT,SAAA,CACzBD,KAACJ,IAAG,CAAAK,SACFD,KAACH,KAAI,CAACK,MAAM,OAAMD,SAAE,IAAIE,OAAO,QAEjCM,MAACb,IAAG,CAACe,eAAe,gBAAeV,SAAA,CACjCQ,MAACb,IAAG,CAAAK,SAAA,CACFD,KAACH,KAAI,CAACK,MAAM,SAAQD,SAAA,QAElBD,KAACH,KADFQ,EACM,CAACH,MAAM,QAAOD,SAAEI,GAEhB,CAACO,UAAQ,EAAAX,SAAA,sBAEfM,GAASP,KAACH,KAAI,CAACK,MAAM,OAAMD,SAAA,SAE9BD,KAACJ,IAAG,CAAAK,SACFD,KAACH,KAAI,CAACe,UAAQ,EAAAX,SAAEO,WAK1B","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ import type { SearchableServer } from '../utils/fuzzySearch.js';
2
+ import type { CategoryGroup, InstalledInfo } from '../hooks/useServers.js';
3
+ interface Props {
4
+ categories: CategoryGroup[];
5
+ filteredServers: SearchableServer[];
6
+ selectedServers: Set<string>;
7
+ installedInfo: InstalledInfo;
8
+ cursorIndex: number;
9
+ onToggle: (serverKey: string) => void;
10
+ onCursorMove: (delta: number) => void;
11
+ focus?: boolean;
12
+ height: number;
13
+ }
14
+ declare function getServerKey(server: SearchableServer): string;
15
+ export declare function ServerList({ categories, filteredServers, selectedServers, installedInfo, cursorIndex, onToggle, onCursorMove, focus, height, }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export { getServerKey };
@@ -0,0 +1,2 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import React from"react";import{Box,Text,useInput}from"ink";function getServerKey(e){return`${e.category}:${e.name}`}export function ServerList({categories:e,filteredServers:r,selectedServers:o,installedInfo:s,cursorIndex:t,onToggle:n,onCursorMove:i,focus:c=!0,height:l}){const x=new Set(r.map((e=>getServerKey(e)))),a=[];for(const r of e)for(const e of r.servers)x.has(getServerKey(e))&&a.push({category:r,server:e});if(useInput(((e,r)=>{if(c)if(r.upArrow)i(-1);else if(r.downArrow)i(1);else if(" "===e){const e=a[t];e&&n(getServerKey(e.server))}}),{isActive:c}),0===a.length)return _jsx(Box,{paddingY:1,children:_jsx(Text,{dimColor:!0,italic:!0,children:"No servers match your search"})});const h=Math.max(3,l-2),d=Math.floor(h/2);let m=Math.max(0,t-d),g=Math.min(a.length,m+h);g-m<h&&(m=Math.max(0,g-h));const j=a.slice(m,g),v=m>0,f=g<a.length;let u="";return _jsxs(Box,{flexDirection:"column",children:[v&&_jsx(Box,{children:_jsxs(Text,{dimColor:!0,children:[" ↑ ",m," more above"]})}),j.map(((e,r)=>{const n=m+r,i=getServerKey(e.server),c=o.has(i),l=n===t,x=e.category.name!==u;u=e.category.name;const a=s[i],h=!!a,d=a?.clients||[];return _jsxs(React.Fragment,{children:[x&&_jsx(Box,{marginTop:0===r?0:1,children:_jsxs(Text,{color:"blue",bold:!0,children:["┌ ",e.category.displayName]})}),_jsxs(Box,{children:[_jsx(Text,{color:l?"cyan":"white",children:l?"│❯":"│ "}),_jsx(Text,{color:c?"green":"gray",children:c?" ●":" ○"}),_jsxs(Text,{color:l?"white":void 0,bold:l||c,children:[" ",e.server.name]}),h&&_jsxs(Text,{color:"green",dimColor:!0,children:[" ✓",d.length>0?` [${d.join(",")}]`:""]}),_jsxs(Text,{dimColor:!0,children:[" ","— ",e.server.description.length>40?e.server.description.slice(0,40)+"…":e.server.description]})]})]},i)})),f&&_jsx(Box,{children:_jsxs(Text,{dimColor:!0,children:[" ↓ ",a.length-g," more below"]})})]})}export{getServerKey};
2
+ //# sourceMappingURL=ServerList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Box","Text","useInput","getServerKey","server","category","name","ServerList","categories","filteredServers","selectedServers","installedInfo","cursorIndex","onToggle","onCursorMove","focus","height","filteredSet","Set","map","s","visibleItems","servers","has","push","input","key","upArrow","downArrow","item","isActive","length","_jsx","paddingY","children","dimColor","italic","maxHeight","Math","max","halfWindow","floor","startIdx","endIdx","min","visibleSlice","slice","showTopIndicator","showBottomIndicator","currentCategory","_jsxs","flexDirection","displayIdx","actualIdx","isSelected","isCursor","showCategory","installInfo","isInstalled","installedClients","clients","Fragment","marginTop","color","bold","displayName","undefined","join","description"],"sources":["../../../../src/cli/tui/components/ServerList.tsx"],"mappings":"gEAAOA,UAAW,eACTC,IAAKC,KAAMC,aAAgB,MAgBpC,SAASC,aAAaC,GACpB,MAAO,GAAGA,EAAOC,YAAYD,EAAOE,MACtC,QAEM,SAAUC,YAAWC,WACzBA,EAAUC,gBACVA,EAAeC,gBACfA,EAAeC,cACfA,EAAaC,YACbA,EAAWC,SACXA,EAAQC,aACRA,EAAYC,MACZA,GAAQ,EAAIC,OACZA,IAGA,MAAMC,EAAc,IAAIC,IAAIT,EAAgBU,KAAIC,GAAKjB,aAAaiB,MAE5DC,EAAwE,GAE9E,IAAK,MAAMhB,KAAYG,EACrB,IAAK,MAAMJ,KAAUC,EAASiB,QACxBL,EAAYM,IAAIpB,aAAaC,KAC/BiB,EAAaG,KAAK,CAAEnB,WAAUD,WAoBpC,GAfAF,UAAS,CAACuB,EAAeC,KACvB,GAAKX,EAEL,GAAIW,EAAIC,QACNb,GAAc,QACT,GAAIY,EAAIE,UACbd,EAAa,QACR,GAAc,MAAVW,EAAe,CACxB,MAAMI,EAAOR,EAAaT,GACtBiB,GACFhB,EAASV,aAAa0B,EAAKzB,QAE/B,IACC,CAAE0B,SAAUf,IAEa,IAAxBM,EA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AAS,QAAOrB,SACrCqB,EAAW,KAAO,OAErBvB,KAAC/B,KAAI,CAAC8D,MAAOT,EAAa,QAAU,OAAMpB,SACvCoB,EAAa,KAAO,OAEvBJ,MAACjD,KAAI,CAAC8D,MAAOR,EAAW,aAAUW,EAAWF,KAAMT,GAAYD,EAAUpB,SAAA,CACtE,IAAKL,EAAKzB,OAAOE,QAEnBoD,GACCR,MAACjD,KAAI,CAAC8D,MAAM,QAAQ5B,UAAQ,EAAAD,SAAA,MAAIyB,EAAiB5B,OAAS,EAAI,KAAK4B,EAAiBQ,KAAK,QAAU,MAErGjB,MAACjD,KAAI,CAACkC,UAAQ,EAAAD,SAAA,CACX,IAAG,KAAIL,EAAKzB,OAAOgE,YAAYrC,OAAS,GACrCF,EAAKzB,OAAOgE,YAAYtB,MAAM,EAAG,IAAM,IACvCjB,EAAKzB,OAAOgE,oBAxBD1C,EA4BtB,IAGFsB,GACChB,KAAChC,IAAG,CAAAkC,SACFgB,MAACjD,KAAI,CAACkC,UAAQ,EAAAD,SAAA,QAAMb,EAAaU,OAASY,EAAM,qBAK1D,QAESxC","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ step: 1 | 2 | 3;
3
+ selectedServerCount: number;
4
+ selectedClientCount: number;
5
+ }
6
+ export declare function StepIndicator({ step, selectedServerCount, selectedClientCount }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import{jsxs as _jsxs,jsx as _jsx}from"react/jsx-runtime";import{Box,Text}from"ink";export function StepIndicator({step:e,selectedServerCount:r,selectedClientCount:o}){return _jsxs(Box,{marginBottom:1,children:[_jsxs(Text,{color:1===e?"cyan":"green",bold:1===e,children:[e>1?"✓":"1"," Select Servers"]}),r>0&&e>1&&_jsxs(Text,{dimColor:!0,children:[" (",r,")"]}),_jsx(Text,{dimColor:!0,children:" → "}),_jsxs(Text,{color:2===e?"cyan":e>2?"green":"gray",bold:2===e,children:[e>2?"✓":"2"," Choose Clients"]}),o>0&&e>2&&_jsxs(Text,{dimColor:!0,children:[" (",o,")"]}),_jsx(Text,{dimColor:!0,children:" → "}),_jsx(Text,{color:3===e?"cyan":"gray",bold:3===e,children:"3 Install"})]})}
2
+ //# sourceMappingURL=StepIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Box","Text","StepIndicator","step","selectedServerCount","selectedClientCount","_jsxs","marginBottom","children","color","bold","dimColor","_jsx"],"sources":["../../../../src/cli/tui/components/StepIndicator.tsx"],"mappings":"gEACSA,IAAKC,SAAY,aAQpB,SAAUC,eAAcC,KAAEA,EAAIC,oBAAEA,EAAmBC,oBAAEA,IACzD,OACEC,MAACN,IAAG,CAACO,aAAc,EAACC,SAAA,CAClBF,MAACL,KAAI,CAACQ,MAAgB,IAATN,EAAa,OAAS,QAASO,KAAe,IAATP,EAAUK,SAAA,CACzDL,EAAO,EAAI,IAAM,IAAG,qBAEtBC,EAAsB,GAAKD,EAAO,GACjCG,MAACL,KAAI,CAACU,UAAQ,EAAAH,SAAA,MAAIJ,EAAmB,OAEvCQ,KAACX,KAAI,CAACU,UAAQ,EAAAH,SAAA,QACdF,MAACL,KAAI,CAACQ,MAAgB,IAATN,EAAa,OAASA,EAAO,EAAI,QAAU,OAAQO,KAAe,IAATP,EAAUK,SAAA,CAC7EL,EAAO,EAAI,IAAM,IAAG,qBAEtBE,EAAsB,GAAKF,EAAO,GACjCG,MAACL,KAAI,CAACU,UAAQ,EAAAH,SAAA,MAAIH,EAAmB,OAEvCO,KAACX,KAAI,CAACU,UAAQ,EAAAH,SAAA,QACdI,KAACX,KAAI,CAACQ,MAAgB,IAATN,EAAa,OAAS,OAAQO,KAAe,IAATP,EAAUK,SAAA,gBAKjE","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ export interface InstallItem {
2
+ category: string;
3
+ serverName: string;
4
+ }
5
+ export interface InstallProgress {
6
+ serverName: string;
7
+ status: 'pending' | 'installing' | 'success' | 'failed';
8
+ message?: string;
9
+ }
10
+ export declare function useInstall(): {
11
+ installing: boolean;
12
+ progress: InstallProgress[];
13
+ completed: boolean;
14
+ operation: "install" | "uninstall";
15
+ install: (items: InstallItem[], clients: string[]) => Promise<void>;
16
+ uninstall: (items: InstallItem[], clients: string[]) => Promise<void>;
17
+ reset: () => void;
18
+ };
@@ -0,0 +1,2 @@
1
+ import{useState,useCallback}from"react";import{serverService}from"../../../services/ServerService.js";export function useInstall(){const[e,s]=useState(!1),[a,t]=useState([]),[r,n]=useState(!1),[l,c]=useState("install");return{installing:e,progress:a,completed:r,operation:l,install:useCallback((async(e,a)=>{s(!0),n(!1),c("install"),t(e.map((e=>({serverName:e.serverName,status:"pending"}))));for(let s=0;s<e.length;s++){const r=e[s];t((e=>e.map(((e,a)=>a===s?{...e,status:"installing"}:e))));try{const e=await serverService.installMcpServer(r.category,r.serverName,{targetClients:a,blockUntilComplete:!0});t((a=>a.map(((a,t)=>t===s?{...a,status:e.success?"success":"failed",message:e.message}:a))))}catch(e){t((a=>a.map(((a,t)=>t===s?{...a,status:"failed",message:e instanceof Error?e.message:"Unknown error"}:a))))}}s(!1),n(!0)}),[]),uninstall:useCallback((async(e,a)=>{s(!0),n(!1),c("uninstall"),t(e.map((e=>({serverName:e.serverName,status:"pending"}))));for(let s=0;s<e.length;s++){const r=e[s];t((e=>e.map(((e,a)=>a===s?{...e,status:"installing"}:e))));try{const e=await serverService.uninstallMcpServer(r.category,r.serverName,{targets:a,removeData:!0});t((a=>a.map(((a,t)=>t===s?{...a,status:e.success?"success":"failed",message:e.message}:a))))}catch(e){t((a=>a.map(((a,t)=>t===s?{...a,status:"failed",message:e instanceof Error?e.message:"Unknown error"}:a))))}}s(!1),n(!0)}),[]),reset:useCallback((()=>{s(!1),t([]),n(!1),c("install")}),[])}}
2
+ //# sourceMappingURL=useInstall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","useCallback","serverService","useInstall","installing","setInstalling","progress","setProgress","completed","setCompleted","operation","setOperation","install","async","items","clients","map","item","serverName","status","i","length","prev","p","idx","result","installMcpServer","category","targetClients","blockUntilComplete","success","message","err","Error","uninstall","uninstallMcpServer","targets","removeData","reset"],"sources":["../../../../src/cli/tui/hooks/useInstall.ts"],"mappings":"OAASA,SAAUC,gBAAmB,eAC7BC,kBAAqB,4CAcxB,SAAUC,aACd,MAAOC,EAAYC,GAAiBL,UAAS,IACtCM,EAAUC,GAAeP,SAA4B,KACrDQ,EAAWC,GAAgBT,UAAS,IACpCU,EAAWC,GAAgBX,SAAkC,WAyGpE,MAAO,CAAEI,aAAYE,WAAUE,YAAWE,YAAWE,QAvGrCX,aAAYY,MAAOC,EAAsBC,KACvDV,GAAc,GACdI,GAAa,GACbE,EAAa,WACbJ,EAAYO,EAAME,KAAIC,IAAQ,CAC5BC,WAAYD,EAAKC,WACjBC,OAAQ,eAGV,IAAK,IAAIC,EAAI,EAAGA,EAAIN,EAAMO,OAAQD,IAAK,CACrC,MAAMH,EAAOH,EAAMM,GAEnBb,GAAYe,GAAQA,EAAKN,KAAI,CAACO,EAAGC,IAC/BA,IAAQJ,EAAI,IAAKG,EAAGJ,OAAQ,cAAiBI,MAG/C,IACE,MAAME,QAAsCvB,cAAcwB,iBACxDT,EAAKU,SACLV,EAAKC,WACL,CACEU,cAAeb,EACfc,oBAAoB,IAIxBtB,GAAYe,GAAQA,EAAKN,KAAI,CAACO,EAAGC,IAC/BA,IAAQJ,EAAI,IACPG,EACHJ,OAAQM,EAAOK,QAAU,UAAY,SACrCC,QAASN,EAAOM,SACdR,KAER,CAAE,MAAOS,GACPzB,GAAYe,GAAQA,EAAKN,KAAI,CAACO,EAAGC,IAC/BA,IAAQJ,EAAI,IACPG,EACHJ,OAAQ,SACRY,QAASC,aAAeC,MAAQD,EAAID,QAAU,iBAC5CR,KAER,CACF,CAEAlB,GAAc,GACdI,GAAa,EAAK,GACjB,IAyD2DyB,UAvD5CjC,aAAYY,MAAOC,EAAsBC,KACzDV,GAAc,GACdI,GAAa,GACbE,EAAa,aACbJ,EAAYO,EAAME,KAAIC,IAAQ,CAC5BC,WAAYD,EAAKC,WACjBC,OAAQ,eAGV,IAAK,IAAIC,EAAI,EAAGA,EAAIN,EAAMO,OAAQD,IAAK,CACrC,MAAMH,EAAOH,EAAMM,GAEnBb,GAAYe,GAAQA,EAAKN,KAAI,CAACO,EAAGC,IAC/BA,IAAQJ,EAAI,IAAKG,EAAGJ,OAAQ,cAAiBI,MAG/C,IACE,MAAME,QAAsCvB,cAAciC,mBACxDlB,EAAKU,SACLV,EAAKC,WACL,CACEkB,QAASrB,EACTsB,YAAY,IAIhB9B,GAAYe,GAAQA,EAAKN,KAAI,CAACO,EAAGC,IAC/BA,IAAQJ,EAAI,IACPG,EACHJ,OAAQM,EAAOK,QAAU,UAAY,SACrCC,QAASN,EAAOM,SACdR,KAER,CAAE,MAAOS,GACPzB,GAAYe,GAAQA,EAAKN,KAAI,CAACO,EAAGC,IAC/BA,IAAQJ,EAAI,IACPG,EACHJ,OAAQ,SACRY,QAASC,aAAeC,MAAQD,EAAID,QAAU,iBAC5CR,KAER,CACF,CAEAlB,GAAc,GACdI,GAAa,EAAK,GACjB,IASsE6B,MAP3DrC,aAAY,KACxBI,GAAc,GACdE,EAAY,IACZE,GAAa,GACbE,EAAa,UAAU,GACtB,IAGL","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ import type { SearchableServer } from '../utils/fuzzySearch.js';
2
+ export interface CategoryGroup {
3
+ name: string;
4
+ displayName: string;
5
+ servers: SearchableServer[];
6
+ }
7
+ export interface InstalledInfo {
8
+ [serverKey: string]: {
9
+ clients: string[];
10
+ };
11
+ }
12
+ export declare function useServers(): {
13
+ loading: boolean;
14
+ error: string | null;
15
+ servers: SearchableServer[];
16
+ categories: CategoryGroup[];
17
+ installedInfo: InstalledInfo;
18
+ };
@@ -0,0 +1,2 @@
1
+ import{useState,useEffect}from"react";import{serverService}from"../../../services/ServerService.js";import{mcpManager}from"../../../services/MCPManager.js";import{hasLocalFeeds}from"../../../utils/feedUtils.js";export function useServers(){const[e,s]=useState(!0),[t,a]=useState(null),[r,i]=useState([]),[n,o]=useState([]),[c,l]=useState({});return useEffect((()=>{!async function load(){try{await hasLocalFeeds()||await serverService.syncFeeds(),await mcpManager.initialize();const e=await serverService.listServerCategories(),t=[],a=[],r={};for(const s of e){const e=s.feedConfiguration?.mcpServers??[],i=s.installationStatus,n=e.map((e=>({name:e.name,description:e.description,category:s.name,categoryDisplayName:s.displayName||s.name})));if(t.push(...n),n.length>0&&a.push({name:s.name,displayName:s.displayName||s.name,servers:n}),i?.serversStatus)for(const[e,t]of Object.entries(i.serversStatus)){const a=`${s.name}:${e}`,i=[];if(t.installedStatus)for(const[e,s]of Object.entries(t.installedStatus))"completed"===s.status&&i.push(e);i.length>0&&(r[a]={clients:i})}}i(t),o(a),l(r),s(!1)}catch(e){a(e instanceof Error?e.message:"Failed to load servers"),s(!1)}}()}),[]),{loading:e,error:t,servers:r,categories:n,installedInfo:c}}
2
+ //# sourceMappingURL=useServers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","useEffect","serverService","mcpManager","hasLocalFeeds","useServers","loading","setLoading","error","setError","servers","setServers","categories","setCategories","installedInfo","setInstalledInfo","async","load","syncFeeds","initialize","serverCategories","listServerCategories","allServers","categoryGroups","installed","category","mcpServers","feedConfiguration","installationStatus","categoryServers","map","server","name","description","categoryDisplayName","displayName","push","length","serversStatus","serverName","serverStatus","Object","entries","key","installedClients","installedStatus","client","status","clients","err","Error","message"],"sources":["../../../../src/cli/tui/hooks/useServers.ts"],"mappings":"OAASA,SAAUC,cAAiB,eAC3BC,kBAAqB,4CACrBC,eAAkB,yCAClBC,kBAAqB,qCAgBxB,SAAUC,aACd,MAAOC,EAASC,GAAcP,UAAS,IAChCQ,EAAOC,GAAYT,SAAwB,OAC3CU,EAASC,GAAcX,SAA6B,KACpDY,EAAYC,GAAiBb,SAA0B,KACvDc,EAAeC,GAAoBf,SAAwB,IAwElE,OAtEAC,WAAU,MACRe,eAAeC,OACb,UAE2Bb,uBAEjBF,cAAcgB,kBAEhBf,WAAWgB,aAEjB,MAAMC,QAAyBlB,cAAcmB,uBACvCC,EAAiC,GACjCC,EAAkC,GAClCC,EAA2B,GAEjC,IAAK,MAAMC,KAAYL,EAAkB,CACvC,MAAMM,EAAaD,EAASE,mBAAmBD,YAAc,GACvDE,EAAqBH,EAASG,mBAE9BC,EAAsCH,EAAWI,KAAIC,IAAU,CACnEC,KAAMD,EAAOC,KACbC,YAAaF,EAAOE,YACpBR,SAAUA,EAASO,KACnBE,oBAAqBT,EAASU,aAAeV,EAASO,SAcxD,GAXAV,EAAWc,QAAQP,GAEfA,EAAgBQ,OAAS,GAC3Bd,EAAea,KAAK,CAClBJ,KAAMP,EAASO,KACfG,YAAaV,EAASU,aAAeV,EAASO,KAC9CtB,QAASmB,IAKTD,GAAoBU,cACtB,IAAK,MAAOC,EAAYC,KAAiBC,OAAOC,QAAQd,EAAmBU,eAAgB,CACzF,MAAMK,EAAM,GAAGlB,EAASO,QAAQO,IAC1BK,EAA6B,GAEnC,GAAIJ,EAAaK,gBACf,IAAK,MAAOC,EAAQC,KAAWN,OAAOC,QAAQF,EAAaK,iBACnC,cAAlBE,EAAOA,QACTH,EAAiBR,KAAKU,GAKxBF,EAAiBP,OAAS,IAC5Bb,EAAUmB,GAAO,CAAEK,QAASJ,GAEhC,CAEJ,CAEAjC,EAAWW,GACXT,EAAcU,GACdR,EAAiBS,GACjBjB,GAAW,EACb,CAAE,MAAO0C,GACPxC,EAASwC,aAAeC,MAAQD,EAAIE,QAAU,0BAC9C5C,GAAW,EACb,CACF,CAEAU,EAAM,GACL,IAEI,CAAEX,UAASE,QAAOE,UAASE,aAAYE,gBAChD","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ import Fuse from 'fuse.js';
2
+ export interface SearchableServer {
3
+ name: string;
4
+ description: string;
5
+ category: string;
6
+ categoryDisplayName: string;
7
+ }
8
+ export declare function createServerSearcher(servers: SearchableServer[]): Fuse<SearchableServer>;
9
+ export declare function filterServers(servers: SearchableServer[], query: string, searcher: Fuse<SearchableServer>): SearchableServer[];
@@ -0,0 +1,2 @@
1
+ import Fuse from"fuse.js";export function createServerSearcher(e){return new Fuse(e,{keys:["name","description","category"],threshold:.4,ignoreLocation:!0})}export function filterServers(e,r,t){return r.trim()?t.search(r).map((e=>e.item)):e}
2
+ //# sourceMappingURL=fuzzySearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Fuse","createServerSearcher","servers","keys","threshold","ignoreLocation","filterServers","query","searcher","trim","search","map","result","item"],"sources":["../../../../src/cli/tui/utils/fuzzySearch.ts"],"mappings":"OAAOA,SAAU,iBASX,SAAUC,qBAAqBC,GACnC,OAAO,IAAIF,KAAKE,EAAS,CACvBC,KAAM,CAAC,OAAQ,cAAe,YAC9BC,UAAW,GACXC,gBAAgB,GAEpB,QAEM,SAAUC,cACdJ,EACAK,EACAC,GAEA,OAAKD,EAAME,OAGJD,EAASE,OAAOH,GAAOI,KAAIC,GAAUA,EAAOC,OAF1CX,CAGX","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Node.js SDK for Model Context Protocol (MCP)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,6 +34,11 @@
34
34
  "commander": "^11.1.0",
35
35
  "express": "^4.18.2",
36
36
  "extract-zip": "^2.0.1",
37
+ "fuse.js": "^7.1.0",
38
+ "ink": "^5.2.1",
39
+ "ink-spinner": "^5.0.0",
40
+ "ink-text-input": "^6.0.0",
41
+ "react": "^18.3.1",
37
42
  "strip-json-comments": "^5.0.1",
38
43
  "unzipper": "^0.10.14"
39
44
  },
@@ -41,6 +46,7 @@
41
46
  "@types/express": "^4.17.21",
42
47
  "@types/jest": "^29.5.11",
43
48
  "@types/node": "^20.10.5",
49
+ "@types/react": "^18.3.27",
44
50
  "@typescript-eslint/eslint-plugin": "^6.15.0",
45
51
  "@typescript-eslint/parser": "^6.15.0",
46
52
  "eslint": "^8.56.0",