mcpmake 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 (344) hide show
  1. package/README.md +691 -0
  2. package/bin/mcpmake.mjs +2 -0
  3. package/dist/analyzer/auth-detector.d.ts +12 -0
  4. package/dist/analyzer/auth-detector.js +142 -0
  5. package/dist/analyzer/dom-parser.d.ts +10 -0
  6. package/dist/analyzer/dom-parser.js +259 -0
  7. package/dist/analyzer/goal-crawler.d.ts +25 -0
  8. package/dist/analyzer/goal-crawler.js +177 -0
  9. package/dist/analyzer/hybrid-detector.d.ts +28 -0
  10. package/dist/analyzer/hybrid-detector.js +96 -0
  11. package/dist/analyzer/index.d.ts +12 -0
  12. package/dist/analyzer/index.js +8 -0
  13. package/dist/analyzer/screenshot-capture.d.ts +29 -0
  14. package/dist/analyzer/screenshot-capture.js +42 -0
  15. package/dist/analyzer/selector-builder.d.ts +19 -0
  16. package/dist/analyzer/selector-builder.js +199 -0
  17. package/dist/analyzer/semantic-analyzer.d.ts +13 -0
  18. package/dist/analyzer/semantic-analyzer.js +145 -0
  19. package/dist/analyzer/site-crawler.d.ts +38 -0
  20. package/dist/analyzer/site-crawler.js +235 -0
  21. package/dist/cloud/billing/billing-engine.d.ts +44 -0
  22. package/dist/cloud/billing/billing-engine.js +81 -0
  23. package/dist/cloud/billing/credit-store.d.ts +64 -0
  24. package/dist/cloud/billing/credit-store.js +168 -0
  25. package/dist/cloud/billing/index.d.ts +4 -0
  26. package/dist/cloud/billing/index.js +2 -0
  27. package/dist/cloud/billing/usage-store.d.ts +42 -0
  28. package/dist/cloud/billing/usage-store.js +85 -0
  29. package/dist/cloud/billing/usage-tracker.d.ts +38 -0
  30. package/dist/cloud/billing/usage-tracker.js +95 -0
  31. package/dist/cloud/build-pipeline.d.ts +39 -0
  32. package/dist/cloud/build-pipeline.js +310 -0
  33. package/dist/cloud/build-queue.d.ts +30 -0
  34. package/dist/cloud/build-queue.js +70 -0
  35. package/dist/cloud/caddy-manager.d.ts +18 -0
  36. package/dist/cloud/caddy-manager.js +97 -0
  37. package/dist/cloud/container-backend.d.ts +62 -0
  38. package/dist/cloud/container-backend.js +59 -0
  39. package/dist/cloud/container-manager.d.ts +64 -0
  40. package/dist/cloud/container-manager.js +301 -0
  41. package/dist/cloud/crypto.d.ts +27 -0
  42. package/dist/cloud/crypto.js +63 -0
  43. package/dist/cloud/db/index.d.ts +27 -0
  44. package/dist/cloud/db/index.js +53 -0
  45. package/dist/cloud/db/migrations.d.ts +12 -0
  46. package/dist/cloud/db/migrations.js +329 -0
  47. package/dist/cloud/db/pg-store.d.ts +45 -0
  48. package/dist/cloud/db/pg-store.js +336 -0
  49. package/dist/cloud/failure-tracker.d.ts +51 -0
  50. package/dist/cloud/failure-tracker.js +102 -0
  51. package/dist/cloud/idle-monitor.d.ts +30 -0
  52. package/dist/cloud/idle-monitor.js +70 -0
  53. package/dist/cloud/mailer.d.ts +21 -0
  54. package/dist/cloud/mailer.js +193 -0
  55. package/dist/cloud/mcp-proxy.d.ts +58 -0
  56. package/dist/cloud/mcp-proxy.js +203 -0
  57. package/dist/cloud/metric-samples.d.ts +43 -0
  58. package/dist/cloud/metric-samples.js +85 -0
  59. package/dist/cloud/metrics.d.ts +26 -0
  60. package/dist/cloud/metrics.js +59 -0
  61. package/dist/cloud/multipart.d.ts +26 -0
  62. package/dist/cloud/multipart.js +132 -0
  63. package/dist/cloud/observability.d.ts +27 -0
  64. package/dist/cloud/observability.js +98 -0
  65. package/dist/cloud/rate-limiter.d.ts +31 -0
  66. package/dist/cloud/rate-limiter.js +58 -0
  67. package/dist/cloud/request-security.d.ts +5 -0
  68. package/dist/cloud/request-security.js +74 -0
  69. package/dist/cloud/resource-monitor.d.ts +69 -0
  70. package/dist/cloud/resource-monitor.js +130 -0
  71. package/dist/cloud/secret-store.d.ts +38 -0
  72. package/dist/cloud/secret-store.js +103 -0
  73. package/dist/cloud/security.d.ts +26 -0
  74. package/dist/cloud/security.js +142 -0
  75. package/dist/cloud/server.d.ts +21 -0
  76. package/dist/cloud/server.js +1079 -0
  77. package/dist/cloud/shared-state.d.ts +72 -0
  78. package/dist/cloud/shared-state.js +159 -0
  79. package/dist/cloud/ssrf.d.ts +43 -0
  80. package/dist/cloud/ssrf.js +150 -0
  81. package/dist/cloud/store.d.ts +41 -0
  82. package/dist/cloud/store.js +75 -0
  83. package/dist/cloud/stripe.d.ts +78 -0
  84. package/dist/cloud/stripe.js +317 -0
  85. package/dist/cloud/telemetry-store.d.ts +53 -0
  86. package/dist/cloud/telemetry-store.js +108 -0
  87. package/dist/cloud/web/auth.d.ts +225 -0
  88. package/dist/cloud/web/auth.js +555 -0
  89. package/dist/cloud/web/charts.d.ts +70 -0
  90. package/dist/cloud/web/charts.js +178 -0
  91. package/dist/cloud/web/csrf.d.ts +14 -0
  92. package/dist/cloud/web/csrf.js +22 -0
  93. package/dist/cloud/web/docs.d.ts +40 -0
  94. package/dist/cloud/web/docs.js +174 -0
  95. package/dist/cloud/web/router.d.ts +25 -0
  96. package/dist/cloud/web/router.js +1921 -0
  97. package/dist/cloud/web/static/alpine.min.js +5 -0
  98. package/dist/cloud/web/static/favicon.svg +4 -0
  99. package/dist/cloud/web/static/htmx-sse.js +290 -0
  100. package/dist/cloud/web/static/htmx.min.js +1 -0
  101. package/dist/cloud/web/static/style.css +2683 -0
  102. package/dist/cloud/web/static-server.d.ts +13 -0
  103. package/dist/cloud/web/static-server.js +73 -0
  104. package/dist/cloud/web/template-engine.d.ts +27 -0
  105. package/dist/cloud/web/template-engine.js +146 -0
  106. package/dist/cloud/web/templates/layouts/admin.hbs +57 -0
  107. package/dist/cloud/web/templates/layouts/auth.hbs +138 -0
  108. package/dist/cloud/web/templates/layouts/base.hbs +16 -0
  109. package/dist/cloud/web/templates/layouts/dashboard.hbs +39 -0
  110. package/dist/cloud/web/templates/layouts/landing.hbs +82 -0
  111. package/dist/cloud/web/templates/pages/admin/overview.hbs +123 -0
  112. package/dist/cloud/web/templates/pages/admin/servers.hbs +129 -0
  113. package/dist/cloud/web/templates/pages/admin/telemetry.hbs +39 -0
  114. package/dist/cloud/web/templates/pages/admin/user-edit.hbs +91 -0
  115. package/dist/cloud/web/templates/pages/admin/users.hbs +179 -0
  116. package/dist/cloud/web/templates/pages/auth/forgot-password.hbs +25 -0
  117. package/dist/cloud/web/templates/pages/auth/login.hbs +33 -0
  118. package/dist/cloud/web/templates/pages/auth/register.hbs +32 -0
  119. package/dist/cloud/web/templates/pages/auth/reset-password.hbs +34 -0
  120. package/dist/cloud/web/templates/pages/dashboard/billing.hbs +140 -0
  121. package/dist/cloud/web/templates/pages/dashboard/create.hbs +173 -0
  122. package/dist/cloud/web/templates/pages/dashboard/index.hbs +8 -0
  123. package/dist/cloud/web/templates/pages/dashboard/server-detail.hbs +280 -0
  124. package/dist/cloud/web/templates/pages/dashboard/server-logs.hbs +35 -0
  125. package/dist/cloud/web/templates/pages/dashboard/server-metrics.hbs +63 -0
  126. package/dist/cloud/web/templates/pages/dashboard/servers-partial.hbs +21 -0
  127. package/dist/cloud/web/templates/pages/dashboard/servers.hbs +44 -0
  128. package/dist/cloud/web/templates/pages/docs/show.hbs +16 -0
  129. package/dist/cloud/web/templates/pages/errors/404.hbs +9 -0
  130. package/dist/cloud/web/templates/pages/errors/500.hbs +8 -0
  131. package/dist/cloud/web/templates/pages/landing/index.hbs +223 -0
  132. package/dist/cloud/web/templates/pages/legal/privacy.hbs +71 -0
  133. package/dist/cloud/web/templates/pages/legal/terms.hbs +73 -0
  134. package/dist/cloud/web/templates/partials/admin-stats.hbs +52 -0
  135. package/dist/cloud/web/templates/partials/flash-message.hbs +6 -0
  136. package/dist/cloud/web/templates/partials/pricing-table.hbs +103 -0
  137. package/dist/cloud/web/templates/partials/server-card.hbs +19 -0
  138. package/dist/cloud/web/templates/partials/status-badge.hbs +1 -0
  139. package/dist/commands/bundle.d.ts +18 -0
  140. package/dist/commands/bundle.js +82 -0
  141. package/dist/commands/ci.d.ts +25 -0
  142. package/dist/commands/ci.js +149 -0
  143. package/dist/commands/deploy.d.ts +24 -0
  144. package/dist/commands/deploy.js +145 -0
  145. package/dist/commands/diff.d.ts +18 -0
  146. package/dist/commands/diff.js +185 -0
  147. package/dist/commands/from/describe.d.ts +65 -0
  148. package/dist/commands/from/describe.js +173 -0
  149. package/dist/commands/from/har.d.ts +81 -0
  150. package/dist/commands/from/har.js +255 -0
  151. package/dist/commands/from/openapi.d.ts +105 -0
  152. package/dist/commands/from/openapi.js +302 -0
  153. package/dist/commands/from/postman.d.ts +51 -0
  154. package/dist/commands/from/postman.js +146 -0
  155. package/dist/commands/from/target-support.d.ts +11 -0
  156. package/dist/commands/from/target-support.js +33 -0
  157. package/dist/commands/from/url.d.ts +75 -0
  158. package/dist/commands/from/url.js +244 -0
  159. package/dist/commands/from/website.d.ts +75 -0
  160. package/dist/commands/from/website.js +284 -0
  161. package/dist/commands/lint.d.ts +24 -0
  162. package/dist/commands/lint.js +184 -0
  163. package/dist/commands/merge.d.ts +18 -0
  164. package/dist/commands/merge.js +161 -0
  165. package/dist/commands/publish.d.ts +27 -0
  166. package/dist/commands/publish.js +334 -0
  167. package/dist/commands/rescan.d.ts +40 -0
  168. package/dist/commands/rescan.js +255 -0
  169. package/dist/commands/update.d.ts +14 -0
  170. package/dist/commands/update.js +87 -0
  171. package/dist/commands/verify.d.ts +14 -0
  172. package/dist/commands/verify.js +71 -0
  173. package/dist/config/configurable-command.d.ts +13 -0
  174. package/dist/config/configurable-command.js +70 -0
  175. package/dist/config/mcpmake-config.d.ts +68 -0
  176. package/dist/config/mcpmake-config.js +207 -0
  177. package/dist/docs/cli.md +400 -0
  178. package/dist/docs/mcp-2026-07-28-migration.md +78 -0
  179. package/dist/docs/migrate-from-stainless.md +94 -0
  180. package/dist/docs/quickstart.md +166 -0
  181. package/dist/docs/show-hn.md +26 -0
  182. package/dist/docs/website-servers.md +169 -0
  183. package/dist/emitter/code-writer.d.ts +8 -0
  184. package/dist/emitter/code-writer.js +25 -0
  185. package/dist/emitter/index.d.ts +32 -0
  186. package/dist/emitter/index.js +280 -0
  187. package/dist/emitter/mcpb-bundler.d.ts +31 -0
  188. package/dist/emitter/mcpb-bundler.js +172 -0
  189. package/dist/emitter/project-scaffolder.d.ts +4 -0
  190. package/dist/emitter/project-scaffolder.js +89 -0
  191. package/dist/emitter/python-template-loader.d.ts +4 -0
  192. package/dist/emitter/python-template-loader.js +30 -0
  193. package/dist/emitter/python-templates/dockerfile.hbs +14 -0
  194. package/dist/emitter/python-templates/env.example.hbs +6 -0
  195. package/dist/emitter/python-templates/requirements.txt.hbs +4 -0
  196. package/dist/emitter/python-templates/server.py.hbs +77 -0
  197. package/dist/emitter/site-scaffolder.d.ts +13 -0
  198. package/dist/emitter/site-scaffolder.js +70 -0
  199. package/dist/emitter/site-template-loader.d.ts +5 -0
  200. package/dist/emitter/site-template-loader.js +47 -0
  201. package/dist/emitter/site-templates/browser-manager.ts.hbs +233 -0
  202. package/dist/emitter/site-templates/config.ts.hbs +28 -0
  203. package/dist/emitter/site-templates/dockerfile.hbs +31 -0
  204. package/dist/emitter/site-templates/env.example.hbs +19 -0
  205. package/dist/emitter/site-templates/package.json.hbs +26 -0
  206. package/dist/emitter/site-templates/server-main-http.ts.hbs +108 -0
  207. package/dist/emitter/site-templates/server-main.ts.hbs +23 -0
  208. package/dist/emitter/site-templates/tool-handler-action.ts.hbs +86 -0
  209. package/dist/emitter/site-templates/tool-handler-form.ts.hbs +116 -0
  210. package/dist/emitter/site-templates/tool-handler-lifecycle.ts.hbs +146 -0
  211. package/dist/emitter/site-templates/tool-index.ts.hbs +11 -0
  212. package/dist/emitter/template-loader.d.ts +1 -0
  213. package/dist/emitter/template-loader.js +27 -0
  214. package/dist/emitter/templates/auth-provider.ts.hbs +57 -0
  215. package/dist/emitter/templates/config.ts.hbs +63 -0
  216. package/dist/emitter/templates/discovery.ts.hbs +301 -0
  217. package/dist/emitter/templates/dockerfile.hbs +34 -0
  218. package/dist/emitter/templates/env.example.hbs +28 -0
  219. package/dist/emitter/templates/gitignore.hbs +5 -0
  220. package/dist/emitter/templates/http-executor.ts.hbs +117 -0
  221. package/dist/emitter/templates/oauth.ts.hbs +188 -0
  222. package/dist/emitter/templates/package.json.hbs +25 -0
  223. package/dist/emitter/templates/prompts.ts.hbs +22 -0
  224. package/dist/emitter/templates/readme.md.hbs +123 -0
  225. package/dist/emitter/templates/resources.ts.hbs +63 -0
  226. package/dist/emitter/templates/server-main-http.ts.hbs +407 -0
  227. package/dist/emitter/templates/server-main.ts.hbs +40 -0
  228. package/dist/emitter/templates/task-handlers.ts.hbs +189 -0
  229. package/dist/emitter/templates/task-manager.ts.hbs +139 -0
  230. package/dist/emitter/templates/task-sse.ts.hbs +105 -0
  231. package/dist/emitter/templates/tool-handler.ts.hbs +124 -0
  232. package/dist/emitter/templates/tool-index.ts.hbs +11 -0
  233. package/dist/emitter/templates/tool-test.ts.hbs +57 -0
  234. package/dist/emitter/templates/trace.ts.hbs +79 -0
  235. package/dist/emitter/templates/tsconfig.json.hbs +16 -0
  236. package/dist/emitter/templates/types.ts.hbs +5 -0
  237. package/dist/emitter/worker-template-loader.d.ts +5 -0
  238. package/dist/emitter/worker-template-loader.js +33 -0
  239. package/dist/emitter/worker-templates/config.ts.hbs +54 -0
  240. package/dist/emitter/worker-templates/dev-vars.example.hbs +10 -0
  241. package/dist/emitter/worker-templates/gitignore.hbs +6 -0
  242. package/dist/emitter/worker-templates/package.json.hbs +24 -0
  243. package/dist/emitter/worker-templates/readme.md.hbs +53 -0
  244. package/dist/emitter/worker-templates/server.test.ts.hbs +20 -0
  245. package/dist/emitter/worker-templates/tool-handler.ts.hbs +85 -0
  246. package/dist/emitter/worker-templates/tool-index.ts.hbs +28 -0
  247. package/dist/emitter/worker-templates/tsconfig.json.hbs +17 -0
  248. package/dist/emitter/worker-templates/worker.ts.hbs +242 -0
  249. package/dist/emitter/worker-templates/wrangler.toml.hbs +19 -0
  250. package/dist/generator/spec-generator.d.ts +6 -0
  251. package/dist/generator/spec-generator.js +50 -0
  252. package/dist/index.d.ts +1 -0
  253. package/dist/index.js +64 -0
  254. package/dist/parser/har-filter.d.ts +8 -0
  255. package/dist/parser/har-filter.js +71 -0
  256. package/dist/parser/har-loader.d.ts +2 -0
  257. package/dist/parser/har-loader.js +14 -0
  258. package/dist/parser/har-normalizer.d.ts +20 -0
  259. package/dist/parser/har-normalizer.js +78 -0
  260. package/dist/parser/index.d.ts +10 -0
  261. package/dist/parser/index.js +6 -0
  262. package/dist/parser/openapi-loader.d.ts +6 -0
  263. package/dist/parser/openapi-loader.js +308 -0
  264. package/dist/parser/operation-extractor.d.ts +13 -0
  265. package/dist/parser/operation-extractor.js +155 -0
  266. package/dist/parser/overlay-loader.d.ts +10 -0
  267. package/dist/parser/overlay-loader.js +184 -0
  268. package/dist/parser/postman-loader.d.ts +9 -0
  269. package/dist/parser/postman-loader.js +106 -0
  270. package/dist/parser/schema-converter.d.ts +12 -0
  271. package/dist/parser/schema-converter.js +117 -0
  272. package/dist/plugins/adapter.d.ts +40 -0
  273. package/dist/plugins/adapter.js +15 -0
  274. package/dist/plugins/loader.d.ts +25 -0
  275. package/dist/plugins/loader.js +58 -0
  276. package/dist/pricing.d.ts +55 -0
  277. package/dist/pricing.js +133 -0
  278. package/dist/providers/index.d.ts +15 -0
  279. package/dist/providers/index.js +56 -0
  280. package/dist/recorder/browser-recorder.d.ts +22 -0
  281. package/dist/recorder/browser-recorder.js +205 -0
  282. package/dist/registry/official-registry.d.ts +90 -0
  283. package/dist/registry/official-registry.js +129 -0
  284. package/dist/rescan/diff-engine.d.ts +5 -0
  285. package/dist/rescan/diff-engine.js +312 -0
  286. package/dist/rescan/index.d.ts +3 -0
  287. package/dist/rescan/index.js +2 -0
  288. package/dist/rescan/rescan-runner.d.ts +42 -0
  289. package/dist/rescan/rescan-runner.js +69 -0
  290. package/dist/rescan/rescan-scheduler.d.ts +41 -0
  291. package/dist/rescan/rescan-scheduler.js +179 -0
  292. package/dist/site-transformer/browser-tools.d.ts +10 -0
  293. package/dist/site-transformer/browser-tools.js +59 -0
  294. package/dist/site-transformer/index.d.ts +2 -0
  295. package/dist/site-transformer/index.js +2 -0
  296. package/dist/site-transformer/selector-healer.d.ts +8 -0
  297. package/dist/site-transformer/selector-healer.js +106 -0
  298. package/dist/site-transformer/tool-generator.d.ts +13 -0
  299. package/dist/site-transformer/tool-generator.js +245 -0
  300. package/dist/transformer/auth-detector.d.ts +13 -0
  301. package/dist/transformer/auth-detector.js +90 -0
  302. package/dist/transformer/catalog-builder.d.ts +18 -0
  303. package/dist/transformer/catalog-builder.js +56 -0
  304. package/dist/transformer/client-compat.d.ts +6 -0
  305. package/dist/transformer/client-compat.js +44 -0
  306. package/dist/transformer/har-clusterer.d.ts +9 -0
  307. package/dist/transformer/har-clusterer.js +27 -0
  308. package/dist/transformer/har-dedup.d.ts +10 -0
  309. package/dist/transformer/har-dedup.js +81 -0
  310. package/dist/transformer/har-schema-inferrer.d.ts +15 -0
  311. package/dist/transformer/har-schema-inferrer.js +90 -0
  312. package/dist/transformer/har-to-operations.d.ts +13 -0
  313. package/dist/transformer/har-to-operations.js +192 -0
  314. package/dist/transformer/index.d.ts +8 -0
  315. package/dist/transformer/index.js +6 -0
  316. package/dist/transformer/llm-namer.d.ts +6 -0
  317. package/dist/transformer/llm-namer.js +59 -0
  318. package/dist/transformer/naming.d.ts +4 -0
  319. package/dist/transformer/naming.js +30 -0
  320. package/dist/transformer/operation-filter.d.ts +13 -0
  321. package/dist/transformer/operation-filter.js +52 -0
  322. package/dist/transformer/resource-builder.d.ts +12 -0
  323. package/dist/transformer/resource-builder.js +80 -0
  324. package/dist/transformer/schema-merger.d.ts +14 -0
  325. package/dist/transformer/schema-merger.js +65 -0
  326. package/dist/transformer/tool-builder.d.ts +3 -0
  327. package/dist/transformer/tool-builder.js +114 -0
  328. package/dist/types/index.d.ts +131 -0
  329. package/dist/types/index.js +1 -0
  330. package/dist/types/site.d.ts +284 -0
  331. package/dist/types/site.js +8 -0
  332. package/dist/utils/fail.d.ts +48 -0
  333. package/dist/utils/fail.js +204 -0
  334. package/dist/utils/fs.d.ts +5 -0
  335. package/dist/utils/fs.js +28 -0
  336. package/dist/utils/interactive.d.ts +6 -0
  337. package/dist/utils/interactive.js +30 -0
  338. package/dist/utils/logger.d.ts +1 -0
  339. package/dist/utils/logger.js +2 -0
  340. package/dist/utils/sanitize.d.ts +28 -0
  341. package/dist/utils/sanitize.js +44 -0
  342. package/dist/utils/watcher.d.ts +11 -0
  343. package/dist/utils/watcher.js +36 -0
  344. package/package.json +65 -0
