@softtechai/quickmcp 1.0.16 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/README.md +3 -3
  2. package/dist/auth/auth-utils.d.ts +130 -0
  3. package/dist/auth/auth-utils.d.ts.map +1 -0
  4. package/dist/auth/auth-utils.js +600 -0
  5. package/dist/auth/auth-utils.js.map +1 -0
  6. package/dist/auth/jwks-provider.d.ts +9 -0
  7. package/dist/auth/jwks-provider.d.ts.map +1 -0
  8. package/dist/auth/jwks-provider.js +56 -0
  9. package/dist/auth/jwks-provider.js.map +1 -0
  10. package/dist/auth/token-utils.d.ts +40 -0
  11. package/dist/auth/token-utils.d.ts.map +1 -0
  12. package/dist/auth/token-utils.js +162 -0
  13. package/dist/auth/token-utils.js.map +1 -0
  14. package/dist/client/MCPClient.js +5 -4
  15. package/dist/client/MCPClient.js.map +1 -1
  16. package/dist/config/auth-config.d.ts +16 -0
  17. package/dist/config/auth-config.d.ts.map +1 -0
  18. package/dist/config/auth-config.js +107 -0
  19. package/dist/config/auth-config.js.map +1 -0
  20. package/dist/constant/constant.d.ts +20 -0
  21. package/dist/constant/constant.d.ts.map +1 -0
  22. package/dist/constant/constant.js +24 -0
  23. package/dist/constant/constant.js.map +1 -0
  24. package/dist/database/async-datastore.d.ts +6 -0
  25. package/dist/database/async-datastore.d.ts.map +1 -0
  26. package/dist/database/async-datastore.js +15 -0
  27. package/dist/database/async-datastore.js.map +1 -0
  28. package/dist/database/database-utils.d.ts +6 -0
  29. package/dist/database/database-utils.d.ts.map +1 -0
  30. package/dist/database/database-utils.js +29 -0
  31. package/dist/database/database-utils.js.map +1 -0
  32. package/dist/database/datastore.d.ts +164 -0
  33. package/dist/database/datastore.d.ts.map +1 -0
  34. package/dist/{parsers/types/index.js → database/datastore.js} +1 -0
  35. package/dist/database/datastore.js.map +1 -0
  36. package/dist/database/factory.d.ts +4 -0
  37. package/dist/database/factory.d.ts.map +1 -0
  38. package/dist/database/factory.js +32 -0
  39. package/dist/database/factory.js.map +1 -0
  40. package/dist/database/jdbc-manager.d.ts +49 -0
  41. package/dist/database/jdbc-manager.d.ts.map +1 -0
  42. package/dist/database/jdbc-manager.js +50 -0
  43. package/dist/database/jdbc-manager.js.map +1 -0
  44. package/dist/database/sqlite-manager.d.ts +46 -44
  45. package/dist/database/sqlite-manager.d.ts.map +1 -1
  46. package/dist/database/sqlite-manager.js +492 -42
  47. package/dist/database/sqlite-manager.js.map +1 -1
  48. package/dist/database/supabase-manager.d.ts +58 -0
  49. package/dist/database/supabase-manager.d.ts.map +1 -0
  50. package/dist/database/supabase-manager.js +432 -0
  51. package/dist/database/supabase-manager.js.map +1 -0
  52. package/dist/generators/MCPServerGenerator.d.ts +103 -20
  53. package/dist/generators/MCPServerGenerator.d.ts.map +1 -1
  54. package/dist/generators/MCPServerGenerator.js +6930 -128
  55. package/dist/generators/MCPServerGenerator.js.map +1 -1
  56. package/dist/index.d.ts +0 -1
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +8 -1
  59. package/dist/index.js.map +1 -1
  60. package/dist/integrated-mcp-server-new.d.ts +14 -2
  61. package/dist/integrated-mcp-server-new.d.ts.map +1 -1
  62. package/dist/integrated-mcp-server-new.js +270 -180
  63. package/dist/integrated-mcp-server-new.js.map +1 -1
  64. package/dist/mcp-core/McpCoreService.d.ts +63 -0
  65. package/dist/mcp-core/McpCoreService.d.ts.map +1 -0
  66. package/dist/mcp-core/McpCoreService.js +492 -0
  67. package/dist/mcp-core/McpCoreService.js.map +1 -0
  68. package/dist/parsers/CsvParser.d.ts +1 -1
  69. package/dist/parsers/CsvParser.d.ts.map +1 -1
  70. package/dist/parsers/CsvParser.js +3 -2
  71. package/dist/parsers/CsvParser.js.map +1 -1
  72. package/dist/parsers/DatabaseParser.d.ts.map +1 -1
  73. package/dist/parsers/DatabaseParser.js +9 -8
  74. package/dist/parsers/DatabaseParser.js.map +1 -1
  75. package/dist/parsers/ExcelParser.d.ts +15 -0
  76. package/dist/parsers/ExcelParser.d.ts.map +1 -1
  77. package/dist/parsers/ExcelParser.js +287 -21
  78. package/dist/parsers/ExcelParser.js.map +1 -1
  79. package/dist/parsers/WebPageParser.d.ts +5 -0
  80. package/dist/parsers/WebPageParser.d.ts.map +1 -0
  81. package/dist/parsers/WebPageParser.js +35 -0
  82. package/dist/parsers/WebPageParser.js.map +1 -0
  83. package/dist/parsers/index.d.ts +3 -2
  84. package/dist/parsers/index.d.ts.map +1 -1
  85. package/dist/parsers/index.js +19 -16
  86. package/dist/parsers/index.js.map +1 -1
  87. package/dist/server/api/askApi.d.ts +41 -0
  88. package/dist/server/api/askApi.d.ts.map +1 -0
  89. package/dist/server/api/askApi.js +479 -0
  90. package/dist/server/api/askApi.js.map +1 -0
  91. package/dist/server/api/authApi.d.ts +101 -0
  92. package/dist/server/api/authApi.d.ts.map +1 -0
  93. package/dist/server/api/authApi.js +1472 -0
  94. package/dist/server/api/authApi.js.map +1 -0
  95. package/dist/server/api/authProperty.d.ts +18 -0
  96. package/dist/server/api/authProperty.d.ts.map +1 -0
  97. package/dist/server/api/authProperty.js +41 -0
  98. package/dist/server/api/authProperty.js.map +1 -0
  99. package/dist/server/api/configApi.d.ts +15 -0
  100. package/dist/server/api/configApi.d.ts.map +1 -0
  101. package/dist/server/api/configApi.js +42 -0
  102. package/dist/server/api/configApi.js.map +1 -0
  103. package/dist/server/api/databaseApi.d.ts +14 -0
  104. package/dist/server/api/databaseApi.d.ts.map +1 -0
  105. package/dist/server/api/databaseApi.js +111 -0
  106. package/dist/server/api/databaseApi.js.map +1 -0
  107. package/dist/server/api/directoryApi.d.ts +9 -0
  108. package/dist/server/api/directoryApi.d.ts.map +1 -0
  109. package/dist/server/api/directoryApi.js +103 -0
  110. package/dist/server/api/directoryApi.js.map +1 -0
  111. package/dist/server/api/generateApi.d.ts +24 -0
  112. package/dist/server/api/generateApi.d.ts.map +1 -0
  113. package/dist/server/api/generateApi.js +457 -0
  114. package/dist/server/api/generateApi.js.map +1 -0
  115. package/dist/server/api/healthApi.d.ts +9 -0
  116. package/dist/server/api/healthApi.d.ts.map +1 -0
  117. package/dist/server/api/healthApi.js +15 -0
  118. package/dist/server/api/healthApi.js.map +1 -0
  119. package/dist/server/api/indexApi.d.ts +21 -0
  120. package/dist/server/api/indexApi.d.ts.map +1 -0
  121. package/dist/server/api/indexApi.js +61 -0
  122. package/dist/server/api/indexApi.js.map +1 -0
  123. package/dist/server/api/logsApi.d.ts +12 -0
  124. package/dist/server/api/logsApi.d.ts.map +1 -0
  125. package/dist/server/api/logsApi.js +37 -0
  126. package/dist/server/api/logsApi.js.map +1 -0
  127. package/dist/server/api/mcpApi.d.ts +20 -0
  128. package/dist/server/api/mcpApi.d.ts.map +1 -0
  129. package/dist/server/api/mcpApi.js +120 -0
  130. package/dist/server/api/mcpApi.js.map +1 -0
  131. package/dist/server/api/nameApi.d.ts +21 -0
  132. package/dist/server/api/nameApi.d.ts.map +1 -0
  133. package/dist/server/api/nameApi.js +42 -0
  134. package/dist/server/api/nameApi.js.map +1 -0
  135. package/dist/server/api/parseApi.d.ts +9 -0
  136. package/dist/server/api/parseApi.d.ts.map +1 -0
  137. package/dist/server/api/parseApi.js +3245 -0
  138. package/dist/server/api/parseApi.js.map +1 -0
  139. package/dist/server/api/serverApi.d.ts +44 -0
  140. package/dist/server/api/serverApi.d.ts.map +1 -0
  141. package/dist/server/api/serverApi.js +417 -0
  142. package/dist/server/api/serverApi.js.map +1 -0
  143. package/dist/{dynamic-mcp-executor.d.ts → server/dynamic-mcp-executor.d.ts} +4 -5
  144. package/dist/server/dynamic-mcp-executor.d.ts.map +1 -0
  145. package/dist/server/dynamic-mcp-executor.js +62 -0
  146. package/dist/server/dynamic-mcp-executor.js.map +1 -0
  147. package/dist/server/port-utils.d.ts +14 -0
  148. package/dist/server/port-utils.d.ts.map +1 -0
  149. package/dist/server/port-utils.js +31 -0
  150. package/dist/server/port-utils.js.map +1 -0
  151. package/dist/server/server-utils.d.ts +13 -0
  152. package/dist/server/server-utils.d.ts.map +1 -0
  153. package/dist/server/server-utils.js +72 -0
  154. package/dist/server/server-utils.js.map +1 -0
  155. package/dist/{web → server}/server.d.ts +1 -0
  156. package/dist/server/server.d.ts.map +1 -0
  157. package/dist/server/server.js +535 -0
  158. package/dist/server/server.js.map +1 -0
  159. package/dist/server/tool-executer.d.ts +101 -0
  160. package/dist/server/tool-executer.d.ts.map +1 -0
  161. package/dist/server/tool-executer.js +6198 -0
  162. package/dist/server/tool-executer.js.map +1 -0
  163. package/dist/types/index.d.ts +1197 -4
  164. package/dist/types/index.d.ts.map +1 -1
  165. package/dist/types/index.js +1028 -0
  166. package/dist/types/index.js.map +1 -1
  167. package/dist/upload/upload-utils.d.ts +4 -0
  168. package/dist/upload/upload-utils.d.ts.map +1 -0
  169. package/dist/upload/upload-utils.js +29 -0
  170. package/dist/upload/upload-utils.js.map +1 -0
  171. package/dist/utils/deployment-util.d.ts +14 -0
  172. package/dist/utils/deployment-util.d.ts.map +1 -0
  173. package/dist/utils/deployment-util.js +46 -0
  174. package/dist/utils/deployment-util.js.map +1 -0
  175. package/dist/utils/logger.d.ts +15 -0
  176. package/dist/utils/logger.d.ts.map +1 -0
  177. package/dist/utils/logger.js +56 -0
  178. package/dist/utils/logger.js.map +1 -0
  179. package/package.json +18 -6
  180. package/quickmcp-direct-stdio.js +183 -187
  181. package/src/web/public/app.js +15370 -1471
  182. package/src/web/public/authorization.html +868 -0
  183. package/src/web/public/database-tables.html +283 -547
  184. package/src/web/public/how-to-use.html +446 -462
  185. package/src/web/public/how-to-use.js +4 -4
  186. package/src/web/public/images/app/activepieces.png +0 -0
  187. package/src/web/public/images/app/airtable.png +0 -0
  188. package/src/web/public/images/app/androidstudio.png +0 -0
  189. package/src/web/public/images/app/antigravity.png +0 -0
  190. package/src/web/public/images/app/applenotes.png +0 -0
  191. package/src/web/public/images/app/applereminders.png +0 -0
  192. package/src/web/public/images/app/asana.png +0 -0
  193. package/src/web/public/images/app/azureai.png +0 -0
  194. package/src/web/public/images/app/bash.png +0 -0
  195. package/src/web/public/images/app/bearnotes.png +0 -0
  196. package/src/web/public/images/app/bitbucket.png +0 -0
  197. package/src/web/public/images/app/claude.png +0 -0
  198. package/src/web/public/images/app/cli.png +0 -0
  199. package/src/web/public/images/app/clickup.png +0 -0
  200. package/src/web/public/images/app/cohere.png +0 -0
  201. package/src/web/public/images/app/confluence.png +0 -0
  202. package/src/web/public/images/app/confluence2.png +0 -0
  203. package/src/web/public/images/app/curl.png +0 -0
  204. package/src/web/public/images/app/curl_mini.png +0 -0
  205. package/src/web/public/images/app/cursor.png +0 -0
  206. package/src/web/public/images/app/db2.png +0 -0
  207. package/src/web/public/images/app/deepseek.png +0 -0
  208. package/src/web/public/images/app/discord.png +0 -0
  209. package/src/web/public/images/app/docker.png +0 -0
  210. package/src/web/public/images/app/dockerhub.png +0 -0
  211. package/src/web/public/images/app/dropbox.png +0 -0
  212. package/src/web/public/images/app/elasticsearch.png +0 -0
  213. package/src/web/public/images/app/facebook.png +0 -0
  214. package/src/web/public/images/app/falai.png +0 -0
  215. package/src/web/public/images/app/fireworks.png +0 -0
  216. package/src/web/public/images/app/gdrive.png +0 -0
  217. package/src/web/public/images/app/gemini.png +0 -0
  218. package/src/web/public/images/app/github.png +0 -0
  219. package/src/web/public/images/app/githubcopilot.png +0 -0
  220. package/src/web/public/images/app/gitlab.png +0 -0
  221. package/src/web/public/images/app/gmail.png +0 -0
  222. package/src/web/public/images/app/googlecalender.png +0 -0
  223. package/src/web/public/images/app/googledocs.png +0 -0
  224. package/src/web/public/images/app/googlesheets.png +0 -0
  225. package/src/web/public/images/app/gradle.png +0 -0
  226. package/src/web/public/images/app/grafana.png +0 -0
  227. package/src/web/public/images/app/graphql.png +0 -0
  228. package/src/web/public/images/app/grok.png +0 -0
  229. package/src/web/public/images/app/groq.png +0 -0
  230. package/src/web/public/images/app/hazelcast.png +0 -0
  231. package/src/web/public/images/app/huggingface.png +0 -0
  232. package/src/web/public/images/app/imessage.png +0 -0
  233. package/src/web/public/images/app/instagram.png +0 -0
  234. package/src/web/public/images/app/intellij.png +0 -0
  235. package/src/web/public/images/app/jenkins.png +0 -0
  236. package/src/web/public/images/app/jira.png +0 -0
  237. package/src/web/public/images/app/kafka.png +0 -0
  238. package/src/web/public/images/app/kubernetes.png +0 -0
  239. package/src/web/public/images/app/linear.png +0 -0
  240. package/src/web/public/images/app/linkedin.png +0 -0
  241. package/src/web/public/images/app/llama.png +0 -0
  242. package/src/web/public/images/app/make.png +0 -0
  243. package/src/web/public/images/app/maven.png +0 -0
  244. package/src/web/public/images/app/mcp.png +0 -0
  245. package/src/web/public/images/app/microsoftteams.png +0 -0
  246. package/src/web/public/images/app/mistral.png +0 -0
  247. package/src/web/public/images/app/monday.png +0 -0
  248. package/src/web/public/images/app/mongodb.png +0 -0
  249. package/src/web/public/images/app/mssql.png +0 -0
  250. package/src/web/public/images/app/mysql.png +0 -0
  251. package/src/web/public/images/app/n8n.png +0 -0
  252. package/src/web/public/images/app/notion.png +0 -0
  253. package/src/web/public/images/app/npm.png +0 -0
  254. package/src/web/public/images/app/nuget.png +0 -0
  255. package/src/web/public/images/app/obsidian.png +0 -0
  256. package/src/web/public/images/app/openai.png +0 -0
  257. package/src/web/public/images/app/openrouter.png +0 -0
  258. package/src/web/public/images/app/opensearch.png +0 -0
  259. package/src/web/public/images/app/openshift.png +0 -0
  260. package/src/web/public/images/app/oracle.png +0 -0
  261. package/src/web/public/images/app/perplexity.png +0 -0
  262. package/src/web/public/images/app/pipedream.png +0 -0
  263. package/src/web/public/images/app/postgresql.png +0 -0
  264. package/src/web/public/images/app/powershell.png +0 -0
  265. package/src/web/public/images/app/prometheus.png +0 -0
  266. package/src/web/public/images/app/reddit.png +0 -0
  267. package/src/web/public/images/app/redis.png +0 -0
  268. package/src/web/public/images/app/rss.png +0 -0
  269. package/src/web/public/images/app/signal.png +0 -0
  270. package/src/web/public/images/app/slack.png +0 -0
  271. package/src/web/public/images/app/soap.png +0 -0
  272. package/src/web/public/images/app/sqlite.png +0 -0
  273. package/src/web/public/images/app/supabase.png +0 -0
  274. package/src/web/public/images/app/telegram.png +0 -0
  275. package/src/web/public/images/app/things3.png +0 -0
  276. package/src/web/public/images/app/threads.png +0 -0
  277. package/src/web/public/images/app/tiktok.png +0 -0
  278. package/src/web/public/images/app/together.png +0 -0
  279. package/src/web/public/images/app/trello.png +0 -0
  280. package/src/web/public/images/app/vscode.png +0 -0
  281. package/src/web/public/images/app/webhook.png +0 -0
  282. package/src/web/public/images/app/webpage.png +0 -0
  283. package/src/web/public/images/app/whatsappbusiness.png +0 -0
  284. package/src/web/public/images/app/windsorf.png +0 -0
  285. package/src/web/public/images/app/x.png +0 -0
  286. package/src/web/public/images/app/youtube.png +0 -0
  287. package/src/web/public/images/app/zapier.png +0 -0
  288. package/src/web/public/images/app/zededitor.png +0 -0
  289. package/src/web/public/images/app/zoom.png +0 -0
  290. package/src/web/public/images/avatar-anon.svg +4 -0
  291. package/src/web/public/images/favicon.png +0 -0
  292. package/src/web/public/images/install/chatgpt-web/step0.png +0 -0
  293. package/src/web/public/images/install/chatgpt-web/step1.png +0 -0
  294. package/src/web/public/images/install/chatgpt-web/step2.png +0 -0
  295. package/src/web/public/images/install/chatgpt-web/step3.png +0 -0
  296. package/src/web/public/images/install/chatgpt-web/step4.png +0 -0
  297. package/src/web/public/images/install/chatgpt-web/step5.png +0 -0
  298. package/src/web/public/images/readme/1-generate-servers.png +0 -0
  299. package/src/web/public/images/readme/2-database-connection.png +0 -0
  300. package/src/web/public/images/readme/2-file-upload.png +0 -0
  301. package/src/web/public/images/readme/3-data-preview.png +0 -0
  302. package/src/web/public/images/readme/4-data-preview2.png +0 -0
  303. package/src/web/public/images/readme/5-server-configuration.png +0 -0
  304. package/src/web/public/images/readme/6-server-generated-modal.png +0 -0
  305. package/src/web/public/images/readme/7-generated-servers.png +0 -0
  306. package/src/web/public/images/readme/8-generated-servers-view-details.png +0 -0
  307. package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.23.51.png +0 -0
  308. package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.24.59.png +0 -0
  309. package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.05.png +0 -0
  310. package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.14.png +0 -0
  311. package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.21.png +0 -0
  312. package/src/web/public/images/readme/Screenshot 2025-10-09 at 20.25.36.png +0 -0
  313. package/src/web/public/index.html +4685 -488
  314. package/src/web/public/landing.html +1638 -0
  315. package/src/web/public/logger.js +31 -0
  316. package/src/web/public/login.html +372 -0
  317. package/src/web/public/manage-servers.html +121 -188
  318. package/src/web/public/pricing.html +537 -0
  319. package/src/web/public/quick-ask.html +133 -0
  320. package/src/web/public/quickmcp-styles.css +708 -0
  321. package/src/web/public/roles.html +177 -0
  322. package/src/web/public/shared.js +736 -3
  323. package/src/web/public/sidebar.js +414 -0
  324. package/src/web/public/test-servers.html +605 -221
  325. package/src/web/public/users.html +191 -0
  326. package/dist/client/MCPClientUnified.d.ts +0 -31
  327. package/dist/client/MCPClientUnified.d.ts.map +0 -1
  328. package/dist/client/MCPClientUnified.js +0 -275
  329. package/dist/client/MCPClientUnified.js.map +0 -1
  330. package/dist/client/MCPTestRunnerUnified.d.ts +0 -48
  331. package/dist/client/MCPTestRunnerUnified.d.ts.map +0 -1
  332. package/dist/client/MCPTestRunnerUnified.js +0 -183
  333. package/dist/client/MCPTestRunnerUnified.js.map +0 -1
  334. package/dist/database/json-manager.d.ts +0 -55
  335. package/dist/database/json-manager.d.ts.map +0 -1
  336. package/dist/database/json-manager.js +0 -128
  337. package/dist/database/json-manager.js.map +0 -1
  338. package/dist/dynamic-mcp-executor.d.ts.map +0 -1
  339. package/dist/dynamic-mcp-executor.js +0 -274
  340. package/dist/dynamic-mcp-executor.js.map +0 -1
  341. package/dist/generators/MCPServerGenerator-new.d.ts +0 -37
  342. package/dist/generators/MCPServerGenerator-new.d.ts.map +0 -1
  343. package/dist/generators/MCPServerGenerator-new.js +0 -287
  344. package/dist/generators/MCPServerGenerator-new.js.map +0 -1
  345. package/dist/generators/database/sqlite-manager.d.ts +0 -52
  346. package/dist/generators/database/sqlite-manager.js +0 -143
  347. package/dist/generators/generators/MCPServerGenerator.d.ts +0 -37
  348. package/dist/generators/generators/MCPServerGenerator.js +0 -396
  349. package/dist/integrated-mcp-server.d.ts +0 -25
  350. package/dist/integrated-mcp-server.d.ts.map +0 -1
  351. package/dist/integrated-mcp-server.js +0 -541
  352. package/dist/integrated-mcp-server.js.map +0 -1
  353. package/dist/mcp-inspector-server.d.ts +0 -3
  354. package/dist/mcp-inspector-server.d.ts.map +0 -1
  355. package/dist/mcp-inspector-server.js +0 -119
  356. package/dist/mcp-inspector-server.js.map +0 -1
  357. package/dist/mcp-sdk-server.d.ts +0 -3
  358. package/dist/mcp-sdk-server.d.ts.map +0 -1
  359. package/dist/mcp-sdk-server.js +0 -90
  360. package/dist/mcp-sdk-server.js.map +0 -1
  361. package/dist/mcp-server.d.ts +0 -3
  362. package/dist/mcp-server.d.ts.map +0 -1
  363. package/dist/mcp-server.js +0 -300
  364. package/dist/mcp-server.js.map +0 -1
  365. package/dist/parsers/parsers/ExcelParser.js +0 -118
  366. package/dist/quickmcp-unified-bridge.d.ts +0 -13
  367. package/dist/quickmcp-unified-bridge.d.ts.map +0 -1
  368. package/dist/quickmcp-unified-bridge.js +0 -176
  369. package/dist/quickmcp-unified-bridge.js.map +0 -1
  370. package/dist/sqlite-manager.js +0 -145
  371. package/dist/test-app.d.ts +0 -2
  372. package/dist/test-app.d.ts.map +0 -1
  373. package/dist/test-app.js +0 -119
  374. package/dist/test-app.js.map +0 -1
  375. package/dist/transport/base-transport.d.ts +0 -21
  376. package/dist/transport/base-transport.d.ts.map +0 -1
  377. package/dist/transport/base-transport.js +0 -16
  378. package/dist/transport/base-transport.js.map +0 -1
  379. package/dist/transport/index.d.ts +0 -10
  380. package/dist/transport/index.d.ts.map +0 -1
  381. package/dist/transport/index.js +0 -12
  382. package/dist/transport/index.js.map +0 -1
  383. package/dist/transport/sse-transport.d.ts +0 -13
  384. package/dist/transport/sse-transport.d.ts.map +0 -1
  385. package/dist/transport/sse-transport.js +0 -106
  386. package/dist/transport/sse-transport.js.map +0 -1
  387. package/dist/transport/stdio-transport.d.ts +0 -8
  388. package/dist/transport/stdio-transport.d.ts.map +0 -1
  389. package/dist/transport/stdio-transport.js +0 -53
  390. package/dist/transport/stdio-transport.js.map +0 -1
  391. package/dist/transport/streamable-http-transport.d.ts +0 -15
  392. package/dist/transport/streamable-http-transport.d.ts.map +0 -1
  393. package/dist/transport/streamable-http-transport.js +0 -151
  394. package/dist/transport/streamable-http-transport.js.map +0 -1
  395. package/dist/web/client/MCPClient.js +0 -348
  396. package/dist/web/client/MCPTestRunner.js +0 -317
  397. package/dist/web/database/json-manager.js +0 -124
  398. package/dist/web/database/sqlite-manager.js +0 -146
  399. package/dist/web/dynamic-mcp-executor.js +0 -443
  400. package/dist/web/generators/MCPServerGenerator-new.js +0 -284
  401. package/dist/web/generators/MCPServerGenerator.js +0 -566
  402. package/dist/web/integrated-mcp-server-new.js +0 -394
  403. package/dist/web/parsers/CsvParser.js +0 -144
  404. package/dist/web/parsers/DatabaseParser.js +0 -637
  405. package/dist/web/parsers/ExcelParser.js +0 -180
  406. package/dist/web/parsers/index.js +0 -152
  407. package/dist/web/server.d.ts.map +0 -1
  408. package/dist/web/server.js +0 -790
  409. package/dist/web/server.js.map +0 -1
  410. package/dist/web/types/index.js +0 -2
  411. package/dist/web/web/server.js +0 -860
  412. package/src/web/public/modern-styles.css +0 -946
  413. package/src/web/public/shared-styles.css +0 -2091
  414. /package/src/web/public/images/{1-claude-quickmcp-stdio.png → readme/1-claude-quickmcp-stdio.png} +0 -0
  415. /package/src/web/public/images/{2-claude-tools.png → readme/2-claude-tools.png} +0 -0
  416. /package/src/web/public/images/{3-claude-developer-settings.png → readme/3-claude-developer-settings.png} +0 -0
  417. /package/src/web/public/images/{4-claude-config.png → readme/4-claude-config.png} +0 -0
  418. /package/src/web/public/images/{5-claude-config-edit.png → readme/5-claude-config-edit.png} +0 -0
