@ken-jo/agent-connector 0.4.97 → 0.4.99
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.
- package/LICENSE +202 -202
- package/NOTICE +6 -6
- package/README.md +604 -596
- package/dist/{action-IPFDPOZU.js → action-5OEM3QC4.js} +17 -16
- package/dist/action-5OEM3QC4.js.map +1 -0
- package/dist/{amazon-q-IT44LEWV.js → amazon-q-7DPVJXJN.js} +6 -6
- package/dist/amazon-q-7DPVJXJN.js.map +1 -0
- package/dist/{amp-CEWOSWQO.js → amp-BQZOL5GR.js} +4 -4
- package/dist/amp-BQZOL5GR.js.map +1 -0
- package/dist/{amp-P35FRU2Z.js → amp-VYXZWHXW.js} +7 -7
- package/dist/amp-VYXZWHXW.js.map +1 -0
- package/dist/{antigravity-LHFEFNMC.js → antigravity-EA4L225L.js} +5 -5
- package/dist/antigravity-EA4L225L.js.map +1 -0
- package/dist/antigravity-VXHL6ZPM.js +18 -0
- package/dist/{antigravity-cli-MOKFSWOU.js → antigravity-cli-B2HXZFYQ.js} +5 -5
- package/dist/antigravity-cli-B2HXZFYQ.js.map +1 -0
- package/dist/{antigravity-cli-MPE27LPI.js → antigravity-cli-JHQ7JGNX.js} +10 -9
- package/dist/antigravity-cli-JHQ7JGNX.js.map +1 -0
- package/dist/{audit-3E5JAOP2.js → audit-BO7JQYIH.js} +8 -8
- package/dist/{chunk-7C2IPIIB.js → chunk-2Y2MZRLP.js} +3 -3
- package/dist/chunk-2Y2MZRLP.js.map +1 -0
- package/dist/{chunk-GZZCHJDP.js → chunk-4KIXXJ7B.js} +2 -2
- package/dist/chunk-4KIXXJ7B.js.map +1 -0
- package/dist/chunk-4NFDNY3C.js +34 -0
- package/dist/chunk-4NFDNY3C.js.map +1 -0
- package/dist/{chunk-C63AAXK7.js → chunk-4QXCNZMD.js} +5 -5
- package/dist/chunk-4QXCNZMD.js.map +1 -0
- package/dist/{chunk-Q7PR2WGT.js → chunk-6TF7MHG5.js} +2 -2
- package/dist/chunk-6TF7MHG5.js.map +1 -0
- package/dist/{chunk-7ZFK2WEO.js → chunk-6WN37NVN.js} +113 -10
- package/dist/chunk-6WN37NVN.js.map +1 -0
- package/dist/{chunk-GCPEPUD7.js → chunk-6XMV2OOA.js} +6 -6
- package/dist/chunk-6XMV2OOA.js.map +1 -0
- package/dist/{chunk-XXLCMSD3.js → chunk-BEFVJ2OE.js} +1 -1
- package/dist/chunk-BEFVJ2OE.js.map +1 -0
- package/dist/{chunk-N4ENLZEU.js → chunk-BV5WK6VQ.js} +19 -19
- package/dist/chunk-BV5WK6VQ.js.map +1 -0
- package/dist/{chunk-WPTNMYYM.js → chunk-BXPSDNIB.js} +6 -6
- package/dist/chunk-BXPSDNIB.js.map +1 -0
- package/dist/{chunk-Q4ISQHUQ.js → chunk-FBJQGRET.js} +1 -1
- package/dist/chunk-FBJQGRET.js.map +1 -0
- package/dist/{chunk-THI4PI4H.js → chunk-FJCUKXGX.js} +2 -2
- package/dist/chunk-FJCUKXGX.js.map +1 -0
- package/dist/{chunk-L2C5UMKW.js → chunk-FKW5A6HE.js} +23 -7
- package/dist/chunk-FKW5A6HE.js.map +1 -0
- package/dist/{chunk-NDMNMAKP.js → chunk-G5HAIYRM.js} +43 -43
- package/dist/chunk-G5HAIYRM.js.map +1 -0
- package/dist/{chunk-SLJI5BOM.js → chunk-GDIAHWNY.js} +2 -2
- package/dist/chunk-GDIAHWNY.js.map +1 -0
- package/dist/{chunk-QYOUQCC6.js → chunk-GZGLCCEE.js} +1 -1
- package/dist/chunk-GZGLCCEE.js.map +1 -0
- package/dist/{chunk-PSGTHJQU.js → chunk-H53QZQJI.js} +1 -1
- package/dist/chunk-H53QZQJI.js.map +1 -0
- package/dist/{chunk-7HHW23AC.js → chunk-IRUYJD23.js} +29 -29
- package/dist/chunk-IRUYJD23.js.map +1 -0
- package/dist/{chunk-IOJDZJ72.js → chunk-IVAWP6HH.js} +2 -2
- package/dist/chunk-IVAWP6HH.js.map +1 -0
- package/dist/{chunk-3FINQ2ZF.js → chunk-JTN3AKZO.js} +30 -20
- package/dist/chunk-JTN3AKZO.js.map +1 -0
- package/dist/{chunk-4GH2KA7V.js → chunk-KHO5WNTP.js} +1 -1
- package/dist/chunk-KHO5WNTP.js.map +1 -0
- package/dist/{chunk-MLU7NDAZ.js → chunk-KLZBRNFP.js} +12 -12
- package/dist/chunk-KLZBRNFP.js.map +1 -0
- package/dist/{chunk-3EP5V2F4.js → chunk-M6OS4OLU.js} +3 -3
- package/dist/chunk-M6OS4OLU.js.map +1 -0
- package/dist/{chunk-UZZTWWGG.js → chunk-MQPNU2CY.js} +1 -1
- package/dist/chunk-MQPNU2CY.js.map +1 -0
- package/dist/{chunk-LQ55E7QI.js → chunk-N4STCQGP.js} +7 -7
- package/dist/chunk-N4STCQGP.js.map +1 -0
- package/dist/{chunk-KFPSJRHR.js → chunk-NBYKLUF6.js} +2 -2
- package/dist/chunk-NBYKLUF6.js.map +1 -0
- package/dist/{chunk-KM2YXO6V.js → chunk-O7SDRBVB.js} +1 -1
- package/dist/chunk-O7SDRBVB.js.map +1 -0
- package/dist/{chunk-LFWYYWLV.js → chunk-OP4KBXUO.js} +1 -1
- package/dist/chunk-OP4KBXUO.js.map +1 -0
- package/dist/{chunk-XN7S44U4.js → chunk-OPXAP3AC.js} +1 -1
- package/dist/chunk-OPXAP3AC.js.map +1 -0
- package/dist/{chunk-TGZFDXNH.js → chunk-PWCBWAM4.js} +6 -4
- package/dist/chunk-PWCBWAM4.js.map +1 -0
- package/dist/{chunk-Y3K6KJMS.js → chunk-QSY74NAP.js} +2 -2
- package/dist/chunk-QSY74NAP.js.map +1 -0
- package/dist/{chunk-ZSOS2KOR.js → chunk-RK6VBLXP.js} +1 -1
- package/dist/chunk-RK6VBLXP.js.map +1 -0
- package/dist/{chunk-FHYR5Q5T.js → chunk-SFY6YLVK.js} +19 -12
- package/dist/chunk-SFY6YLVK.js.map +1 -0
- package/dist/{chunk-C747DYNT.js → chunk-UM5S7DKK.js} +1 -1
- package/dist/chunk-UM5S7DKK.js.map +1 -0
- package/dist/{chunk-ILWHLGIC.js → chunk-UMQ6NBQR.js} +2 -2
- package/dist/chunk-UMQ6NBQR.js.map +1 -0
- package/dist/{chunk-7PSNXUFK.js → chunk-XD7MY6HB.js} +1 -1
- package/dist/chunk-XD7MY6HB.js.map +1 -0
- package/dist/{chunk-XVEJAFKW.js → chunk-XY3N2U6L.js} +5 -5
- package/dist/chunk-XY3N2U6L.js.map +1 -0
- package/dist/{chunk-XZWMJLIT.js → chunk-YT43MUSJ.js} +1 -1
- package/dist/chunk-YT43MUSJ.js.map +1 -0
- package/dist/{claude-code-QBWDT5RT.js → claude-code-LJ6DVXWQ.js} +24 -14
- package/dist/claude-code-LJ6DVXWQ.js.map +1 -0
- package/dist/{claude-code-FS42PXZO.js → claude-code-NMRKTAP7.js} +4 -4
- package/dist/claude-code-NMRKTAP7.js.map +1 -0
- package/dist/cli/sdk.js +7 -7
- package/dist/cli/sdk.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/{cline-JKEAYWVR.js → cline-JAPJNOZQ.js} +6 -6
- package/dist/cline-JAPJNOZQ.js.map +1 -0
- package/dist/{codebuddy-EB6EYPC3.js → codebuddy-GC7VAE2Y.js} +7 -7
- package/dist/codebuddy-GC7VAE2Y.js.map +1 -0
- package/dist/{codebuff-5RSXFU6G.js → codebuff-3VODFPD4.js} +6 -6
- package/dist/codebuff-3VODFPD4.js.map +1 -0
- package/dist/{codebuff-6KWBW6CT.js → codebuff-ETYT5UBL.js} +4 -4
- package/dist/codebuff-ETYT5UBL.js.map +1 -0
- package/dist/{codex-ART46CDD.js → codex-RXIS5BHM.js} +9 -9
- package/dist/codex-RXIS5BHM.js.map +1 -0
- package/dist/{codex-DKBAAUCO.js → codex-YAORPCOD.js} +4 -4
- package/dist/codex-YAORPCOD.js.map +1 -0
- package/dist/{continue-JHZCMSPH.js → continue-MECVDV4Z.js} +8 -8
- package/dist/continue-MECVDV4Z.js.map +1 -0
- package/dist/{copilot-cli-CLBJACQ5.js → copilot-cli-MZTAWMPW.js} +4 -4
- package/dist/copilot-cli-MZTAWMPW.js.map +1 -0
- package/dist/{copilot-cli-QVAU5CFM.js → copilot-cli-WVWAWNSM.js} +7 -7
- package/dist/copilot-cli-WVWAWNSM.js.map +1 -0
- package/dist/{crush-A5C5USRL.js → crush-QBXLNN7T.js} +4 -4
- package/dist/crush-QBXLNN7T.js.map +1 -0
- package/dist/{crush-7TORBYUL.js → crush-YB3SK6NK.js} +7 -7
- package/dist/crush-YB3SK6NK.js.map +1 -0
- package/dist/{cursor-D5SWDVSW.js → cursor-DIW43TRZ.js} +3 -3
- package/dist/cursor-DIW43TRZ.js.map +1 -0
- package/dist/cursor-RSLHA2CY.js +22 -0
- package/dist/{define-connector-DTWb46UB.d.ts → define-connector-odRHEC4H.d.ts} +1 -1
- package/dist/{detect-JHSA3G3U.js → detect-ALP4G7WG.js} +4 -4
- package/dist/detect-ALP4G7WG.js.map +1 -0
- package/dist/{devin-SSR7S4WX.js → devin-WPDN3MXE.js} +7 -7
- package/dist/devin-WPDN3MXE.js.map +1 -0
- package/dist/{doctor-CQJ7TZPA.js → doctor-YEQWCWZJ.js} +27 -26
- package/dist/doctor-YEQWCWZJ.js.map +1 -0
- package/dist/{droid-45PJ7JGF.js → droid-HS6MX3IL.js} +10 -8
- package/dist/droid-HS6MX3IL.js.map +1 -0
- package/dist/{droid-PFQ2PZSF.js → droid-U3ZBLQFO.js} +4 -4
- package/dist/droid-U3ZBLQFO.js.map +1 -0
- package/dist/{gemini-cli-Y6RJMU24.js → gemini-cli-NMVVBO3K.js} +4 -4
- package/dist/gemini-cli-NMVVBO3K.js.map +1 -0
- package/dist/{gemini-cli-24PFDK7D.js → gemini-cli-VJ6X5DNF.js} +8 -8
- package/dist/gemini-cli-VJ6X5DNF.js.map +1 -0
- package/dist/{goose-U5D3LCPC.js → goose-3X7ID7YW.js} +9 -9
- package/dist/goose-3X7ID7YW.js.map +1 -0
- package/dist/{goose-K2HKUTBK.js → goose-64V46Y2W.js} +4 -4
- package/dist/goose-64V46Y2W.js.map +1 -0
- package/dist/{grok-cli-L2MHAPBY.js → grok-cli-4VFVF2CQ.js} +7 -7
- package/dist/grok-cli-4VFVF2CQ.js.map +1 -0
- package/dist/{hermes-2S5JUTTJ.js → hermes-AIVUE7LX.js} +10 -8
- package/dist/hermes-AIVUE7LX.js.map +1 -0
- package/dist/{hermes-MF3NX4ZY.js → hermes-F3EGTK6N.js} +4 -4
- package/dist/hermes-F3EGTK6N.js.map +1 -0
- package/dist/{hook-VHICXHXL.js → hook-F63I3SD5.js} +17 -16
- package/dist/hook-F63I3SD5.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/{install-WLENR4KF.js → install-23WRRFBY.js} +21 -21
- package/dist/install-23WRRFBY.js.map +1 -0
- package/dist/{introspect-dNekqPDY.d.ts → introspect-gTx6GzpW.d.ts} +1 -1
- package/dist/{jetbrains-copilot-Z4FC3RM3.js → jetbrains-copilot-XBO2JZRO.js} +6 -6
- package/dist/jetbrains-copilot-XBO2JZRO.js.map +1 -0
- package/dist/{junie-ULGJJIHB.js → junie-UCOS6Q37.js} +6 -6
- package/dist/junie-UCOS6Q37.js.map +1 -0
- package/dist/{kilo-SMHPOHJ5.js → kilo-SW7BH6EG.js} +4 -4
- package/dist/kilo-SW7BH6EG.js.map +1 -0
- package/dist/{kilo-WWIJOVWD.js → kilo-T4OXNUYY.js} +8 -8
- package/dist/kilo-T4OXNUYY.js.map +1 -0
- package/dist/{kilo-cli-QKE2EQLS.js → kilo-cli-I2S3W245.js} +8 -8
- package/dist/kilo-cli-I2S3W245.js.map +1 -0
- package/dist/{kilo-cli-T2SRRRJS.js → kilo-cli-ZF272ZHN.js} +5 -5
- package/dist/kilo-cli-ZF272ZHN.js.map +1 -0
- package/dist/{kimi-MSIDEMCI.js → kimi-5FHEXGZD.js} +4 -4
- package/dist/kimi-5FHEXGZD.js.map +1 -0
- package/dist/{kimi-JMUFTVSF.js → kimi-VLSUFLYV.js} +7 -7
- package/dist/kimi-VLSUFLYV.js.map +1 -0
- package/dist/{kiro-UWUCRKR3.js → kiro-AQFXGOJX.js} +10 -8
- package/dist/kiro-AQFXGOJX.js.map +1 -0
- package/dist/{kiro-NYRRBIKW.js → kiro-WGOI5CGT.js} +4 -4
- package/dist/kiro-WGOI5CGT.js.map +1 -0
- package/dist/{leaderboard-NJWKGMXP.js → leaderboard-YBD3IKC2.js} +7 -7
- package/dist/leaderboard-YBD3IKC2.js.map +1 -0
- package/dist/{mimo-code-BPNYYIVM.js → mimo-code-KETL7W7D.js} +7 -7
- package/dist/mimo-code-KETL7W7D.js.map +1 -0
- package/dist/{mistral-vibe-LT3DAJ3L.js → mistral-vibe-3AU7N2CA.js} +6 -6
- package/dist/mistral-vibe-3AU7N2CA.js.map +1 -0
- package/dist/{mux-AHNUAY5Z.js → mux-BO2L5CTW.js} +6 -6
- package/dist/mux-BO2L5CTW.js.map +1 -0
- package/dist/{mux-7PIJ7HUQ.js → mux-XM6AP35L.js} +4 -4
- package/dist/mux-XM6AP35L.js.map +1 -0
- package/dist/{nemoclaw-RE5RZASZ.js → nemoclaw-WA7RSKF2.js} +7 -7
- package/dist/nemoclaw-WA7RSKF2.js.map +1 -0
- package/dist/{omp-D2EXEPH7.js → omp-UDYJ2PYY.js} +9 -7
- package/dist/omp-UDYJ2PYY.js.map +1 -0
- package/dist/{open-interpreter-SSGBEUKX.js → open-interpreter-WMBNM4MQ.js} +6 -6
- package/dist/open-interpreter-WMBNM4MQ.js.map +1 -0
- package/dist/openclaw-3DHVHX5P.js +17 -0
- package/dist/{openclaw-KAFTNLR2.js → openclaw-5EQFGOWL.js} +4 -4
- package/dist/openclaw-5EQFGOWL.js.map +1 -0
- package/dist/{opencode-YKUKZY3J.js → opencode-IKMI3RI7.js} +7 -7
- package/dist/opencode-IKMI3RI7.js.map +1 -0
- package/dist/{opencode-Z65JYILL.js → opencode-QGP4ALQY.js} +4 -4
- package/dist/opencode-QGP4ALQY.js.map +1 -0
- package/dist/{openhands-SEZMCUC3.js → openhands-QGXMQR6I.js} +7 -7
- package/dist/openhands-QGXMQR6I.js.map +1 -0
- package/dist/{package-JECVQEFT.js → package-TAUTPP7Z.js} +15 -15
- package/dist/package-TAUTPP7Z.js.map +1 -0
- package/dist/{pi-YPYV2ULH.js → pi-A2HCGRJG.js} +9 -7
- package/dist/pi-A2HCGRJG.js.map +1 -0
- package/dist/{pi-DLKCPOJE.js → pi-GGDQREVG.js} +4 -4
- package/dist/pi-GGDQREVG.js.map +1 -0
- package/dist/{qwen-code-ZHCLCYMC.js → qwen-code-DNQTGJOF.js} +35 -17
- package/dist/qwen-code-DNQTGJOF.js.map +1 -0
- package/dist/{qwen-code-26CSFDX6.js → qwen-code-GQILBJ5B.js} +4 -4
- package/dist/qwen-code-GQILBJ5B.js.map +1 -0
- package/dist/{roo-code-HSAE2CJU.js → roo-code-SUWI4BBN.js} +4 -4
- package/dist/roo-code-SUWI4BBN.js.map +1 -0
- package/dist/{roo-code-7F4HYB34.js → roo-code-VI2ZKTZC.js} +6 -6
- package/dist/roo-code-VI2ZKTZC.js.map +1 -0
- package/dist/runtime/index.d.ts +9 -8
- package/dist/runtime/index.js +15 -14
- package/dist/sdk/index.d.ts +4 -4
- package/dist/sdk/index.js +6 -6
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/test.d.ts +2 -2
- package/dist/sdk/test.js +12 -11
- package/dist/{serve-LYSBH43G.js → serve-6MDLRQS2.js} +17 -16
- package/dist/serve-6MDLRQS2.js.map +1 -0
- package/dist/{status-PHKKGEW5.js → status-IUP75XHP.js} +11 -11
- package/dist/status-IUP75XHP.js.map +1 -0
- package/dist/{statusline-ZDD4OZ4F.js → statusline-PRODZV2J.js} +16 -15
- package/dist/statusline-PRODZV2J.js.map +1 -0
- package/dist/{synthetic-LUT6V6SD.js → synthetic-6FRA7P5Q.js} +4 -4
- package/dist/synthetic-6FRA7P5Q.js.map +1 -0
- package/dist/{telemetry-HDGMI2BK.js → telemetry-X4PLZEDB.js} +10 -10
- package/dist/telemetry-X4PLZEDB.js.map +1 -0
- package/dist/{trae-SIQI3C66.js → trae-CPPYASR2.js} +4 -4
- package/dist/trae-CPPYASR2.js.map +1 -0
- package/dist/{trae-Y67HSDOW.js → trae-VOJXUYRN.js} +6 -6
- package/dist/trae-VOJXUYRN.js.map +1 -0
- package/dist/{types-JyhpJHJa.d.ts → types-DWXnnx-N.d.ts} +96 -22
- package/dist/{uninstall-RWO2GM2I.js → uninstall-BSIJ4QXN.js} +21 -21
- package/dist/uninstall-BSIJ4QXN.js.map +1 -0
- package/dist/{upgrade-YJCXNUEE.js → upgrade-ZSICU3NE.js} +21 -21
- package/dist/upgrade-ZSICU3NE.js.map +1 -0
- package/dist/{usage-IWO4RQN6.js → usage-EQUNVSCT.js} +4 -4
- package/dist/usage-EQUNVSCT.js.map +1 -0
- package/dist/{usage-event-AFFKCLHE.js → usage-event-J5CQ6LNT.js} +16 -15
- package/dist/usage-event-J5CQ6LNT.js.map +1 -0
- package/dist/{vscode-copilot-5CI5B3X6.js → vscode-copilot-ZBXRPKGG.js} +7 -7
- package/dist/vscode-copilot-ZBXRPKGG.js.map +1 -0
- package/dist/{warp-5YBSP7FP.js → warp-NRBBJQR2.js} +4 -4
- package/dist/warp-NRBBJQR2.js.map +1 -0
- package/dist/{warp-INAKVGBV.js → warp-S444B2S3.js} +9 -7
- package/dist/warp-S444B2S3.js.map +1 -0
- package/dist/{windsurf-4HM57QAY.js → windsurf-R6D2JUTN.js} +6 -6
- package/dist/windsurf-R6D2JUTN.js.map +1 -0
- package/dist/{zed-YN5X37PQ.js → zed-DQV3ZUCU.js} +10 -8
- package/dist/zed-DQV3ZUCU.js.map +1 -0
- package/dist/{zed-XXCNYOIN.js → zed-XJFOOKCO.js} +4 -4
- package/dist/zed-XJFOOKCO.js.map +1 -0
- package/package.json +88 -88
- package/dist/action-IPFDPOZU.js.map +0 -1
- package/dist/amazon-q-IT44LEWV.js.map +0 -1
- package/dist/amp-CEWOSWQO.js.map +0 -1
- package/dist/amp-P35FRU2Z.js.map +0 -1
- package/dist/antigravity-LHFEFNMC.js.map +0 -1
- package/dist/antigravity-TWIWXTQH.js +0 -18
- package/dist/antigravity-cli-MOKFSWOU.js.map +0 -1
- package/dist/antigravity-cli-MPE27LPI.js.map +0 -1
- package/dist/chunk-3EP5V2F4.js.map +0 -1
- package/dist/chunk-3FINQ2ZF.js.map +0 -1
- package/dist/chunk-4GH2KA7V.js.map +0 -1
- package/dist/chunk-7C2IPIIB.js.map +0 -1
- package/dist/chunk-7HHW23AC.js.map +0 -1
- package/dist/chunk-7PSNXUFK.js.map +0 -1
- package/dist/chunk-7ZFK2WEO.js.map +0 -1
- package/dist/chunk-C63AAXK7.js.map +0 -1
- package/dist/chunk-C747DYNT.js.map +0 -1
- package/dist/chunk-FHYR5Q5T.js.map +0 -1
- package/dist/chunk-GCPEPUD7.js.map +0 -1
- package/dist/chunk-GZZCHJDP.js.map +0 -1
- package/dist/chunk-ILWHLGIC.js.map +0 -1
- package/dist/chunk-IOJDZJ72.js.map +0 -1
- package/dist/chunk-KFPSJRHR.js.map +0 -1
- package/dist/chunk-KM2YXO6V.js.map +0 -1
- package/dist/chunk-L2C5UMKW.js.map +0 -1
- package/dist/chunk-LFWYYWLV.js.map +0 -1
- package/dist/chunk-LQ55E7QI.js.map +0 -1
- package/dist/chunk-MLU7NDAZ.js.map +0 -1
- package/dist/chunk-N4ENLZEU.js.map +0 -1
- package/dist/chunk-NDMNMAKP.js.map +0 -1
- package/dist/chunk-PSGTHJQU.js.map +0 -1
- package/dist/chunk-Q4ISQHUQ.js.map +0 -1
- package/dist/chunk-Q7PR2WGT.js.map +0 -1
- package/dist/chunk-QYOUQCC6.js.map +0 -1
- package/dist/chunk-SLJI5BOM.js.map +0 -1
- package/dist/chunk-TGZFDXNH.js.map +0 -1
- package/dist/chunk-THI4PI4H.js.map +0 -1
- package/dist/chunk-UZZTWWGG.js.map +0 -1
- package/dist/chunk-WPTNMYYM.js.map +0 -1
- package/dist/chunk-XN7S44U4.js.map +0 -1
- package/dist/chunk-XVEJAFKW.js.map +0 -1
- package/dist/chunk-XXLCMSD3.js.map +0 -1
- package/dist/chunk-XZWMJLIT.js.map +0 -1
- package/dist/chunk-Y3K6KJMS.js.map +0 -1
- package/dist/chunk-ZSOS2KOR.js.map +0 -1
- package/dist/claude-code-FS42PXZO.js.map +0 -1
- package/dist/claude-code-QBWDT5RT.js.map +0 -1
- package/dist/cline-JKEAYWVR.js.map +0 -1
- package/dist/codebuddy-EB6EYPC3.js.map +0 -1
- package/dist/codebuff-5RSXFU6G.js.map +0 -1
- package/dist/codebuff-6KWBW6CT.js.map +0 -1
- package/dist/codex-ART46CDD.js.map +0 -1
- package/dist/codex-DKBAAUCO.js.map +0 -1
- package/dist/continue-JHZCMSPH.js.map +0 -1
- package/dist/copilot-cli-CLBJACQ5.js.map +0 -1
- package/dist/copilot-cli-QVAU5CFM.js.map +0 -1
- package/dist/crush-7TORBYUL.js.map +0 -1
- package/dist/crush-A5C5USRL.js.map +0 -1
- package/dist/cursor-D5SWDVSW.js.map +0 -1
- package/dist/cursor-W7I4QUFO.js +0 -22
- package/dist/detect-JHSA3G3U.js.map +0 -1
- package/dist/devin-SSR7S4WX.js.map +0 -1
- package/dist/doctor-CQJ7TZPA.js.map +0 -1
- package/dist/droid-45PJ7JGF.js.map +0 -1
- package/dist/droid-PFQ2PZSF.js.map +0 -1
- package/dist/gemini-cli-24PFDK7D.js.map +0 -1
- package/dist/gemini-cli-Y6RJMU24.js.map +0 -1
- package/dist/goose-K2HKUTBK.js.map +0 -1
- package/dist/goose-U5D3LCPC.js.map +0 -1
- package/dist/grok-cli-L2MHAPBY.js.map +0 -1
- package/dist/hermes-2S5JUTTJ.js.map +0 -1
- package/dist/hermes-MF3NX4ZY.js.map +0 -1
- package/dist/hook-VHICXHXL.js.map +0 -1
- package/dist/install-WLENR4KF.js.map +0 -1
- package/dist/jetbrains-copilot-Z4FC3RM3.js.map +0 -1
- package/dist/junie-ULGJJIHB.js.map +0 -1
- package/dist/kilo-SMHPOHJ5.js.map +0 -1
- package/dist/kilo-WWIJOVWD.js.map +0 -1
- package/dist/kilo-cli-QKE2EQLS.js.map +0 -1
- package/dist/kilo-cli-T2SRRRJS.js.map +0 -1
- package/dist/kimi-JMUFTVSF.js.map +0 -1
- package/dist/kimi-MSIDEMCI.js.map +0 -1
- package/dist/kiro-NYRRBIKW.js.map +0 -1
- package/dist/kiro-UWUCRKR3.js.map +0 -1
- package/dist/leaderboard-NJWKGMXP.js.map +0 -1
- package/dist/mimo-code-BPNYYIVM.js.map +0 -1
- package/dist/mistral-vibe-LT3DAJ3L.js.map +0 -1
- package/dist/mux-7PIJ7HUQ.js.map +0 -1
- package/dist/mux-AHNUAY5Z.js.map +0 -1
- package/dist/nemoclaw-RE5RZASZ.js.map +0 -1
- package/dist/omp-D2EXEPH7.js.map +0 -1
- package/dist/open-interpreter-SSGBEUKX.js.map +0 -1
- package/dist/openclaw-IJ33K45M.js +0 -17
- package/dist/openclaw-KAFTNLR2.js.map +0 -1
- package/dist/opencode-YKUKZY3J.js.map +0 -1
- package/dist/opencode-Z65JYILL.js.map +0 -1
- package/dist/openhands-SEZMCUC3.js.map +0 -1
- package/dist/package-JECVQEFT.js.map +0 -1
- package/dist/pi-DLKCPOJE.js.map +0 -1
- package/dist/pi-YPYV2ULH.js.map +0 -1
- package/dist/qwen-code-26CSFDX6.js.map +0 -1
- package/dist/qwen-code-ZHCLCYMC.js.map +0 -1
- package/dist/roo-code-7F4HYB34.js.map +0 -1
- package/dist/roo-code-HSAE2CJU.js.map +0 -1
- package/dist/serve-LYSBH43G.js.map +0 -1
- package/dist/status-PHKKGEW5.js.map +0 -1
- package/dist/statusline-ZDD4OZ4F.js.map +0 -1
- package/dist/synthetic-LUT6V6SD.js.map +0 -1
- package/dist/telemetry-HDGMI2BK.js.map +0 -1
- package/dist/trae-SIQI3C66.js.map +0 -1
- package/dist/trae-Y67HSDOW.js.map +0 -1
- package/dist/uninstall-RWO2GM2I.js.map +0 -1
- package/dist/upgrade-YJCXNUEE.js.map +0 -1
- package/dist/usage-IWO4RQN6.js.map +0 -1
- package/dist/usage-event-AFFKCLHE.js.map +0 -1
- package/dist/vscode-copilot-5CI5B3X6.js.map +0 -1
- package/dist/warp-5YBSP7FP.js.map +0 -1
- package/dist/warp-INAKVGBV.js.map +0 -1
- package/dist/windsurf-4HM57QAY.js.map +0 -1
- package/dist/zed-XXCNYOIN.js.map +0 -1
- package/dist/zed-YN5X37PQ.js.map +0 -1
- /package/dist/{antigravity-TWIWXTQH.js.map → antigravity-VXHL6ZPM.js.map} +0 -0
- /package/dist/{audit-3E5JAOP2.js.map → audit-BO7JQYIH.js.map} +0 -0
- /package/dist/{cursor-W7I4QUFO.js.map → cursor-RSLHA2CY.js.map} +0 -0
- /package/dist/{openclaw-IJ33K45M.js.map → openclaw-3DHVHX5P.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1,226 +1,226 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="site/public/mascot.png" alt="agent-connector mascot — a pixel-art lobster worker in a tool belt" width="160" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# agent-connector
|
|
6
|
-
|
|
7
|
-
### Deploy one MCP to every agent CLI.
|
|
8
|
-
|
|
9
|
-
Write your server + hooks once with `defineConnector()`, then `install` it into
|
|
10
|
-
the native config — or `package` it as a real plugin — across every detected agent CLI
|
|
11
|
-
(Claude Code, Codex, Cursor, Copilot, Gemini, OpenCode, Warp, Zed…).
|
|
12
|
-
|
|
13
|
-
[](https://www.npmjs.com/package/@ken-jo/agent-connector)
|
|
14
|
-
[](LICENSE)
|
|
15
|
-
[](https://agent-connector.ai/coverage)
|
|
16
|
-

|
|
17
|
-

|
|
18
|
-
[](https://agent-connector.ai/coverage)
|
|
19
|
-
[](https://agent-connector.ai/coverage)
|
|
20
|
-

|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
**Two audiences:** connector developers start at [Quick start](#quick-start);
|
|
24
|
-
if you already run an agent CLI and just want token totals, jump straight to
|
|
25
|
-
[`usage`](#token-telemetry--usage).
|
|
26
|
-
|
|
27
|
-
- [Quick start](#quick-start) — depend on the SDK, declare a connector, install it
|
|
28
|
-
- [Ship it](#ship-it-direct-install-or-a-marketplace-plugin) — direct install or a marketplace plugin
|
|
29
|
-
- [What you define once](#what-you-define-once) — server, hooks, and the other surfaces
|
|
30
|
-
- [How it works](#how-it-works) — single home binary, per-project data, hook paradigms
|
|
31
|
-
- [CLI](#cli) — every command at a glance
|
|
32
|
-
- [Token telemetry & usage](#token-telemetry--usage) — per-tool telemetry vs. connector-free `usage`
|
|
33
|
-
- [Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem) — emit the official MCP standard artifacts
|
|
34
|
-
- [Verification](#verification) — how the platform coverage contract is proven
|
|
35
|
-
|
|
36
|
-
<p align="center">
|
|
37
|
-
<a href="examples/showcase-demo/">
|
|
38
|
-
<img src="examples/showcase-demo/demo.gif" width="820"
|
|
39
|
-
alt="agent-connector showcase: define a connector once, ship it as your own branded CLI, install it via each host's native marketplace, and drive every CLI with one command." />
|
|
40
|
-
</a>
|
|
41
|
-
</p>
|
|
42
|
-
|
|
43
|
-
<p align="center"><sub>
|
|
44
|
-
Define once → ship it as your own branded CLI → users install via their host's native marketplace → one command drives every CLI.
|
|
45
|
-
<a href="examples/showcase-demo/">Regenerate this demo.</a>
|
|
46
|
-
</sub></p>
|
|
47
|
-
|
|
48
|
-
## Quick start
|
|
49
|
-
|
|
50
|
-
agent-connector is an **SDK connector developers depend on**. Add it to the
|
|
51
|
-
package that holds your connector, declare the connector once, then ship a
|
|
52
|
-
branded MCP package/bin such as `npx @acme/acme-db-mcp install` — it deploys to
|
|
53
|
-
every detected agent CLI in that host's own native config. Installing
|
|
54
|
-
`@ken-jo/agent-connector` globally is not the branded MCP lifecycle path; reserve
|
|
55
|
-
the global CLI guidance for connector-free token usage reports. Framework
|
|
56
|
-
artifact tooling stays developer-facing and normally runs through
|
|
57
|
-
`npx @ken-jo/agent-connector ... --connector`. The linear path is:
|
|
58
|
-
**get a server → declare it → install through your branded package**.
|
|
59
|
-
|
|
60
|
-
**0. You need an MCP server file first.** The config below points at
|
|
61
|
-
`./my-mcp-server.mjs`, so that file must exist before you install. Don't have an
|
|
62
|
-
MCP server yet? Copy
|
|
63
|
-
[`examples/acme-db/acme-db-mcp-server.mjs`](examples/acme-db/acme-db-mcp-server.mjs)
|
|
64
|
-
(a self-contained ~35-line stub) as `./my-mcp-server.mjs`, or follow the
|
|
65
|
-
[official MCP SDK quickstart](https://modelcontextprotocol.io/quickstart/server).
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# 1. add agent-connector as a DEPENDENCY of your connector package
|
|
69
|
-
npm install @ken-jo/agent-connector
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
```jsonc
|
|
73
|
-
// 2. package.json — this is the user-facing package identity
|
|
74
|
-
{
|
|
75
|
-
"name": "@acme/acme-db-mcp",
|
|
76
|
-
"mcpName": "io.github.acme/acme-db",
|
|
77
|
-
"bin": { "acme-db": "./bin.mjs" },
|
|
78
|
-
"dependencies": { "@ken-jo/agent-connector": "^0.4.
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
```js
|
|
83
|
-
// 3. agent-connector.config.mjs — declare your server + hooks once
|
|
84
|
-
import { fileURLToPath } from "node:url";
|
|
85
|
-
import { defineConnector } from "@ken-jo/agent-connector/sdk";
|
|
86
|
-
|
|
87
|
-
const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
|
|
88
|
-
|
|
89
|
-
export default defineConnector({
|
|
90
|
-
// package.json / npm metadata is the source of truth. The host alias/runtime
|
|
91
|
-
// id and connector version are derived from name/mcpName/bin/version unless
|
|
92
|
-
// you need a legacy or multi-instance alias. Host-native ids are generated
|
|
93
|
-
// during install, so do not copy them back into defineConnector({ id }).
|
|
94
|
-
server: {
|
|
95
|
-
transport: "stdio",
|
|
96
|
-
command: "node",
|
|
97
|
-
args: [serverPath],
|
|
98
|
-
},
|
|
99
|
-
// hooks, telemetry, and more surfaces — see "What you define once" below
|
|
100
|
-
});
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
The wiring contract is:
|
|
104
|
-
|
|
105
|
-
1. `package.json` defines the public product identity (`name`, `mcpName`, `bin`,
|
|
106
|
-
`version`).
|
|
107
|
-
2. `bin.mjs` calls `createConnectorCli({ packageJson, connector })` so every
|
|
108
|
-
install/doctor/upgrade/uninstall command runs under the developer's brand.
|
|
109
|
-
3. `agent-connector.config.*` uses `defineConnector({ server, ...surfaces })` to
|
|
110
|
-
describe the real MCP launch shape or remote endpoint.
|
|
111
|
-
4. `install` renders that single declaration into each detected host's native
|
|
112
|
-
MCP config. For stdio processes, the host points at the stable
|
|
113
|
-
agent-connector home binary, which launches the real command and can measure
|
|
114
|
-
per-tool traffic. For remote HTTP servers, the host receives the URL where
|
|
115
|
-
supported; there is no stdio process to wrap.
|
|
116
|
-
|
|
117
|
-
### Command boundary
|
|
118
|
-
|
|
119
|
-
Keep the two command layers separate:
|
|
120
|
-
|
|
121
|
-
| Layer | Who runs it | Examples | Purpose |
|
|
122
|
-
| --- | --- | --- | --- |
|
|
123
|
-
| Branded MCP lifecycle | Users of your MCP package | `npx @acme/acme-db-mcp install`, `acme-db doctor --probe`, `acme-db upgrade`, `acme-db uninstall`, `acme-db telemetry report --by tool` | Install, verify, update, remove, and inspect telemetry for **your MCP**. |
|
|
124
|
-
| Framework tooling | MCP package developers | `npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs` | Emit host plugin bundles and MCP distribution artifacts from a connector config. |
|
|
125
|
-
| Connector-free user telemetry | Agent-CLI users with no MCP package | `npx @ken-jo/agent-connector usage report --by platform` | Read host CLI logs read-only for whole-conversation token totals. |
|
|
126
|
-
|
|
127
|
-
If a command operates the MCP after it is authored, prefer the branded package/bin.
|
|
128
|
-
If a command builds framework distribution artifacts, use the framework CLI.
|
|
129
|
-
|
|
130
|
-
### MCP server launch examples
|
|
131
|
-
|
|
132
|
-
Pick the `server` shape that matches the MCP you are building. The wrapper
|
|
133
|
-
package identity still comes from `package.json`; these examples only describe
|
|
134
|
-
how to start or connect to the actual MCP server.
|
|
135
|
-
|
|
136
|
-
| Shape | Use when | Minimal launch |
|
|
137
|
-
| --- | --- | --- |
|
|
138
|
-
| Package-runner MCP | The MCP is published as a package. | `npx -y @acme/acme-db-mcp` |
|
|
139
|
-
| Local server-process MCP | The MCP server ships inside your package. | `node ./my-mcp-server.mjs` |
|
|
140
|
-
| Python MCP | The MCP server is Python and should resolve runtime deps at launch. | `uv run --with mcp ./my_mcp_server.py` |
|
|
141
|
-
| CLI-based MCP | An existing executable exposes an MCP serving mode. | `local-tools mcp serve` |
|
|
142
|
-
| Remote server MCP | The MCP is hosted behind an HTTP endpoint. | `https://mcp.example.com/mcp` |
|
|
143
|
-
|
|
144
|
-
Each snippet below is the `server` field for `defineConnector({ ... })`; only
|
|
145
|
-
the local server-process example needs the `serverPath` helper shown inline.
|
|
146
|
-
|
|
147
|
-
**Package-runner MCP** — a published package that should be launched with `npx`:
|
|
148
|
-
|
|
149
|
-
```js
|
|
150
|
-
server: {
|
|
151
|
-
transport: "stdio",
|
|
152
|
-
command: "npx",
|
|
153
|
-
args: ["-y", "@acme/acme-db-mcp"],
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
**Local server-process MCP** — a bundled server file or binary:
|
|
158
|
-
|
|
159
|
-
```js
|
|
160
|
-
import { fileURLToPath } from "node:url";
|
|
161
|
-
|
|
162
|
-
const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
|
|
163
|
-
|
|
164
|
-
server: {
|
|
165
|
-
transport: "stdio",
|
|
166
|
-
command: "node",
|
|
167
|
-
args: [serverPath],
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Python MCP** — usually run through `uv` so dependencies are resolved with the
|
|
172
|
-
server:
|
|
173
|
-
|
|
174
|
-
```js
|
|
175
|
-
server: {
|
|
176
|
-
transport: "stdio",
|
|
177
|
-
command: "uv",
|
|
178
|
-
args: ["run", "--with", "mcp", "./my_mcp_server.py"],
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Use direct `python ./my_mcp_server.py` only when the runtime environment is
|
|
183
|
-
already managed by your package or deployment wrapper.
|
|
184
|
-
|
|
185
|
-
**CLI-based MCP** — an existing executable exposes an MCP mode:
|
|
186
|
-
|
|
187
|
-
```js
|
|
188
|
-
server: {
|
|
189
|
-
transport: "stdio",
|
|
190
|
-
command: "local-tools",
|
|
191
|
-
args: ["mcp", "serve"],
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**Remote server MCP** — a hosted MCP endpoint:
|
|
196
|
-
|
|
197
|
-
```js
|
|
198
|
-
server: {
|
|
199
|
-
transport: "http",
|
|
200
|
-
url: "https://mcp.example.com/mcp",
|
|
201
|
-
}
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
```bash
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="site/public/mascot.png" alt="agent-connector mascot — a pixel-art lobster worker in a tool belt" width="160" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# agent-connector
|
|
6
|
+
|
|
7
|
+
### Deploy one MCP to every agent CLI.
|
|
8
|
+
|
|
9
|
+
Write your server + hooks once with `defineConnector()`, then `install` it into
|
|
10
|
+
the native config — or `package` it as a real plugin — across every detected agent CLI
|
|
11
|
+
(Claude Code, Codex, Cursor, Copilot, Gemini, OpenCode, Warp, Zed…).
|
|
12
|
+
|
|
13
|
+
[](https://www.npmjs.com/package/@ken-jo/agent-connector)
|
|
14
|
+
[](LICENSE)
|
|
15
|
+
[](https://agent-connector.ai/coverage)
|
|
16
|
+

|
|
17
|
+

|
|
18
|
+
[](https://agent-connector.ai/coverage)
|
|
19
|
+
[](https://agent-connector.ai/coverage)
|
|
20
|
+

|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
**Two audiences:** connector developers start at [Quick start](#quick-start);
|
|
24
|
+
if you already run an agent CLI and just want token totals, jump straight to
|
|
25
|
+
[`usage`](#token-telemetry--usage).
|
|
26
|
+
|
|
27
|
+
- [Quick start](#quick-start) — depend on the SDK, declare a connector, install it
|
|
28
|
+
- [Ship it](#ship-it-direct-install-or-a-marketplace-plugin) — direct install or a marketplace plugin
|
|
29
|
+
- [What you define once](#what-you-define-once) — server, hooks, and the other surfaces
|
|
30
|
+
- [How it works](#how-it-works) — single home binary, per-project data, hook paradigms
|
|
31
|
+
- [CLI](#cli) — every command at a glance
|
|
32
|
+
- [Token telemetry & usage](#token-telemetry--usage) — per-tool telemetry vs. connector-free `usage`
|
|
33
|
+
- [Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem) — emit the official MCP standard artifacts
|
|
34
|
+
- [Verification](#verification) — how the platform coverage contract is proven
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<a href="examples/showcase-demo/">
|
|
38
|
+
<img src="examples/showcase-demo/demo.gif" width="820"
|
|
39
|
+
alt="agent-connector showcase: define a connector once, ship it as your own branded CLI, install it via each host's native marketplace, and drive every CLI with one command." />
|
|
40
|
+
</a>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
<p align="center"><sub>
|
|
44
|
+
Define once → ship it as your own branded CLI → users install via their host's native marketplace → one command drives every CLI.
|
|
45
|
+
<a href="examples/showcase-demo/">Regenerate this demo.</a>
|
|
46
|
+
</sub></p>
|
|
47
|
+
|
|
48
|
+
## Quick start
|
|
49
|
+
|
|
50
|
+
agent-connector is an **SDK connector developers depend on**. Add it to the
|
|
51
|
+
package that holds your connector, declare the connector once, then ship a
|
|
52
|
+
branded MCP package/bin such as `npx @acme/acme-db-mcp install` — it deploys to
|
|
53
|
+
every detected agent CLI in that host's own native config. Installing
|
|
54
|
+
`@ken-jo/agent-connector` globally is not the branded MCP lifecycle path; reserve
|
|
55
|
+
the global CLI guidance for connector-free token usage reports. Framework
|
|
56
|
+
artifact tooling stays developer-facing and normally runs through
|
|
57
|
+
`npx @ken-jo/agent-connector ... --connector`. The linear path is:
|
|
58
|
+
**get a server → declare it → install through your branded package**.
|
|
59
|
+
|
|
60
|
+
**0. You need an MCP server file first.** The config below points at
|
|
61
|
+
`./my-mcp-server.mjs`, so that file must exist before you install. Don't have an
|
|
62
|
+
MCP server yet? Copy
|
|
63
|
+
[`examples/acme-db/acme-db-mcp-server.mjs`](examples/acme-db/acme-db-mcp-server.mjs)
|
|
64
|
+
(a self-contained ~35-line stub) as `./my-mcp-server.mjs`, or follow the
|
|
65
|
+
[official MCP SDK quickstart](https://modelcontextprotocol.io/quickstart/server).
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# 1. add agent-connector as a DEPENDENCY of your connector package
|
|
69
|
+
npm install @ken-jo/agent-connector
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```jsonc
|
|
73
|
+
// 2. package.json — this is the user-facing package identity
|
|
74
|
+
{
|
|
75
|
+
"name": "@acme/acme-db-mcp",
|
|
76
|
+
"mcpName": "io.github.acme/acme-db",
|
|
77
|
+
"bin": { "acme-db": "./bin.mjs" },
|
|
78
|
+
"dependencies": { "@ken-jo/agent-connector": "^0.4.99" }
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
// 3. agent-connector.config.mjs — declare your server + hooks once
|
|
84
|
+
import { fileURLToPath } from "node:url";
|
|
85
|
+
import { defineConnector } from "@ken-jo/agent-connector/sdk";
|
|
86
|
+
|
|
87
|
+
const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
|
|
88
|
+
|
|
89
|
+
export default defineConnector({
|
|
90
|
+
// package.json / npm metadata is the source of truth. The host alias/runtime
|
|
91
|
+
// id and connector version are derived from name/mcpName/bin/version unless
|
|
92
|
+
// you need a legacy or multi-instance alias. Host-native ids are generated
|
|
93
|
+
// during install, so do not copy them back into defineConnector({ id }).
|
|
94
|
+
server: {
|
|
95
|
+
transport: "stdio",
|
|
96
|
+
command: "node",
|
|
97
|
+
args: [serverPath],
|
|
98
|
+
},
|
|
99
|
+
// hooks, telemetry, and more surfaces — see "What you define once" below
|
|
100
|
+
});
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The wiring contract is:
|
|
104
|
+
|
|
105
|
+
1. `package.json` defines the public product identity (`name`, `mcpName`, `bin`,
|
|
106
|
+
`version`).
|
|
107
|
+
2. `bin.mjs` calls `createConnectorCli({ packageJson, connector })` so every
|
|
108
|
+
install/doctor/upgrade/uninstall command runs under the developer's brand.
|
|
109
|
+
3. `agent-connector.config.*` uses `defineConnector({ server, ...surfaces })` to
|
|
110
|
+
describe the real MCP launch shape or remote endpoint.
|
|
111
|
+
4. `install` renders that single declaration into each detected host's native
|
|
112
|
+
MCP config. For stdio processes, the host points at the stable
|
|
113
|
+
agent-connector home binary, which launches the real command and can measure
|
|
114
|
+
per-tool traffic. For remote HTTP servers, the host receives the URL where
|
|
115
|
+
supported; there is no stdio process to wrap.
|
|
116
|
+
|
|
117
|
+
### Command boundary
|
|
118
|
+
|
|
119
|
+
Keep the two command layers separate:
|
|
120
|
+
|
|
121
|
+
| Layer | Who runs it | Examples | Purpose |
|
|
122
|
+
| --- | --- | --- | --- |
|
|
123
|
+
| Branded MCP lifecycle | Users of your MCP package | `npx @acme/acme-db-mcp install`, `acme-db doctor --probe`, `acme-db upgrade`, `acme-db uninstall`, `acme-db telemetry report --by tool` | Install, verify, update, remove, and inspect telemetry for **your MCP**. |
|
|
124
|
+
| Framework tooling | MCP package developers | `npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs` | Emit host plugin bundles and MCP distribution artifacts from a connector config. |
|
|
125
|
+
| Connector-free user telemetry | Agent-CLI users with no MCP package | `npx @ken-jo/agent-connector usage report --by platform` | Read host CLI logs read-only for whole-conversation token totals. |
|
|
126
|
+
|
|
127
|
+
If a command operates the MCP after it is authored, prefer the branded package/bin.
|
|
128
|
+
If a command builds framework distribution artifacts, use the framework CLI.
|
|
129
|
+
|
|
130
|
+
### MCP server launch examples
|
|
131
|
+
|
|
132
|
+
Pick the `server` shape that matches the MCP you are building. The wrapper
|
|
133
|
+
package identity still comes from `package.json`; these examples only describe
|
|
134
|
+
how to start or connect to the actual MCP server.
|
|
135
|
+
|
|
136
|
+
| Shape | Use when | Minimal launch |
|
|
137
|
+
| --- | --- | --- |
|
|
138
|
+
| Package-runner MCP | The MCP is published as a package. | `npx -y @acme/acme-db-mcp` |
|
|
139
|
+
| Local server-process MCP | The MCP server ships inside your package. | `node ./my-mcp-server.mjs` |
|
|
140
|
+
| Python MCP | The MCP server is Python and should resolve runtime deps at launch. | `uv run --with mcp ./my_mcp_server.py` |
|
|
141
|
+
| CLI-based MCP | An existing executable exposes an MCP serving mode. | `local-tools mcp serve` |
|
|
142
|
+
| Remote server MCP | The MCP is hosted behind an HTTP endpoint. | `https://mcp.example.com/mcp` |
|
|
143
|
+
|
|
144
|
+
Each snippet below is the `server` field for `defineConnector({ ... })`; only
|
|
145
|
+
the local server-process example needs the `serverPath` helper shown inline.
|
|
146
|
+
|
|
147
|
+
**Package-runner MCP** — a published package that should be launched with `npx`:
|
|
148
|
+
|
|
149
|
+
```js
|
|
150
|
+
server: {
|
|
151
|
+
transport: "stdio",
|
|
152
|
+
command: "npx",
|
|
153
|
+
args: ["-y", "@acme/acme-db-mcp"],
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Local server-process MCP** — a bundled server file or binary:
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
import { fileURLToPath } from "node:url";
|
|
161
|
+
|
|
162
|
+
const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
|
|
163
|
+
|
|
164
|
+
server: {
|
|
165
|
+
transport: "stdio",
|
|
166
|
+
command: "node",
|
|
167
|
+
args: [serverPath],
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Python MCP** — usually run through `uv` so dependencies are resolved with the
|
|
172
|
+
server:
|
|
173
|
+
|
|
174
|
+
```js
|
|
175
|
+
server: {
|
|
176
|
+
transport: "stdio",
|
|
177
|
+
command: "uv",
|
|
178
|
+
args: ["run", "--with", "mcp", "./my_mcp_server.py"],
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Use direct `python ./my_mcp_server.py` only when the runtime environment is
|
|
183
|
+
already managed by your package or deployment wrapper.
|
|
184
|
+
|
|
185
|
+
**CLI-based MCP** — an existing executable exposes an MCP mode:
|
|
186
|
+
|
|
187
|
+
```js
|
|
188
|
+
server: {
|
|
189
|
+
transport: "stdio",
|
|
190
|
+
command: "local-tools",
|
|
191
|
+
args: ["mcp", "serve"],
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Remote server MCP** — a hosted MCP endpoint:
|
|
196
|
+
|
|
197
|
+
```js
|
|
198
|
+
server: {
|
|
199
|
+
transport: "http",
|
|
200
|
+
url: "https://mcp.example.com/mcp",
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
205
|
# 4. deploy under your branded MCP package/bin
|
|
206
206
|
npx @acme/acme-db-mcp detect # which platforms are installed here?
|
|
207
207
|
npx @acme/acme-db-mcp audit # catch package/bin/connector identity drift
|
|
208
208
|
npx @acme/acme-db-mcp install --dry-run # preview every change first
|
|
209
209
|
npx @acme/acme-db-mcp install # write native config in each host
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
> `install` targets only the hosts actually **detected** on this machine (or an
|
|
213
|
-
> explicit `--targets` / `connector.targets` list), intersected with the
|
|
214
|
-
> current adapter registry shown on [`/coverage`](https://agent-connector.ai/coverage)
|
|
215
|
-
> — there is no "install to every host unconditionally" path.
|
|
216
|
-
> `@ken-jo/agent-connector` is the framework dependency underneath; use it
|
|
217
|
-
> directly for framework packaging/debugging or connector-free token telemetry,
|
|
218
|
-
> not as the foreground install brand for your users.
|
|
219
|
-
|
|
220
|
-
## Ship it: direct install or a marketplace plugin
|
|
221
|
-
|
|
222
|
-
Same one definition, your choice of distribution.
|
|
223
|
-
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
> `install` targets only the hosts actually **detected** on this machine (or an
|
|
213
|
+
> explicit `--targets` / `connector.targets` list), intersected with the
|
|
214
|
+
> current adapter registry shown on [`/coverage`](https://agent-connector.ai/coverage)
|
|
215
|
+
> — there is no "install to every host unconditionally" path.
|
|
216
|
+
> `@ken-jo/agent-connector` is the framework dependency underneath; use it
|
|
217
|
+
> directly for framework packaging/debugging or connector-free token telemetry,
|
|
218
|
+
> not as the foreground install brand for your users.
|
|
219
|
+
|
|
220
|
+
## Ship it: direct install or a marketplace plugin
|
|
221
|
+
|
|
222
|
+
Same one definition, your choice of distribution.
|
|
223
|
+
|
|
224
224
|
**Direct install** — your branded command (`acme-db install`,
|
|
225
225
|
`npx @acme/acme-db-mcp install`) writes each host's native MCP + hook +
|
|
226
226
|
content-surface config in place, with no per-platform marketplace submission or
|
|
@@ -230,388 +230,396 @@ Framework fallback can also install a connector source directly when you are
|
|
|
230
230
|
testing distribution intake: `github:owner/repo`, `npm:@scope/package@version`,
|
|
231
231
|
or an `archive:` / direct `.tgz` source. Every fetched source is cached under
|
|
232
232
|
`~/.agent-connector/sources/` and must contain `agent-connector.config.*`.
|
|
233
|
-
|
|
234
|
-
**Marketplace plugin** — the framework `package` command turns the connector
|
|
235
|
-
into a real plugin/extension bundle (manifest + bundled commands, agents,
|
|
236
|
-
skills, hooks, MCP) from one definition. This is framework tooling, so run it
|
|
237
|
-
with `npx @ken-jo/agent-connector package --connector ...`. If you already keep
|
|
238
|
-
the framework CLI installed globally, `agent-connector package --connector ...`
|
|
239
|
-
is only the shorter equivalent. Hooks + MCP keep the
|
|
240
|
-
telemetry serve-wrapper, so a marketplace-installed connector still reports
|
|
241
|
-
per-tool tokens for its stdio server. `--format all` emits **10 host formats**:
|
|
242
|
-
|
|
243
|
-
| Format | Hosts |
|
|
244
|
-
|---|---|
|
|
245
|
-
| `claude-plugin` | Claude Code · Codex · VS Code Copilot · OpenClaw · OMP |
|
|
246
|
-
| `codex-plugin` | Codex (`.codex-plugin/` manifest variant) |
|
|
247
|
-
| `copilot-plugin` | GitHub Copilot CLI |
|
|
248
|
-
| `factory-plugin` | Droid |
|
|
249
|
-
| `gemini-extension` | Gemini CLI |
|
|
250
|
-
| `qwen-extension` | Qwen Code |
|
|
251
|
-
| `agy-plugin` | Antigravity (CLI + IDE) |
|
|
252
|
-
| `cursor-plugin` | Cursor |
|
|
253
|
-
| `kimi-plugin` | Kimi CLI |
|
|
254
|
-
| `npm-plugin` | OpenCode · Kilo CLI · Pi |
|
|
255
|
-
|
|
256
|
-
Two official **MCP standard artifacts** are opt-in (they need a `publish` block,
|
|
257
|
-
so they're excluded from `--format all`) — `mcp-server-json` (an MCP Registry
|
|
258
|
-
`server.json`) and `mcpb` (a one-click MCPB bundle); see
|
|
259
|
-
[Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem).
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
# emit every host format (mcp-server-json + mcpb are opt-in by name)
|
|
263
|
-
npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
|
|
264
|
-
npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format gemini-extension --out ./ext # or just one
|
|
265
|
-
|
|
266
|
-
# if you already keep the framework CLI globally installed, the same command is:
|
|
267
|
-
agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
|
|
268
|
-
|
|
269
|
-
# e.g. Claude Code: /plugin marketplace add ./dist-plugin/claude-plugin
|
|
270
|
-
# /plugin install <connector-id>@agent-connector
|
|
271
|
-
# e.g. Gemini CLI: gemini extensions install ./dist-plugin/gemini-extension/<id>
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
> **Embedded-path caveat.** Most host bundles bake in the absolute home-bin
|
|
275
|
-
> launcher path of the machine that ran `package`, so they're valid for a
|
|
276
|
-
> **local install on that same machine/home**. For shared distribution use
|
|
277
|
-
> `npm-plugin` or the MCP standard artifacts, or re-run `package` per machine.
|
|
278
|
-
|
|
279
|
-
**Let your branded MCP package drive the host's own install flow** with
|
|
280
|
-
`install --method marketplace`:
|
|
281
|
-
|
|
282
|
-
```bash
|
|
283
|
-
acme-db install --method marketplace
|
|
284
|
-
|
|
285
|
-
# framework fallback for local framework development/debugging only
|
|
286
|
-
npx @ken-jo/agent-connector install --method marketplace --connector ./agent-connector.config.mjs
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
- **What it does** — stages the bundle, registers a local marketplace where the
|
|
290
|
-
host has one, then runs the host's plugin-install verb (or, for npm-plugin
|
|
291
|
-
hosts, writes a local `file://` entry); headless and idempotent. Other
|
|
292
|
-
marketplace-format hosts print the exact manual commands.
|
|
293
|
-
- **Host coverage** — live-verified for Claude Code, Codex, OpenCode, Kilo
|
|
294
|
-
(CLI + ext), and Antigravity (CLI + IDE) on Linux, Windows, and macOS; Droid
|
|
295
|
-
and Qwen Code have the driver shipped but pending a live host; Gemini CLI is
|
|
296
|
-
legacy (sunsetting toward Antigravity — driver kept for existing installs).
|
|
297
|
-
- **Safety + reversal** — a guard refuses installing the same connector by BOTH
|
|
298
|
-
methods, `uninstall --method auto` reverses whichever method is installed, and
|
|
299
|
-
`doctor` checks registration drift.
|
|
300
|
-
|
|
301
|
-
### Ship a branded CLI
|
|
302
|
-
|
|
303
|
-
A connector developer can ship their **own** bin instead of having users type
|
|
304
|
-
`agent-connector`. `createConnectorCli({ packageJson, connector })` (from the
|
|
305
|
-
`@ken-jo/agent-connector/cli` export) derives the bin name/version from
|
|
306
|
-
`package.json` and exposes **every** subcommand under your brand, fully
|
|
307
|
-
delegated and **auto-scoped** to your connector — so your users do not need a
|
|
308
|
-
framework global install or `--connector` for branded MCP install/doctor/uninstall. See
|
|
309
|
-
[`examples/branded-cli`](examples/branded-cli) for the full, runnable package.
|
|
310
|
-
|
|
311
|
-
```js
|
|
312
|
-
#!/usr/bin/env node
|
|
313
|
-
// bin.mjs — every agent-connector subcommand, branded as `acme-db`
|
|
314
|
-
import { createConnectorCli } from "@ken-jo/agent-connector/cli";
|
|
315
|
-
|
|
316
|
-
// run() resolves to the exit code and never calls process.exit
|
|
317
|
-
process.exitCode = await createConnectorCli({
|
|
318
|
-
// packageJson supplies public identity: name, mcpName, bin, version.
|
|
319
|
-
packageJson: new URL("./package.json", import.meta.url),
|
|
320
|
-
// connector supplies behavior: server, hooks, skills, telemetry.
|
|
321
|
-
// These are two layers, not duplicate id/display-name inputs.
|
|
322
|
-
connector: new URL("./agent-connector.config.mjs", import.meta.url),
|
|
323
|
-
}).run();
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
After a consumer installs **your** package, the `acme-db` bin is on their PATH
|
|
327
|
-
and every command is scoped to your connector (`acme-db install` ≈
|
|
328
|
-
`agent-connector install --connector ./agent-connector.config.mjs`). Auto-scoping
|
|
329
|
-
is pure argument injection over the SAME single home binary; `serve` and `hook`
|
|
330
|
-
still route through the one `~/.agent-connector` home binary every host config
|
|
331
|
-
points back to. An explicit `--connector` / `--connector-id` always overrides
|
|
332
|
-
the injected default.
|
|
333
|
-
|
|
334
|
-
## What you define once
|
|
335
|
-
|
|
336
|
-
A single `defineConnector({...})` declares your MCP **server** + lifecycle
|
|
337
|
-
**hooks**, and optionally the additional surfaces — **commands**, **skills**,
|
|
338
|
-
**subagents**, **memory**, **statusline**, **actions**, plus host-native escape
|
|
339
|
-
hatches. agent-connector renders each surface into every detected host's native
|
|
340
|
-
format, or *skip-warns* (never silently drops) where a host can't support it.
|
|
341
|
-
|
|
342
|
-
```ts
|
|
343
|
-
import { fileURLToPath } from "node:url";
|
|
344
|
-
import { defineConnector } from "@ken-jo/agent-connector/sdk";
|
|
345
|
-
|
|
346
|
-
// Resolve your server to an absolute path — host CLIs spawn it from their own CWD.
|
|
347
|
-
const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
|
|
348
|
-
|
|
349
|
-
export default defineConnector({
|
|
350
|
-
server: {
|
|
351
|
-
transport: "stdio",
|
|
352
|
-
command: "node", // or "npx", "python", etc. — whatever starts your server
|
|
353
|
-
args: [serverPath], // replace with your real server entrypoint
|
|
354
|
-
env: { ACME_DB_DSN: "${env:ACME_DB_DSN}" },
|
|
355
|
-
},
|
|
356
|
-
hooks: {
|
|
357
|
-
PreToolUse: {
|
|
358
|
-
matcher: "acme_write",
|
|
359
|
-
async handler(evt) {
|
|
360
|
-
return evt.toolName === "acme_write"
|
|
361
|
-
? { decision: "ask", reason: "Confirm write" }
|
|
362
|
-
: { decision: "allow" };
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
|
-
},
|
|
366
|
-
// telemetry is on by default
|
|
367
|
-
});
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
`npx @acme/acme-db-mcp install` turns that into, e.g.:
|
|
371
|
-
|
|
372
|
-
| Host | What gets written |
|
|
373
|
-
|---|---|
|
|
374
|
-
| **Claude Code** | `~/.claude.json` → `mcpServers.acme-db` (+ hooks in `~/.claude/settings.json`) |
|
|
375
|
-
| **Codex CLI** | `~/.codex/config.toml` → `[mcp_servers.acme-db]` (+ `~/.codex/hooks.json`) |
|
|
376
|
-
| **Cursor** | `~/.cursor/mcp.json` → `mcpServers.acme-db` (+ `~/.cursor/hooks.json`) |
|
|
377
|
-
|
|
378
|
-
…each pointing hooks at a **single stable home binary**, so one update propagates
|
|
379
|
-
everywhere.
|
|
380
|
-
|
|
381
|
-
**Secret env-refs (`${env:VAR}`).** Write `"${env:VAR}"` (or `"${env:VAR:-default}"`) anywhere in `command` / `args` / `env` / `url` / `headers` to reference an environment variable.
|
|
382
|
-
|
|
383
|
-
<details>
|
|
384
|
-
<summary>Native interpolation vs. literal-at-install resolution</summary>
|
|
385
|
-
|
|
386
|
-
> On hosts with **native** interpolation (Claude Code, Cursor, VS Code Copilot,
|
|
387
|
-
> amp, codebuff) the token is written through to the host config and resolved at
|
|
388
|
-
> runtime. Every other host has **no** native interpolation, so the value is
|
|
389
|
-
> resolved to a **literal at install time**; an unset variable with no default
|
|
390
|
-
> resolves to an **empty string**, and `install` emits a `warn` for it on a
|
|
391
|
-
> literal-resolving host.
|
|
392
|
-
|
|
393
|
-
</details>
|
|
394
|
-
|
|
395
|
-
**Native hooks escape hatch.** The normalized `hooks` API covers the 13 cross-platform events; for host-only events (Claude Code alone ships 30) declare `platforms: { "claude-code": { nativeHooks: { TaskCompleted: { handler } } } }`.
|
|
396
|
-
|
|
397
|
-
<details>
|
|
398
|
-
<summary>Raw-payload semantics and the ~14 passthrough hosts</summary>
|
|
399
|
-
|
|
400
|
-
> The handler receives the host's **raw** payload and whatever it returns is the
|
|
401
|
-
> **verbatim** JSON reply (exit 0 only — exit-2 blocking isn't modeled). Hosts
|
|
402
|
-
> supporting host-native passthrough: `amp`, `claude-code`, `continue`,
|
|
403
|
-
> `copilot-cli`, `cursor`, `gemini-cli`, `hermes`, `jetbrains-copilot`, `kimi`,
|
|
404
|
-
> `nemoclaw`, `omp`, `openclaw`, `opencode`, `qwen-code`. Others skip-warn.
|
|
405
|
-
|
|
406
|
-
</details>
|
|
407
|
-
|
|
408
|
-
**Host-config key patches.** For host-exclusive *settings keys* no other surface reaches, declare `platforms: { "claude-code": { configPatch: [{ key, value, reason }] } }` (Claude Code only for now; other hosts skip-warn with the exact manual edit).
|
|
409
|
-
|
|
410
|
-
<details>
|
|
411
|
-
<summary>Set-if-absent + refcount + denylist semantics</summary>
|
|
412
|
-
|
|
413
|
-
> Semantics are fixed: **set-if-absent + skip-warn on any conflict** — never
|
|
414
|
-
> overwrite, never deep-merge. Ownership is refcounted in a persisted ledger;
|
|
415
|
-
> security-relevant keys and keys agent-connector models as first-class surfaces
|
|
416
|
-
> are hard-refused.
|
|
417
|
-
|
|
418
|
-
</details>
|
|
419
|
-
|
|
420
|
-
### Memory, statusline, actions, and the SDK
|
|
421
|
-
|
|
422
|
-
- **`memory`** (aligned with the [AGENTS.md](https://agents.md) standard) — ship
|
|
423
|
-
standing guidance into the memory/rules file each host actually reads.
|
|
424
|
-
AGENTS.md adopters get the standard file; host-specific exceptions such as
|
|
425
|
-
Claude Code → `CLAUDE.md` and Gemini CLI → `GEMINI.md` are wired per their own
|
|
426
|
-
official docs. Writes are surgical marker-fenced, hash-stamped managed blocks
|
|
427
|
-
— multiple connectors coexist, bytes outside your markers are never touched,
|
|
428
|
-
and uninstall excises exactly your blocks.
|
|
429
|
-
- **`statusline`** (`defineStatusline`) — a live HUD render function the host
|
|
430
|
-
calls on every status refresh.
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
`
|
|
443
|
-
`
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
- **
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
**
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
|
481
|
-
|
|
482
|
-
| `
|
|
233
|
+
|
|
234
|
+
**Marketplace plugin** — the framework `package` command turns the connector
|
|
235
|
+
into a real plugin/extension bundle (manifest + bundled commands, agents,
|
|
236
|
+
skills, hooks, MCP) from one definition. This is framework tooling, so run it
|
|
237
|
+
with `npx @ken-jo/agent-connector package --connector ...`. If you already keep
|
|
238
|
+
the framework CLI installed globally, `agent-connector package --connector ...`
|
|
239
|
+
is only the shorter equivalent. Hooks + MCP keep the
|
|
240
|
+
telemetry serve-wrapper, so a marketplace-installed connector still reports
|
|
241
|
+
per-tool tokens for its stdio server. `--format all` emits **10 host formats**:
|
|
242
|
+
|
|
243
|
+
| Format | Hosts |
|
|
244
|
+
|---|---|
|
|
245
|
+
| `claude-plugin` | Claude Code · Codex · VS Code Copilot · OpenClaw · OMP |
|
|
246
|
+
| `codex-plugin` | Codex (`.codex-plugin/` manifest variant) |
|
|
247
|
+
| `copilot-plugin` | GitHub Copilot CLI |
|
|
248
|
+
| `factory-plugin` | Droid |
|
|
249
|
+
| `gemini-extension` | Gemini CLI |
|
|
250
|
+
| `qwen-extension` | Qwen Code |
|
|
251
|
+
| `agy-plugin` | Antigravity (CLI + IDE) |
|
|
252
|
+
| `cursor-plugin` | Cursor |
|
|
253
|
+
| `kimi-plugin` | Kimi CLI |
|
|
254
|
+
| `npm-plugin` | OpenCode · Kilo CLI · Pi |
|
|
255
|
+
|
|
256
|
+
Two official **MCP standard artifacts** are opt-in (they need a `publish` block,
|
|
257
|
+
so they're excluded from `--format all`) — `mcp-server-json` (an MCP Registry
|
|
258
|
+
`server.json`) and `mcpb` (a one-click MCPB bundle); see
|
|
259
|
+
[Publish to the MCP ecosystem](#publish-to-the-mcp-ecosystem).
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# emit every host format (mcp-server-json + mcpb are opt-in by name)
|
|
263
|
+
npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
|
|
264
|
+
npx @ken-jo/agent-connector package --connector ./agent-connector.config.mjs --format gemini-extension --out ./ext # or just one
|
|
265
|
+
|
|
266
|
+
# if you already keep the framework CLI globally installed, the same command is:
|
|
267
|
+
agent-connector package --connector ./agent-connector.config.mjs --format all --out ./dist-plugin
|
|
268
|
+
|
|
269
|
+
# e.g. Claude Code: /plugin marketplace add ./dist-plugin/claude-plugin
|
|
270
|
+
# /plugin install <connector-id>@agent-connector
|
|
271
|
+
# e.g. Gemini CLI: gemini extensions install ./dist-plugin/gemini-extension/<id>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
> **Embedded-path caveat.** Most host bundles bake in the absolute home-bin
|
|
275
|
+
> launcher path of the machine that ran `package`, so they're valid for a
|
|
276
|
+
> **local install on that same machine/home**. For shared distribution use
|
|
277
|
+
> `npm-plugin` or the MCP standard artifacts, or re-run `package` per machine.
|
|
278
|
+
|
|
279
|
+
**Let your branded MCP package drive the host's own install flow** with
|
|
280
|
+
`install --method marketplace`:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
acme-db install --method marketplace
|
|
284
|
+
|
|
285
|
+
# framework fallback for local framework development/debugging only
|
|
286
|
+
npx @ken-jo/agent-connector install --method marketplace --connector ./agent-connector.config.mjs
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- **What it does** — stages the bundle, registers a local marketplace where the
|
|
290
|
+
host has one, then runs the host's plugin-install verb (or, for npm-plugin
|
|
291
|
+
hosts, writes a local `file://` entry); headless and idempotent. Other
|
|
292
|
+
marketplace-format hosts print the exact manual commands.
|
|
293
|
+
- **Host coverage** — live-verified for Claude Code, Codex, OpenCode, Kilo
|
|
294
|
+
(CLI + ext), and Antigravity (CLI + IDE) on Linux, Windows, and macOS; Droid
|
|
295
|
+
and Qwen Code have the driver shipped but pending a live host; Gemini CLI is
|
|
296
|
+
legacy (sunsetting toward Antigravity — driver kept for existing installs).
|
|
297
|
+
- **Safety + reversal** — a guard refuses installing the same connector by BOTH
|
|
298
|
+
methods, `uninstall --method auto` reverses whichever method is installed, and
|
|
299
|
+
`doctor` checks registration drift.
|
|
300
|
+
|
|
301
|
+
### Ship a branded CLI
|
|
302
|
+
|
|
303
|
+
A connector developer can ship their **own** bin instead of having users type
|
|
304
|
+
`agent-connector`. `createConnectorCli({ packageJson, connector })` (from the
|
|
305
|
+
`@ken-jo/agent-connector/cli` export) derives the bin name/version from
|
|
306
|
+
`package.json` and exposes **every** subcommand under your brand, fully
|
|
307
|
+
delegated and **auto-scoped** to your connector — so your users do not need a
|
|
308
|
+
framework global install or `--connector` for branded MCP install/doctor/uninstall. See
|
|
309
|
+
[`examples/branded-cli`](examples/branded-cli) for the full, runnable package.
|
|
310
|
+
|
|
311
|
+
```js
|
|
312
|
+
#!/usr/bin/env node
|
|
313
|
+
// bin.mjs — every agent-connector subcommand, branded as `acme-db`
|
|
314
|
+
import { createConnectorCli } from "@ken-jo/agent-connector/cli";
|
|
315
|
+
|
|
316
|
+
// run() resolves to the exit code and never calls process.exit
|
|
317
|
+
process.exitCode = await createConnectorCli({
|
|
318
|
+
// packageJson supplies public identity: name, mcpName, bin, version.
|
|
319
|
+
packageJson: new URL("./package.json", import.meta.url),
|
|
320
|
+
// connector supplies behavior: server, hooks, skills, telemetry.
|
|
321
|
+
// These are two layers, not duplicate id/display-name inputs.
|
|
322
|
+
connector: new URL("./agent-connector.config.mjs", import.meta.url),
|
|
323
|
+
}).run();
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
After a consumer installs **your** package, the `acme-db` bin is on their PATH
|
|
327
|
+
and every command is scoped to your connector (`acme-db install` ≈
|
|
328
|
+
`agent-connector install --connector ./agent-connector.config.mjs`). Auto-scoping
|
|
329
|
+
is pure argument injection over the SAME single home binary; `serve` and `hook`
|
|
330
|
+
still route through the one `~/.agent-connector` home binary every host config
|
|
331
|
+
points back to. An explicit `--connector` / `--connector-id` always overrides
|
|
332
|
+
the injected default.
|
|
333
|
+
|
|
334
|
+
## What you define once
|
|
335
|
+
|
|
336
|
+
A single `defineConnector({...})` declares your MCP **server** + lifecycle
|
|
337
|
+
**hooks**, and optionally the additional surfaces — **commands**, **skills**,
|
|
338
|
+
**subagents**, **memory**, **statusline**, **actions**, plus host-native escape
|
|
339
|
+
hatches. agent-connector renders each surface into every detected host's native
|
|
340
|
+
format, or *skip-warns* (never silently drops) where a host can't support it.
|
|
341
|
+
|
|
342
|
+
```ts
|
|
343
|
+
import { fileURLToPath } from "node:url";
|
|
344
|
+
import { defineConnector } from "@ken-jo/agent-connector/sdk";
|
|
345
|
+
|
|
346
|
+
// Resolve your server to an absolute path — host CLIs spawn it from their own CWD.
|
|
347
|
+
const serverPath = fileURLToPath(new URL("./my-mcp-server.mjs", import.meta.url));
|
|
348
|
+
|
|
349
|
+
export default defineConnector({
|
|
350
|
+
server: {
|
|
351
|
+
transport: "stdio",
|
|
352
|
+
command: "node", // or "npx", "python", etc. — whatever starts your server
|
|
353
|
+
args: [serverPath], // replace with your real server entrypoint
|
|
354
|
+
env: { ACME_DB_DSN: "${env:ACME_DB_DSN}" },
|
|
355
|
+
},
|
|
356
|
+
hooks: {
|
|
357
|
+
PreToolUse: {
|
|
358
|
+
matcher: "acme_write",
|
|
359
|
+
async handler(evt) {
|
|
360
|
+
return evt.toolName === "acme_write"
|
|
361
|
+
? { decision: "ask", reason: "Confirm write" }
|
|
362
|
+
: { decision: "allow" };
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
// telemetry is on by default
|
|
367
|
+
});
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
`npx @acme/acme-db-mcp install` turns that into, e.g.:
|
|
371
|
+
|
|
372
|
+
| Host | What gets written |
|
|
373
|
+
|---|---|
|
|
374
|
+
| **Claude Code** | `~/.claude.json` → `mcpServers.acme-db` (+ hooks in `~/.claude/settings.json`) |
|
|
375
|
+
| **Codex CLI** | `~/.codex/config.toml` → `[mcp_servers.acme-db]` (+ `~/.codex/hooks.json`) |
|
|
376
|
+
| **Cursor** | `~/.cursor/mcp.json` → `mcpServers.acme-db` (+ `~/.cursor/hooks.json`) |
|
|
377
|
+
|
|
378
|
+
…each pointing hooks at a **single stable home binary**, so one update propagates
|
|
379
|
+
everywhere.
|
|
380
|
+
|
|
381
|
+
**Secret env-refs (`${env:VAR}`).** Write `"${env:VAR}"` (or `"${env:VAR:-default}"`) anywhere in `command` / `args` / `env` / `url` / `headers` to reference an environment variable.
|
|
382
|
+
|
|
383
|
+
<details>
|
|
384
|
+
<summary>Native interpolation vs. literal-at-install resolution</summary>
|
|
385
|
+
|
|
386
|
+
> On hosts with **native** interpolation (Claude Code, Cursor, VS Code Copilot,
|
|
387
|
+
> amp, codebuff) the token is written through to the host config and resolved at
|
|
388
|
+
> runtime. Every other host has **no** native interpolation, so the value is
|
|
389
|
+
> resolved to a **literal at install time**; an unset variable with no default
|
|
390
|
+
> resolves to an **empty string**, and `install` emits a `warn` for it on a
|
|
391
|
+
> literal-resolving host.
|
|
392
|
+
|
|
393
|
+
</details>
|
|
394
|
+
|
|
395
|
+
**Native hooks escape hatch.** The normalized `hooks` API covers the 13 cross-platform events; for host-only events (Claude Code alone ships 30) declare `platforms: { "claude-code": { nativeHooks: { TaskCompleted: { handler } } } }`.
|
|
396
|
+
|
|
397
|
+
<details>
|
|
398
|
+
<summary>Raw-payload semantics and the ~14 passthrough hosts</summary>
|
|
399
|
+
|
|
400
|
+
> The handler receives the host's **raw** payload and whatever it returns is the
|
|
401
|
+
> **verbatim** JSON reply (exit 0 only — exit-2 blocking isn't modeled). Hosts
|
|
402
|
+
> supporting host-native passthrough: `amp`, `claude-code`, `continue`,
|
|
403
|
+
> `copilot-cli`, `cursor`, `gemini-cli`, `hermes`, `jetbrains-copilot`, `kimi`,
|
|
404
|
+
> `nemoclaw`, `omp`, `openclaw`, `opencode`, `qwen-code`. Others skip-warn.
|
|
405
|
+
|
|
406
|
+
</details>
|
|
407
|
+
|
|
408
|
+
**Host-config key patches.** For host-exclusive *settings keys* no other surface reaches, declare `platforms: { "claude-code": { configPatch: [{ key, value, reason }] } }` (Claude Code only for now; other hosts skip-warn with the exact manual edit).
|
|
409
|
+
|
|
410
|
+
<details>
|
|
411
|
+
<summary>Set-if-absent + refcount + denylist semantics</summary>
|
|
412
|
+
|
|
413
|
+
> Semantics are fixed: **set-if-absent + skip-warn on any conflict** — never
|
|
414
|
+
> overwrite, never deep-merge. Ownership is refcounted in a persisted ledger;
|
|
415
|
+
> security-relevant keys and keys agent-connector models as first-class surfaces
|
|
416
|
+
> are hard-refused.
|
|
417
|
+
|
|
418
|
+
</details>
|
|
419
|
+
|
|
420
|
+
### Memory, statusline, actions, and the SDK
|
|
421
|
+
|
|
422
|
+
- **`memory`** (aligned with the [AGENTS.md](https://agents.md) standard) — ship
|
|
423
|
+
standing guidance into the memory/rules file each host actually reads.
|
|
424
|
+
AGENTS.md adopters get the standard file; host-specific exceptions such as
|
|
425
|
+
Claude Code → `CLAUDE.md` and Gemini CLI → `GEMINI.md` are wired per their own
|
|
426
|
+
official docs. Writes are surgical marker-fenced, hash-stamped managed blocks
|
|
427
|
+
— multiple connectors coexist, bytes outside your markers are never touched,
|
|
428
|
+
and uninstall excises exactly your blocks.
|
|
429
|
+
- **`statusline`** (`defineStatusline`) — a live HUD render function the host
|
|
430
|
+
calls on every status refresh. The SDK supports top-level and per-host
|
|
431
|
+
`render(ctx)` handlers plus `options` such as `refreshInterval`,
|
|
432
|
+
`respectUserColors`, `hideContextIndicator`, and framework-enforced
|
|
433
|
+
`maxLines`. Today it registers command-driven statuslines for Claude Code,
|
|
434
|
+
Qwen Code, and Antigravity CLI (set-if-absent, refcounted, reversible);
|
|
435
|
+
hosts whose statusline is only a built-in preset rather than a connector-owned
|
|
436
|
+
command still skip-warn. The runtime is **fail-safe**: any error exits 0 with
|
|
437
|
+
empty stdout so a HUD never wedges the host.
|
|
438
|
+
- **`actions`** (`defineAction`) — named, user-invocable operations dispatched by
|
|
439
|
+
the universal verb `agent-connector action <platform> <id> --connector <id>`.
|
|
440
|
+
Actions can declare `label`, `icon`, `placement`, `confirm`, and per-host
|
|
441
|
+
overrides for user-facing metadata or `run(ctx)`. `install` emits host-side
|
|
442
|
+
affordances on `droid`, `hermes`, `kiro`, `nemoclaw`, `omp`, `openclaw`, `pi`,
|
|
443
|
+
`warp`, and `zed`; adapter capabilities expose whether that affordance is an
|
|
444
|
+
exec command, exec-file, manual hook panel, paste workflow, plugin command, or
|
|
445
|
+
task. Other hosts skip-warn. Error semantics are user-triggered (unknown id or
|
|
446
|
+
throw exits 1).
|
|
447
|
+
- **The Connector SDK** (`@ken-jo/agent-connector/sdk`, `/sdk/test`) — the
|
|
448
|
+
consolidated authoring surface re-exports `defineConnector`, the full `define*`
|
|
449
|
+
family (`defineHook`, `defineCommand`, `defineSkill`, `defineSubagent`,
|
|
450
|
+
`defineMemory`, `defineStatusline`, `defineAction`, `defineConfigPatch`,
|
|
451
|
+
`defineNativeHook`), introspection helpers (`hostsSupporting`,
|
|
452
|
+
`capabilitiesOf`, `surfaceSupport`), and an **offline harness**
|
|
453
|
+
(`simulate`, `explain`, `explainHooks`) that runs the real adapter
|
|
454
|
+
parse→handler→format chain to answer *"does my handler actually work on host
|
|
455
|
+
X?"* before you touch a real host. Agent-facing guidance is intentionally
|
|
456
|
+
split into a small router skill plus focused references under
|
|
457
|
+
[`skills/agent-connector/references`](skills/agent-connector/references). See
|
|
458
|
+
[`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
|
|
459
|
+
|
|
460
|
+
## How it works
|
|
461
|
+
|
|
462
|
+
- **Home-dir, single binary.** The runtime installs once under
|
|
463
|
+
`~/.agent-connector` (override `AGENT_CONNECTOR_DATA_DIR`). Every host config we
|
|
464
|
+
write is a thin pointer back to that one binary. Updates are
|
|
465
|
+
**explicit/managed** (`agent-connector upgrade`), never silent auto-update.
|
|
466
|
+
- **Per-project data, kept.** Telemetry/state is keyed by a stable project
|
|
467
|
+
identity (git remote or normalized path), partitioned per project, stored under
|
|
468
|
+
the home data-root — surviving `git clean`, shared across hosts opening the same
|
|
469
|
+
project.
|
|
470
|
+
- **Native config stays native.** We never relocate a host's own settings files;
|
|
471
|
+
only framework-owned state lives under the data-root.
|
|
472
|
+
- **Windows-first correctness.** No symlinks, no POSIX-only assumptions.
|
|
473
|
+
|
|
474
|
+
**Three hook paradigms**, all install-verified across the registered platform
|
|
475
|
+
set (see [`/coverage`](https://agent-connector.ai/coverage) and
|
|
476
|
+
[`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)):
|
|
477
|
+
|
|
478
|
+
| Paradigm | Platforms |
|
|
479
|
+
|---|---|
|
|
480
|
+
| `json-stdio` (full hook dispatch) | CodeBuddy · Claude Code · Codex CLI · Cursor · VS Code Copilot · JetBrains Copilot · GitHub Copilot CLI · Gemini CLI · Qwen CLI · Kiro · Kimi CLI · Crush · Goose · Hermes · Droid (Factory) · OpenHands · Antigravity · Antigravity CLI · Continue · Amazon Q · Grok CLI · Devin CLI |
|
|
481
|
+
| `mcp-only` (MCP registration only) | Warp · Roo Code · Cline · Trae · Zed · Codebuff · Mux · Pi · Windsurf · Open Interpreter · Junie · Mistral Vibe |
|
|
482
|
+
| `ts-plugin` (generated bridge module) | OpenCode · MiMoCode · Kilo CLI · Kilo · OMP · NemoClaw · OpenClaw · Amp |
|
|
483
|
+
|
|
484
|
+
Adding a platform = **one registry entry + one adapter**.
|
|
485
|
+
|
|
486
|
+
## CLI
|
|
487
|
+
|
|
488
|
+
| Command | Purpose |
|
|
489
|
+
|---|---|
|
|
490
|
+
| `detect` | List installed platforms, scopes, capabilities, hook paradigm. |
|
|
483
491
|
| `install [<source>] [--scope …] [--targets …] [--method …] [--dry-run] [--force]` | Render + write MCP + hooks + content surfaces. `<source>` may be local, GitHub/git, `npm:<package>[@version]`, or `.tgz`/`archive:`. |
|
|
484
|
-
| `uninstall [--targets …] [--purge] [--method …]` | Full inverse — removes everything we wrote; `--purge` also clears framework state. |
|
|
485
|
-
| `upgrade [--channel …]` | Re-render host config + heal stale pointers + refresh the home binary (alias: `update`, `sync`); never a silent self-update. |
|
|
486
|
-
| `doctor [--probe] [--explain]` | Per-platform health checks with fixes; `--probe` runs a live MCP handshake, `--explain` prints the per-`(host, event)` hook honor matrix. |
|
|
492
|
+
| `uninstall [--targets …] [--purge] [--method …]` | Full inverse — removes everything we wrote; `--purge` also clears framework state. |
|
|
493
|
+
| `upgrade [--channel …]` | Re-render host config + heal stale pointers + refresh the home binary (alias: `update`, `sync`); never a silent self-update. |
|
|
494
|
+
| `doctor [--probe] [--explain]` | Per-platform health checks with fixes; `--probe` runs a live MCP handshake, `--explain` prints the per-`(host, event)` hook honor matrix. |
|
|
487
495
|
| `status` | Light install-state: which connectors are present on which hosts (always exits 0). |
|
|
488
496
|
| `package [--format <fmt>\|all]` | Emit a host plugin bundle, or an OFFICIAL standard artifact: `mcp-server-json` (registry) · `mcpb` (one-click bundle). |
|
|
489
497
|
| `audit [--strict]` | Pre-install package identity lint: package name/version/bin, runtime dependency, connector id/version drift, and publish `files` coverage. |
|
|
490
498
|
| `action <platform> <id> [--connector <id>]` | Run a declared action from the shell. |
|
|
491
|
-
| `telemetry report [--by …] [--since …] [--connector <id>]` | Per-tool token footprint of **your connector's own wrapped server**. Stdio servers only. |
|
|
492
|
-
| `telemetry export [--format …] [--connector <id>]` | Raw aggregate records for your wrapped server. |
|
|
493
|
-
| `usage report\|export\|leaderboard [--by …]` | **No connector needed.** Host-native whole-conversation token totals parsed read-only from each agent CLI's own logs. Does NOT break down by individual MCP or tool. |
|
|
494
|
-
| `leaderboard [--since …] [--connector <id>] [--scope …]` | Three origin-labeled boards with **different prerequisites** (🔌 MCP/plugin · 🛰️ host-native turns · 🖥️ host/user); counts are never summed across them. |
|
|
495
|
-
|
|
496
|
-
> `hook` and `serve` also exist — internal entrypoints the written host configs
|
|
497
|
-
> point at; you never run them by hand. Full flag-level reference: the
|
|
498
|
-
> [docs site `/docs/dev/cli`](https://agent-connector.ai/docs/dev/cli) · `llms-full.txt` §3 (canonical, drift-guarded by tests).
|
|
499
|
-
|
|
500
|
-
## Token telemetry & usage
|
|
501
|
-
|
|
502
|
-
Two independent, never-summed views of token cost:
|
|
503
|
-
|
|
504
|
-
- **Per-tool telemetry for *your own* server** (the MCP-developer path). No host
|
|
505
|
-
reports per-tool usage back to an MCP server, so agent-connector measures your
|
|
506
|
-
server's *own* bytes (args in, results out, tool schemas) and tokenizes them
|
|
507
|
-
locally — **aggregate counts only, stored locally, zero egress by default.**
|
|
508
|
-
Per-tool telemetry is automatic for **stdio** servers; remote (`http`/`sse`/`ws`)
|
|
509
|
-
servers are registered but not wrapped (the proxy can't intercept remote
|
|
510
|
-
transports). Read it with `agent-connector telemetry report --by tool`.
|
|
511
|
-
- **Connector-free usage** (`agent-connector usage`). Already run Claude Code /
|
|
512
|
-
Codex / Cursor and just want totals? `usage` reads your local agent-CLI session
|
|
513
|
-
logs **read-only** and never writes any host config — no connector, no install:
|
|
514
|
-
|
|
515
|
-
```bash
|
|
516
|
-
npx @ken-jo/agent-connector usage report --by platform # CLI/model/project/session/day
|
|
517
|
-
npx @ken-jo/agent-connector usage leaderboard --by platform # or --by model
|
|
518
|
-
npx @ken-jo/agent-connector usage export --format csv --out usage.csv
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
It reports **whole-conversation totals** per agent CLI / model / project /
|
|
522
|
-
session / day. It does **not** itemize cost by individual MCP server or tool —
|
|
523
|
-
agent CLIs don't log per-tool attribution.
|
|
524
|
-
|
|
525
|
-
**Privacy & tokenizer.** Default tokenizer is `gpt-tokenizer` (pure-JS, no native
|
|
526
|
-
build) — `o200k_base` for OpenAI/Codex-family, a documented approximation for
|
|
527
|
-
Anthropic; falls back to a `chars/4` heuristic if it can't load. Every record
|
|
528
|
-
carries a confidence tag. Raw tool arguments and results are never stored or
|
|
529
|
-
transmitted. Off switch: `AGENT_CONNECTOR_TELEMETRY=0`, or
|
|
530
|
-
`telemetry: { enabled: false }`.
|
|
531
|
-
|
|
532
|
-
## Publish to the MCP ecosystem
|
|
533
|
-
|
|
534
|
-
Where the MCP standard already covers your server's functionality,
|
|
535
|
-
agent-connector **emits the standard exactly** so your already-standard work is
|
|
536
|
-
portable:
|
|
537
|
-
|
|
538
|
-
- **`package --format mcp-server-json`** → an official **MCP Registry**
|
|
539
|
-
`server.json` (schema `2025-12-11`). It describes your **real upstream server**
|
|
540
|
-
(what a registry installer runs), not our telemetry wrapper. Publish it with
|
|
541
|
-
the official `mcp-publisher` CLI.
|
|
542
|
-
- **`package --format mcpb`** → an official **MCPB** (`.mcpb`, formerly DXT)
|
|
543
|
-
bundle `manifest.json` (`manifest_version 0.3`) for one-click local install in
|
|
544
|
-
Claude Desktop and any MCPB host, with secrets routed through the host keychain
|
|
545
|
-
(`user_config`).
|
|
546
|
-
|
|
547
|
-
Both read a `publish` block on your connector (the namespace you own + your
|
|
548
|
-
published package + author):
|
|
549
|
-
|
|
550
|
-
```ts
|
|
551
|
-
defineConnector({
|
|
552
|
-
server: { transport: "stdio", command: "npx", args: ["-y", "@acme/acme-db-mcp"] },
|
|
553
|
-
publish: {
|
|
554
|
-
registryNamespace: "io.github.acme", // a namespace YOU proved ownership of
|
|
555
|
-
packageName: "@acme/acme-db-mcp", // your REAL published package
|
|
556
|
-
author: { name: "Acme Inc" },
|
|
557
|
-
},
|
|
558
|
-
});
|
|
559
|
-
```
|
|
560
|
-
|
|
561
|
-
> **Config we write is the standard.** `install` writes each host's native MCP
|
|
562
|
-
> config in the de-facto canonical `mcpServers` shape — `{ command, args, env }`
|
|
563
|
-
> for stdio, `{ url, headers }` for remote. The spec transport slug for
|
|
564
|
-
> streamable HTTP is `streamable-http` (registry `server.json`); host configs
|
|
565
|
-
> canonically use `http`. WebSocket (`ws`) is **not** an MCP spec transport and
|
|
566
|
-
> the standard artifacts reject it.
|
|
567
|
-
|
|
568
|
-
> **Forward-compatible by transport.** The `serve` proxy is **byte-transparent**:
|
|
569
|
-
> it forwards every JSON-RPC message verbatim and only tees a copy to count
|
|
570
|
-
> `tools/call` round-trips. So newer MCP features ride through untouched —
|
|
571
|
-
> **MCP Apps** (the official `io.modelcontextprotocol/ui` extension) and **any
|
|
572
|
-
> reverse-DNS extension** negotiated at `initialize`. A connector whose server
|
|
573
|
-
> already speaks these deploys across every host and keeps its telemetry today,
|
|
574
|
-
> no agent-connector change required.
|
|
575
|
-
|
|
576
|
-
## Verification
|
|
577
|
-
|
|
578
|
-
The full single-API contract is **install-verified across the current platform
|
|
579
|
-
registry** by a committed registry-driven install-roundtrip harness that, for
|
|
580
|
-
every adapter, drives the real install → uninstall into an isolated HOME and
|
|
581
|
-
asserts on-disk placement + zero residue. A separate committed
|
|
582
|
-
`scripts/verify-host.mjs` driver installs real host CLIs from the verification
|
|
583
|
-
matrix and checks install → placement → clean-uninstall; live hook dispatch +
|
|
584
|
-
telemetry are proven end-to-end where the host can run headlessly. IDE
|
|
585
|
-
extensions / GUI editors with no headless CLI stay covered by the
|
|
586
|
-
install-roundtrip harness.
|
|
587
|
-
|
|
588
|
-
**Dogfood result:** porting the real multi-host context-mode plugin to
|
|
589
|
-
`defineConnector` collapsed **~20,322 lines of hand-maintained per-host code down
|
|
590
|
-
to ~76 lines** (a 99.63% reduction). See the reports under
|
|
591
|
-
[`docs/research/`](docs/research/) and [`CHANGELOG.md`](CHANGELOG.md).
|
|
592
|
-
|
|
593
|
-
## Development
|
|
594
|
-
|
|
595
|
-
```bash
|
|
596
|
-
npm install
|
|
597
|
-
npm run typecheck
|
|
598
|
-
npm run build
|
|
599
|
-
npm run dev -- detect # run the CLI from source via tsx
|
|
600
|
-
|
|
499
|
+
| `telemetry report [--by …] [--since …] [--connector <id>]` | Per-tool token footprint of **your connector's own wrapped server**. Stdio servers only. |
|
|
500
|
+
| `telemetry export [--format …] [--connector <id>]` | Raw aggregate records for your wrapped server. |
|
|
501
|
+
| `usage report\|export\|leaderboard [--by …]` | **No connector needed.** Host-native whole-conversation token totals parsed read-only from each agent CLI's own logs. Does NOT break down by individual MCP or tool. |
|
|
502
|
+
| `leaderboard [--since …] [--connector <id>] [--scope …]` | Three origin-labeled boards with **different prerequisites** (🔌 MCP/plugin · 🛰️ host-native turns · 🖥️ host/user); counts are never summed across them. |
|
|
503
|
+
|
|
504
|
+
> `hook` and `serve` also exist — internal entrypoints the written host configs
|
|
505
|
+
> point at; you never run them by hand. Full flag-level reference: the
|
|
506
|
+
> [docs site `/docs/dev/cli`](https://agent-connector.ai/docs/dev/cli) · `llms-full.txt` §3 (canonical, drift-guarded by tests).
|
|
507
|
+
|
|
508
|
+
## Token telemetry & usage
|
|
509
|
+
|
|
510
|
+
Two independent, never-summed views of token cost:
|
|
511
|
+
|
|
512
|
+
- **Per-tool telemetry for *your own* server** (the MCP-developer path). No host
|
|
513
|
+
reports per-tool usage back to an MCP server, so agent-connector measures your
|
|
514
|
+
server's *own* bytes (args in, results out, tool schemas) and tokenizes them
|
|
515
|
+
locally — **aggregate counts only, stored locally, zero egress by default.**
|
|
516
|
+
Per-tool telemetry is automatic for **stdio** servers; remote (`http`/`sse`/`ws`)
|
|
517
|
+
servers are registered but not wrapped (the proxy can't intercept remote
|
|
518
|
+
transports). Read it with `agent-connector telemetry report --by tool`.
|
|
519
|
+
- **Connector-free usage** (`agent-connector usage`). Already run Claude Code /
|
|
520
|
+
Codex / Cursor and just want totals? `usage` reads your local agent-CLI session
|
|
521
|
+
logs **read-only** and never writes any host config — no connector, no install:
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
npx @ken-jo/agent-connector usage report --by platform # CLI/model/project/session/day
|
|
525
|
+
npx @ken-jo/agent-connector usage leaderboard --by platform # or --by model
|
|
526
|
+
npx @ken-jo/agent-connector usage export --format csv --out usage.csv
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
It reports **whole-conversation totals** per agent CLI / model / project /
|
|
530
|
+
session / day. It does **not** itemize cost by individual MCP server or tool —
|
|
531
|
+
agent CLIs don't log per-tool attribution.
|
|
532
|
+
|
|
533
|
+
**Privacy & tokenizer.** Default tokenizer is `gpt-tokenizer` (pure-JS, no native
|
|
534
|
+
build) — `o200k_base` for OpenAI/Codex-family, a documented approximation for
|
|
535
|
+
Anthropic; falls back to a `chars/4` heuristic if it can't load. Every record
|
|
536
|
+
carries a confidence tag. Raw tool arguments and results are never stored or
|
|
537
|
+
transmitted. Off switch: `AGENT_CONNECTOR_TELEMETRY=0`, or
|
|
538
|
+
`telemetry: { enabled: false }`.
|
|
539
|
+
|
|
540
|
+
## Publish to the MCP ecosystem
|
|
541
|
+
|
|
542
|
+
Where the MCP standard already covers your server's functionality,
|
|
543
|
+
agent-connector **emits the standard exactly** so your already-standard work is
|
|
544
|
+
portable:
|
|
545
|
+
|
|
546
|
+
- **`package --format mcp-server-json`** → an official **MCP Registry**
|
|
547
|
+
`server.json` (schema `2025-12-11`). It describes your **real upstream server**
|
|
548
|
+
(what a registry installer runs), not our telemetry wrapper. Publish it with
|
|
549
|
+
the official `mcp-publisher` CLI.
|
|
550
|
+
- **`package --format mcpb`** → an official **MCPB** (`.mcpb`, formerly DXT)
|
|
551
|
+
bundle `manifest.json` (`manifest_version 0.3`) for one-click local install in
|
|
552
|
+
Claude Desktop and any MCPB host, with secrets routed through the host keychain
|
|
553
|
+
(`user_config`).
|
|
554
|
+
|
|
555
|
+
Both read a `publish` block on your connector (the namespace you own + your
|
|
556
|
+
published package + author):
|
|
557
|
+
|
|
558
|
+
```ts
|
|
559
|
+
defineConnector({
|
|
560
|
+
server: { transport: "stdio", command: "npx", args: ["-y", "@acme/acme-db-mcp"] },
|
|
561
|
+
publish: {
|
|
562
|
+
registryNamespace: "io.github.acme", // a namespace YOU proved ownership of
|
|
563
|
+
packageName: "@acme/acme-db-mcp", // your REAL published package
|
|
564
|
+
author: { name: "Acme Inc" },
|
|
565
|
+
},
|
|
566
|
+
});
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
> **Config we write is the standard.** `install` writes each host's native MCP
|
|
570
|
+
> config in the de-facto canonical `mcpServers` shape — `{ command, args, env }`
|
|
571
|
+
> for stdio, `{ url, headers }` for remote. The spec transport slug for
|
|
572
|
+
> streamable HTTP is `streamable-http` (registry `server.json`); host configs
|
|
573
|
+
> canonically use `http`. WebSocket (`ws`) is **not** an MCP spec transport and
|
|
574
|
+
> the standard artifacts reject it.
|
|
575
|
+
|
|
576
|
+
> **Forward-compatible by transport.** The `serve` proxy is **byte-transparent**:
|
|
577
|
+
> it forwards every JSON-RPC message verbatim and only tees a copy to count
|
|
578
|
+
> `tools/call` round-trips. So newer MCP features ride through untouched —
|
|
579
|
+
> **MCP Apps** (the official `io.modelcontextprotocol/ui` extension) and **any
|
|
580
|
+
> reverse-DNS extension** negotiated at `initialize`. A connector whose server
|
|
581
|
+
> already speaks these deploys across every host and keeps its telemetry today,
|
|
582
|
+
> no agent-connector change required.
|
|
583
|
+
|
|
584
|
+
## Verification
|
|
585
|
+
|
|
586
|
+
The full single-API contract is **install-verified across the current platform
|
|
587
|
+
registry** by a committed registry-driven install-roundtrip harness that, for
|
|
588
|
+
every adapter, drives the real install → uninstall into an isolated HOME and
|
|
589
|
+
asserts on-disk placement + zero residue. A separate committed
|
|
590
|
+
`scripts/verify-host.mjs` driver installs real host CLIs from the verification
|
|
591
|
+
matrix and checks install → placement → clean-uninstall; live hook dispatch +
|
|
592
|
+
telemetry are proven end-to-end where the host can run headlessly. IDE
|
|
593
|
+
extensions / GUI editors with no headless CLI stay covered by the
|
|
594
|
+
install-roundtrip harness.
|
|
595
|
+
|
|
596
|
+
**Dogfood result:** porting the real multi-host context-mode plugin to
|
|
597
|
+
`defineConnector` collapsed **~20,322 lines of hand-maintained per-host code down
|
|
598
|
+
to ~76 lines** (a 99.63% reduction). See the reports under
|
|
599
|
+
[`docs/research/`](docs/research/) and [`CHANGELOG.md`](CHANGELOG.md).
|
|
600
|
+
|
|
601
|
+
## Development
|
|
602
|
+
|
|
603
|
+
```bash
|
|
604
|
+
npm install
|
|
605
|
+
npm run typecheck
|
|
606
|
+
npm run build
|
|
607
|
+
npm run dev -- detect # run the CLI from source via tsx
|
|
608
|
+
|
|
601
609
|
# Tests: scope + single-fork (useful on low-RAM machines).
|
|
602
610
|
npm run test:single -- tests/adapters/<host>.test.ts
|
|
603
|
-
```
|
|
604
|
-
|
|
605
|
-
## Contributing
|
|
606
|
-
|
|
607
|
-
PRs welcome — especially new host adapters and fixes verified against a host's
|
|
608
|
-
primary source. See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the dev workflow,
|
|
609
|
-
the single-fork test discipline, the **verify-first** rule for adapters, and the
|
|
610
|
-
new-host checklist. Want a new agent CLI supported? Open a
|
|
611
|
-
[host adapter request](https://github.com/ken-jo/agent-connector/issues/new?template=host_adapter_request.yml).
|
|
612
|
-
|
|
613
|
-
Security reports: see [SECURITY.md](SECURITY.md).
|
|
614
|
-
|
|
615
|
-
## License
|
|
616
|
-
|
|
617
|
-
Apache-2.0 © 2026 KenJo
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
## Contributing
|
|
614
|
+
|
|
615
|
+
PRs welcome — especially new host adapters and fixes verified against a host's
|
|
616
|
+
primary source. See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the dev workflow,
|
|
617
|
+
the single-fork test discipline, the **verify-first** rule for adapters, and the
|
|
618
|
+
new-host checklist. Want a new agent CLI supported? Open a
|
|
619
|
+
[host adapter request](https://github.com/ken-jo/agent-connector/issues/new?template=host_adapter_request.yml).
|
|
620
|
+
|
|
621
|
+
Security reports: see [SECURITY.md](SECURITY.md).
|
|
622
|
+
|
|
623
|
+
## License
|
|
624
|
+
|
|
625
|
+
Apache-2.0 © 2026 KenJo
|