@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,86 @@
1
+ ---
2
+ name: agent-nested-tracing
3
+ reference: telemetry-api
4
+ level: advanced
5
+ description: "Trace an agent's execution lifecycle including its nested tool calls. Every span shares the same trace ID."
6
+ tags: [telemetry, agent, nested, tools, trace-id]
7
+ features:
8
+ - 'Agent span wraps the entire execution (including LLM loop)'
9
+ - 'Nested tool calls automatically get their own spans'
10
+ - 'All spans share the same trace ID for end-to-end visibility'
11
+ - 'this.telemetry works identically in agents and tools'
12
+ ---
13
+
14
+ # Agent Nested Tracing
15
+
16
+ Trace an agent's execution lifecycle including its nested tool calls. Every span shares the same trace ID.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/apps/research/agents/research.agent.ts
22
+ import { Agent, AgentContext } from '@frontmcp/sdk';
23
+ import { WebSearchTool } from '../tools/web-search.tool';
24
+ import { SummarizerTool } from '../tools/summarizer.tool';
25
+
26
+ @Agent({
27
+ name: 'research_agent',
28
+ description: 'Research a topic using web search and summarization',
29
+ systemInstructions: 'You are a research assistant. Search for information, then summarize.',
30
+ tools: [WebSearchTool, SummarizerTool],
31
+ })
32
+ export class ResearchAgent extends AgentContext {
33
+ async execute(input: { query: string }) {
34
+ // Event on the "agent research_agent" span
35
+ this.telemetry.addEvent('research-started', {
36
+ query: input.query,
37
+ tools: 'web_search, summarize',
38
+ });
39
+
40
+ // The agent loop calls tools automatically.
41
+ // Each tool call gets its own span under this agent's span.
42
+ const result = await super.execute(input);
43
+
44
+ this.telemetry.setAttributes({
45
+ 'research.iterations': 3,
46
+ 'research.sources': 5,
47
+ });
48
+
49
+ return result;
50
+ }
51
+ }
52
+ ```
53
+
54
+ Result in the trace:
55
+
56
+ ```
57
+ RPC Span: "agents/call"
58
+ └── Agent Span: "agent research_agent"
59
+ ├── event: research-started (query=..., tools=...)
60
+ ├── attribute: research.iterations=3
61
+
62
+ ├── RPC Span: "tools/call"
63
+ │ └── Tool Span: "tool web_search"
64
+ │ └── HTTP Client Span: "GET" (search API)
65
+
66
+ ├── RPC Span: "tools/call"
67
+ │ └── Tool Span: "tool web_search"
68
+ │ └── HTTP Client Span: "GET" (another query)
69
+
70
+ └── RPC Span: "tools/call"
71
+ └── Tool Span: "tool summarize"
72
+
73
+ All spans share traceId = "abcdef1234567890..."
74
+ ```
75
+
76
+ ## What This Demonstrates
77
+
78
+ - Agent span wraps the entire execution (including LLM loop)
79
+ - Nested tool calls automatically get their own spans
80
+ - All spans share the same trace ID for end-to-end visibility
81
+ - this.telemetry works identically in agents and tools
82
+
83
+ ## Related
84
+
85
+ - See `telemetry-api` for the full API reference
86
+ - See `frontmcp-development` for building agents
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: plugin-telemetry
3
+ reference: telemetry-api
4
+ level: intermediate
5
+ description: "Add telemetry events from a custom plugin's hooks. Events appear on the tool execution span, giving you visibility into plugin behavior within the trace."
6
+ tags: [telemetry, plugin, hooks, cache, audit]
7
+ features:
8
+ - 'Plugin hooks can access toolCtx.telemetry to add events to the active span'
9
+ - 'Events from plugins appear in the same trace as the tool execution'
10
+ - 'Graceful degradation when observability is not enabled'
11
+ ---
12
+
13
+ # Plugin Telemetry
14
+
15
+ Add telemetry events from a custom plugin's hooks. Events appear on the tool execution span, giving you visibility into plugin behavior within the trace.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/plugins/audit.plugin.ts
21
+ import { DynamicPlugin, Plugin, ToolHook, FlowCtxOf } from '@frontmcp/sdk';
22
+
23
+ @Plugin({
24
+ name: 'audit',
25
+ description: 'Audit logging with telemetry integration',
26
+ providers: [],
27
+ })
28
+ export default class AuditPlugin extends DynamicPlugin<{ enabled: boolean }> {
29
+ @ToolHook.Will('execute')
30
+ willExecute(flowCtx: FlowCtxOf<'tools:call-tool'>): void {
31
+ const toolCtx = flowCtx.state.toolContext;
32
+ if (!toolCtx) return;
33
+
34
+ // Add audit event to the tool's execution span
35
+ try {
36
+ toolCtx.telemetry?.addEvent('audit.pre-execution', {
37
+ tool: flowCtx.state.input?.name ?? 'unknown',
38
+ user: toolCtx.context?.authInfo?.clientId ?? 'anonymous',
39
+ });
40
+ } catch {
41
+ // telemetry may not be available if observability is disabled
42
+ }
43
+ }
44
+
45
+ @ToolHook.Did('execute')
46
+ didExecute(flowCtx: FlowCtxOf<'tools:call-tool'>): void {
47
+ const toolCtx = flowCtx.state.toolContext;
48
+ if (!toolCtx) return;
49
+
50
+ try {
51
+ toolCtx.telemetry?.addEvent('audit.post-execution', {
52
+ success: !flowCtx.state.error,
53
+ });
54
+ } catch {
55
+ // graceful degradation
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ```typescript
62
+ // src/server.ts
63
+ import { FrontMcp } from '@frontmcp/sdk';
64
+ import AuditPlugin from './plugins/audit.plugin';
65
+
66
+ @FrontMcp({
67
+ plugins: [AuditPlugin.init({ enabled: true })],
68
+ observability: true,
69
+ })
70
+ export default class Server {}
71
+ ```
72
+
73
+ Result in the trace:
74
+
75
+ ```
76
+ tool my_tool
77
+ ├── event: audit.pre-execution (tool=my_tool, user=client-42)
78
+ ├── event: stage.execute.start
79
+ ├── ... tool work ...
80
+ ├── event: stage.execute.done
81
+ └── event: audit.post-execution (success=true)
82
+ ```
83
+
84
+ ## What This Demonstrates
85
+
86
+ - Plugin hooks can access toolCtx.telemetry to add events to the active span
87
+ - Events from plugins appear in the same trace as the tool execution
88
+ - Graceful degradation when observability is not enabled
89
+
90
+ ## Related
91
+
92
+ - See `telemetry-api` for all TelemetryAccessor methods
93
+ - See `frontmcp-extensibility` for building plugins
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: tool-custom-spans
3
+ reference: telemetry-api
4
+ level: basic
5
+ description: "Create child spans, events, and attributes inside a tool's execute method using this.telemetry."
6
+ tags: [telemetry, tool, spans, events, attributes]
7
+ features:
8
+ - 'this.telemetry.withSpan() creates auto-managed child spans'
9
+ - 'this.telemetry.addEvent() adds events to the parent tool span'
10
+ - 'this.telemetry.setAttributes() adds metadata to the parent tool span'
11
+ - 'Child spans inherit the trace ID automatically'
12
+ ---
13
+
14
+ # Custom Spans in a Tool
15
+
16
+ Create child spans, events, and attributes inside a tool's execute method using this.telemetry.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/apps/my-app/tools/weather.tool.ts
22
+ import { Tool, ToolContext } from '@frontmcp/sdk';
23
+ import { z } from 'zod';
24
+
25
+ @Tool({
26
+ name: 'get_weather',
27
+ description: 'Get weather for a city',
28
+ inputSchema: { city: z.string() },
29
+ })
30
+ export class GetWeatherTool extends ToolContext<typeof GetWeatherTool> {
31
+ async execute({ city }: { city: string }) {
32
+ // Event on the "tool get_weather" span
33
+ this.telemetry.addEvent('request-received', { city });
34
+
35
+ // Child span for the API call
36
+ const weather = await this.telemetry.withSpan('fetch-weather-api', async (span) => {
37
+ span.setAttribute('api.city', city);
38
+
39
+ const response = await this.fetch(`https://api.weatherapi.com/v1/current.json?q=${city}`);
40
+
41
+ span.setAttribute('api.status', response.status);
42
+ span.addEvent('response-received');
43
+
44
+ return response.json();
45
+ });
46
+
47
+ // Attributes on the tool span (visible in trace backend)
48
+ this.telemetry.setAttributes({
49
+ 'weather.temp_c': weather.current.temp_c,
50
+ 'weather.condition': weather.current.condition.text,
51
+ });
52
+
53
+ return {
54
+ city,
55
+ temperature: weather.current.temp_c,
56
+ condition: weather.current.condition.text,
57
+ };
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## What This Demonstrates
63
+
64
+ - this.telemetry.withSpan() creates auto-managed child spans
65
+ - this.telemetry.addEvent() adds events to the parent tool span
66
+ - this.telemetry.setAttributes() adds metadata to the parent tool span
67
+ - Child spans inherit the trace ID automatically
68
+
69
+ ## Related
70
+
71
+ - See `telemetry-api` for all available methods
72
+ - See `testing-observability` for testing custom spans
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: test-custom-spans
3
+ reference: testing-observability
4
+ level: basic
5
+ description: 'Verify that your tool creates the expected child spans with correct attributes.'
6
+ tags: [testing, spans, assertions, jest, basic]
7
+ features:
8
+ - 'createTestTracer() provides isolated OTel setup (no global pollution)'
9
+ - 'assertSpanExists() throws helpful errors when spans are missing'
10
+ - 'assertSpanAttribute() verifies span attributes'
11
+ - 'findSpansByAttribute() queries spans by attribute value'
12
+ ---
13
+
14
+ # Test Custom Spans
15
+
16
+ Verify that your tool creates the expected child spans with correct attributes.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/apps/my-app/tools/__tests__/weather.tool.spec.ts
22
+ import { SpanStatusCode } from '@opentelemetry/api';
23
+ import {
24
+ createTestTracer,
25
+ getFinishedSpans,
26
+ assertSpanExists,
27
+ assertSpanAttribute,
28
+ findSpansByAttribute,
29
+ } from '@frontmcp/observability';
30
+
31
+ describe('GetWeatherTool', () => {
32
+ const { tracer, exporter, cleanup } = createTestTracer();
33
+
34
+ afterEach(() => {
35
+ exporter.reset();
36
+ });
37
+
38
+ afterAll(async () => {
39
+ await cleanup();
40
+ });
41
+
42
+ it('should create a fetch-weather-api child span', async () => {
43
+ // ... set up and invoke tool ...
44
+ // (the tool uses this.telemetry.withSpan('fetch-weather-api', ...))
45
+
46
+ const spans = getFinishedSpans(exporter);
47
+
48
+ // Verify span exists
49
+ const fetchSpan = assertSpanExists(spans, 'fetch-weather-api');
50
+
51
+ // Verify attributes
52
+ assertSpanAttribute(fetchSpan, 'api.city', 'London');
53
+ assertSpanAttribute(fetchSpan, 'api.status', 200);
54
+
55
+ // Verify it completed successfully
56
+ expect(fetchSpan.status.code).toBe(SpanStatusCode.OK);
57
+ });
58
+
59
+ it('should record error when API fails', async () => {
60
+ // ... invoke tool with failing API ...
61
+
62
+ const spans = getFinishedSpans(exporter);
63
+ const fetchSpan = assertSpanExists(spans, 'fetch-weather-api');
64
+
65
+ expect(fetchSpan.status.code).toBe(SpanStatusCode.ERROR);
66
+ expect(fetchSpan.events.some((e) => e.name === 'exception')).toBe(true);
67
+ });
68
+
69
+ it('should find all tool spans', async () => {
70
+ // ... invoke multiple tools ...
71
+
72
+ const spans = getFinishedSpans(exporter);
73
+ const toolSpans = findSpansByAttribute(spans, 'mcp.component.type', 'tool');
74
+
75
+ expect(toolSpans.length).toBeGreaterThan(0);
76
+ });
77
+ });
78
+ ```
79
+
80
+ ## What This Demonstrates
81
+
82
+ - createTestTracer() provides isolated OTel setup (no global pollution)
83
+ - assertSpanExists() throws helpful errors when spans are missing
84
+ - assertSpanAttribute() verifies span attributes
85
+ - findSpansByAttribute() queries spans by attribute value
86
+
87
+ ## Related
88
+
89
+ - See `testing-observability` for log entry testing
90
+ - See `frontmcp-testing` for general testing patterns
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: test-log-correlation
3
+ reference: testing-observability
4
+ level: intermediate
5
+ description: 'Verify that structured log entries include trace context fields for correlation with spans.'
6
+ tags: [testing, logging, correlation, trace-id, intermediate]
7
+ features:
8
+ - 'CallbackSink captures log entries for test assertions'
9
+ - 'StructuredLogTransport with mock context accessor provides trace fields'
10
+ - 'Verifying trace_id, span_id, request_id are present'
11
+ - 'Testing field redaction behavior'
12
+ ---
13
+
14
+ # Test Log Correlation
15
+
16
+ Verify that structured log entries include trace context fields for correlation with spans.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/__tests__/log-correlation.spec.ts
22
+ import { StructuredLogTransport, CallbackSink } from '@frontmcp/observability';
23
+ import type { StructuredLogEntry } from '@frontmcp/observability';
24
+
25
+ describe('Log correlation', () => {
26
+ it('should include trace_id and request_id in log entries', () => {
27
+ const entries: StructuredLogEntry[] = [];
28
+ const sink = new CallbackSink((e) => entries.push(e));
29
+
30
+ const transport = new StructuredLogTransport([sink], {}, () => ({
31
+ requestId: 'req-test-001',
32
+ traceContext: {
33
+ traceId: 'a'.repeat(32),
34
+ parentId: 'b'.repeat(16),
35
+ traceFlags: 1,
36
+ },
37
+ sessionIdHash: 'hash12345678',
38
+ scopeId: 'test-scope',
39
+ flowName: 'tools:call-tool',
40
+ elapsed: 100,
41
+ }));
42
+
43
+ transport.log({
44
+ level: 2,
45
+ levelName: 'info',
46
+ message: 'tool executed',
47
+ args: [{ toolName: 'get_weather', duration: 142 }],
48
+ timestamp: new Date(),
49
+ prefix: 'MyTool',
50
+ });
51
+
52
+ expect(entries).toHaveLength(1);
53
+ const entry = entries[0];
54
+
55
+ // Trace correlation
56
+ expect(entry.trace_id).toBe('a'.repeat(32));
57
+ expect(entry.span_id).toBe('b'.repeat(16));
58
+ expect(entry.request_id).toBe('req-test-001');
59
+ expect(entry.session_id_hash).toBe('hash12345678');
60
+ expect(entry.scope_id).toBe('test-scope');
61
+ expect(entry.flow_name).toBe('tools:call-tool');
62
+ expect(entry.elapsed_ms).toBe(100);
63
+
64
+ // Structured attributes
65
+ expect(entry.attributes).toEqual({
66
+ toolName: 'get_weather',
67
+ duration: 142,
68
+ });
69
+ });
70
+
71
+ it('should redact sensitive fields', () => {
72
+ const entries: StructuredLogEntry[] = [];
73
+ const sink = new CallbackSink((e) => entries.push(e));
74
+ const transport = new StructuredLogTransport([sink], { redactFields: ['password', 'apiKey'] });
75
+
76
+ transport.log({
77
+ level: 2,
78
+ levelName: 'info',
79
+ message: 'auth attempt',
80
+ args: [{ user: 'alice', password: 'secret', apiKey: 'sk-123' }],
81
+ timestamp: new Date(),
82
+ prefix: '',
83
+ });
84
+
85
+ expect(entries[0].attributes).toEqual({
86
+ user: 'alice',
87
+ password: '[REDACTED]',
88
+ apiKey: '[REDACTED]',
89
+ });
90
+ });
91
+ });
92
+ ```
93
+
94
+ ## What This Demonstrates
95
+
96
+ - CallbackSink captures log entries for test assertions
97
+ - StructuredLogTransport with mock context accessor provides trace fields
98
+ - Verifying trace_id, span_id, request_id are present
99
+ - Testing field redaction behavior
100
+
101
+ ## Related
102
+
103
+ - See `testing-observability` for span testing patterns
104
+ - See `structured-logging` for sink configuration
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: basic-tracing
3
+ reference: tracing-setup
4
+ level: basic
5
+ description: 'Enable auto-tracing and see spans printed to your terminal.'
6
+ tags: [tracing, setup, console, basic]
7
+ features:
8
+ - 'Zero-config tracing via observability: true'
9
+ - 'Console exporter for local development'
10
+ - 'Single trace ID shared across all spans in a request'
11
+ ---
12
+
13
+ # Basic Tracing Setup
14
+
15
+ Enable auto-tracing and see spans printed to your terminal.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/setup-otel.ts
21
+ import { setupOTel } from '@frontmcp/observability';
22
+
23
+ // Call BEFORE @FrontMcp runs
24
+ setupOTel({ serviceName: 'my-server', exporter: 'console' });
25
+ ```
26
+
27
+ ```typescript
28
+ // src/server.ts
29
+ import './setup-otel'; // Must be first import
30
+ import { FrontMcp } from '@frontmcp/sdk';
31
+ import { MyApp } from './apps/my-app';
32
+
33
+ @FrontMcp({
34
+ info: { name: 'my-server', version: '1.0.0' },
35
+ apps: [MyApp],
36
+ observability: true,
37
+ })
38
+ export default class Server {}
39
+ ```
40
+
41
+ ```typescript
42
+ // src/apps/my-app/tools/hello.tool.ts
43
+ import { Tool, ToolContext } from '@frontmcp/sdk';
44
+ import { z } from 'zod';
45
+
46
+ @Tool({
47
+ name: 'hello',
48
+ description: 'Say hello',
49
+ inputSchema: { name: z.string() },
50
+ })
51
+ export class HelloTool extends ToolContext<typeof HelloTool> {
52
+ async execute({ name }: { name: string }) {
53
+ return { greeting: `Hello, ${name}!` };
54
+ }
55
+ }
56
+ ```
57
+
58
+ When you call `hello` via an MCP client, you'll see spans in the console:
59
+
60
+ ```
61
+ {
62
+ traceId: 'abcdef1234567890abcdef1234567890',
63
+ name: 'tools/call',
64
+ attributes: { 'rpc.system': 'mcp', 'mcp.method.name': 'tools/call' }
65
+ }
66
+ {
67
+ traceId: 'abcdef1234567890abcdef1234567890',
68
+ parentId: '...',
69
+ name: 'tool hello',
70
+ attributes: { 'mcp.component.type': 'tool', 'mcp.component.key': 'tool:hello' }
71
+ }
72
+ ```
73
+
74
+ ## What This Demonstrates
75
+
76
+ - Zero-config tracing via observability: true
77
+ - Console exporter for local development
78
+ - Single trace ID shared across all spans in a request
79
+
80
+ ## Related
81
+
82
+ - See `tracing-setup` for OTLP and production configuration
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: production-tracing
3
+ reference: tracing-setup
4
+ level: intermediate
5
+ description: 'Full production observability — traces to OTLP, structured logs to stdout, per-request log collection.'
6
+ tags: [tracing, production, otlp, logging, request-logs]
7
+ features:
8
+ - 'OTLP exporter with env var configuration'
9
+ - 'Structured logging with sensitive field redaction'
10
+ - 'Request log collection with error alerting'
11
+ - 'Full tracing across all SDK flows'
12
+ ---
13
+
14
+ # Production Tracing Setup
15
+
16
+ Full production observability — traces to OTLP, structured logs to stdout, per-request log collection.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/server.ts
22
+ import { FrontMcp } from '@frontmcp/sdk';
23
+ import { setupOTel } from '@frontmcp/observability';
24
+ import { MyApp } from './apps/my-app';
25
+
26
+ setupOTel({
27
+ serviceName: process.env.OTEL_SERVICE_NAME ?? 'my-server',
28
+ exporter: 'otlp',
29
+ endpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? 'http://collector:4318',
30
+ serviceVersion: '1.0.0',
31
+ });
32
+
33
+ @FrontMcp({
34
+ info: { name: 'my-server', version: '1.0.0' },
35
+ apps: [MyApp],
36
+ observability: {
37
+ tracing: {
38
+ httpSpans: true,
39
+ executionSpans: true,
40
+ fetchSpans: true,
41
+ flowStageEvents: true,
42
+ transportSpans: true,
43
+ authSpans: true,
44
+ },
45
+ logging: {
46
+ sinks: [{ type: 'stdout' }],
47
+ redactFields: ['password', 'token', 'secret', 'authorization'],
48
+ includeStacks: false,
49
+ },
50
+ requestLogs: {
51
+ maxEntries: 500,
52
+ onRequestComplete: async (log) => {
53
+ if (log.status === 'error') {
54
+ console.error('Request failed:', JSON.stringify(log));
55
+ }
56
+ },
57
+ },
58
+ },
59
+ })
60
+ export default class Server {}
61
+ ```
62
+
63
+ ## What This Demonstrates
64
+
65
+ - OTLP exporter with env var configuration
66
+ - Structured logging with sensitive field redaction
67
+ - Request log collection with error alerting
68
+ - Full tracing across all SDK flows
69
+
70
+ ## Related
71
+
72
+ - See `tracing-setup` for all configuration options
73
+ - See `vendor-integrations` for Coralogix/Datadog/Logz.io setup
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: coralogix-setup
3
+ reference: vendor-integrations
4
+ level: intermediate
5
+ description: 'Send both traces and structured logs to Coralogix. Logs include trace_id so Coralogix links them to traces automatically.'
6
+ tags: [coralogix, otlp, vendor, integration, production]
7
+ features:
8
+ - 'Traces and logs both sent to Coralogix via OTLP'
9
+ - 'Automatic trace_id correlation — click a trace, see its logs'
10
+ - 'Environment variable configuration for production'
11
+ ---
12
+
13
+ # Coralogix Setup
14
+
15
+ Send both traces and structured logs to Coralogix. Logs include trace_id so Coralogix links them to traces automatically.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/server.ts
21
+ import { FrontMcp } from '@frontmcp/sdk';
22
+ import { setupOTel } from '@frontmcp/observability';
23
+
24
+ // Traces → Coralogix via OTLP
25
+ setupOTel({
26
+ serviceName: 'my-mcp-server',
27
+ exporter: 'otlp',
28
+ endpoint: 'https://ingress.coralogix.com:443', // EU: eu2.coralogix.com
29
+ serviceVersion: '1.0.0',
30
+ });
31
+
32
+ @FrontMcp({
33
+ info: { name: 'my-mcp-server', version: '1.0.0' },
34
+ apps: [MyApp],
35
+ observability: {
36
+ tracing: true,
37
+ logging: {
38
+ sinks: [
39
+ // Logs → Coralogix via OTLP
40
+ {
41
+ type: 'otlp',
42
+ endpoint: 'https://ingress.coralogix.com:443',
43
+ headers: { Authorization: `Bearer ${process.env.CX_PRIVATE_KEY}` },
44
+ serviceName: 'my-mcp-server',
45
+ },
46
+ // Also stdout for Docker log collection
47
+ { type: 'stdout' },
48
+ ],
49
+ redactFields: ['password', 'token', 'secret'],
50
+ },
51
+ requestLogs: true,
52
+ },
53
+ })
54
+ export default class Server {}
55
+ ```
56
+
57
+ Environment variables alternative:
58
+
59
+ ```bash
60
+ OTEL_SERVICE_NAME=my-mcp-server
61
+ OTEL_EXPORTER_OTLP_ENDPOINT=https://ingress.coralogix.com:443
62
+ CX_PRIVATE_KEY=your-coralogix-private-key
63
+ ```
64
+
65
+ ## What This Demonstrates
66
+
67
+ - Traces and logs both sent to Coralogix via OTLP
68
+ - Automatic trace_id correlation — click a trace, see its logs
69
+ - Environment variable configuration for production
70
+
71
+ ## Related
72
+
73
+ - See `vendor-integrations` for Datadog, Logz.io, Grafana setup
74
+ - See `tracing-setup` for trace configuration options