@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,142 @@
1
+ ---
2
+ name: unit-and-e2e-tests
3
+ reference: example-weather-api
4
+ level: intermediate
5
+ description: 'Shows how to write unit tests for tools by mocking context methods, and E2E tests using `McpTestClient` and `TestServer`.'
6
+ tags: [guides, e2e, unit-test, weather, api, unit]
7
+ features:
8
+ - 'Unit testing tools by mocking `this.fetch()`, `this.fail()`, and other context methods'
9
+ - 'Using `Object.assign(tool, ctx)` to inject mock context into the tool instance'
10
+ - 'E2E testing with `TestServer.start()` and `McpTestClient.create()`'
11
+ - 'Using `toContainTool()` custom matcher for asserting tool presence'
12
+ - 'Proper cleanup with `client.disconnect()` and `server.stop()` in `afterAll`'
13
+ ---
14
+
15
+ # Weather API: Unit and E2E Tests
16
+
17
+ Shows how to write unit tests for tools by mocking context methods, and E2E tests using `McpTestClient` and `TestServer`.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // test/get-weather.tool.spec.ts
23
+ import { ToolContext } from '@frontmcp/sdk';
24
+ import { GetWeatherTool } from '../src/tools/get-weather.tool';
25
+
26
+ describe('GetWeatherTool', () => {
27
+ let tool: GetWeatherTool;
28
+
29
+ beforeEach(() => {
30
+ tool = new GetWeatherTool();
31
+ });
32
+
33
+ it('should return weather data for a valid city', async () => {
34
+ const mockResponse = {
35
+ ok: true,
36
+ json: async () => ({
37
+ temp: 22,
38
+ condition: 'Sunny',
39
+ humidity: 45,
40
+ }),
41
+ } as unknown as Response;
42
+
43
+ const ctx = {
44
+ fetch: jest.fn().mockResolvedValue(mockResponse),
45
+ fail: jest.fn((err: Error) => {
46
+ throw err;
47
+ }),
48
+ mark: jest.fn(),
49
+ get: jest.fn(),
50
+ tryGet: jest.fn(),
51
+ notify: jest.fn(),
52
+ respondProgress: jest.fn(),
53
+ } as unknown as ToolContext;
54
+ Object.assign(tool, ctx);
55
+
56
+ const result = await tool.execute({ city: 'London', units: 'celsius' });
57
+
58
+ expect(result).toEqual({
59
+ temperature: 22,
60
+ condition: 'Sunny',
61
+ humidity: 45,
62
+ city: 'London',
63
+ });
64
+ expect(ctx.fetch).toHaveBeenCalledWith(expect.stringContaining('city=London'));
65
+ });
66
+
67
+ it('should fail when the weather API returns an error', async () => {
68
+ const mockResponse = {
69
+ ok: false,
70
+ status: 404,
71
+ statusText: 'Not Found',
72
+ } as unknown as Response;
73
+
74
+ const failFn = jest.fn((err: Error) => {
75
+ throw err;
76
+ });
77
+ const ctx = {
78
+ fetch: jest.fn().mockResolvedValue(mockResponse),
79
+ fail: failFn,
80
+ mark: jest.fn(),
81
+ get: jest.fn(),
82
+ tryGet: jest.fn(),
83
+ notify: jest.fn(),
84
+ respondProgress: jest.fn(),
85
+ } as unknown as ToolContext;
86
+ Object.assign(tool, ctx);
87
+
88
+ await expect(tool.execute({ city: 'Atlantis', units: 'celsius' })).rejects.toThrow(
89
+ 'Weather API error: 404 Not Found',
90
+ );
91
+ expect(failFn).toHaveBeenCalled();
92
+ });
93
+ });
94
+ ```
95
+
96
+ ```typescript
97
+ // test/weather.e2e.spec.ts
98
+ import { McpTestClient, TestServer } from '@frontmcp/testing';
99
+
100
+ describe('Weather Server E2E', () => {
101
+ let client: McpTestClient;
102
+ let server: TestServer;
103
+
104
+ beforeAll(async () => {
105
+ server = await TestServer.start({ command: 'npx tsx src/main.ts' });
106
+ client = await McpTestClient.create({ baseUrl: server.info.baseUrl }).buildAndConnect();
107
+ });
108
+
109
+ afterAll(async () => {
110
+ await client.disconnect();
111
+ await server.stop();
112
+ });
113
+
114
+ it('should list tools including get_weather', async () => {
115
+ const { tools } = await client.listTools();
116
+
117
+ expect(tools.length).toBeGreaterThan(0);
118
+ expect(tools).toContainTool('get_weather');
119
+ });
120
+
121
+ it('should read the cities resource', async () => {
122
+ const result = await client.readResource('weather://cities');
123
+ const cities = JSON.parse(result.contents[0].text);
124
+
125
+ expect(Array.isArray(cities)).toBe(true);
126
+ expect(cities).toContain('London');
127
+ expect(cities).toContain('Tokyo');
128
+ });
129
+ });
130
+ ```
131
+
132
+ ## What This Demonstrates
133
+
134
+ - Unit testing tools by mocking `this.fetch()`, `this.fail()`, and other context methods
135
+ - Using `Object.assign(tool, ctx)` to inject mock context into the tool instance
136
+ - E2E testing with `TestServer.start()` and `McpTestClient.create()`
137
+ - Using `toContainTool()` custom matcher for asserting tool presence
138
+ - Proper cleanup with `client.disconnect()` and `server.stop()` in `afterAll`
139
+
140
+ ## Related
141
+
142
+ - See `example-weather-api` for the full end-to-end weather API example
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: weather-tool-with-schemas
3
+ reference: example-weather-api
4
+ level: basic
5
+ description: 'Shows how to create a tool with Zod input and output schemas, use `this.fetch()` for HTTP calls, and handle errors with `this.fail()`.'
6
+ tags: [guides, weather, api, tool, schemas]
7
+ features:
8
+ - 'Defining Zod `inputSchema` with validation (`.min(1)`, `.enum()`, `.default()`)'
9
+ - 'Defining `outputSchema` to prevent data leaks and ensure type safety'
10
+ - 'Using `this.fetch()` for HTTP calls within tools'
11
+ - 'Using `this.fail()` for business-logic error handling'
12
+ - 'Using `.describe()` on schema fields for LLM-friendly tool descriptions'
13
+ ---
14
+
15
+ # Weather Tool with Zod Input/Output Schemas
16
+
17
+ Shows how to create a tool with Zod input and output schemas, use `this.fetch()` for HTTP calls, and handle errors with `this.fail()`.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/tools/get-weather.tool.ts
23
+ import { Tool, ToolContext } from '@frontmcp/sdk';
24
+ import { z } from 'zod';
25
+
26
+ @Tool({
27
+ name: 'get_weather',
28
+ description: 'Get current weather for a city',
29
+ inputSchema: {
30
+ city: z.string().min(1).describe('City name'),
31
+ units: z.enum(['celsius', 'fahrenheit']).default('celsius').describe('Temperature units'),
32
+ },
33
+ outputSchema: {
34
+ temperature: z.number(),
35
+ condition: z.string(),
36
+ humidity: z.number(),
37
+ city: z.string(),
38
+ },
39
+ })
40
+ export class GetWeatherTool extends ToolContext {
41
+ async execute(input: { city: string; units: 'celsius' | 'fahrenheit' }) {
42
+ const url = `https://api.weather.example.com/v1/current?city=${encodeURIComponent(input.city)}&units=${input.units}`;
43
+
44
+ // Use this.fetch() for HTTP calls — the framework handles errors in the tool execution flow.
45
+ const response = await this.fetch(url);
46
+
47
+ if (!response.ok) {
48
+ // Use this.fail() for business-logic errors
49
+ this.fail(new Error(`Weather API error: ${response.status} ${response.statusText}`));
50
+ }
51
+
52
+ const data = await response.json();
53
+
54
+ return {
55
+ temperature: data.temp,
56
+ condition: data.condition,
57
+ humidity: data.humidity,
58
+ city: input.city,
59
+ };
60
+ }
61
+ }
62
+ ```
63
+
64
+ ## What This Demonstrates
65
+
66
+ - Defining Zod `inputSchema` with validation (`.min(1)`, `.enum()`, `.default()`)
67
+ - Defining `outputSchema` to prevent data leaks and ensure type safety
68
+ - Using `this.fetch()` for HTTP calls within tools
69
+ - Using `this.fail()` for business-logic error handling
70
+ - Using `.describe()` on schema fields for LLM-friendly tool descriptions
71
+
72
+ ## Related
73
+
74
+ - See `example-weather-api` for the full end-to-end weather API example with tests
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: example-knowledge-base
3
+ description: Multi-app knowledge base with vector storage, semantic search, AI research agent, and audit plugin
4
+ ---
5
+
1
6
  # Example: Knowledge Base (Advanced)
2
7
 
3
8
  > Skills used: setup-project, multi-app-composition, create-tool, create-resource, create-provider, create-agent, create-plugin, configure-auth, deploy-to-vercel
@@ -634,3 +639,13 @@ describe('AuditLogPlugin', () => {
634
639
  });
635
640
  });
636
641
  ```
