@frontmcp/skills 1.0.0-beta.9 → 1.0.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 (284) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +69 -0
  3. package/catalog/frontmcp-config/SKILL.md +38 -22
  4. package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +87 -0
  5. package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +63 -0
  6. package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +76 -0
  7. package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +77 -0
  8. package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +73 -0
  9. package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +64 -0
  10. package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +83 -0
  11. package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +87 -0
  12. package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +52 -0
  13. package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +72 -0
  14. package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +64 -0
  15. package/catalog/frontmcp-config/examples/configure-session/multi-server-key-prefix.md +68 -0
  16. package/catalog/frontmcp-config/examples/configure-session/redis-session-store.md +52 -0
  17. package/catalog/frontmcp-config/examples/configure-session/vercel-kv-session.md +52 -0
  18. package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +94 -0
  19. package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +92 -0
  20. package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +83 -0
  21. package/catalog/frontmcp-config/examples/configure-throttle-guard-config/full-guard-config.md +99 -0
  22. package/catalog/frontmcp-config/examples/configure-throttle-guard-config/minimal-guard-config.md +55 -0
  23. package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +74 -0
  24. package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +86 -0
  25. package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +69 -0
  26. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +65 -0
  27. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +69 -0
  28. package/catalog/frontmcp-config/references/configure-auth-modes.md +15 -0
  29. package/catalog/frontmcp-config/references/configure-auth.md +15 -0
  30. package/catalog/frontmcp-config/references/configure-elicitation.md +14 -0
  31. package/catalog/frontmcp-config/references/configure-http.md +15 -0
  32. package/catalog/frontmcp-config/references/configure-session.md +15 -0
  33. package/catalog/frontmcp-config/references/configure-throttle-guard-config.md +14 -0
  34. package/catalog/frontmcp-config/references/configure-throttle.md +15 -0
  35. package/catalog/frontmcp-config/references/configure-transport-protocol-presets.md +14 -0
  36. package/catalog/frontmcp-config/references/configure-transport.md +15 -0
  37. package/catalog/frontmcp-config/references/setup-redis.md +10 -0
  38. package/catalog/frontmcp-config/references/setup-sqlite.md +10 -0
  39. package/catalog/frontmcp-deployment/SKILL.md +40 -12
  40. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +43 -0
  41. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +85 -0
  42. package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +61 -0
  43. package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +66 -0
  44. package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +76 -0
  45. package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +78 -0
  46. package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +85 -0
  47. package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +104 -0
  48. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +82 -0
  49. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +97 -0
  50. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +92 -0
  51. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +92 -0
  52. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +113 -0
  53. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +100 -0
  54. package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +101 -0
  55. package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +79 -0
  56. package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +92 -0
  57. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +63 -0
  58. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +89 -0
  59. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +69 -0
  60. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +82 -0
  61. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +90 -0
  62. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +49 -0
  63. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +92 -0
  64. package/catalog/frontmcp-deployment/references/build-for-browser.md +15 -0
  65. package/catalog/frontmcp-deployment/references/build-for-cli.md +65 -3
  66. package/catalog/frontmcp-deployment/references/build-for-sdk.md +15 -0
  67. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +15 -0
  68. package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +18 -3
  69. package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +16 -2
  70. package/catalog/frontmcp-deployment/references/deploy-to-node.md +19 -4
  71. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +14 -0
  72. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +15 -0
  73. package/catalog/frontmcp-development/SKILL.md +25 -17
  74. package/catalog/frontmcp-development/examples/create-adapter/basic-api-adapter.md +92 -0
  75. package/catalog/frontmcp-development/examples/create-adapter/namespaced-adapter.md +124 -0
  76. package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +121 -0
  77. package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +95 -0
  78. package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +111 -0
  79. package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +81 -0
  80. package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +80 -0
  81. package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +87 -0
  82. package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +117 -0
  83. package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +88 -0
  84. package/catalog/frontmcp-development/examples/create-plugin/basic-plugin-with-provider.md +69 -0
  85. package/catalog/frontmcp-development/examples/create-plugin/configurable-dynamic-plugin.md +178 -0
  86. package/catalog/frontmcp-development/examples/create-plugin/plugin-with-context-extension.md +107 -0
  87. package/catalog/frontmcp-development/examples/create-plugin-hooks/basic-logging-plugin.md +69 -0
  88. package/catalog/frontmcp-development/examples/create-plugin-hooks/caching-with-around.md +80 -0
  89. package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +100 -0
  90. package/catalog/frontmcp-development/examples/create-prompt/basic-prompt.md +72 -0
  91. package/catalog/frontmcp-development/examples/create-prompt/dynamic-rag-prompt.md +92 -0
  92. package/catalog/frontmcp-development/examples/create-prompt/multi-turn-debug-session.md +86 -0
  93. package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +113 -0
  94. package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +107 -0
  95. package/catalog/frontmcp-development/examples/create-resource/basic-static-resource.md +72 -0
  96. package/catalog/frontmcp-development/examples/create-resource/binary-and-multi-content.md +111 -0
  97. package/catalog/frontmcp-development/examples/create-resource/parameterized-template.md +84 -0
  98. package/catalog/frontmcp-development/examples/create-skill/basic-inline-skill.md +96 -0
  99. package/catalog/frontmcp-development/examples/create-skill/directory-based-skill.md +115 -0
  100. package/catalog/frontmcp-development/examples/create-skill/parameterized-skill.md +96 -0
  101. package/catalog/frontmcp-development/examples/create-skill-with-tools/basic-tool-orchestration.md +76 -0
  102. package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +149 -0
  103. package/catalog/frontmcp-development/examples/create-skill-with-tools/incident-response-skill.md +92 -0
  104. package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +62 -0
  105. package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +84 -0
  106. package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +93 -0
  107. package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +94 -0
  108. package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +60 -0
  109. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +104 -0
  110. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +63 -0
  111. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +103 -0
  112. package/catalog/frontmcp-development/examples/create-workflow/basic-deploy-pipeline.md +91 -0
  113. package/catalog/frontmcp-development/examples/create-workflow/parallel-validation-pipeline.md +90 -0
  114. package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +136 -0
  115. package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +145 -0
  116. package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +124 -0
  117. package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +149 -0
  118. package/catalog/frontmcp-development/examples/official-adapters/authenticated-adapter-with-polling.md +84 -0
  119. package/catalog/frontmcp-development/examples/official-adapters/basic-openapi-adapter.md +54 -0
  120. package/catalog/frontmcp-development/examples/official-adapters/multi-api-hub-with-inline-spec.md +130 -0
  121. package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +117 -0
  122. package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +147 -0
  123. package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +104 -0
  124. package/catalog/frontmcp-development/references/create-adapter.md +14 -0
  125. package/catalog/frontmcp-development/references/create-agent-llm-config.md +14 -0
  126. package/catalog/frontmcp-development/references/create-agent.md +15 -0
  127. package/catalog/frontmcp-development/references/create-job.md +15 -0
  128. package/catalog/frontmcp-development/references/create-plugin-hooks.md +51 -0
  129. package/catalog/frontmcp-development/references/create-plugin.md +186 -11
  130. package/catalog/frontmcp-development/references/create-prompt.md +17 -0
  131. package/catalog/frontmcp-development/references/create-provider.md +14 -0
  132. package/catalog/frontmcp-development/references/create-resource.md +127 -0
  133. package/catalog/frontmcp-development/references/create-skill-with-tools.md +126 -7
  134. package/catalog/frontmcp-development/references/create-skill.md +57 -12
  135. package/catalog/frontmcp-development/references/create-tool-annotations.md +14 -0
  136. package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +15 -0
  137. package/catalog/frontmcp-development/references/create-tool.md +205 -1
  138. package/catalog/frontmcp-development/references/create-workflow.md +15 -0
  139. package/catalog/frontmcp-development/references/decorators-guide.md +155 -78
  140. package/catalog/frontmcp-development/references/official-adapters.md +31 -16
  141. package/catalog/frontmcp-development/references/official-plugins.md +62 -28
  142. package/catalog/frontmcp-extensibility/SKILL.md +103 -0
  143. package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +175 -0
  144. package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +138 -0
  145. package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +103 -0
  146. package/catalog/frontmcp-extensibility/references/vectoriadb.md +299 -0
  147. package/catalog/frontmcp-guides/SKILL.md +7 -4
  148. package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +160 -0
  149. package/catalog/frontmcp-guides/examples/example-knowledge-base/multi-app-composition.md +92 -0
  150. package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +135 -0
  151. package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +135 -0
  152. package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +148 -0
  153. package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +129 -0
  154. package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +75 -0
  155. package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +142 -0
  156. package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +74 -0
  157. package/catalog/frontmcp-guides/references/example-knowledge-base.md +15 -0
  158. package/catalog/frontmcp-guides/references/example-task-manager.md +30 -21
  159. package/catalog/frontmcp-guides/references/example-weather-api.md +18 -6
  160. package/catalog/frontmcp-observability/SKILL.md +144 -0
  161. package/catalog/frontmcp-observability/examples/structured-logging/stdout-logging.md +71 -0
  162. package/catalog/frontmcp-observability/examples/structured-logging/winston-integration.md +70 -0
  163. package/catalog/frontmcp-observability/examples/telemetry-api/agent-nested-tracing.md +86 -0
  164. package/catalog/frontmcp-observability/examples/telemetry-api/plugin-telemetry.md +93 -0
  165. package/catalog/frontmcp-observability/examples/telemetry-api/tool-custom-spans.md +72 -0
  166. package/catalog/frontmcp-observability/examples/testing-observability/test-custom-spans.md +90 -0
  167. package/catalog/frontmcp-observability/examples/testing-observability/test-log-correlation.md +104 -0
  168. package/catalog/frontmcp-observability/examples/tracing-setup/basic-tracing.md +82 -0
  169. package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +73 -0
  170. package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +74 -0
  171. package/catalog/frontmcp-observability/references/structured-logging.md +114 -0
  172. package/catalog/frontmcp-observability/references/telemetry-api.md +155 -0
  173. package/catalog/frontmcp-observability/references/testing-observability.md +169 -0
  174. package/catalog/frontmcp-observability/references/tracing-setup.md +146 -0
  175. package/catalog/frontmcp-observability/references/vendor-integrations.md +164 -0
  176. package/catalog/frontmcp-production-readiness/SKILL.md +99 -0
  177. package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +102 -0
  178. package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +104 -0
  179. package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +95 -0
  180. package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/basic-health-setup.md +81 -0
  181. package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/custom-probes.md +136 -0
  182. package/catalog/frontmcp-production-readiness/examples/production-browser/browser-bundle-config.md +93 -0
  183. package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +116 -0
  184. package/catalog/frontmcp-production-readiness/examples/production-browser/security-and-performance.md +128 -0
  185. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/binary-build-config.md +109 -0
  186. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +132 -0
  187. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +82 -0
  188. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +107 -0
  189. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +119 -0
  190. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +124 -0
  191. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +103 -0
  192. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +89 -0
  193. package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +122 -0
  194. package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +107 -0
  195. package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +138 -0
  196. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/basic-sdk-lifecycle.md +85 -0
  197. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +110 -0
  198. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/package-json-config.md +107 -0
  199. package/catalog/frontmcp-production-readiness/examples/production-node-server/docker-multi-stage.md +103 -0
  200. package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +87 -0
  201. package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +97 -0
  202. package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +104 -0
  203. package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +91 -0
  204. package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +78 -0
  205. package/catalog/frontmcp-production-readiness/references/common-checklist.md +175 -0
  206. package/catalog/frontmcp-production-readiness/references/health-readiness-endpoints.md +198 -0
  207. package/catalog/frontmcp-production-readiness/references/production-browser.md +56 -0
  208. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +71 -0
  209. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +71 -0
  210. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +62 -0
  211. package/catalog/frontmcp-production-readiness/references/production-lambda.md +63 -0
  212. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +76 -0
  213. package/catalog/frontmcp-production-readiness/references/production-node-server.md +71 -0
  214. package/catalog/frontmcp-production-readiness/references/production-vercel.md +62 -0
  215. package/catalog/frontmcp-setup/SKILL.md +19 -14
  216. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/bundle-presets-scaffolding.md +61 -0
  217. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +83 -0
  218. package/catalog/frontmcp-setup/examples/multi-app-composition/local-apps-with-shared-tools.md +87 -0
  219. package/catalog/frontmcp-setup/examples/multi-app-composition/per-app-auth-and-isolation.md +88 -0
  220. package/catalog/frontmcp-setup/examples/multi-app-composition/remote-and-esm-apps.md +81 -0
  221. package/catalog/frontmcp-setup/examples/nx-workflow/build-test-affected.md +77 -0
  222. package/catalog/frontmcp-setup/examples/nx-workflow/multi-server-deployment.md +93 -0
  223. package/catalog/frontmcp-setup/examples/nx-workflow/scaffold-and-generate.md +62 -0
  224. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-generator-scaffolding.md +73 -0
  225. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +85 -0
  226. package/catalog/frontmcp-setup/examples/project-structure-nx/shared-library-usage.md +89 -0
  227. package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +64 -0
  228. package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +111 -0
  229. package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +73 -0
  230. package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +89 -0
  231. package/catalog/frontmcp-setup/examples/readme-guide/vercel-deployment-readme.md +90 -0
  232. package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +99 -0
  233. package/catalog/frontmcp-setup/examples/setup-project/cli-scaffold-with-flags.md +77 -0
  234. package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +89 -0
  235. package/catalog/frontmcp-setup/examples/setup-redis/docker-redis-local-dev.md +88 -0
  236. package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +78 -0
  237. package/catalog/frontmcp-setup/examples/setup-redis/vercel-kv-serverless.md +78 -0
  238. package/catalog/frontmcp-setup/examples/setup-sqlite/basic-sqlite-setup.md +75 -0
  239. package/catalog/frontmcp-setup/examples/setup-sqlite/encrypted-sqlite-storage.md +55 -0
  240. package/catalog/frontmcp-setup/examples/setup-sqlite/unix-socket-daemon.md +70 -0
  241. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +33 -9
  242. package/catalog/frontmcp-setup/references/multi-app-composition.md +15 -0
  243. package/catalog/frontmcp-setup/references/nx-workflow.md +15 -0
  244. package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -0
  245. package/catalog/frontmcp-setup/references/project-structure-standalone.md +15 -0
  246. package/catalog/frontmcp-setup/references/readme-guide.md +235 -0
  247. package/catalog/frontmcp-setup/references/setup-project.md +16 -1
  248. package/catalog/frontmcp-setup/references/setup-redis.md +15 -0
  249. package/catalog/frontmcp-setup/references/setup-sqlite.md +15 -0
  250. package/catalog/frontmcp-testing/SKILL.md +41 -27
  251. package/catalog/frontmcp-testing/examples/setup-testing/fixture-based-e2e-test.md +70 -0
  252. package/catalog/frontmcp-testing/examples/setup-testing/jest-config-with-coverage.md +59 -0
  253. package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +115 -0
  254. package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +78 -0
  255. package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +88 -0
  256. package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +71 -0
  257. package/catalog/frontmcp-testing/examples/test-browser-build/browser-bundle-validation.md +58 -0
  258. package/catalog/frontmcp-testing/examples/test-browser-build/playwright-browser-test.md +69 -0
  259. package/catalog/frontmcp-testing/examples/test-cli-binary/binary-startup-test.md +77 -0
  260. package/catalog/frontmcp-testing/examples/test-cli-binary/js-bundle-import-test.md +56 -0
  261. package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +74 -0
  262. package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +79 -0
  263. package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +67 -0
  264. package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +72 -0
  265. package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +73 -0
  266. package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +69 -0
  267. package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +82 -0
  268. package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +92 -0
  269. package/catalog/frontmcp-testing/references/setup-testing.md +17 -0
  270. package/catalog/frontmcp-testing/references/test-auth.md +15 -0
  271. package/catalog/frontmcp-testing/references/test-browser-build.md +14 -0
  272. package/catalog/frontmcp-testing/references/test-cli-binary.md +14 -0
  273. package/catalog/frontmcp-testing/references/test-direct-client.md +14 -0
  274. package/catalog/frontmcp-testing/references/test-e2e-handler.md +15 -0
  275. package/catalog/frontmcp-testing/references/test-tool-unit.md +15 -0
  276. package/catalog/skills-manifest.json +2849 -32
  277. package/package.json +2 -2
  278. package/src/index.d.ts +1 -1
  279. package/src/index.js.map +1 -1
  280. package/src/loader.js +0 -1
  281. package/src/loader.js.map +1 -1
  282. package/src/manifest.d.ts +36 -1
  283. package/src/manifest.js +6 -1
  284. package/src/manifest.js.map +1 -1
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: custom-probes
3
+ reference: health-readiness-endpoints
4
+ level: intermediate
5
+ description: 'Custom database and API probes with Kubernetes deployment configuration.'
6
+ tags: [production, health, readiness, kubernetes, postgres, probes, custom]
7
+ features:
8
+ - 'Custom health probes for PostgreSQL and external API dependencies'
9
+ - 'Kubernetes liveness and readiness probe configuration'
10
+ - 'Production includeDetails: false to hide infrastructure topology'
11
+ - 'Per-probe timeout to prevent slow dependencies from blocking readiness'
12
+ ---
13
+
14
+ # Custom Health Probes with Kubernetes
15
+
16
+ Custom database and API probes with Kubernetes deployment configuration.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/server.ts
22
+ import { FrontMcp } from '@frontmcp/sdk';
23
+ import { pool } from './db';
24
+ import { MyApp } from './apps/my-app';
25
+
26
+ @FrontMcp({
27
+ info: { name: 'api-server', version: '2.1.0' },
28
+ apps: [MyApp],
29
+ http: { port: 3001 },
30
+ redis: { host: process.env['REDIS_HOST'] ?? 'localhost' },
31
+ health: {
32
+ includeDetails: false, // don't leak infra topology in production
33
+ readyz: {
34
+ timeoutMs: 3000, // probes must respond within 3s
35
+ },
36
+ probes: [
37
+ {
38
+ name: 'postgres',
39
+ async check() {
40
+ const start = Date.now();
41
+ try {
42
+ await pool.query('SELECT 1');
43
+ return { status: 'healthy', latencyMs: Date.now() - start };
44
+ } catch (err) {
45
+ return {
46
+ status: 'unhealthy',
47
+ latencyMs: Date.now() - start,
48
+ error: err instanceof Error ? err.message : String(err),
49
+ };
50
+ }
51
+ },
52
+ },
53
+ {
54
+ name: 'payment-api',
55
+ async check() {
56
+ const start = Date.now();
57
+ const res = await fetch('https://api.payments.example.com/health', {
58
+ signal: AbortSignal.timeout(2000),
59
+ });
60
+ return {
61
+ status: res.ok ? 'healthy' : 'unhealthy',
62
+ latencyMs: Date.now() - start,
63
+ };
64
+ },
65
+ },
66
+ ],
67
+ },
68
+ })
69
+ export default class Server {}
70
+ ```
71
+
72
+ ```yaml
73
+ # k8s/deployment.yaml
74
+ apiVersion: apps/v1
75
+ kind: Deployment
76
+ metadata:
77
+ name: api-server
78
+ spec:
79
+ replicas: 3
80
+ template:
81
+ spec:
82
+ containers:
83
+ - name: api-server
84
+ image: my-registry/api-server:2.1.0
85
+ ports:
86
+ - containerPort: 3001
87
+ livenessProbe:
88
+ httpGet:
89
+ path: /healthz
90
+ port: 3001
91
+ initialDelaySeconds: 5
92
+ periodSeconds: 10
93
+ failureThreshold: 3
94
+ readinessProbe:
95
+ httpGet:
96
+ path: /readyz
97
+ port: 3001
98
+ initialDelaySeconds: 10
99
+ periodSeconds: 15
100
+ timeoutSeconds: 5
101
+ failureThreshold: 2
102
+ env:
103
+ - name: REDIS_HOST
104
+ value: redis-service
105
+ - name: NODE_ENV
106
+ value: production
107
+ ```
108
+
109
+ When `includeDetails: false`, the `/readyz` response omits per-probe details:
110
+
111
+ ```json
112
+ {
113
+ "status": "ready",
114
+ "totalLatencyMs": 45,
115
+ "catalog": {
116
+ "toolsHash": "a1b2c3d4...",
117
+ "toolCount": 8,
118
+ "resourceCount": 2,
119
+ "promptCount": 1,
120
+ "skillCount": 0,
121
+ "agentCount": 0
122
+ }
123
+ }
124
+ ```
125
+
126
+ ## What This Demonstrates
127
+
128
+ - Custom health probes for PostgreSQL and external API dependencies
129
+ - Kubernetes liveness and readiness probe configuration
130
+ - Production includeDetails: false to hide infrastructure topology
131
+ - Per-probe timeout to prevent slow dependencies from blocking readiness
132
+
133
+ ## Related
134
+
135
+ - See `health-readiness-endpoints` for the full configuration reference
136
+ - See `frontmcp-observability` for tracing and monitoring integration
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: browser-bundle-config
3
+ reference: production-browser
4
+ level: basic
5
+ description: 'Shows how to configure package.json for browser-compatible SDK distribution with ESM/CJS/UMD entry points, TypeScript declarations, and CDN support.'
6
+ tags: [production, browser, sdk, node, bundle, config]
7
+ features:
8
+ - 'Correct `main`, `module`, `browser`, `types`, and `exports` fields for browser distribution'
9
+ - 'Using the `browser` field to point bundlers to the browser-specific build'
10
+ - 'Browser-safe imports with no Node.js-only APIs'
11
+ - 'CDN-friendly distribution that works via `<script type="module">`'
12
+ ---
13
+
14
+ # Browser SDK Bundle Configuration
15
+
16
+ Shows how to configure package.json for browser-compatible SDK distribution with ESM/CJS/UMD entry points, TypeScript declarations, and CDN support.
17
+
18
+ ## Code
19
+
20
+ ```jsonc
21
+ // package.json
22
+ {
23
+ "name": "my-mcp-browser-sdk",
24
+ "version": "1.0.0",
25
+ "description": "Browser-compatible MCP SDK",
26
+ "license": "MIT",
27
+
28
+ // CJS entry
29
+ "main": "./dist/cjs/index.js",
30
+ // ESM entry
31
+ "module": "./dist/esm/index.js",
32
+ // Browser-specific entry
33
+ "browser": "./dist/browser/index.js",
34
+ // TypeScript declarations
35
+ "types": "./dist/types/index.d.ts",
36
+
37
+ // Conditional exports for bundlers
38
+ "exports": {
39
+ ".": {
40
+ "browser": "./dist/browser/index.js",
41
+ "import": "./dist/esm/index.js",
42
+ "require": "./dist/cjs/index.js",
43
+ "types": "./dist/types/index.d.ts",
44
+ },
45
+ },
46
+
47
+ "files": ["dist/", "README.md", "LICENSE"],
48
+
49
+ "scripts": {
50
+ "build": "frontmcp build --target browser",
51
+ "analyze": "npx bundlesize",
52
+ "test": "jest --coverage",
53
+ },
54
+ }
55
+ ```
56
+
57
+ ```typescript
58
+ // src/index.ts — Browser-safe public API
59
+ // No Node.js-only imports (fs, path, child_process, net, crypto)
60
+ // All crypto uses @frontmcp/utils (wraps Web Crypto API)
61
+ import { sha256Hex, randomUUID, base64urlEncode } from '@frontmcp/utils';
62
+
63
+ export { create } from './client';
64
+ export type { McpBrowserClient, McpToolResult } from './types';
65
+
66
+ // Re-export utilities that work in the browser
67
+ export { sha256Hex, randomUUID, base64urlEncode };
68
+ ```
69
+
70
+ ```html
71
+ <!-- CDN usage via script tag -->
72
+ <script type="module">
73
+ import { create } from 'https://cdn.example.com/my-mcp-browser-sdk@1.0.0/dist/browser/index.js';
74
+
75
+ const client = await create({
76
+ baseUrl: 'https://mcp-api.example.com',
77
+ });
78
+
79
+ const tools = await client.listTools();
80
+ console.log('Available tools:', tools);
81
+ </script>
82
+ ```
83
+
84
+ ## What This Demonstrates
85
+
86
+ - Correct `main`, `module`, `browser`, `types`, and `exports` fields for browser distribution
87
+ - Using the `browser` field to point bundlers to the browser-specific build
88
+ - Browser-safe imports with no Node.js-only APIs
89
+ - CDN-friendly distribution that works via `<script type="module">`
90
+
91
+ ## Related
92
+
93
+ - See `production-browser` for the full browser compatibility and distribution checklist
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: cross-platform-crypto
3
+ reference: production-browser
4
+ level: intermediate
5
+ description: 'Shows how to use `@frontmcp/utils` for cross-platform crypto operations that work in both browser and Node.js, and how to avoid Node.js-only APIs.'
6
+ tags: [production, browser, node, cross, platform, crypto]
7
+ features:
8
+ - 'Using `@frontmcp/utils` for crypto instead of `node:crypto` (wraps Web Crypto API)'
9
+ - 'Using Fetch API for HTTP calls instead of Node.js `http`/`https`'
10
+ - 'Using `crypto.randomUUID()` from the Web Crypto API in browser code'
11
+ - 'WebSocket connection with automatic reconnection for streaming'
12
+ - 'No Node.js-only APIs (`fs`, `path`, `child_process`, `net`)'
13
+ ---
14
+
15
+ # Cross-Platform Crypto and Browser Compatibility
16
+
17
+ Shows how to use `@frontmcp/utils` for cross-platform crypto operations that work in both browser and Node.js, and how to avoid Node.js-only APIs.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/tools/browser-safe-hash.tool.ts
23
+ import { Tool, ToolContext } from '@frontmcp/sdk';
24
+ import { z } from 'zod';
25
+ // @frontmcp/utils wraps Web Crypto API — works in browsers
26
+ import { sha256Hex, sha256Base64url, randomUUID } from '@frontmcp/utils';
27
+
28
+ @Tool({
29
+ name: 'hash_data',
30
+ description: 'Hash data using browser-compatible crypto',
31
+ inputSchema: {
32
+ data: z.string().min(1).describe('Data to hash'),
33
+ format: z.enum(['hex', 'base64url']).default('hex').describe('Output format'),
34
+ },
35
+ outputSchema: {
36
+ hash: z.string(),
37
+ format: z.string(),
38
+ id: z.string(),
39
+ },
40
+ })
41
+ export class HashDataTool extends ToolContext {
42
+ async execute(input: { data: string; format: 'hex' | 'base64url' }) {
43
+ // Cross-platform: works in browser (Web Crypto) and Node.js
44
+ const hash = input.format === 'hex' ? sha256Hex(input.data) : sha256Base64url(input.data);
45
+ const id = randomUUID();
46
+
47
+ return { hash, format: input.format, id };
48
+ }
49
+ }
50
+ ```
51
+
52
+ ```typescript
53
+ // src/client/browser-client.ts
54
+ // Browser-compatible MCP client — no Node.js APIs
55
+
56
+ export class BrowserMcpClient {
57
+ private baseUrl: string;
58
+
59
+ constructor(config: { baseUrl: string }) {
60
+ this.baseUrl = config.baseUrl;
61
+ }
62
+
63
+ // Use Fetch API — not Node.js http/https
64
+ async callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
65
+ const response = await fetch(`${this.baseUrl}/mcp`, {
66
+ method: 'POST',
67
+ headers: { 'Content-Type': 'application/json' },
68
+ body: JSON.stringify({
69
+ jsonrpc: '2.0',
70
+ method: 'tools/call',
71
+ params: { name, arguments: args },
72
+ id: crypto.randomUUID(), // Web Crypto API
73
+ }),
74
+ });
75
+
76
+ const result = await response.json();
77
+ return result;
78
+ }
79
+
80
+ // WebSocket with reconnection for SSE/streaming
81
+ connectStream(onMessage: (data: unknown) => void): { close: () => void } {
82
+ let ws: WebSocket;
83
+ let reconnectTimer: ReturnType<typeof setTimeout>;
84
+
85
+ const connect = () => {
86
+ ws = new WebSocket(this.baseUrl.replace('http', 'ws') + '/mcp/stream');
87
+ ws.onmessage = (event) => onMessage(JSON.parse(event.data));
88
+ ws.onclose = () => {
89
+ // Reconnect gracefully
90
+ reconnectTimer = setTimeout(connect, 1000);
91
+ };
92
+ };
93
+
94
+ connect();
95
+
96
+ return {
97
+ close: () => {
98
+ clearTimeout(reconnectTimer);
99
+ ws?.close();
100
+ },
101
+ };
102
+ }
103
+ }
104
+ ```
105
+
106
+ ## What This Demonstrates
107
+
108
+ - Using `@frontmcp/utils` for crypto instead of `node:crypto` (wraps Web Crypto API)
109
+ - Using Fetch API for HTTP calls instead of Node.js `http`/`https`
110
+ - Using `crypto.randomUUID()` from the Web Crypto API in browser code
111
+ - WebSocket connection with automatic reconnection for streaming
112
+ - No Node.js-only APIs (`fs`, `path`, `child_process`, `net`)
113
+
114
+ ## Related
115
+
116
+ - See `production-browser` for the full browser compatibility and security checklist
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: security-and-performance
3
+ reference: production-browser
4
+ level: advanced
5
+ description: 'Shows how to ensure no secrets are bundled in browser code, configure CSP headers on the server, optimize bundle size, and avoid blocking the main thread.'
6
+ tags: [production, auth, browser, security, performance]
7
+ features:
8
+ - 'No secrets (API keys, tokens) in the browser bundle -- using server-side proxy'
9
+ - 'CORS configured on the server to accept specific browser origins'
10
+ - 'Code splitting with dynamic `import()` for large optional features'
11
+ - 'Yielding to the event loop during large data processing to avoid blocking the main thread'
12
+ - 'Auth tokens obtained from the auth flow, never hardcoded'
13
+ ---
14
+
15
+ # Browser SDK Security and Performance Optimization
16
+
17
+ Shows how to ensure no secrets are bundled in browser code, configure CSP headers on the server, optimize bundle size, and avoid blocking the main thread.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/main.ts — Server-side: configure CORS and CSP for browser clients
23
+ import { FrontMcp } from '@frontmcp/sdk';
24
+ import { MyApp } from './my.app';
25
+
26
+ @FrontMcp({
27
+ info: { name: 'browser-api', version: '1.0.0' },
28
+ apps: [MyApp],
29
+
30
+ // CORS configured for browser origins
31
+ cors: {
32
+ origin: ['https://app.example.com', 'https://admin.example.com'],
33
+ credentials: true,
34
+ maxAge: 86400,
35
+ },
36
+
37
+ // API keys stay server-side — browser clients use session tokens
38
+ auth: {
39
+ mode: 'remote',
40
+ provider: 'https://auth.example.com',
41
+ clientId: process.env.AUTH_CLIENT_ID!,
42
+ },
43
+ })
44
+ export default class BrowserApiServer {}
45
+ ```
46
+
47
+ ```typescript
48
+ // src/browser-sdk/index.ts — Browser SDK entry point
49
+ // No secrets in this code — it ships to the browser!
50
+
51
+ export async function createClient(config: { baseUrl: string; token: string }) {
52
+ // Token comes from the auth flow, not hardcoded
53
+ const headers = {
54
+ 'Content-Type': 'application/json',
55
+ Authorization: `Bearer ${config.token}`,
56
+ };
57
+
58
+ return {
59
+ async callTool(name: string, args: Record<string, unknown>) {
60
+ const response = await fetch(`${config.baseUrl}/mcp`, {
61
+ method: 'POST',
62
+ headers,
63
+ body: JSON.stringify({
64
+ jsonrpc: '2.0',
65
+ method: 'tools/call',
66
+ params: { name, arguments: args },
67
+ id: crypto.randomUUID(),
68
+ }),
69
+ });
70
+ return response.json();
71
+ },
72
+
73
+ async listTools() {
74
+ const response = await fetch(`${config.baseUrl}/mcp`, {
75
+ method: 'POST',
76
+ headers,
77
+ body: JSON.stringify({
78
+ jsonrpc: '2.0',
79
+ method: 'tools/list',
80
+ id: crypto.randomUUID(),
81
+ }),
82
+ });
83
+ return response.json();
84
+ },
85
+ };
86
+ }
87
+ ```
88
+
89
+ ```typescript
90
+ // src/browser-sdk/lazy-features.ts — Code splitting for large optional features
91
+
92
+ // Lazy-load heavy features — don't include in the main bundle
93
+ export async function loadVectorSearch() {
94
+ const { TFIDFVectoria } = await import('vectoriadb');
95
+ return new TFIDFVectoria({ defaultTopK: 10 });
96
+ }
97
+
98
+ // Use in a non-blocking way
99
+ export async function processLargeDataset(data: string[]): Promise<string[]> {
100
+ // Don't block the main thread — yield periodically
101
+ const results: string[] = [];
102
+ const BATCH_SIZE = 100;
103
+
104
+ for (let i = 0; i < data.length; i += BATCH_SIZE) {
105
+ const batch = data.slice(i, i + BATCH_SIZE);
106
+ results.push(...batch.map((item) => item.toUpperCase()));
107
+
108
+ // Yield to the event loop between batches
109
+ if (i + BATCH_SIZE < data.length) {
110
+ await new Promise((resolve) => setTimeout(resolve, 0));
111
+ }
112
+ }
113
+
114
+ return results;
115
+ }
116
+ ```
117
+
118
+ ## What This Demonstrates
119
+
120
+ - No secrets (API keys, tokens) in the browser bundle -- using server-side proxy
121
+ - CORS configured on the server to accept specific browser origins
122
+ - Code splitting with dynamic `import()` for large optional features
123
+ - Yielding to the event loop during large data processing to avoid blocking the main thread
124
+ - Auth tokens obtained from the auth flow, never hardcoded
125
+
126
+ ## Related
127
+
128
+ - See `production-browser` for the full security, distribution, and performance checklist
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: binary-build-config
3
+ reference: production-cli-binary
4
+ level: basic
5
+ description: 'Shows how to configure a FrontMCP CLI binary with correct package.json `bin` field, shebang, stdio transport, and npm distribution settings.'
6
+ tags: [production, cli, transport, node, binary, config]
7
+ features:
8
+ - 'Correct `bin` field in package.json pointing to the built output'
9
+ - 'Shebang line (`#!/usr/bin/env node`) for direct execution'
10
+ - 'Handling `--version` and `--help` flags before server initialization'
11
+ - 'Using stderr for logging (stdout is the MCP channel)'
12
+ - '`files` field excluding source, tests, and config from the published package'
13
+ ---
14
+
15
+ # CLI Binary Build and Package Configuration
16
+
17
+ Shows how to configure a FrontMCP CLI binary with correct package.json `bin` field, shebang, stdio transport, and npm distribution settings.
18
+
19
+ ## Code
20
+
21
+ ```jsonc
22
+ // package.json
23
+ {
24
+ "name": "my-mcp-cli",
25
+ "version": "1.0.0",
26
+ "description": "MCP CLI tool for data processing",
27
+ "keywords": ["mcp", "cli", "data-processing"],
28
+ "license": "MIT",
29
+
30
+ // Binary entry point
31
+ "bin": {
32
+ "my-mcp-cli": "./dist/cli.js",
33
+ },
34
+
35
+ // Only ship what users need
36
+ "files": ["dist/", "README.md", "LICENSE"],
37
+
38
+ // Required Node.js version
39
+ "engines": {
40
+ "node": ">=18.0.0",
41
+ },
42
+
43
+ "dependencies": {
44
+ "@frontmcp/sdk": "^1.0.0",
45
+ "zod": "^4.0.0",
46
+ },
47
+
48
+ "scripts": {
49
+ "build": "frontmcp build --target cli",
50
+ "test": "jest --coverage",
51
+ "prepublishOnly": "npm run build && npm test",
52
+ },
53
+ }
54
+ ```
55
+
56
+ ```typescript
57
+ #!/usr/bin/env node
58
+ // src/cli.ts
59
+ import { FrontMcp } from '@frontmcp/sdk';
60
+ import { MyApp } from './my.app';
61
+
62
+ // Handle --version and --help before server initialization
63
+ if (process.argv.includes('--version')) {
64
+ console.error('my-mcp-cli v1.0.0');
65
+ process.exit(0);
66
+ }
67
+
68
+ if (process.argv.includes('--help')) {
69
+ console.error('Usage: my-mcp-cli');
70
+ console.error(' Runs an MCP server via stdio transport.');
71
+ console.error(' Reads JSON-RPC from stdin, writes to stdout.');
72
+ console.error('');
73
+ console.error('Options:');
74
+ console.error(' --version Show version');
75
+ console.error(' --help Show this help');
76
+ process.exit(0);
77
+ }
78
+
79
+ @FrontMcp({
80
+ info: { name: 'my-mcp-cli', version: '1.0.0' },
81
+ apps: [MyApp],
82
+ // Stdio transport: reads JSON-RPC from stdin, writes to stdout
83
+ })
84
+ class CliServer {}
85
+ ```
86
+
87
+ ```bash
88
+ # Build and verify
89
+ frontmcp build --target cli
90
+
91
+ # Verify binary starts quickly
92
+ time my-mcp-cli --help # Should complete in < 500ms
93
+ time my-mcp-cli --version # Should complete in < 500ms
94
+
95
+ # Test stdio transport
96
+ echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | my-mcp-cli
97
+ ```
98
+
99
+ ## What This Demonstrates
100
+
101
+ - Correct `bin` field in package.json pointing to the built output
102
+ - Shebang line (`#!/usr/bin/env node`) for direct execution
103
+ - Handling `--version` and `--help` flags before server initialization
104
+ - Using stderr for logging (stdout is the MCP channel)
105
+ - `files` field excluding source, tests, and config from the published package
106
+
107
+ ## Related
108
+
109
+ - See `production-cli-binary` for the full build and distribution checklist