package/README.md ADDED
@@ -0,0 +1,691 @@
1
+ # mcpmake
2
+
3
+ Generate fully functional [MCP](https://modelcontextprotocol.io/) servers from anything. One command, batteries included.
4
+
5
+ ```bash
6
+ # From an OpenAPI spec (or provider shortcut)
7
+ mcpmake from openapi ./petstore.yaml -o ./petstore-mcp
8
+ mcpmake from openapi stripe -o ./stripe-mcp --include customers,charges
9
+
10
+ # From a browser recording
11
+ mcpmake from har ./session.har -o ./api-mcp
12
+
13
+ # From a live website (opens a browser, you interact, close when done)
14
+ mcpmake from url https://app.example.com -o ./app-mcp
15
+
16
+ # From any website's HTML (forms, buttons, links → Playwright-based MCP server)
17
+ mcpmake from website https://app.example.com -o ./site-mcp
18
+
19
+ # Re-crawl that site later, heal broken selectors, regenerate
20
+ mcpmake rescan ./site-mcp --write
21
+
22
+ # From a Postman collection
23
+ mcpmake from postman ./collection.json -o ./api-mcp
24
+
25
+ # From a plain English description (AI-powered)
26
+ mcpmake from describe "manage GitHub issues" -o ./github-mcp
27
+
28
+ # Generate Python instead of TypeScript
29
+ mcpmake from openapi ./spec.yaml -o ./api-mcp --format python
30
+
31
+ # Deploy to mcpmake Cloud
32
+ mcpmake deploy ./spec.yaml
33
+
34
+ # Publish to Smithery/Glama registries
35
+ mcpmake publish ./my-mcp-server
36
+ ```
37
+
38
+ Produces a complete MCP server (TypeScript or Python) with typed tools, resources, prompts, auth, retries, rate limiting, and structured errors — ready for Claude Desktop or any MCP client.
39
+
40
+ ## Why
41
+
42
+ The official `create-mcp-server` scaffolding gives you an empty shell. Writing tool definitions, wiring up auth, handling errors, and converting schemas by hand is tedious and repetitive. mcpmake does it all from your existing API spec, a browser recording, a live website, or even a plain English description.
43
+
44
+ ## Quick Start
45
+
46
+ > **Not yet on npm.** Until the first release is published, install from source:
47
+ > `git clone` this repo, `npm install && npm run build`, then `npm link` (or run
48
+ > `npx tsx src/index.ts ...`). The `npm install -g mcpmake` line below applies
49
+ > once published.
50
+
51
+ ```bash
52
+ # Install (after first npm release)
53
+ npm install -g mcpmake
54
+
55
+ # Generate from an OpenAPI spec
56
+ mcpmake from openapi ./api-spec.yaml -o ./my-mcp-server
57
+
58
+ # Or use a provider shortcut
59
+ mcpmake from openapi github -o ./github-mcp
60
+
61
+ # Run the generated server
62
+ cd my-mcp-server
63
+ cp .env.example .env # fill in your API credentials
64
+ npm install
65
+ npm run build
66
+ npm start
67
+ ```
68
+
69
+ ### Keep it in sync with your spec (CI)
70
+
71
+ ```bash
72
+ # Writes .github/workflows/mcpmake.yaml — regenerates + verifies the server
73
+ # on every spec change, and fails CI if the committed output is out of date.
74
+ mcpmake ci init ./api-spec.yaml -o ./my-mcp-server
75
+ ```
76
+
77
+ > **Coming from Stainless?** See [Migrate off Stainless to an MCP server you own](docs/migrate-from-stainless.md).
78
+
79
+ ### Project config (`.mcpmake.yaml`)
80
+
81
+ Stop repeating CLI flags — drop a `.mcpmake.yaml` in your project root and commit it so your team shares the same generation settings. It's auto-discovered from the working directory (override with `--config <path>` or `MCPMAKE_CONFIG`).
82
+
83
+ ```yaml
84
+ # .mcpmake.yaml
85
+ output: ./generated # global defaults for every command
86
+ transport: http
87
+ format: typescript
88
+
89
+ openapi: # optional per-command overrides
90
+ base-url: https://api.example.com
91
+ include: [users, repos] # arrays become the --include users,repos form
92
+ deploy:
93
+ server: https://mcpmake.dev
94
+ ```
95
+
96
+ ```bash
97
+ # With the config above, this is equivalent to
98
+ # mcpmake from openapi ./api-spec.yaml -o ./generated -t http -b https://api.example.com -i users,repos
99
+ mcpmake from openapi ./api-spec.yaml
100
+ ```
101
+
102
+ **Precedence (highest wins):** explicit CLI flag → per-command section → global key → built-in default. Positional args (the spec path) always stay on the command line. See [`.mcpmake.example.yaml`](.mcpmake.example.yaml). Supported by every `from` generator and `deploy`.
103
+
104
+ ## What Gets Generated
105
+
106
+ ```
107
+ my-mcp-server/
108
+ ├── package.json # 2 runtime deps: @modelcontextprotocol/sdk + zod
109
+ ├── tsconfig.json
110
+ ├── Dockerfile # (with --transport http) production-ready, non-root, read-only
111
+ ├── .env.example # Pre-filled with base URL + auth vars
112
+ ├── README.md # Tool docs + Claude Desktop config snippet
113
+ ├── .gitignore
114
+ ├── src/
115
+ │ ├── index.ts # McpServer bootstrap (stdio or HTTP transport)
116
+ │ ├── config.ts # Environment config loader + validation
117
+ │ ├── auth.ts # Auth header injection
118
+ │ ├── http.ts # fetch wrapper: retries, backoff, rate limiting
119
+ │ ├── types.ts # Shared types
120
+ │ ├── resources.ts # MCP resources (GET list endpoints)
121
+ │ ├── prompts.ts # MCP prompts (tag-grouped workflows)
122
+ │ └── tools/
123
+ │ ├── index.ts # registerAllTools(server, config)
124
+ │ ├── list-pets.ts # One file per API operation
125
+ │ ├── create-pet.ts
126
+ │ └── get-pet.ts
127
+ └── test/tools/
128
+ ├── list-pets.test.ts # Test scaffolds (vitest)
129
+ ├── create-pet.test.ts
130
+ └── get-pet.test.ts
131
+ ```
132
+
133
+ Each tool file is self-contained, clean, and designed to be edited after generation.
134
+
135
+ ## Input Adapters
136
+
137
+ ### `from openapi` — OpenAPI Specs
138
+
139
+ Parse any OpenAPI 3.x spec and generate one tool per operation. Supports YAML/JSON, local files and URLs, and full `$ref` dereferencing.
140
+
141
+ **Provider shortcuts** — skip the spec URL for popular APIs:
142
+
143
+ ```bash
144
+ mcpmake from openapi stripe -o ./stripe-mcp --include customers,charges
145
+ mcpmake from openapi github -o ./github-mcp --include repos,issues
146
+ mcpmake from openapi slack -o ./slack-mcp --include chat,users
147
+ ```
148
+
149
+ Available providers: `stripe`, `github`, `slack`, `notion`, `linear`, `shopify`
150
+
151
+ ### `from har` — Browser Recordings
152
+
153
+ Record a session in Chrome/Firefox DevTools (Network tab -> Export HAR), and mcpmake will:
154
+
155
+ - **Filter noise** — removes favicon, analytics, CDN, and static asset requests automatically
156
+ - **Detect path parameters** — recognizes numeric IDs, UUIDs, and MongoDB ObjectIDs
157
+ - **Cluster requests** — groups `GET /users/42` and `GET /users/99` into one `get_user` tool
158
+ - **Infer schemas** — extracts Zod schemas from JSON request/response bodies
159
+ - **Detect auth** — finds Bearer tokens, API keys, and Basic auth in headers
160
+
161
+ ```bash
162
+ mcpmake from har ./session.har -o ./api-mcp --domain api.example.com
163
+ ```
164
+
165
+ ### `from url` — Live Website Recording
166
+
167
+ Point mcpmake at any URL and it opens a browser. Click around, interact with the site, and when you close the browser it generates an MCP server from the captured API traffic.
168
+
169
+ ```bash
170
+ mcpmake from url https://app.example.com -o ./app-mcp
171
+ ```
172
+
173
+ Uses Playwright under the hood. Requires `npx playwright install chromium` on first use.
174
+
175
+ **Headless / CI capture** — for automated environments where no one can drive a window, run headless and auto-visit a set of same-origin paths to surface their API calls:
176
+
177
+ ```bash
178
+ mcpmake from url https://app.example.com -o ./app-mcp \
179
+ --headless --navigate /dashboard,/orders,/settings
180
+ ```
181
+
182
+ `--navigate` takes a comma-separated list of absolute or relative same-origin URLs; cross-origin targets are skipped. The browser loads each, captures the traffic, and exits — no manual interaction needed.
183
+
184
+ ### `from postman` — Postman Collections
185
+
186
+ Import a Postman Collection v2.1 and generate tools from its requests:
187
+
188
+ ```bash
189
+ mcpmake from postman ./collection.json -o ./api-mcp
190
+ ```
191
+
192
+ ### `from website` — Website DOM Analysis
193
+
194
+ Analyze any website's HTML structure (forms, buttons, links) and generate a Playwright-based MCP server with site-specific tools:
195
+
196
+ ```bash
197
+ mcpmake from website https://app.example.com -o ./site-mcp
198
+ mcpmake from website https://shop.example.com -o ./shop-mcp --depth 3 --max-pages 30
199
+ mcpmake from website https://app.example.com -o ./site-mcp --goal "complete checkout flow"
200
+ mcpmake from website https://app.example.com -o ./site-mcp --hybrid --improve-names
201
+ ```
202
+
203
+ Unlike generic browser MCP servers (Playwright MCP, Puppeteer MCP), this generates **site-specific tools** like `login(email, password)` instead of generic `click(selector)`. Features:
204
+
205
+ - **Multi-strategy selectors** — data-testid > id > aria-label > name > CSS path > XPath
206
+ - **Resilient selectors at runtime** — each generated tool tries its primary selector and then every fallback, so a tool keeps working when the page's DOM shifts instead of failing on the first broken selector
207
+ - **Page-level tools** — one tool per form (e.g., `login`, `search`, `subscribe`)
208
+ - **Action-level tools** — one tool per standalone button
209
+ - **Browser lifecycle** — `start_browser`, `stop_browser`, `take_screenshot`
210
+ - **Session management** — persistent browser sessions via `sessionId`
211
+ - **LLM-powered naming** — Claude infers semantic tool names from page context (`--improve-names`)
212
+ - **Goal-directed crawl** — `--goal` flag for AI-driven navigation toward a specific objective
213
+ - **Hybrid mode** — `--hybrid` uses HTTP fetch for API-backed forms, Playwright for HTML-only forms
214
+ - **Auth detection** — automatically detects login forms, OAuth buttons, session cookies
215
+ - **Drift rescan** — re-crawl the site later and self-heal broken selectors with [`mcpmake rescan`](#mcpmake-rescan)
216
+
217
+ When the site changes, run `mcpmake rescan ./site-mcp` to diff the live site against the embedded snapshot, heal low-confidence selectors, and (with `--write`) regenerate the server in place.
218
+
219
+ See **[Website MCP servers](docs/website-servers.md)** for the full `from url` / `from website` / `rescan` workflow, headless capture, and the runtime selector-resilience details.
220
+
221
+ ### `from describe` — Natural Language (AI-Powered)
222
+
223
+ Describe what you want in plain English, and Claude generates an OpenAPI spec, which is then piped through the full generation pipeline.
224
+
225
+ ```bash
226
+ export ANTHROPIC_API_KEY=your-key
227
+ mcpmake from describe "manage GitHub issues and pull requests" -o ./github-mcp
228
+ mcpmake from describe "a todo list API" -o ./todo-mcp --save-spec ./todo-spec.json
229
+ ```
230
+
231
+ ## Features
232
+
233
+ ### Output Formats
234
+
235
+ Generate servers in TypeScript (default) or Python:
236
+
237
+ ```bash
238
+ mcpmake from openapi ./spec.yaml -o ./my-server --format python
239
+ ```
240
+
241
+ Python output uses the `mcp` SDK + `httpx`, producing a single `server.py` + `requirements.txt`.
242
+
243
+ ### Deployment Targets
244
+
245
+ Generate for Node.js (default) or **Cloudflare Workers**:
246
+
247
+ ```bash
248
+ mcpmake from openapi ./spec.yaml -o ./my-worker --target cloudflare
249
+ ```
250
+
251
+ The Workers target emits a stateless JSON-RPC Fetch handler (no `node:http`, no
252
+ SDK transport — the MCP 2026‑07‑28 stateless transport maps 1:1 onto a Worker
253
+ request) plus `wrangler.toml`. Deploy with `wrangler deploy`; Cloudflare's free
254
+ plan covers 100K requests/day. Secrets (API credentials + the MCP bearer token)
255
+ are injected via the `env` binding (`wrangler secret put`), not `process.env`.
256
+ Available on all spec adapters (`openapi`, `postman`, `har`, `url`, `describe`).
257
+ v1 emits **tools** — for resources, prompts, the Tasks extension, or OAuth2
258
+ outbound auth, use the default `--target node`.
259
+
260
+ ### Full MCP Primitive Support
261
+
262
+ Generated servers include all three MCP primitives:
263
+
264
+ - **Tools** — one per API operation, with Zod input schemas
265
+ - **Resources** — GET list endpoints exposed as readable resources
266
+ - **Prompts** — tag-grouped workflow prompts listing available tools
267
+
268
+ ### Auth Detection
269
+
270
+ Security schemes are auto-detected from specs and HAR headers:
271
+
272
+ | Source | Detected As | Env Var |
273
+ | --------------------- | ----------------------- | ----------------------------------- |
274
+ | OpenAPI `apiKey` | Custom header/query | `API_KEY` |
275
+ | OpenAPI `http` bearer | `Authorization: Bearer` | `BEARER_TOKEN` |
276
+ | OpenAPI `http` basic | `Authorization: Basic` | `BASIC_USERNAME` / `BASIC_PASSWORD` |
277
+ | OpenAPI `oauth2` | Bearer (pre-obtained) | `OAUTH2_TOKEN` |
278
+ | HAR Bearer header | Bearer token | `BEARER_TOKEN` |
279
+ | HAR custom headers | API key | `API_KEY` |
280
+
281
+ ### HTTP Executor
282
+
283
+ Generated servers include a production-grade HTTP client:
284
+
285
+ - Exponential backoff with `Retry-After` header support
286
+ - Retries on 429, 500, 502, 503, 504
287
+ - Configurable rate limiting (min interval between requests)
288
+ - Structured `ApiError` with status code and response body
289
+
290
+ ### Dual Transport
291
+
292
+ - **stdio** (default) — for Claude Desktop, Claude Code, local use
293
+ - **HTTP** (`--transport http`) — for remote deployment with:
294
+ - Stateful sessions via `Mcp-Session-Id`
295
+ - Origin validation (DNS-rebinding protection per MCP spec)
296
+ - `/health` and `/ready` endpoints
297
+ - Graceful shutdown on `SIGTERM`
298
+ - Structured JSON logging
299
+ - Production Dockerfile (non-root, read-only, multi-stage build)
300
+
301
+ ### Security
302
+
303
+ - **Input sanitization** — all user-controlled strings sanitized before embedding in generated code
304
+ - **Path traversal protection** — generated file paths validated to stay within output directory
305
+ - **Secret redaction** — auth tokens from HAR headers never included in generated code
306
+ - **Prototype pollution defense** — dangerous keys filtered during schema inference
307
+ - **Size limits** — HAR files capped at 50 MB, schema inference depth-limited to 20 levels
308
+ - **Generated code audit** — scans for dangerous patterns before Docker image build
309
+
310
+ ### Operation Filtering
311
+
312
+ All adapters support `--include` and `--exclude` to select operations by tag, path glob, or operationId:
313
+
314
+ ```bash
315
+ mcpmake from openapi ./spec.yaml -o ./out --include pets --exclude delete
316
+ mcpmake from openapi ./spec.yaml -o ./out --exclude "/admin*,/internal*"
317
+ ```
318
+
319
+ ## Additional Commands
320
+
321
+ ### `mcpmake verify`
322
+
323
+ Check that a generated project still matches its source spec (useful in CI):
324
+
325
+ ```bash
326
+ mcpmake verify ./spec.yaml -p ./my-mcp-server
327
+ ```
328
+
329
+ ### `mcpmake update`
330
+
331
+ Re-generate a project from an updated spec, showing what changed:
332
+
333
+ ```bash
334
+ mcpmake update ./spec.yaml -p ./my-mcp-server
335
+ ```
336
+
337
+ ### `mcpmake rescan`
338
+
339
+ The website counterpart to `update`: re-crawl the target of a `from website`
340
+ project, diff it against the snapshot embedded at generation time, self-heal
341
+ broken selectors, and optionally regenerate the server in place.
342
+
343
+ ```bash
344
+ # Report what changed (and which selectors are fragile) — no writes
345
+ mcpmake rescan ./site-mcp
346
+
347
+ # Heal low-confidence selectors via the page's accessibility tree (needs ANTHROPIC_API_KEY)
348
+ ANTHROPIC_API_KEY=... mcpmake rescan ./site-mcp
349
+
350
+ # Regenerate the project in place from the fresh, healed snapshot
351
+ mcpmake rescan ./site-mcp --write
352
+
353
+ # Machine-readable diff for CI
354
+ mcpmake rescan ./site-mcp --format json
355
+ ```
356
+
357
+ How it works:
358
+
359
+ - Reads the snapshot from `src/site-descriptor.json` and the regeneration
360
+ settings from `mcpmake.site.json` (both written by `from website`).
361
+ - Re-crawls the live site (override the URL with `--url`; crawl bounds default
362
+ from the snapshot, override with `--depth` / `--max-pages`).
363
+ - Diffs old vs new and reports added/removed/modified pages, forms, fields,
364
+ buttons, and links, plus selectors that broke.
365
+ - **Self-healing:** for fragile (low-confidence) selectors, it asks Claude for a
366
+ better one from the live accessibility tree and only applies it if it actually
367
+ resolves on the page. Skipped (with a warning) when `ANTHROPIC_API_KEY` is unset.
368
+ - `--write` regenerates the project (overwrites generated files, like `update`).
369
+
370
+ ### `mcpmake deploy`
371
+
372
+ Deploy a spec to mcpmake Cloud and get a running MCP server at a URL:
373
+
374
+ ```bash
375
+ mcpmake deploy ./spec.yaml --name my-api
376
+ # Returns: endpoint URL, bearer token, Claude Desktop config snippet
377
+ ```
378
+
379
+ ### `mcpmake publish`
380
+
381
+ Generate registry manifests, or publish to the official MCP Registry:
382
+
383
+ ```bash
384
+ mcpmake publish ./my-mcp-server # smithery.yaml + glama.json (default)
385
+ mcpmake publish ./my-mcp-server --registry smithery # smithery.yaml only
386
+ mcpmake publish ./my-mcp-server --registry glama # glama.json only
387
+
388
+ # Official MCP Registry (registry.modelcontextprotocol.io)
389
+ mcpmake publish ./my-mcp-server --registry official # writes server.json + sets package.json mcpName
390
+ mcpmake publish ./my-mcp-server --registry official --name io.github.you/my-server
391
+ mcpmake publish ./my-mcp-server --registry official --remote-url https://my-server.example.com/mcp
392
+ mcpmake publish ./my-mcp-server --registry official --push # runs `mcp-publisher publish`
393
+ ```
394
+
395
+ For `official`, mcpmake builds a schema-conformant `server.json`, sets the
396
+ `mcpName` marker in `package.json`, and prints the exact `npm publish` +
397
+ `mcp-publisher login/publish` steps. `--name` defaults to a namespaced id
398
+ derived from your git remote; `--push` requires the `mcp-publisher` CLI (after
399
+ `mcp-publisher login github` and an `npm publish`).
400
+
401
+ ### `mcpmake bundle`
402
+
403
+ Bundle a generated project into an `.mcpb` file for one-click Claude Desktop
404
+ install (builds the project first unless `--skip-build`):
405
+
406
+ ```bash
407
+ mcpmake bundle ./my-mcp-server -o ./my-mcp-server.mcpb
408
+ mcpmake bundle ./my-mcp-server --skip-build # if already built
409
+ ```
410
+
411
+ ### `mcpmake lint`
412
+
413
+ MCP-specific linting for OpenAPI specs (useful in CI):
414
+
415
+ ```bash
416
+ mcpmake lint ./spec.yaml
417
+ mcpmake lint ./spec.yaml --format json # machine-readable output
418
+ mcpmake lint ./spec.yaml --level warn # filter by severity
419
+ ```
420
+
421
+ Rules: tool name length (60/128 char limits), description quality, parameter count, duplicate names, missing annotations, reserved names. Exits with code 1 on errors.
422
+
423
+ ### `mcpmake diff`
424
+
425
+ Compare two specs and show which MCP tools changed:
426
+
427
+ ```bash
428
+ mcpmake diff ./old-spec.yaml ./new-spec.yaml
429
+ mcpmake diff ./old-spec.yaml ./new-spec.yaml --format json
430
+ ```
431
+
432
+ Shows added, removed, and changed tools with parameter-level detail.
433
+
434
+ ### `mcpmake merge`
435
+
436
+ Combine multiple API specs into one MCP server:
437
+
438
+ ```bash
439
+ mcpmake merge ./users-api.yaml ./orders-api.yaml -o ./combined.yaml
440
+ ```
441
+
442
+ ## Advanced Features
443
+
444
+ ### Swagger 2.0 Support
445
+
446
+ Swagger 2.0 specs are automatically converted to OpenAPI 3.0 on ingest:
447
+
448
+ ```bash
449
+ mcpmake from openapi ./swagger-v2.json -o ./my-server # auto-detected
450
+ ```
451
+
452
+ ### OpenAPI Overlays
453
+
454
+ Customize a spec non-destructively without editing the source:
455
+
456
+ ```bash
457
+ mcpmake from openapi ./spec.yaml --overlay ./my-overrides.yaml -o ./my-server
458
+ ```
459
+
460
+ Overlay format:
461
+
462
+ ```yaml
463
+ overlay: 1.0.0
464
+ actions:
465
+ - target: "$.paths['/users'].get"
466
+ update:
467
+ x-mcp-name: list_all_users
468
+ x-mcp-description: 'Retrieve all registered users'
469
+ - target: "$.paths['/admin/*']"
470
+ remove: true
471
+ ```
472
+
473
+ ### MCP Extensions
474
+
475
+ Custom `x-mcp-*` extensions in your OpenAPI spec:
476
+
477
+ ```yaml
478
+ paths:
479
+ /users:
480
+ get:
481
+ x-mcp-name: list_users # override tool name
482
+ x-mcp-description: 'Get users' # override description
483
+ x-mcp-emit: skip # skip this operation
484
+ x-mcp-scope: read # semantic scope hint
485
+ x-mcp-jq-filter: '.data' # trim response before returning
486
+ x-mcp-deprecation-message: 'Use /v2/users instead'
487
+ x-mcp-deprecation-replacement: list_users_v2
488
+ x-mcp-unknown-values: allow # accept unknown enum values
489
+ ```
490
+
491
+ ## CLI Reference
492
+
493
+ Every command, argument, flag, default, and required env var is documented in
494
+ the complete **[CLI reference → `docs/cli.md`](docs/cli.md)**. You can also run
495
+ `mcpmake <command> --help` for the live, authoritative flag list.
496
+
497
+ | Command | Purpose |
498
+ | --- | --- |
499
+ | [`from openapi`](docs/cli.md#mcpmake-from-openapi) | Generate from an OpenAPI/Swagger spec or provider shortcut |
500
+ | [`from har`](docs/cli.md#mcpmake-from-har) | Generate from a HAR (browser DevTools) recording |
501
+ | [`from url`](docs/cli.md#mcpmake-from-url) | Generate by recording a live browser session |
502
+ | [`from postman`](docs/cli.md#mcpmake-from-postman) | Generate from a Postman Collection (v2.1) |
503
+ | [`from website`](docs/cli.md#mcpmake-from-website) | Generate a Playwright server from a site's DOM |
504
+ | [`from describe`](docs/cli.md#mcpmake-from-describe) | Generate from a natural-language description (AI) |
505
+ | [`merge`](docs/cli.md#mcpmake-merge) | Merge two OpenAPI specs into one |
506
+ | [`diff`](docs/cli.md#mcpmake-diff) | Compare tools generated from two specs |
507
+ | [`lint`](docs/cli.md#mcpmake-lint) | Lint an OpenAPI spec for MCP issues |
508
+ | [`verify`](docs/cli.md#mcpmake-verify) | Check a generated project still matches its spec |
509
+ | [`update`](docs/cli.md#mcpmake-update) | Re-generate a project from a changed spec |
510
+ | [`rescan`](docs/cli.md#mcpmake-rescan) | Re-crawl a website project, heal selectors, regenerate |
511
+ | [`bundle`](docs/cli.md#mcpmake-bundle) | Bundle a generated project into an `.mcpb` file |
512
+ | [`publish`](docs/cli.md#mcpmake-publish) | Generate registry manifests / publish to the MCP Registry |
513
+ | [`deploy`](docs/cli.md#mcpmake-deploy) | Deploy a spec to the hosting backend |
514
+ | [`ci init`](docs/cli.md#mcpmake-ci-init) | Generate a GitHub Actions drift-check workflow |
515
+
516
+ ## Architecture
517
+
518
+ ```
519
+ Input Source (OpenAPI / HAR / URL / Description)
520
+ -> Parser (load, extract operations, convert schemas)
521
+ -> Transformer (build tools + resources + prompts, detect auth)
522
+ -> Emitter (render Handlebars templates, write project to disk)
523
+ -> Runnable MCP Server (stdio or HTTP)
524
+ ```
525
+
526
+ Two parallel pipelines share the emitter infrastructure:
527
+
528
+ - **API pipeline**: OpenAPI/HAR/URL/Postman/Describe → `OperationDescriptor[]` → HTTP-fetch MCP server
529
+ - **Website pipeline**: Website URL → `SiteDescriptor` → Playwright-based MCP server
530
+
531
+ ### Project Layout
532
+
533
+ ```
534
+ src/
535
+ ├── parser/ # Input adapters (OpenAPI, HAR, Postman)
536
+ ├── analyzer/ # Website DOM analysis (crawler, forms, selectors, screenshots)
537
+ ├── transformer/ # Tool/resource/prompt building, auth, naming, filtering
538
+ ├── site-transformer/ # Website → site-specific tool generation
539
+ ├── emitter/ # Template rendering, code writing, project scaffolding
540
+ │ ├── templates/ # Handlebars templates for TypeScript servers
541
+ │ ├── site-templates/ # Templates for Playwright-based servers
542
+ │ └── python-templates/ # Templates for Python servers
543
+ ├── generator/ # AI-powered spec generation (Claude API)
544
+ ├── recorder/ # Playwright browser recorder (interactive + headless capture)
545
+ ├── rescan/ # Site diff + self-heal engine (powers `mcpmake rescan`)
546
+ ├── providers/ # Pre-built configs for popular APIs
547
+ ├── plugins/ # Adapter plugin system
548
+ ├── cloud/ # Hosting backend (server, containers, billing, DB)
549
+ │ ├── db/ # PostgreSQL stores and migrations
550
+ │ ├── billing/ # Usage tracking and plan enforcement
551
+ │ └── web/ # Dashboard, auth, admin panel
552
+ ├── commands/ # CLI commands (from/*, verify, update, rescan, deploy, publish)
553
+ ├── pricing.ts # Canonical Family A price card (served at /api/pricing)
554
+ ├── types/ # Shared TypeScript types
555
+ └── utils/ # Logger, filesystem, sanitization helpers
556
+ ```
557
+
558
+ ## Pricing
559
+
560
+ The CLI is **free forever** — generate code you own and run it anywhere. Paid
561
+ tiers cover keeping it in sync and running it for you.
562
+
563
+ | Tier | Price | What you get |
564
+ | ------------------------ | ------------------ | ------------------------------------------------------------- |
565
+ | **Local compiler (CLI)** | **Free forever** | Generate, own the code, run anywhere. |
566
+ | **Sync — Solo** | **$19/mo** | CI drift-check + spec-currency auto-PRs, 1 repo. |
567
+ | **Sync — Team** | **$499/mo** | Multi-repo CI sync, policy checks, support. |
568
+ | **Self-hosted license** | **from $8,000/yr** | Run the generator + sync on your own infra; governance + SLA. |
569
+ | **Migration engagement** | **$5,000–$20,000** | Done-for-you API → owned MCP servers + CI wiring. |
570
+ | **Managed hosting** | convenience add-on | We host code you already own — self-host any time. See below. |
571
+ | **Enterprise** | custom | SSO, RBAC, private registry, audit. |
572
+
573
+ Prices are served live from the backend (`GET /api/pricing`) and defined in
574
+ [`src/pricing.ts`](src/pricing.ts), so the CLI never shows stale numbers.
575
+ Managed hosting is a convenience tier, not the anchor — the value you own is the
576
+ editable code and safe regeneration.
577
+
578
+ ## mcpmake Cloud
579
+
580
+ Hosted platform for deploying generated MCP servers as containers:
581
+
582
+ - **Spec upload API** — `POST /api/servers` accepts specs, returns endpoint + bearer token
583
+ - **Container management** — Docker-based with resource limits (HTTP: 256MB/0.5CPU, Playwright: 768MB/1CPU)
584
+ - **Security** — read-only containers, non-root user, code auditing, bearer auth, encrypted secrets (AES-256-GCM)
585
+ - **Auto-scaling** — idle containers stopped automatically, dynamic routing
586
+ - **Monitoring** — per-server metrics, log streaming via SSE, rate limiting
587
+ - **Web dashboard** — register/login, server CRUD, logs, metrics, billing, admin panel
588
+ - **Billing** — browser-minute metering, plan quotas, Stripe payment integration
589
+ - **Database** — PostgreSQL with in-memory fallback, automatic migrations
590
+ - **Deployment** — VPS setup scripts, PM2/nginx, nightly pg_dump backups
591
+
592
+ ```bash
593
+ # Deploy to mcpmake.dev
594
+ mcpmake deploy ./petstore.yaml --server https://mcpmake.dev
595
+ ```
596
+
597
+ ### Admin dashboard
598
+
599
+ The admin panel adds operational visibility and growth levers on top of the
600
+ per-server views:
601
+
602
+ - **Promotional tool-call credits** — grant or revoke bonus tool-calls per user
603
+ from the dashboard. Credits are consumed (all-or-nothing, atomically) when a
604
+ user is over their plan quota, _before_ the 429 hard cap. Every grant/revoke is
605
+ recorded in an auditable **ledger** (newest-first; per-request consumption is
606
+ intentionally not ledgered).
607
+ - **Time-series charts** — server-rendered, script-free inline SVG (sparklines,
608
+ bar charts, and a requests-vs-errors dual line) backed by periodic metric
609
+ samples. CSP-safe: no inline JS, hover values via `<title>` only.
610
+ - **Health panel** — host RAM/disk pressure, active containers, and totals at a
611
+ glance.
612
+ - **API failure-rate** — a rolling per-minute tracker classifies responses by
613
+ status class (2xx/3xx/4xx/5xx) plus aborted requests, surfacing a
614
+ server-error rate (`(5xx + aborted) / total`) and client-error rate.
615
+ - **CLI telemetry viewer** — opt-in crash reports grouped by fingerprint with
616
+ counts and last-seen, hardened against abuse (size cap, no decompression,
617
+ per-IP rate limit, strict field whitelist).
618
+
619
+ ### Public API endpoints
620
+
621
+ Two endpoints are public (unauthenticated) and stable:
622
+
623
+ | Endpoint | Purpose |
624
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
625
+ | `GET /api/pricing` | Canonical Family A price card (the CLI fetches this so an old binary never prints stale prices; falls back to its bundled copy when unreachable). |
626
+ | `POST /api/telemetry/report` | Receives opt-in, pre-redacted CLI crash reports. Returns **202** on accept; **400** (malformed/empty), **413** (oversized), **415** (`Content-Encoding` set), or **429** (rate-limited) on reject. |
627
+
628
+ ### Configuration
629
+
630
+ Environment variables for the cloud backend:
631
+
632
+ | Variable | Required | Description |
633
+ | ----------------------- | -------- | --------------------------------------------------------------- |
634
+ | `DATABASE_URL` | Yes | PostgreSQL connection string |
635
+ | `PORT` | No | Server port (default: 3001) |
636
+ | `DOMAIN` | Yes | Domain for hosted servers |
637
+ | `TRUST_PROXY` | No | Trust X-Forwarded headers |
638
+ | `ADMIN_TOKEN` | Yes | Admin API auth token |
639
+ | `ENCRYPTION_KEY` | Yes | 32+ char key for AES-256-GCM secrets |
640
+ | `ALLOWED_EMAILS` | No | Comma-separated allowlist (e.g. `*@company.com,user@gmail.com`) |
641
+ | `STRIPE_SECRET_KEY` | No | Stripe API key for payments |
642
+ | `STRIPE_WEBHOOK_SECRET` | No | Stripe webhook signature secret |
643
+ | `ANTHROPIC_API_KEY` | No | For AI-powered features |
644
+
645
+ ## Development
646
+
647
+ ```bash
648
+ git clone <repo>
649
+ cd mcpmake
650
+ npm install
651
+ npm run build
652
+
653
+ # Run without building
654
+ npx tsx src/index.ts from openapi ./test/fixtures/petstore.yaml -o /tmp/test-mcp
655
+
656
+ # Type check
657
+ npm run typecheck
658
+
659
+ # Run tests (263 tests across 39 files)
660
+ npm test
661
+
662
+ # Release smoke tests (validate the packaged binary + a generated server)
663
+ npm run smoke:pack
664
+ npm run smoke:server
665
+
666
+ # Format code
667
+ npm run format
668
+ ```
669
+
670
+ ## Supported Inputs
671
+
672
+ | Input | Format | Notes |
673
+ | ----------- | -------------- | ---------------------------------------------- |
674
+ | OpenAPI | 3.0.x, 3.1.x | YAML/JSON, local/remote |
675
+ | HAR | 1.2 | Chrome/Firefox DevTools export |
676
+ | URL | http/https | Playwright browser recording |
677
+ | Website | http/https | DOM analysis, Playwright MCP server |
678
+ | Postman | v2.1 | Collection import |
679
+ | Description | Plain English | Claude-powered spec generation |
680
+ | Providers | Shortcut names | stripe, github, slack, notion, linear, shopify |
681
+
682
+ ## Requirements
683
+
684
+ - Node.js >= 20.0.0
685
+ - Playwright (`npx playwright install chromium`) for `from url` command
686
+ - `ANTHROPIC_API_KEY` for `from describe` command
687
+ - Docker for `mcpmake deploy` / Cloud hosting
688
+
689
+ ## License
690
+
691
+ Proprietary. All rights reserved.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js';