642
+
643
+ ## Examples
644
+
645
+ | Example | Level | Description |
646
+ | -------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
647
+ | [`agent-and-plugin`](../examples/example-knowledge-base/agent-and-plugin.md) | Advanced | Shows an autonomous research agent with inner tools and configurable depth, and a plugin that hooks into tool execution for audit logging. |
648
+ | [`multi-app-composition`](../examples/example-knowledge-base/multi-app-composition.md) | Basic | Shows how to compose multiple apps (Ingestion, Search, Research) into a single server with shared providers, plugins, and agent registration. |
649
+ | [`vector-search-and-resources`](../examples/example-knowledge-base/vector-search-and-resources.md) | Intermediate | Shows a semantic search tool with embedding generation and a resource template for retrieving documents by ID using URI parameters. |
650
+
651
+ > See all examples in [`examples/example-knowledge-base/`](../examples/example-knowledge-base/)
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: example-task-manager
3
+ description: Authenticated task management server with CRUD tools, Redis storage, OAuth, and Vercel deployment
4
+ ---
5
+
1
6
  # Example: Task Manager (Intermediate)
2
7
 
3
8
  > Skills used: setup-project, create-tool, create-provider, configure-auth, configure-session, setup-redis, setup-testing, deploy-to-vercel
@@ -304,21 +309,18 @@ export class UpdateTaskTool extends ToolContext {
304
309
  this.fail(new Error('Authentication required'));
305
310
  }
