@openziti/ziti-mcp-server 0.1.0

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 (210) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +868 -0
  3. package/dist/auth/client-credentials-flow.d.ts +21 -0
  4. package/dist/auth/client-credentials-flow.js +63 -0
  5. package/dist/auth/client-credentials-flow.js.map +1 -0
  6. package/dist/auth/device-auth-flow.d.ts +47 -0
  7. package/dist/auth/device-auth-flow.js +291 -0
  8. package/dist/auth/device-auth-flow.js.map +1 -0
  9. package/dist/clients/base.d.ts +74 -0
  10. package/dist/clients/base.js +109 -0
  11. package/dist/clients/base.js.map +1 -0
  12. package/dist/clients/claude.d.ts +22 -0
  13. package/dist/clients/claude.js +40 -0
  14. package/dist/clients/claude.js.map +1 -0
  15. package/dist/clients/cursor.d.ts +22 -0
  16. package/dist/clients/cursor.js +39 -0
  17. package/dist/clients/cursor.js.map +1 -0
  18. package/dist/clients/index.d.ts +33 -0
  19. package/dist/clients/index.js +39 -0
  20. package/dist/clients/index.js.map +1 -0
  21. package/dist/clients/types.d.ts +70 -0
  22. package/dist/clients/types.js +2 -0
  23. package/dist/clients/types.js.map +1 -0
  24. package/dist/clients/utils.d.ts +22 -0
  25. package/dist/clients/utils.js +46 -0
  26. package/dist/clients/utils.js.map +1 -0
  27. package/dist/clients/vscode.d.ts +76 -0
  28. package/dist/clients/vscode.js +159 -0
  29. package/dist/clients/vscode.js.map +1 -0
  30. package/dist/clients/windsurf.d.ts +22 -0
  31. package/dist/clients/windsurf.js +39 -0
  32. package/dist/clients/windsurf.js.map +1 -0
  33. package/dist/commands/init.d.ts +45 -0
  34. package/dist/commands/init.js +133 -0
  35. package/dist/commands/init.js.map +1 -0
  36. package/dist/commands/logout.d.ts +12 -0
  37. package/dist/commands/logout.js +90 -0
  38. package/dist/commands/logout.js.map +1 -0
  39. package/dist/commands/run.d.ts +15 -0
  40. package/dist/commands/run.js +94 -0
  41. package/dist/commands/run.js.map +1 -0
  42. package/dist/commands/session.d.ts +12 -0
  43. package/dist/commands/session.js +99 -0
  44. package/dist/commands/session.js.map +1 -0
  45. package/dist/index.d.ts +2 -0
  46. package/dist/index.js +105 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/server.d.ts +67 -0
  49. package/dist/server.js +171 -0
  50. package/dist/server.js.map +1 -0
  51. package/dist/tools/api-sessions.d.ts +3 -0
  52. package/dist/tools/api-sessions.js +86 -0
  53. package/dist/tools/api-sessions.js.map +1 -0
  54. package/dist/tools/auth-policies.d.ts +3 -0
  55. package/dist/tools/auth-policies.js +347 -0
  56. package/dist/tools/auth-policies.js.map +1 -0
  57. package/dist/tools/authenticators.d.ts +3 -0
  58. package/dist/tools/authenticators.js +183 -0
  59. package/dist/tools/authenticators.js.map +1 -0
  60. package/dist/tools/certificate-authorities.d.ts +3 -0
  61. package/dist/tools/certificate-authorities.js +288 -0
  62. package/dist/tools/certificate-authorities.js.map +1 -0
  63. package/dist/tools/config-types.d.ts +3 -0
  64. package/dist/tools/config-types.js +194 -0
  65. package/dist/tools/config-types.js.map +1 -0
  66. package/dist/tools/configs.d.ts +3 -0
  67. package/dist/tools/configs.js +203 -0
  68. package/dist/tools/configs.js.map +1 -0
  69. package/dist/tools/controller-settings.d.ts +3 -0
  70. package/dist/tools/controller-settings.js +219 -0
  71. package/dist/tools/controller-settings.js.map +1 -0
  72. package/dist/tools/controllers.d.ts +3 -0
  73. package/dist/tools/controllers.js +89 -0
  74. package/dist/tools/controllers.js.map +1 -0
  75. package/dist/tools/edge-router-policies.d.ts +3 -0
  76. package/dist/tools/edge-router-policies.js +262 -0
  77. package/dist/tools/edge-router-policies.js.map +1 -0
  78. package/dist/tools/edge-routers.d.ts +3 -0
  79. package/dist/tools/edge-routers.js +381 -0
  80. package/dist/tools/edge-routers.js.map +1 -0
  81. package/dist/tools/enrollments.d.ts +3 -0
  82. package/dist/tools/enrollments.js +187 -0
  83. package/dist/tools/enrollments.js.map +1 -0
  84. package/dist/tools/external-jwt-signers.d.ts +3 -0
  85. package/dist/tools/external-jwt-signers.js +242 -0
  86. package/dist/tools/external-jwt-signers.js.map +1 -0
  87. package/dist/tools/identities.d.ts +3 -0
  88. package/dist/tools/identities.js +741 -0
  89. package/dist/tools/identities.js.map +1 -0
  90. package/dist/tools/identity-types.d.ts +3 -0
  91. package/dist/tools/identity-types.js +58 -0
  92. package/dist/tools/identity-types.js.map +1 -0
  93. package/dist/tools/index.d.ts +3 -0
  94. package/dist/tools/index.js +101 -0
  95. package/dist/tools/index.js.map +1 -0
  96. package/dist/tools/posture-checks.d.ts +3 -0
  97. package/dist/tools/posture-checks.js +254 -0
  98. package/dist/tools/posture-checks.js.map +1 -0
  99. package/dist/tools/routers.d.ts +3 -0
  100. package/dist/tools/routers.js +169 -0
  101. package/dist/tools/routers.js.map +1 -0
  102. package/dist/tools/service-edge-router-policies.d.ts +3 -0
  103. package/dist/tools/service-edge-router-policies.js +282 -0
  104. package/dist/tools/service-edge-router-policies.js.map +1 -0
  105. package/dist/tools/service-policies.d.ts +3 -0
  106. package/dist/tools/service-policies.js +311 -0
  107. package/dist/tools/service-policies.js.map +1 -0
  108. package/dist/tools/services.d.ts +3 -0
  109. package/dist/tools/services.js +403 -0
  110. package/dist/tools/services.js.map +1 -0
  111. package/dist/tools/sessions.d.ts +3 -0
  112. package/dist/tools/sessions.js +86 -0
  113. package/dist/tools/sessions.js.map +1 -0
  114. package/dist/tools/terminators.d.ts +3 -0
  115. package/dist/tools/terminators.js +187 -0
  116. package/dist/tools/terminators.js.map +1 -0
  117. package/dist/tools/transit-routers.d.ts +3 -0
  118. package/dist/tools/transit-routers.js +169 -0
  119. package/dist/tools/transit-routers.js.map +1 -0
  120. package/dist/utils/analytics.d.ts +75 -0
  121. package/dist/utils/analytics.js +191 -0
  122. package/dist/utils/analytics.js.map +1 -0
  123. package/dist/utils/auth0-client.d.ts +27 -0
  124. package/dist/utils/auth0-client.js +67 -0
  125. package/dist/utils/auth0-client.js.map +1 -0
  126. package/dist/utils/authenticated-client.d.ts +6 -0
  127. package/dist/utils/authenticated-client.js +55 -0
  128. package/dist/utils/authenticated-client.js.map +1 -0
  129. package/dist/utils/config.d.ts +65 -0
  130. package/dist/utils/config.js +80 -0
  131. package/dist/utils/config.js.map +1 -0
  132. package/dist/utils/constants.d.ts +15 -0
  133. package/dist/utils/constants.js +17 -0
  134. package/dist/utils/constants.js.map +1 -0
  135. package/dist/utils/controller-client/client/client.gen.d.ts +2 -0
  136. package/dist/utils/controller-client/client/client.gen.js +229 -0
  137. package/dist/utils/controller-client/client/client.gen.js.map +1 -0
  138. package/dist/utils/controller-client/client/index.d.ts +8 -0
  139. package/dist/utils/controller-client/client/index.js +7 -0
  140. package/dist/utils/controller-client/client/index.js.map +1 -0
  141. package/dist/utils/controller-client/client/types.gen.d.ts +117 -0
  142. package/dist/utils/controller-client/client/types.gen.js +3 -0
  143. package/dist/utils/controller-client/client/types.gen.js.map +1 -0
  144. package/dist/utils/controller-client/client/utils.gen.d.ts +33 -0
  145. package/dist/utils/controller-client/client/utils.gen.js +232 -0
  146. package/dist/utils/controller-client/client/utils.gen.js.map +1 -0
  147. package/dist/utils/controller-client/client.gen.d.ts +12 -0
  148. package/dist/utils/controller-client/client.gen.js +6 -0
  149. package/dist/utils/controller-client/client.gen.js.map +1 -0
  150. package/dist/utils/controller-client/core/auth.gen.d.ts +18 -0
  151. package/dist/utils/controller-client/core/auth.gen.js +15 -0
  152. package/dist/utils/controller-client/core/auth.gen.js.map +1 -0
  153. package/dist/utils/controller-client/core/bodySerializer.gen.d.ts +25 -0
  154. package/dist/utils/controller-client/core/bodySerializer.gen.js +58 -0
  155. package/dist/utils/controller-client/core/bodySerializer.gen.js.map +1 -0
  156. package/dist/utils/controller-client/core/params.gen.d.ts +43 -0
  157. package/dist/utils/controller-client/core/params.gen.js +101 -0
  158. package/dist/utils/controller-client/core/params.gen.js.map +1 -0
  159. package/dist/utils/controller-client/core/pathSerializer.gen.d.ts +33 -0
  160. package/dist/utils/controller-client/core/pathSerializer.gen.js +115 -0
  161. package/dist/utils/controller-client/core/pathSerializer.gen.js.map +1 -0
  162. package/dist/utils/controller-client/core/queryKeySerializer.gen.d.ts +18 -0
  163. package/dist/utils/controller-client/core/queryKeySerializer.gen.js +100 -0
  164. package/dist/utils/controller-client/core/queryKeySerializer.gen.js.map +1 -0
  165. package/dist/utils/controller-client/core/serverSentEvents.gen.d.ts +71 -0
  166. package/dist/utils/controller-client/core/serverSentEvents.gen.js +136 -0
  167. package/dist/utils/controller-client/core/serverSentEvents.gen.js.map +1 -0
  168. package/dist/utils/controller-client/core/types.gen.d.ts +78 -0
  169. package/dist/utils/controller-client/core/types.gen.js +3 -0
  170. package/dist/utils/controller-client/core/types.gen.js.map +1 -0
  171. package/dist/utils/controller-client/core/utils.gen.d.ts +19 -0
  172. package/dist/utils/controller-client/core/utils.gen.js +88 -0
  173. package/dist/utils/controller-client/core/utils.gen.js.map +1 -0
  174. package/dist/utils/controller-client/index.d.ts +2 -0
  175. package/dist/utils/controller-client/index.js +3 -0
  176. package/dist/utils/controller-client/index.js.map +1 -0
  177. package/dist/utils/controller-client/sdk.gen.d.ts +1302 -0
  178. package/dist/utils/controller-client/sdk.gen.js +4436 -0
  179. package/dist/utils/controller-client/sdk.gen.js.map +1 -0
  180. package/dist/utils/controller-client/types.gen.d.ts +9170 -0
  181. package/dist/utils/controller-client/types.gen.js +3 -0
  182. package/dist/utils/controller-client/types.gen.js.map +1 -0
  183. package/dist/utils/glob.d.ts +75 -0
  184. package/dist/utils/glob.js +110 -0
  185. package/dist/utils/glob.js.map +1 -0
  186. package/dist/utils/http-utility.d.ts +5 -0
  187. package/dist/utils/http-utility.js +68 -0
  188. package/dist/utils/http-utility.js.map +1 -0
  189. package/dist/utils/keychain.d.ts +129 -0
  190. package/dist/utils/keychain.js +193 -0
  191. package/dist/utils/keychain.js.map +1 -0
  192. package/dist/utils/logger.d.ts +4 -0
  193. package/dist/utils/logger.js +28 -0
  194. package/dist/utils/logger.js.map +1 -0
  195. package/dist/utils/package.d.ts +3 -0
  196. package/dist/utils/package.js +9 -0
  197. package/dist/utils/package.js.map +1 -0
  198. package/dist/utils/scopes.d.ts +12 -0
  199. package/dist/utils/scopes.js +19 -0
  200. package/dist/utils/scopes.js.map +1 -0
  201. package/dist/utils/terminal.d.ts +35 -0
  202. package/dist/utils/terminal.js +409 -0
  203. package/dist/utils/terminal.js.map +1 -0
  204. package/dist/utils/tools.d.ts +63 -0
  205. package/dist/utils/tools.js +149 -0
  206. package/dist/utils/tools.js.map +1 -0
  207. package/dist/utils/types.d.ts +55 -0
  208. package/dist/utils/types.js +3 -0
  209. package/dist/utils/types.js.map +1 -0
  210. package/package.json +89 -0