@@ -1,348 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.MCPClient = void 0;
40
- var child_process_1 = require("child_process");
41
- var MCPClient = /** @class */ (function () {
42
- function MCPClient() {
43
- this.process = null;
44
- this.messageId = 1;
45
- this.pendingRequests = new Map();
46
- this.isConnected = false;
47
- this.buffer = '';
48
- }
49
- MCPClient.prototype.connect = function (serverPath) {
50
- return __awaiter(this, void 0, void 0, function () {
51
- var _this = this;
52
- return __generator(this, function (_a) {
53
- return [2 /*return*/, new Promise(function (resolve, reject) {
54
- var _a, _b;
55
- _this.process = (0, child_process_1.spawn)('node', [serverPath], {
56
- stdio: ['pipe', 'pipe', 'pipe']
57
- });
58
- (_a = _this.process.stdout) === null || _a === void 0 ? void 0 : _a.on('data', function (data) {
59
- _this.handleMessage(data.toString());
60
- });
61
- (_b = _this.process.stderr) === null || _b === void 0 ? void 0 : _b.on('data', function (data) {
62
- console.error('MCP Server stderr:', data.toString());
63
- });
64
- _this.process.on('error', function (error) {
65
- console.error('MCP Server process error:', error);
66
- reject(error);
67
- });
68
- _this.process.on('exit', function (code) {
69
- console.log('MCP Server process exited with code:', code);
70
- _this.isConnected = false;
71
- });
72
- // Initialize the connection
73
- _this.initialize()
74
- .then(function () {
75
- _this.isConnected = true;
76
- resolve();
77
- })
78
- .catch(reject);
79
- })];
80
- });
81
- });
82
- };
83
- MCPClient.prototype.disconnect = function () {
84
- return __awaiter(this, void 0, void 0, function () {
85
- return __generator(this, function (_a) {
86
- if (this.process) {
87
- this.process.kill();
88
- this.process = null;
89
- this.isConnected = false;
90
- }
91
- return [2 /*return*/];
92
- });
93
- });
94
- };
95
- MCPClient.prototype.listTools = function () {
96
- return __awaiter(this, void 0, void 0, function () {
97
- var response;
98
- return __generator(this, function (_a) {
99
- switch (_a.label) {
100
- case 0: return [4 /*yield*/, this.sendRequest('tools/list', {})];
101
- case 1:
102
- response = _a.sent();
103
- return [2 /*return*/, response.tools || []];
104
- }
105
- });
106
- });
107
- };
108
- MCPClient.prototype.listResources = function () {
109
- return __awaiter(this, void 0, void 0, function () {
110
- var response;
111
- return __generator(this, function (_a) {
112
- switch (_a.label) {
113
- case 0: return [4 /*yield*/, this.sendRequest('resources/list', {})];
114
- case 1:
115
- response = _a.sent();
116
- return [2 /*return*/, response.resources || []];
117
- }
118
- });
119
- });
120
- };
121
- MCPClient.prototype.listPrompts = function () {
122
- return __awaiter(this, void 0, void 0, function () {
123
- var response;
124
- return __generator(this, function (_a) {
125
- switch (_a.label) {
126
- case 0: return [4 /*yield*/, this.sendRequest('prompts/list', {})];
127
- case 1:
128
- response = _a.sent();
129
- return [2 /*return*/, response.prompts || []];
130
- }
131
- });
132
- });
133
- };
134
- MCPClient.prototype.callTool = function (name, args) {
135
- return __awaiter(this, void 0, void 0, function () {
136
- var response, error_1;
137
- return __generator(this, function (_a) {
138
- switch (_a.label) {
139
- case 0:
140
- _a.trys.push([0, 2, , 3]);
141
- return [4 /*yield*/, this.sendRequest('tools/call', {
142
- name: name,
143
- arguments: args || {}
144
- })];
145
- case 1:
146
- response = _a.sent();
147
- return [2 /*return*/, {
148
- success: true,
149
- data: response
150
- }];
151
- case 2:
152
- error_1 = _a.sent();
153
- return [2 /*return*/, {
154
- success: false,
155
- error: error_1 instanceof Error ? error_1.message : 'Unknown error'
156
- }];
157
- case 3: return [2 /*return*/];
158
- }
159
- });
160
- });
161
- };
162
- MCPClient.prototype.readResource = function (uri) {
163
- return __awaiter(this, void 0, void 0, function () {
164
- var response, error_2;
165
- return __generator(this, function (_a) {
166
- switch (_a.label) {
167
- case 0:
168
- _a.trys.push([0, 2, , 3]);
169
- return [4 /*yield*/, this.sendRequest('resources/read', { uri: uri })];
170
- case 1:
171
- response = _a.sent();
172
- return [2 /*return*/, {
173
- success: true,
174
- data: response
175
- }];
176
- case 2:
177
- error_2 = _a.sent();
178
- return [2 /*return*/, {
179
- success: false,
180
- error: error_2 instanceof Error ? error_2.message : 'Unknown error'
181
- }];
182
- case 3: return [2 /*return*/];
183
- }
184
- });
185
- });
186
- };
187
- MCPClient.prototype.getPrompt = function (name, args) {
188
- return __awaiter(this, void 0, void 0, function () {
189
- var response, error_3;
190
- return __generator(this, function (_a) {
191
- switch (_a.label) {
192
- case 0:
193
- _a.trys.push([0, 2, , 3]);
194
- return [4 /*yield*/, this.sendRequest('prompts/get', {
195
- name: name,
196
- arguments: args || {}
197
- })];
198
- case 1:
199
- response = _a.sent();
200
- return [2 /*return*/, {
201
- success: true,
202
- data: response
203
- }];
204
- case 2:
205
- error_3 = _a.sent();
206
- return [2 /*return*/, {
207
- success: false,
208
- error: error_3 instanceof Error ? error_3.message : 'Unknown error'
209
- }];
210
- case 3: return [2 /*return*/];
211
- }
212
- });
213
- });
214
- };
215
- MCPClient.prototype.testRequest = function (request) {
216
- return __awaiter(this, void 0, void 0, function () {
217
- return __generator(this, function (_a) {
218
- switch (request.method) {
219
- case 'tool':
220
- return [2 /*return*/, this.callTool(request.name, request.params)];
221
- case 'resource':
222
- return [2 /*return*/, this.readResource(request.name)];
223
- case 'prompt':
224
- return [2 /*return*/, this.getPrompt(request.name, request.params)];
225
- default:
226
- return [2 /*return*/, {
227
- success: false,
228
- error: 'Unknown request method'
229
- }];
230
- }
231
- return [2 /*return*/];
232
- });
233
- });
234
- };
235
- MCPClient.prototype.initialize = function () {
236
- return __awaiter(this, void 0, void 0, function () {
237
- return __generator(this, function (_a) {
238
- switch (_a.label) {
239
- case 0: return [4 /*yield*/, this.sendRequest('initialize', {
240
- protocolVersion: '2024-11-05',
241
- capabilities: {
242
- roots: {},
243
- sampling: {}
244
- },
245
- clientInfo: {
246
- name: 'MCP Server Generator Client',
247
- version: '1.0.0'
248
- }
249
- })];
250
- case 1:
251
- _a.sent();
252
- return [4 /*yield*/, this.sendNotification('initialized', {})];
253
- case 2:
254
- _a.sent();
255
- return [2 /*return*/];
256
- }
257
- });
258
- });
259
- };
260
- MCPClient.prototype.sendRequest = function (method, params) {
261
- return __awaiter(this, void 0, void 0, function () {
262
- var _this = this;
263
- return __generator(this, function (_a) {
264
- return [2 /*return*/, new Promise(function (resolve, reject) {
265
- var _a;
266
- if (!((_a = _this.process) === null || _a === void 0 ? void 0 : _a.stdin)) {
267
- reject(new Error('Not connected to MCP server'));
268
- return;
269
- }
270
- var id = _this.messageId++;
271
- var message = {
272
- jsonrpc: '2.0',
273
- id: id,
274
- method: method,
275
- params: params
276
- };
277
- _this.pendingRequests.set(id, { resolve: resolve, reject: reject });
278
- var messageStr = JSON.stringify(message) + '\n';
279
- _this.process.stdin.write(messageStr);
280
- // Set timeout for requests
281
- setTimeout(function () {
282
- if (_this.pendingRequests.has(id)) {
283
- _this.pendingRequests.delete(id);
284
- reject(new Error('Request timeout'));
285
- }
286
- }, 10000);
287
- })];
288
- });
289
- });
290
- };
291
- MCPClient.prototype.sendNotification = function (method, params) {
292
- return __awaiter(this, void 0, void 0, function () {
293
- var message, messageStr;
294
- var _a;
295
- return __generator(this, function (_b) {
296
- if (!((_a = this.process) === null || _a === void 0 ? void 0 : _a.stdin)) {
297
- throw new Error('Not connected to MCP server');
298
- }
299
- message = {
300
- jsonrpc: '2.0',
301
- method: method,
302
- params: params
303
- };
304
- messageStr = JSON.stringify(message) + '\n';
305
- this.process.stdin.write(messageStr);
306
- return [2 /*return*/];
307
- });
308
- });
309
- };
310
- MCPClient.prototype.handleMessage = function (data) {
311
- this.buffer += data;
312
- var newlineIndex;
313
- while ((newlineIndex = this.buffer.indexOf('\n')) !== -1) {
314
- var messageStr = this.buffer.slice(0, newlineIndex);
315
- this.buffer = this.buffer.slice(newlineIndex + 1);
316
- if (messageStr.trim()) {
317
- try {
318
- var message = JSON.parse(messageStr);
319
- this.processMessage(message);
320
- }
321
- catch (error) {
322
- console.error('Failed to parse MCP message:', messageStr, error);
323
- }
324
- }
325
- }
326
- };
327
- MCPClient.prototype.processMessage = function (message) {
328
- if (message.id !== undefined && this.pendingRequests.has(message.id)) {
329
- var _a = this.pendingRequests.get(message.id), resolve = _a.resolve, reject = _a.reject;
330
- this.pendingRequests.delete(message.id);
331
- if (message.error) {
332
- reject(new Error("MCP Error (".concat(message.error.code, "): ").concat(message.error.message)));
333
- }
334
- else {
335
- resolve(message.result);
336
- }
337
- }
338
- };
339
- Object.defineProperty(MCPClient.prototype, "connected", {
340
- get: function () {
341
- return this.isConnected;
342
- },
343
- enumerable: false,
344
- configurable: true
345
- });
346
- return MCPClient;
347
- }());
348
- exports.MCPClient = MCPClient;
@@ -1,317 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.MCPTestRunner = void 0;
40
- var MCPClient_1 = require("./MCPClient");
41
- var MCPTestRunner = /** @class */ (function () {
42
- function MCPTestRunner() {
43
- this.client = new MCPClient_1.MCPClient();
44
- }
45
- MCPTestRunner.prototype.runTestSuite = function (serverPath, testSuite) {
46
- return __awaiter(this, void 0, void 0, function () {
47
- var startTime, results, _i, _a, testCase, result, duration, passedTests, failedTests;
48
- return __generator(this, function (_b) {
49
- switch (_b.label) {
50
- case 0:
51
- startTime = Date.now();
52
- results = [];
53
- _b.label = 1;
54
- case 1:
55
- _b.trys.push([1, , 7, 9]);
56
- return [4 /*yield*/, this.client.connect(serverPath)];
57
- case 2:
58
- _b.sent();
59
- _i = 0, _a = testSuite.tests;
60
- _b.label = 3;
61
- case 3:
62
- if (!(_i < _a.length)) return [3 /*break*/, 6];
63
- testCase = _a[_i];
64
- return [4 /*yield*/, this.runTestCase(testCase)];
65
- case 4:
66
- result = _b.sent();
67
- results.push(result);
68
- _b.label = 5;
69
- case 5:
70
- _i++;
71
- return [3 /*break*/, 3];
72
- case 6: return [3 /*break*/, 9];
73
- case 7: return [4 /*yield*/, this.client.disconnect()];
74
- case 8:
75
- _b.sent();
76
- return [7 /*endfinally*/];
77
- case 9:
78
- duration = Date.now() - startTime;
79
- passedTests = results.filter(function (r) { return r.passed; }).length;
80
- failedTests = results.length - passedTests;
81
- return [2 /*return*/, {
82
- testSuite: testSuite,
83
- results: results,
84
- totalTests: results.length,
85
- passedTests: passedTests,
86
- failedTests: failedTests,
87
- duration: duration
88
- }];
89
- }
90
- });
91
- });
92
- };
93
- MCPTestRunner.prototype.runTestCase = function (testCase) {
94
- return __awaiter(this, void 0, void 0, function () {
95
- var startTime, response, duration, passed, error_1, duration;
96
- return __generator(this, function (_a) {
97
- switch (_a.label) {
98
- case 0:
99
- startTime = Date.now();
100
- _a.label = 1;
101
- case 1:
102
- _a.trys.push([1, 3, , 4]);
103
- return [4 /*yield*/, this.client.testRequest(testCase.request)];
104
- case 2:
105
- response = _a.sent();
106
- duration = Date.now() - startTime;
107
- passed = this.evaluateTestResult(testCase, response);
108
- return [2 /*return*/, {
109
- testCase: testCase,
110
- response: response,
111
- passed: passed,
112
- duration: duration
113
- }];
114
- case 3:
115
- error_1 = _a.sent();
116
- duration = Date.now() - startTime;
117
- return [2 /*return*/, {
118
- testCase: testCase,
119
- response: {
120
- success: false,
121
- error: error_1 instanceof Error ? error_1.message : 'Unknown error'
122
- },
123
- passed: false,
124
- duration: duration,
125
- error: error_1 instanceof Error ? error_1.message : 'Unknown error'
126
- }];
127
- case 4: return [2 /*return*/];
128
- }
129
- });
130
- });
131
- };
132
- MCPTestRunner.prototype.generateTestSuite = function (serverPath, suiteName) {
133
- return __awaiter(this, void 0, void 0, function () {
134
- var tools, resources, prompts, tests, _i, tools_1, tool, _a, resources_1, resource, _b, prompts_1, prompt_1;
135
- return __generator(this, function (_c) {
136
- switch (_c.label) {
137
- case 0: return [4 /*yield*/, this.client.connect(serverPath)];
138
- case 1:
139
- _c.sent();
140
- _c.label = 2;
141
- case 2:
142
- _c.trys.push([2, , 6, 8]);
143
- return [4 /*yield*/, this.client.listTools()];
144
- case 3:
145
- tools = _c.sent();
146
- return [4 /*yield*/, this.client.listResources()];
147
- case 4:
148
- resources = _c.sent();
149
- return [4 /*yield*/, this.client.listPrompts()];
150
- case 5:
151
- prompts = _c.sent();
152
- tests = [];
153
- // Generate tool tests
154
- for (_i = 0, tools_1 = tools; _i < tools_1.length; _i++) {
155
- tool = tools_1[_i];
156
- tests.push({
157
- name: "Test tool: ".concat(tool.name),
158
- description: "Test the ".concat(tool.name, " tool with sample parameters"),
159
- request: {
160
- serverId: suiteName,
161
- method: 'tool',
162
- name: tool.name,
163
- params: this.generateSampleParams(tool.inputSchema)
164
- },
165
- expectedSuccess: true
166
- });
167
- }
168
- // Generate resource tests
169
- for (_a = 0, resources_1 = resources; _a < resources_1.length; _a++) {
170
- resource = resources_1[_a];
171
- tests.push({
172
- name: "Test resource: ".concat(resource.name),
173
- description: "Test reading the ".concat(resource.name, " resource"),
174
- request: {
175
- serverId: suiteName,
176
- method: 'resource',
177
- name: resource.uri,
178
- },
179
- expectedSuccess: true
180
- });
181
- }
182
- // Generate prompt tests
183
- for (_b = 0, prompts_1 = prompts; _b < prompts_1.length; _b++) {
184
- prompt_1 = prompts_1[_b];
185
- tests.push({
186
- name: "Test prompt: ".concat(prompt_1.name),
187
- description: "Test the ".concat(prompt_1.name, " prompt with sample arguments"),
188
- request: {
189
- serverId: suiteName,
190
- method: 'prompt',
191
- name: prompt_1.name,
192
- params: this.generateSamplePromptArgs(prompt_1.arguments)
193
- },
194
- expectedSuccess: true
195
- });
196
- }
197
- return [2 /*return*/, {
198
- name: suiteName,
199
- description: "Auto-generated test suite for ".concat(suiteName, " MCP server"),
200
- tests: tests
201
- }];
202
- case 6: return [4 /*yield*/, this.client.disconnect()];
203
- case 7:
204
- _c.sent();
205
- return [7 /*endfinally*/];
206
- case 8: return [2 /*return*/];
207
- }
208
- });
209
- });
210
- };
211
- MCPTestRunner.prototype.evaluateTestResult = function (testCase, response) {
212
- // Check expected success
213
- if (testCase.expectedSuccess !== undefined && response.success !== testCase.expectedSuccess) {
214
- return false;
215
- }
216
- // Check expected data contains
217
- if (testCase.expectedDataContains && response.data) {
218
- return this.dataContains(response.data, testCase.expectedDataContains);
219
- }
220
- // Default: test passes if no error occurred
221
- return response.success;
222
- };
223
- MCPTestRunner.prototype.dataContains = function (actual, expected) {
224
- if (typeof expected === 'string') {
225
- return JSON.stringify(actual).includes(expected);
226
- }
227
- if (typeof expected === 'object' && expected !== null) {
228
- for (var _i = 0, _a = Object.entries(expected); _i < _a.length; _i++) {
229
- var _b = _a[_i], key = _b[0], value = _b[1];
230
- if (!(key in actual) || !this.dataContains(actual[key], value)) {
231
- return false;
232
- }
233
- }
234
- return true;
235
- }
236
- return actual === expected;
237
- };
238
- MCPTestRunner.prototype.generateSampleParams = function (schema) {
239
- if (!schema || !schema.properties) {
240
- return {};
241
- }
242
- var params = {};
243
- for (var _i = 0, _a = Object.entries(schema.properties); _i < _a.length; _i++) {
244
- var _b = _a[_i], key = _b[0], prop = _b[1];
245
- params[key] = this.generateSampleValue(prop);
246
- }
247
- return params;
248
- };
249
- MCPTestRunner.prototype.generateSamplePromptArgs = function (argumentsSchema) {
250
- var args = {};
251
- for (var _i = 0, _a = argumentsSchema || []; _i < _a.length; _i++) {
252
- var arg = _a[_i];
253
- if (arg.name) {
254
- args[arg.name] = this.generateSampleValueFromDescription(arg.description);
255
- }
256
- }
257
- return args;
258
- };
259
- MCPTestRunner.prototype.generateSampleValue = function (schema) {
260
- var _a, _b;
261
- switch (schema.type) {
262
- case 'string':
263
- return ((_a = schema.description) === null || _a === void 0 ? void 0 : _a.includes('query')) ? 'test query' :
264
- ((_b = schema.description) === null || _b === void 0 ? void 0 : _b.includes('name')) ? 'sample name' :
265
- 'sample string';
266
- case 'number':
267
- case 'integer':
268
- return schema.default !== undefined ? schema.default : 10;
269
- case 'boolean':
270
- return schema.default !== undefined ? schema.default : true;
271
- case 'array':
272
- return [];
273
- case 'object':
274
- return {};
275
- default:
276
- return 'sample value';
277
- }
278
- };
279
- MCPTestRunner.prototype.generateSampleValueFromDescription = function (description) {
280
- if (!description)
281
- return 'sample value';
282
- var lower = description.toLowerCase();
283
- if (lower.includes('query') || lower.includes('search'))
284
- return 'test query';
285
- if (lower.includes('name'))
286
- return 'sample name';
287
- if (lower.includes('focus'))
288
- return 'data patterns';
289
- if (lower.includes('number') || lower.includes('count'))
290
- return 10;
291
- if (lower.includes('boolean') || lower.includes('flag'))
292
- return true;
293
- return 'sample value';
294
- };
295
- MCPTestRunner.prototype.formatTestResults = function (result) {
296
- var output = "\n=== Test Suite: ".concat(result.testSuite.name, " ===\n");
297
- output += "Description: ".concat(result.testSuite.description, "\n");
298
- output += "Duration: ".concat(result.duration, "ms\n");
299
- output += "Results: ".concat(result.passedTests, "/").concat(result.totalTests, " tests passed\n\n");
300
- for (var _i = 0, _a = result.results; _i < _a.length; _i++) {
301
- var testResult = _a[_i];
302
- var status_1 = testResult.passed ? '✅ PASS' : '❌ FAIL';
303
- output += "".concat(status_1, " ").concat(testResult.testCase.name, " (").concat(testResult.duration, "ms)\n");
304
- if (!testResult.passed) {
305
- output += " Error: ".concat(testResult.error || testResult.response.error || 'Test assertion failed', "\n");
306
- }
307
- if (testResult.response.data) {
308
- var dataPreview = JSON.stringify(testResult.response.data, null, 2).slice(0, 200);
309
- output += " Response: ".concat(dataPreview).concat(dataPreview.length >= 200 ? '...' : '', "\n");
310
- }
311
- output += '\n';
312
- }
313
- return output;
314
- };
315
- return MCPTestRunner;
316
- }());
317
- exports.MCPTestRunner = MCPTestRunner;