306
311
 
307
- try {
308
- const updated = await store.update(input.id, userId, {
309
- ...(input.status && { status: input.status }),
310
- ...(input.priority && { priority: input.priority }),
311
- });
312
-
313
- return {
314
- id: updated.id,
315
- title: updated.title,
316
- priority: updated.priority,
317
- status: updated.status,
318
- };
319
- } catch (err) {
320
- this.fail(new Error(`Failed to update task: ${String(err)}`));
321
- }
312
+ // No try/catch needed — the framework handles errors in the tool execution flow.
313
+ const updated = await store.update(input.id, userId, {
314
+ ...(input.status && { status: input.status }),
315
+ ...(input.priority && { priority: input.priority }),
316
+ });
317
+
318
+ return {
319
+ id: updated.id,
320
+ title: updated.title,
321
+ priority: updated.priority,
322
+ status: updated.status,
323
+ };
322
324
  }
323
325
  }
324
326
  ```
@@ -353,12 +355,9 @@ export class DeleteTaskTool extends ToolContext {
353
355
  this.fail(new Error('Authentication required'));
354
356
  }
355
357
 
356
- try {
357
- await store.delete(input.id, userId);
358
- return { deleted: true, id: input.id };
359
- } catch (err) {
360
- this.fail(new Error(`Failed to delete task: ${String(err)}`));
361
- }
358
+ // No try/catch needed — the framework handles errors in the tool execution flow.
359
+ await store.delete(input.id, userId);
360
+ return { deleted: true, id: input.id };
362
361
  }
363
362
  }
364
363
  ```
@@ -510,3 +509,13 @@ describe('Task Manager E2E', () => {
510
509
  });
511
510
  });