@@ -0,0 +1,40 @@
1
+ import * as path from 'path';
2
+ import * as os from 'os';
3
+ import { BaseClientManager } from './base.js';
4
+ import { getPlatformPath, ensureDir } from './utils.js';
5
+ /**
6
+ * Client manager implementation for Claude Desktop.
7
+ *
8
+ * Responsible for configuring and managing the MCP server integration
9
+ * for the Claude Desktop application.
10
+ *
11
+ * @see {@link https://claude.ai/download | Claude Desktop Download}
12
+ */
13
+ export class ClaudeClientManager extends BaseClientManager {
14
+ constructor() {
15
+ super({
16
+ clientType: 'claude',
17
+ displayName: 'Claude Desktop',
18
+ capabilities: ['tools'],
19
+ });
20
+ }
21
+ /**
22
+ * Returns the path to the Claude Desktop configuration file.
23
+ *
24
+ * Resolves the platform-specific configuration directory,
25
+ * ensures the directory exists on disk, and constructs the full path
26
+ * to the Claude Desktop configuration file.
27
+ *
28
+ * @returns The absolute path to the configuration file.
29
+ */
30
+ getConfigPath() {
31
+ const configDir = getPlatformPath({
32
+ darwin: path.join(os.homedir(), 'Library', 'Application Support', 'Claude'),
33
+ win32: path.join('{APPDATA}', 'Claude'), // assumes getPlatformPath resolves {APPDATA}
34
+ linux: path.join(os.homedir(), '.config', 'Claude'),
35
+ });
36
+ ensureDir(configDir);
37
+ return path.join(configDir, 'claude_desktop_config.json');
38
+ }
39
+ }
40
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../src/clients/claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IACxD;QACE,KAAK,CAAC;YACJ,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,gBAAgB;YAC7B,YAAY,EAAE,CAAC,OAAO,CAAC;SACxB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,aAAa;QACX,MAAM,SAAS,GAAG,eAAe,CAAC;YAChC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,qBAAqB,EAAE,QAAQ,CAAC;YAC3E,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,6CAA6C;YACtF,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC;SACpD,CAAC,CAAC;QAEH,SAAS,CAAC,SAAS,CAAC,CAAC;QAErB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { BaseClientManager } from './base.js';
2
+ /**
3
+ * Client manager implementation for Cursor.
4
+ *
5
+ * Responsible for configuring and managing the MCP server integration
6
+ * for the Cursor code editor application.
7
+ *
8
+ * @see {@link https://www.cursor.com/ | Cursor Official Website}
9
+ */
10
+ export declare class CursorClientManager extends BaseClientManager {
11
+ constructor();
12
+ /**
13
+ * Returns the path to the Cursor configuration file.
14
+ *
15
+ * Resolves the platform-specific configuration directory,
16
+ * ensures the directory exists on disk, and constructs the full path
17
+ * to the MCP configuration file.
18
+ *
19
+ * @returns The absolute path to the configuration file.
20
+ */
21
+ getConfigPath(): string;
22
+ }
@@ -0,0 +1,39 @@
1
+ import * as path from 'path';
2
+ import * as os from 'os';
3
+ import { BaseClientManager } from './base.js';
4
+ import { getPlatformPath, ensureDir } from './utils.js';
5
+ /**
6
+ * Client manager implementation for Cursor.
7
+ *
8
+ * Responsible for configuring and managing the MCP server integration
9
+ * for the Cursor code editor application.
10
+ *
11
+ * @see {@link https://www.cursor.com/ | Cursor Official Website}
12
+ */
13
+ export class CursorClientManager extends BaseClientManager {
14
+ constructor() {
15
+ super({
16
+ clientType: 'cursor',
17
+ displayName: 'Cursor',
18
+ });
19
+ }
20
+ /**
21
+ * Returns the path to the Cursor configuration file.
22
+ *
23
+ * Resolves the platform-specific configuration directory,
24
+ * ensures the directory exists on disk, and constructs the full path
25
+ * to the MCP configuration file.
26
+ *
27
+ * @returns The absolute path to the configuration file.
28
+ */
29
+ getConfigPath() {
30
+ const configDir = getPlatformPath({
31
+ darwin: path.join(os.homedir(), '.cursor'),
32
+ win32: path.join('{APPDATA}', '.cursor'),
33
+ linux: path.join(os.homedir(), '.cursor'),
34
+ });
35
+ ensureDir(configDir);
36
+ return path.join(configDir, 'mcp.json');
37
+ }
38
+ }
39
+ //# sourceMappingURL=cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/clients/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IACxD;QACE,KAAK,CAAC;YACJ,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,QAAQ;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,aAAa;QACX,MAAM,SAAS,GAAG,eAAe,CAAC;YAChC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC;YAC1C,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;YACxC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC;SAC1C,CAAC,CAAC;QAEH,SAAS,CAAC,SAAS,CAAC,CAAC;QAErB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1C,CAAC;CACF"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * MCP client exports for configuration management.
3
+ *
4
+ * Provides initialized client manager instances for supported applications.
5
+ *
6
+ * @module clients
7
+ */
8
+ import { ClaudeClientManager } from './claude.js';
9
+ import { CursorClientManager } from './cursor.js';
10
+ import { WindsurfClientManager } from './windsurf.js';
11
+ import { VSCodeClientManager } from './vscode.js';
12
+ /**
13
+ * Namespace object containing initialized client managers.
14
+ *
15
+ * Each property corresponds to a supported client application.
16
+ *
17
+ * @property {ClaudeClientManager} claude - Manager for Claude Desktop.
18
+ * @property {CursorClientManager} cursor - Manager for Cursor code editor.
19
+ * @property {WindsurfClientManager} windsurf - Manager for Windsurf editor.
20
+ * @property {VSCodeClientManager} vscode - Manager for Visual Studio Code.
21
+ *
22
+ * @see {@link https://claude.ai/download | Claude Desktop}
23
+ * @see {@link https://www.cursor.com/ | Cursor Code Editor}
24
+ * @see {@link https://windsurf.com/editor | Windsurf Editor}
25
+ * @see {@link https://code.visualstudio.com/ | Visual Studio Code}
26
+ */
27
+ export declare const clients: {
28
+ claude: ClaudeClientManager;
29
+ cursor: CursorClientManager;
30
+ windsurf: WindsurfClientManager;
31
+ vscode: VSCodeClientManager;
32
+ };
33
+ export type { ClientType, ClientManager, ClientConfig, ServerConfig } from './types.js';
@@ -0,0 +1,39 @@
1
+ /**
2
+ * MCP client exports for configuration management.
3
+ *
4
+ * Provides initialized client manager instances for supported applications.
5
+ *
6
+ * @module clients
7
+ */
8
+ // Import client classes
9
+ import { ClaudeClientManager } from './claude.js';
10
+ import { CursorClientManager } from './cursor.js';
11
+ import { WindsurfClientManager } from './windsurf.js';
12
+ import { VSCodeClientManager } from './vscode.js';
13
+ // Create client manager instances
14
+ const claude = new ClaudeClientManager();
15
+ const cursor = new CursorClientManager();
16
+ const windsurf = new WindsurfClientManager();
17
+ const vscode = new VSCodeClientManager();
18
+ /**
19
+ * Namespace object containing initialized client managers.
20
+ *
21
+ * Each property corresponds to a supported client application.
22
+ *
23
+ * @property {ClaudeClientManager} claude - Manager for Claude Desktop.
24
+ * @property {CursorClientManager} cursor - Manager for Cursor code editor.
25
+ * @property {WindsurfClientManager} windsurf - Manager for Windsurf editor.
26
+ * @property {VSCodeClientManager} vscode - Manager for Visual Studio Code.
27
+ *
28
+ * @see {@link https://claude.ai/download | Claude Desktop}
29
+ * @see {@link https://www.cursor.com/ | Cursor Code Editor}
30
+ * @see {@link https://windsurf.com/editor | Windsurf Editor}
31
+ * @see {@link https://code.visualstudio.com/ | Visual Studio Code}
32
+ */
33
+ export const clients = {
34
+ claude,
35
+ cursor,
36
+ windsurf,
37
+ vscode,
38
+ };
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wBAAwB;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,kCAAkC;AAClC,MAAM,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;AACzC,MAAM,QAAQ,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAC7C,MAAM,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;AAEzC;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM;IACN,MAAM;IACN,QAAQ;IACR,MAAM;CACP,CAAC"}
@@ -0,0 +1,70 @@
1
+ import type { ClientOptions } from '../utils/types.js';
2
+ /**
3
+ * Supported client types.
4
+ *
5
+ * Represents the set of known MCP client applications supported by this project.
6
+ */
7
+ export type ClientType = 'claude' | 'cursor' | 'windsurf' | 'vscode';
8
+ /**
9
+ * MCP server configuration object used in client configuration files.
10
+ *
11
+ * Defines the parameters needed to launch the MCP server in the context of a client application.
12
+ */
13
+ export interface ServerConfig {
14
+ /** Command-line arguments to pass when launching the MCP server. */
15
+ args: string[];
16
+ /** Base command to execute (typically 'npx' or similar). */
17
+ command: string;
18
+ /** Optional environment variables to set when executing the command. */
19
+ env?: Record<string, string>;
20
+ /** Optional list of capabilities supported by the client integration. */
21
+ capabilities?: string[];
22
+ }
23
+ /**
24
+ * Generic client configuration format shared across different MCP clients.
25
+ *
26
+ * Defines the structure of the configuration file used by client applications
27
+ * to specify MCP server settings.
28
+ */
29
+ export interface ClientConfig {
30
+ /** Dictionary of MCP server configurations, keyed by server identifier. */
31
+ mcpServers: Record<string, ServerConfig>;
32
+ /** Additional client-specific configuration fields. */
33
+ [key: string]: any;
34
+ }
35
+ /**
36
+ * Interface for client managers responsible for handling client-specific configuration.
37
+ *
38
+ * Client managers locate, read, and update configuration files
39
+ * to integrate MCP server support into client applications.
40
+ */
41
+ export interface ClientManager {
42
+ /**
43
+ * Returns the absolute path to the client's configuration file.
44
+ *
45
+ * @returns The full filesystem path to the configuration file.
46
+ * @throws Error if the configuration directory cannot be created or accessed.
47
+ */
48
+ getConfigPath(): string;
49
+ /**
50
+ * Updates the client's configuration with OpenZiti MCP server settings.
51
+ *
52
+ * @param options - Configuration options, including enabled tools and read-only mode.
53
+ * @returns A Promise that resolves when the configuration update has been completed successfully.
54
+ * @throws Error if the configuration cannot be written to disk.
55
+ */
56
+ configure(options: ClientOptions): Promise<void>;
57
+ }
58
+ /**
59
+ * Platform-specific path templates.
60
+ *
61
+ * Provides OS-specific configuration directory paths for Darwin (macOS), Windows, and Linux.
62
+ */
63
+ export interface PlatformPaths {
64
+ /** Path template for macOS platforms ('darwin'). */
65
+ darwin: string;
66
+ /** Path template for Windows platforms ('win32'). */
67
+ win32: string;
68
+ /** Path template for Linux platforms ('linux'). */
69
+ linux: string;
70
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/clients/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import type { PlatformPaths } from './types.js';
2
+ /**
3
+ * Ensures that a directory exists on disk.
4
+ *
5
+ * If the directory does not already exist, it will be created recursively.
6
+ * Throws an error if the directory cannot be created.
7
+ *
8
+ * @param dir - The absolute path of the directory to ensure exists.
9
+ * @throws Error if directory creation fails due to filesystem errors.
10
+ */
11
+ export declare function ensureDir(dir: string): void;
12
+ /**
13
+ * Resolves the appropriate configuration directory path for the current operating system.
14
+ *
15
+ * Accepts an object mapping platform identifiers (`darwin`, `win32`, `linux`) to path templates.
16
+ * On Windows, replaces `{APPDATA}` placeholders with the actual APPDATA environment variable.
17
+ *
18
+ * @param paths - An object containing platform-specific path templates.
19
+ * @returns The resolved configuration path for the current platform.
20
+ * @throws Error if the platform is unsupported or required environment variables are missing.
21
+ */
22
+ export declare function getPlatformPath(paths: PlatformPaths): string;
@@ -0,0 +1,46 @@
1
+ import * as fs from 'fs';
2
+ /**
3
+ * Ensures that a directory exists on disk.
4
+ *
5
+ * If the directory does not already exist, it will be created recursively.
6
+ * Throws an error if the directory cannot be created.
7
+ *
8
+ * @param dir - The absolute path of the directory to ensure exists.
9
+ * @throws Error if directory creation fails due to filesystem errors.
10
+ */
11
+ export function ensureDir(dir) {
12
+ try {
13
+ fs.mkdirSync(dir, { recursive: true });
14
+ }
15
+ catch (err) {
16
+ throw new Error(`Failed to create directory: ${err.message}`);
17
+ }
18
+ }
19
+ /**
20
+ * Resolves the appropriate configuration directory path for the current operating system.
21
+ *
22
+ * Accepts an object mapping platform identifiers (`darwin`, `win32`, `linux`) to path templates.
23
+ * On Windows, replaces `{APPDATA}` placeholders with the actual APPDATA environment variable.
24
+ *
25
+ * @param paths - An object containing platform-specific path templates.
26
+ * @returns The resolved configuration path for the current platform.
27
+ * @throws Error if the platform is unsupported or required environment variables are missing.
28
+ */
29
+ export function getPlatformPath(paths) {
30
+ switch (process.platform) {
31
+ case 'darwin':
32
+ return paths.darwin;
33
+ case 'win32': {
34
+ const APPDATA = process.env.APPDATA;
35
+ if (!APPDATA) {
36
+ throw new Error('APPDATA environment variable not set');
37
+ }
38
+ return paths.win32.replace('{APPDATA}', APPDATA);
39
+ }
40
+ case 'linux':
41
+ return paths.linux;
42
+ default:
43
+ throw new Error(`Unsupported operating system: ${process.platform}`);
44
+ }
45
+ }
46
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/clients/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,IAAI,CAAC;QACH,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,+BAAgC,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,KAAoB;IAClD,QAAQ,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzB,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,KAAK,OAAO,CAAC,CAAC,CAAC;YACb,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;YACpC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;YAC1D,CAAC;YACD,OAAO,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;QACD,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB;YACE,MAAM,IAAI,KAAK,CAAC,iCAAiC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { BaseClientManager } from './base.js';
2
+ import type { ClientOptions } from '../utils/types.js';
3
+ /**
4
+ * VS Code configuration scope options
5
+ */
6
+ export type VSCodeScope = 'workspace' | 'global';
7
+ /**
8
+ * Extended client options for VS Code that includes scope selection
9
+ */
10
+ export interface VSCodeClientOptions extends ClientOptions {
11
+ scope?: VSCodeScope;
12
+ workspaceFolder?: string;
13
+ }
14
+ /**
15
+ * Client manager implementation for VS Code.
16
+ *
17
+ * Responsible for configuring and managing the MCP server integration
18
+ * for the VS Code editor application with support for both workspace-specific
19
+ * and global configurations.
20
+ *
21
+ * @see {@link https://code.visualstudio.com/ | VS Code Official Website}
22
+ */
23
+ export declare class VSCodeClientManager extends BaseClientManager {
24
+ private selectedScope;
25
+ private selectedWorkspaceFolder?;
26
+ constructor();
27
+ /**
28
+ * Returns the path to the VS Code configuration file.
29
+ * Uses the currently selected scope and workspace folder.
30
+ *
31
+ * @returns The absolute path to the configuration file.
32
+ */
33
+ getConfigPath(): string;
34
+ /**
35
+ * Returns the path to the global VS Code configuration file.
36
+ *
37
+ * @returns The absolute path to the global configuration file.
38
+ */
39
+ private getGlobalConfigPath;
40
+ /**
41
+ * Prompts user to select between workspace and global scope.
42
+ *
43
+ * @returns Promise resolving to the selected scope
44
+ */
45
+ private promptForScope;
46
+ /**
47
+ * Prompts user for workspace folder path.
48
+ *
49
+ * @returns Promise resolving to the validated workspace folder path
50
+ */
51
+ private promptForWorkspaceFolder;
52
+ /**
53
+ * Enhanced configure method that handles VS Code-specific scope selection.
54
+ *
55
+ * First prompts for configuration scope (workspace vs global), then if workspace
56
+ * is selected, prompts for the project folder path.
57
+ *
58
+ * @param options - Client configuration options
59
+ */
60
+ configure(options: VSCodeClientOptions): Promise<void>;
61
+ /**
62
+ * Loads VS Code-specific configuration from disk.
63
+ * VS Code uses settings.json format, not the mcpServers format used by other clients.
64
+ *
65
+ * @param configPath - Path to the VS Code settings file
66
+ * @returns Parsed configuration object
67
+ */
68
+ private readVSCodeConfig;
69
+ /**
70
+ * Writes VS Code configuration to disk with proper formatting.
71
+ *
72
+ * @param configPath - Path where the configuration should be saved
73
+ * @param config - Configuration object to serialize and write
74
+ */
75
+ private writeVSCodeConfig;
76
+ }
@@ -0,0 +1,159 @@
1
+ import * as path from 'path';
2
+ import * as os from 'os';
3
+ import * as fs from 'fs';
4
+ import chalk from 'chalk';
5
+ import { BaseClientManager } from './base.js';
6
+ import { getPlatformPath, ensureDir } from './utils.js';
7
+ import { log } from '../utils/logger.js';
8
+ import { cliOutput, promptForChoice, promptForPath } from '../utils/terminal.js';
9
+ /**
10
+ * Client manager implementation for VS Code.
11
+ *
12
+ * Responsible for configuring and managing the MCP server integration
13
+ * for the VS Code editor application with support for both workspace-specific
14
+ * and global configurations.
15
+ *
16
+ * @see {@link https://code.visualstudio.com/ | VS Code Official Website}
17
+ */
18
+ export class VSCodeClientManager extends BaseClientManager {
19
+ selectedScope = 'global';
20
+ selectedWorkspaceFolder;
21
+ constructor() {
22
+ super({
23
+ clientType: 'vscode',
24
+ displayName: 'VS Code',
25
+ });
26
+ }
27
+ /**
28
+ * Returns the path to the VS Code configuration file.
29
+ * Uses the currently selected scope and workspace folder.
30
+ *
31
+ * @returns The absolute path to the configuration file.
32
+ */
33
+ getConfigPath() {
34
+ if (this.selectedScope === 'workspace') {
35
+ if (!this.selectedWorkspaceFolder) {
36
+ // Fallback to global if workspace folder not set
37
+ return this.getGlobalConfigPath();
38
+ }
39
+ if (!fs.existsSync(this.selectedWorkspaceFolder)) {
40
+ throw new Error(`Workspace folder does not exist: ${this.selectedWorkspaceFolder}`);
41
+ }
42
+ const vscodeDir = path.join(this.selectedWorkspaceFolder, '.vscode');
43
+ ensureDir(vscodeDir);
44
+ return path.join(vscodeDir, 'mcp.json');
45
+ }
46
+ return this.getGlobalConfigPath();
47
+ }
48
+ /**
49
+ * Returns the path to the global VS Code configuration file.
50
+ *
51
+ * @returns The absolute path to the global configuration file.
52
+ */
53
+ getGlobalConfigPath() {
54
+ const configDir = getPlatformPath({
55
+ darwin: path.join(os.homedir(), 'Library', 'Application Support', 'Code', 'User'),
56
+ win32: path.join('{APPDATA}', 'Code', 'User'),
57
+ linux: path.join(os.homedir(), '.config', 'Code', 'User'),
58
+ });
59
+ ensureDir(configDir);
60
+ return path.join(configDir, 'mcp.json');
61
+ }
62
+ /**
63
+ * Prompts user to select between workspace and global scope.
64
+ *
65
+ * @returns Promise resolving to the selected scope
66
+ */
67
+ async promptForScope() {
68
+ return promptForChoice('Where would you like to configure the OpenZiti MCP server for VS Code?', [
69
+ {
70
+ label: 'Workspace - Configure for a specific project/repository',
71
+ value: 'workspace',
72
+ },
73
+ { label: 'Global - Configure for all VS Code instances', value: 'global' },
74
+ ], 'workspace');
75
+ }
76
+ /**
77
+ * Prompts user for workspace folder path.
78
+ *
79
+ * @returns Promise resolving to the validated workspace folder path
80
+ */
81
+ async promptForWorkspaceFolder() {
82
+ return promptForPath('Enter the absolute path to your workspace/project folder: ', {
83
+ required: true,
84
+ mustExist: true,
85
+ mustBeDirectory: true,
86
+ });
87
+ }
88
+ /**
89
+ * Enhanced configure method that handles VS Code-specific scope selection.
90
+ *
91
+ * First prompts for configuration scope (workspace vs global), then if workspace
92
+ * is selected, prompts for the project folder path.
93
+ *
94
+ * @param options - Client configuration options
95
+ */
96
+ async configure(options) {
97
+ // Set scope from options or prompt user
98
+ if (options.scope) {
99
+ this.selectedScope = options.scope;
100
+ this.selectedWorkspaceFolder = options.workspaceFolder;
101
+ }
102
+ else {
103
+ this.selectedScope = await this.promptForScope();
104
+ }
105
+ // If workspace scope but no folder specified, prompt for it
106
+ if (this.selectedScope === 'workspace' && !this.selectedWorkspaceFolder) {
107
+ this.selectedWorkspaceFolder = await this.promptForWorkspaceFolder();
108
+ }
109
+ const configPath = this.getConfigPath();
110
+ const config = this.readVSCodeConfig(configPath);
111
+ const serverConfig = this.createServerConfig(options);
112
+ // VS Code uses a different configuration structure for MCP
113
+ if (!config['servers']) {
114
+ config['servers'] = {};
115
+ }
116
+ config['servers']['ziti'] = serverConfig;
117
+ this.writeVSCodeConfig(configPath, config);
118
+ const scopeDescription = this.selectedScope === 'workspace' ? `workspace (${this.selectedWorkspaceFolder})` : 'global';
119
+ log(`Updated ${this.displayName} ${scopeDescription} config file at: ${configPath}`);
120
+ if (this.selectedScope === 'workspace') {
121
+ cliOutput(`\n${chalk.green('✓')} OpenZiti MCP server configured for workspace.\n` +
122
+ `${chalk.yellow('Note:')} Make sure to open VS Code in the workspace folder: ${this.selectedWorkspaceFolder}\n` +
123
+ `${chalk.yellow('Restart VS Code')} to apply changes.\n`);
124
+ }
125
+ else {
126
+ cliOutput(`\n${chalk.green('✓')} OpenZiti MCP server configured globally for ${this.displayName}.\n` +
127
+ `${chalk.yellow('Restart VS Code')} to apply changes.\n`);
128
+ }
129
+ }
130
+ /**
131
+ * Loads VS Code-specific configuration from disk.
132
+ * VS Code uses settings.json format, not the mcpServers format used by other clients.
133
+ *
134
+ * @param configPath - Path to the VS Code settings file
135
+ * @returns Parsed configuration object
136
+ */
137
+ readVSCodeConfig(configPath) {
138
+ if (fs.existsSync(configPath)) {
139
+ try {
140
+ const data = fs.readFileSync(configPath, 'utf-8');
141
+ return JSON.parse(data);
142
+ }
143
+ catch (err) {
144
+ log(`Warning: Could not read VS Code config at ${configPath}: ${err}`);
145
+ }
146
+ }
147
+ return {};
148
+ }
149
+ /**
150
+ * Writes VS Code configuration to disk with proper formatting.
151
+ *
152
+ * @param configPath - Path where the configuration should be saved
153
+ * @param config - Configuration object to serialize and write
154
+ */
155
+ writeVSCodeConfig(configPath, config) {
156
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
157
+ }
158
+ }
159
+ //# sourceMappingURL=vscode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vscode.js","sourceRoot":"","sources":["../../src/clients/vscode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAgBjF;;;;;;;;GAQG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IAChD,aAAa,GAAgB,QAAQ,CAAC;IACtC,uBAAuB,CAAU;IAEzC;QACE,KAAK,CAAC;YACJ,UAA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AC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;;;;OAKG;IACK,iBAAiB,CAAC,UAAkB,EAAE,MAA2B;QACvE,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { BaseClientManager } from './base.js';
2
+ /**
3
+ * Client manager implementation for Windsurf.
4
+ *
5
+ * Responsible for configuring and managing the MCP server integration
6
+ * for the Windsurf Editor application.
7
+ *
8
+ * @see {@link https://windsurf.com/editor | Windsurf Editor}
9
+ */
10
+ export declare class WindsurfClientManager extends BaseClientManager {
11
+ constructor();
12
+ /**
13
+ * Returns the path to the Windsurf configuration file.
14
+ *
15
+ * Resolves the platform-specific configuration directory,
16
+ * ensures the directory exists on disk, and constructs the full path
17
+ * to the MCP configuration file.
18
+ *
19
+ * @returns The absolute path to the configuration file.
20
+ */
21
+ getConfigPath(): string;
22
+ }
@@ -0,0 +1,39 @@
1
+ import * as path from 'path';
2
+ import * as os from 'os';
3
+ import { BaseClientManager } from './base.js';
4
+ import { getPlatformPath, ensureDir } from './utils.js';
5
+ /**
6
+ * Client manager implementation for Windsurf.
7
+ *
8
+ * Responsible for configuring and managing the MCP server integration
9
+ * for the Windsurf Editor application.
10
+ *
11
+ * @see {@link https://windsurf.com/editor | Windsurf Editor}
12
+ */
13
+ export class WindsurfClientManager extends BaseClientManager {
14
+ constructor() {
15
+ super({
16
+ clientType: 'windsurf',
17
+ displayName: 'Windsurf',
18
+ });
19
+ }
20
+ /**
21
+ * Returns the path to the Windsurf configuration file.
22
+ *
23
+ * Resolves the platform-specific configuration directory,
24
+ * ensures the directory exists on disk, and constructs the full path
25
+ * to the MCP configuration file.
26
+ *
27
+ * @returns The absolute path to the configuration file.
28
+ */
29
+ getConfigPath() {
30
+ const configDir = getPlatformPath({
31
+ darwin: path.join(os.homedir(), '.codeium', 'windsurf'),
32
+ win32: path.join('{APPDATA}', '.codeium', 'windsurf'),
33
+ linux: path.join(os.homedir(), '.codeium', 'windsurf'),
34
+ });
35
+ ensureDir(configDir);
36
+ return path.join(configDir, 'mcp_config.json');
37
+ }
38
+ }
39
+ //# sourceMappingURL=windsurf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/clients/windsurf.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iBAAiB;IAC1D;QACE,KAAK,CAAC;YACJ,UAAU,EAAE,UAAU;YACtB,WAAW,EAAE,UAAU;SACxB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,aAAa;QACX,MAAM,SAAS,GAAG,eAAe,CAAC;YAChC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC;YACvD,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC;YACrD,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC;SACvD,CAAC,CAAC;QAEH,SAAS,CAAC,SAAS,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACjD,CAAC;CACF"}