512
511
  ```
512
+
513
+ ## Examples
514
+
515
+ | Example | Level | Description |
516
+ | ---------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
517
+ | [`auth-and-crud-tools`](../examples/example-task-manager/auth-and-crud-tools.md) | Basic | Shows how to create CRUD tools with authentication, using `this.context.session` for user isolation and `this.get()` for dependency injection. |
518
+ | [`authenticated-e2e-tests`](../examples/example-task-manager/authenticated-e2e-tests.md) | Advanced | Shows how to write E2E tests with authentication using `TestTokenFactory`, and unit tests for tools that require session context. |
519
+ | [`redis-provider-with-di`](../examples/example-task-manager/redis-provider-with-di.md) | Intermediate | Shows how to create a Redis-backed provider with a DI token, lifecycle hooks (`onInit`/`onDestroy`), and how tools inject it. |
520
+
521
+ > See all examples in [`examples/example-task-manager/`](../examples/example-task-manager/)
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: example-weather-api
3
+ description: Beginner MCP server with a weather lookup tool, static resource, Zod schemas, and E2E tests
4
+ ---
5
+
1
6
  # Example: Weather API (Beginner)
2
7
 
3
8
  > Skills used: setup-project, create-tool, create-resource, setup-testing, deploy-to-node
@@ -94,12 +99,9 @@ export class GetWeatherTool extends ToolContext {
94
99
  async execute(input: { city: string; units: 'celsius' | 'fahrenheit' }) {
95
100
  const url = `https://api.weather.example.com/v1/current?city=${encodeURIComponent(input.city)}&units=${input.units}`;
96
101
 
97
- let response: Response;
98
- try {
99
- response = await this.fetch(url);
100
- } catch (err) {
101
- this.fail(new Error(`Weather API unreachable: ${String(err)}`));
102
- }
102
+ // No try/catch needed — the framework's tool execution flow handles errors automatically.
103
+ // Use this.fail() only for business-logic errors (e.g., invalid response).
104
+ const response = await this.fetch(url);
103
105
 
104
106
  if (!response.ok) {
105
107
  this.fail(new Error(`Weather API error: ${response.status} ${response.statusText}`));
@@ -290,3 +292,13 @@ describe('Weather Server E2E', () => {
290
292
  });
291
293
  });
292
294
  ```
295
+
296
+ ## Examples
297
+
298
+ | Example | Level | Description |
299
+ | ------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
300
+ | [`server-and-app-setup`](../examples/example-weather-api/server-and-app-setup.md) | Basic | Shows the server entry point, app registration, and static resource for a beginner FrontMCP weather API server. |
301
+ | [`unit-and-e2e-tests`](../examples/example-weather-api/unit-and-e2e-tests.md) | Intermediate | Shows how to write unit tests for tools by mocking context methods, and E2E tests using `McpTestClient` and `TestServer`. |
302
+ | [`weather-tool-with-schemas`](../examples/example-weather-api/weather-tool-with-schemas.md) | Basic | Shows how to create a tool with Zod input and output schemas, use `this.fetch()` for HTTP calls, and handle errors with `this.fail()`. |
303
+
304
+ > See all examples in [`examples/example-weather-api/`](../examples/example-weather-api/)
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: frontmcp-observability
3
+ description: 'Use when you want to add tracing, structured logging, or monitoring to your FrontMCP server. Covers OpenTelemetry instrumentation, vendor integrations (Coralogix, Datadog, Logz.io, Grafana), this.telemetry API for custom spans, structured JSON logging with sinks, and testing observability. Triggers: observability, telemetry, tracing, logging, monitoring, opentelemetry, otel, spans, datadog, coralogix, logz, grafana, winston, pino.'
4
+ tags: [router, observability, telemetry, tracing, logging, monitoring, opentelemetry, otel, spans]
5
+ category: observability
6
+ targets: [all]
7
+ bundle: [recommended, full]
8
+ priority: 10
9
+ visibility: both
10
+ license: Apache-2.0
11
+ metadata:
12
+ docs: https://docs.agentfront.dev/frontmcp/guides/observability
13
+ ---
14
+
15
+ # FrontMCP Observability
16
+
17
+ Router for adding observability to FrontMCP servers. Covers distributed tracing (OpenTelemetry), structured JSON logging, per-request log collection, the `this.telemetry` developer API, and vendor integrations.
18
+
19
+ ## When to Use This Skill
20
+
21
+ ### Must Use
22
+
23
+ - Adding tracing, logging, or monitoring to a FrontMCP server
24
+ - Connecting Coralogix, Datadog, Logz.io, Grafana, or any OTLP backend
25
+ - Using `this.telemetry` to create custom spans in tools, plugins, or agents
26
+ - Setting up structured logging with winston, pino, or NDJSON stdout
27
+ - Testing that spans and log entries are created correctly
28
+
29
+ ### Recommended
30
+
31
+ - Before going to production (see also `frontmcp-production-readiness`)
32
+ - When debugging request latency or error rates
33
+ - When building plugins that need trace context propagation
34
+
35
+ ### Skip When
36
+
37
+ - Building a prototype that doesn't need observability yet
38
+ - Configuring auth, transport, or throttle (see `frontmcp-config`)
39
+ - Setting up the project from scratch (see `frontmcp-setup`)
40
+
41
+ > **Decision:** Use this skill when you need to observe, trace, or log your server. Start with `tracing-setup` for auto-instrumentation, add `structured-logging` for production logs, and use `telemetry-api` for custom spans in your code.
42
+
43
+ ## Prerequisites
44
+
45
+ - A working FrontMCP server (see `frontmcp-setup`)
46
+ - `npm install @frontmcp/observability`
47
+
48
+ ## Step 1: Choose What You Need
49
+
50
+ | I want to... | Reference |
51
+ | -------------------------------------------------- | ------------------------------------- |
52
+ | Enable auto-tracing for all flows | `references/tracing-setup.md` |
53
+ | Add structured JSON logging with trace correlation | `references/structured-logging.md` |
54
+ | Create custom spans in tools/plugins | `references/telemetry-api.md` |
55
+ | Connect Coralogix, Datadog, Logz.io, Grafana | `references/vendor-integrations.md` |
56
+ | Test that spans and logs are correct | `references/testing-observability.md` |
57
+
58
+ ## Step 2: Enable Observability
59
+
60
+ The simplest way — one config line:
61
+
62
+ ```typescript
63
+ @FrontMcp({
64
+ observability: true,
65
+ })
66
+ ```
67
+
68
+ This enables auto-tracing for all 33 SDK flows. Add structured logging:
69
+
70
+ ```typescript
71
+ @FrontMcp({
72
+ observability: {
73
+ tracing: true,
74
+ logging: { sinks: [{ type: 'stdout' }] },
75
+ requestLogs: true,
76
+ },
77
+ })
78
+ ```
79
+
80
+ ## Step 3: Read the Relevant Reference
81
+
82
+ Follow the scenario routing table above to find the right reference for your use case.
83
+
84
+ ## Scenario Routing Table
85
+
86
+ | Scenario | Reference | Description |
87
+ | ------------------------------------ | ------------------------------------- | --------------------------------------------------------------------------- |
88
+ | Enable OpenTelemetry tracing | `references/tracing-setup.md` | Zero-config auto-instrumentation, setupOTel(), span hierarchy |
89
+ | Add JSON logs with trace correlation | `references/structured-logging.md` | Sinks (stdout, console, OTLP, winston, pino), redaction, log format |
90
+ | Custom spans in tools/plugins | `references/telemetry-api.md` | `this.telemetry.startSpan()`, `withSpan()`, `addEvent()`, `setAttributes()` |
91
+ | Connect to monitoring platforms | `references/vendor-integrations.md` | Coralogix, Datadog, Logz.io, Grafana — OTLP and direct |
92
+ | Test spans and log entries | `references/testing-observability.md` | `createTestTracer()`, `assertSpanExists()`, integration test patterns |
93
+
94
+ ## Cross-Cutting Patterns
95
+
96
+ | Pattern | Correct | Incorrect | Why |
97
+ | -------------------- | ------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------- |
98
+ | Enable observability | `observability: true` in `@FrontMcp` config | Import and install `ObservabilityPlugin` manually | Config-driven is the standard pattern since v1.0 |
99
+ | Custom spans | `this.telemetry.withSpan('op', fn)` | `trace.getTracer().startSpan()` directly | `this.telemetry` auto-inherits trace context |
100
+ | Log correlation | `this.logger.info('msg', { key: val })` | `console.log('msg')` | SDK logger flows through StructuredLogTransport with trace_id |
101
+ | Session ID | Use `mcp.session.id` attribute (hashed) | Log the real session ID | Privacy: the hash is sufficient for correlation |
102
+ | Vendor integration | Use `{ type: 'otlp', endpoint }` sink | Build vendor-specific HTTP clients | OTLP is the universal standard |
103
+
104
+ ## Quick Reference: What Gets Traced
105
+
106
+ | Category | Flows | Attributes |
107
+ | -------------- | ---------------------------------------------------- | ------------------------------------------------- |
108
+ | HTTP requests | traceRequest, auth, route, finalize | `http.request.method`, `url.path` |
109
+ | Tool calls | parseInput → findTool → execute → finalize | `mcp.component.type=tool`, `enduser.id` |
110
+ | Resource reads | parseInput → findResource → execute | `mcp.component.type=resource`, `mcp.resource.uri` |
111
+ | Prompts | parseInput → findPrompt → execute | `mcp.component.type=prompt` |
112
+ | Agents | parseInput → findAgent → execute (nested tool calls) | `mcp.component.type=agent` |
113
+ | Auth | verify, session verify, OAuth flows | `frontmcp.auth.mode`, `frontmcp.auth.result` |
114
+ | Transport | SSE, Streamable HTTP, Stateless HTTP | `frontmcp.transport.type` |
115
+ | Skills | search, load, HTTP endpoints | `frontmcp.flow.name` |
116
+
117
+ ## Verification Checklist
118
+
119
+ ### Configuration
120
+
121
+ - [ ] `@frontmcp/observability` installed
122
+ - [ ] `observability` field added to `@FrontMcp` config
123
+ - [ ] TracerProvider configured (via `setupOTel()` or external SDK)
124
+ - [ ] Logging sinks configured for production (stdout or OTLP)
125
+
126
+ ### Runtime
127
+
128
+ - [ ] Spans appear in trace backend when calling a tool
129
+ - [ ] Log entries include `trace_id` and `span_id`
130
+ - [ ] `this.telemetry` is available in tool execution contexts
131
+ - [ ] Session tracing ID is consistent across all spans in a request
132
+ - [ ] Errors are recorded on spans with `ERROR` status
133
+
134
+ ### Testing
135
+
136
+ - [ ] Tests verify span creation with `createTestTracer()`
137
+ - [ ] Tests verify log entries via `CallbackSink`
138
+ - [ ] No test isolation issues (each test resets exporter)
139
+
140
+ ## Reference
141
+
142
+ - [Observability Guide](https://docs.agentfront.dev/frontmcp/guides/observability)
143
+ - [Telemetry API Reference](https://docs.agentfront.dev/frontmcp/sdk-reference/telemetry)
144
+ - Related skills: `frontmcp-production-readiness`, `frontmcp-config`, `frontmcp-testing`, `frontmcp-development`
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: stdout-logging
3
+ reference: structured-logging
4
+ level: basic
5
+ description: 'Enable NDJSON structured logging to stdout with automatic trace correlation and field redaction.'
6
+ tags: [logging, stdout, ndjson, redaction, basic]
7
+ features:
8
+ - 'NDJSON format for stdout (Docker/K8s log collection)'
9
+ - 'Automatic trace context enrichment (trace_id, span_id)'
10
+ - 'Sensitive field redaction (token → [REDACTED])'
11
+ ---
12
+
13
+ # Stdout Structured Logging
14
+
15
+ Enable NDJSON structured logging to stdout with automatic trace correlation and field redaction.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/server.ts
21
+ import { FrontMcp } from '@frontmcp/sdk';
22
+
23
+ @FrontMcp({
24
+ info: { name: 'my-server', version: '1.0.0' },
25
+ apps: [MyApp],
26
+ observability: {
27
+ tracing: true,
28
+ logging: {
29
+ sinks: [{ type: 'stdout' }],
30
+ redactFields: ['password', 'token', 'secret', 'authorization'],
31
+ includeStacks: process.env.NODE_ENV !== 'production',
32
+ },
33
+ },
34
+ })
35
+ export default class Server {}
36
+ ```
37
+
38
+ ```typescript
39
+ // In any tool:
40
+ this.logger.info('user authenticated', { userId: 'u-123', token: 'secret-jwt' });
41
+ ```
42
+
43
+ Output (NDJSON, one line per entry):
44
+
45
+ ```json
46
+ {
47
+ "timestamp": "2026-04-03T10:15:30.123Z",
48
+ "level": "info",
49
+ "severity_number": 9,
50
+ "message": "user authenticated",
51
+ "trace_id": "abcdef...",
52
+ "span_id": "123456...",
53
+ "request_id": "req-001",
54
+ "session_id_hash": "a3f8b2c1d4e5f6a7",
55
+ "scope_id": "my-app",
56
+ "flow_name": "tools:call-tool",
57
+ "elapsed_ms": 42,
58
+ "prefix": "MyTool",
59
+ "attributes": { "userId": "u-123", "token": "[REDACTED]" }
60
+ }
61
+ ```
62
+
63
+ ## What This Demonstrates
64
+
65
+ - NDJSON format for stdout (Docker/K8s log collection)
66
+ - Automatic trace context enrichment (trace_id, span_id)
67
+ - Sensitive field redaction (token → [REDACTED])
68
+
69
+ ## Related
70
+
71
+ - See `structured-logging` for all sink types
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: winston-integration
3
+ reference: structured-logging
4
+ level: intermediate
5
+ description: 'Forward FrontMCP structured log entries to your existing winston logger. Each entry includes trace_id and span_id as metadata.'
6
+ tags: [logging, winston, integration, intermediate]
7
+ features:
8
+ - 'WinstonSink forwarding structured entries with trace metadata'
9
+ - 'Multiple sinks running simultaneously (stdout + winston)'
10
+ - 'Winston transports handle file logging, remote forwarding, etc.'
11
+ ---
12
+
13
+ # Winston Integration
14
+
15
+ Forward FrontMCP structured log entries to your existing winston logger. Each entry includes trace_id and span_id as metadata.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/server.ts
21
+ import { FrontMcp } from '@frontmcp/sdk';
22
+ import winston from 'winston';
23
+
24
+ const logger = winston.createLogger({
25
+ level: 'info',
26
+ format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
27
+ transports: [new winston.transports.Console(), new winston.transports.File({ filename: 'app.log' })],
28
+ });
29
+
30
+ @FrontMcp({
31
+ info: { name: 'my-server', version: '1.0.0' },
32
+ apps: [MyApp],
33
+ observability: {
34
+ tracing: true,
35
+ logging: {
36
+ sinks: [
37
+ { type: 'winston', logger }, // Forward to winston
38
+ { type: 'stdout' }, // Also write NDJSON to stdout
39
+ ],
40
+ },
41
+ },
42
+ })
43
+ export default class Server {}
44
+ ```
45
+
46
+ Winston receives entries like:
47
+
48
+ ```json
49
+ {
50
+ "level": "info",
51
+ "message": "tool executed",
52
+ "timestamp": "2026-04-03T10:15:30.123Z",
53
+ "trace_id": "abcdef1234567890abcdef1234567890",
54
+ "span_id": "1234567890abcdef",
55
+ "request_id": "req-001",
56
+ "session_id_hash": "a3f8b2c1d4e5f6a7",
57
+ "attributes": { "tool": "get_weather", "duration_ms": 142 }
58
+ }
59
+ ```
60
+
61
+ ## What This Demonstrates
62
+
63
+ - WinstonSink forwarding structured entries with trace metadata
64
+ - Multiple sinks running simultaneously (stdout + winston)
65
+ - Winston transports handle file logging, remote forwarding, etc.
66
+
67
+ ## Related
68
+
69
+ - See `structured-logging` for all sink types
70
+ - See `vendor-integrations` for connecting to Coralogix/Datadog via winston