@frontmcp/skills 1.0.0-beta.13 → 1.0.0-beta.14

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 (258) hide show
  1. package/catalog/TEMPLATE.md +55 -0
  2. package/catalog/frontmcp-config/SKILL.md +2 -2
  3. package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +87 -0
  4. package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +63 -0
  5. package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +76 -0
  6. package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +77 -0
  7. package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +73 -0
  8. package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +64 -0
  9. package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +83 -0
  10. package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +87 -0
  11. package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +52 -0
  12. package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +72 -0
  13. package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +64 -0
  14. package/catalog/frontmcp-config/examples/configure-session/multi-server-key-prefix.md +68 -0
  15. package/catalog/frontmcp-config/examples/configure-session/redis-session-store.md +52 -0
  16. package/catalog/frontmcp-config/examples/configure-session/vercel-kv-session.md +52 -0
  17. package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +94 -0
  18. package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +92 -0
  19. package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +83 -0
  20. package/catalog/frontmcp-config/examples/configure-throttle-guard-config/full-guard-config.md +99 -0
  21. package/catalog/frontmcp-config/examples/configure-throttle-guard-config/minimal-guard-config.md +55 -0
  22. package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +74 -0
  23. package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +86 -0
  24. package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +69 -0
  25. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +65 -0
  26. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +69 -0
  27. package/catalog/frontmcp-config/references/configure-auth-modes.md +10 -0
  28. package/catalog/frontmcp-config/references/configure-auth.md +10 -0
  29. package/catalog/frontmcp-config/references/configure-elicitation.md +9 -0
  30. package/catalog/frontmcp-config/references/configure-http.md +10 -0
  31. package/catalog/frontmcp-config/references/configure-session.md +10 -0
  32. package/catalog/frontmcp-config/references/configure-throttle-guard-config.md +9 -0
  33. package/catalog/frontmcp-config/references/configure-throttle.md +10 -0
  34. package/catalog/frontmcp-config/references/configure-transport-protocol-presets.md +9 -0
  35. package/catalog/frontmcp-config/references/configure-transport.md +10 -0
  36. package/catalog/frontmcp-config/references/setup-redis.md +5 -0
  37. package/catalog/frontmcp-config/references/setup-sqlite.md +5 -0
  38. package/catalog/frontmcp-deployment/SKILL.md +2 -2
  39. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +43 -0
  40. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +85 -0
  41. package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +61 -0
  42. package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +66 -0
  43. package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +76 -0
  44. package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +78 -0
  45. package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +85 -0
  46. package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +104 -0
  47. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +82 -0
  48. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +97 -0
  49. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +92 -0
  50. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +92 -0
  51. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +113 -0
  52. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +100 -0
  53. package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +101 -0
  54. package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +79 -0
  55. package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +92 -0
  56. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +63 -0
  57. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +89 -0
  58. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +69 -0
  59. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +82 -0
  60. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +90 -0
  61. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +49 -0
  62. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +92 -0
  63. package/catalog/frontmcp-deployment/references/build-for-browser.md +10 -0
  64. package/catalog/frontmcp-deployment/references/build-for-cli.md +9 -0
  65. package/catalog/frontmcp-deployment/references/build-for-sdk.md +10 -0
  66. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +10 -0
  67. package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +10 -0
  68. package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +9 -0
  69. package/catalog/frontmcp-deployment/references/deploy-to-node.md +10 -0
  70. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +9 -0
  71. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +10 -0
  72. package/catalog/frontmcp-development/SKILL.md +2 -2
  73. package/catalog/frontmcp-development/examples/create-adapter/basic-api-adapter.md +92 -0
  74. package/catalog/frontmcp-development/examples/create-adapter/namespaced-adapter.md +124 -0
  75. package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +121 -0
  76. package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +95 -0
  77. package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +111 -0
  78. package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +81 -0
  79. package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +80 -0
  80. package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +87 -0
  81. package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +117 -0
  82. package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +88 -0
  83. package/catalog/frontmcp-development/examples/create-plugin/basic-plugin-with-provider.md +69 -0
  84. package/catalog/frontmcp-development/examples/create-plugin/configurable-dynamic-plugin.md +178 -0
  85. package/catalog/frontmcp-development/examples/create-plugin/plugin-with-context-extension.md +107 -0
  86. package/catalog/frontmcp-development/examples/create-plugin-hooks/basic-logging-plugin.md +69 -0
  87. package/catalog/frontmcp-development/examples/create-plugin-hooks/caching-with-around.md +80 -0
  88. package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +100 -0
  89. package/catalog/frontmcp-development/examples/create-prompt/basic-prompt.md +72 -0
  90. package/catalog/frontmcp-development/examples/create-prompt/dynamic-rag-prompt.md +92 -0
  91. package/catalog/frontmcp-development/examples/create-prompt/multi-turn-debug-session.md +86 -0
  92. package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +113 -0
  93. package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +107 -0
  94. package/catalog/frontmcp-development/examples/create-resource/basic-static-resource.md +72 -0
  95. package/catalog/frontmcp-development/examples/create-resource/binary-and-multi-content.md +111 -0
  96. package/catalog/frontmcp-development/examples/create-resource/parameterized-template.md +84 -0
  97. package/catalog/frontmcp-development/examples/create-skill/basic-inline-skill.md +96 -0
  98. package/catalog/frontmcp-development/examples/create-skill/directory-based-skill.md +115 -0
  99. package/catalog/frontmcp-development/examples/create-skill/parameterized-skill.md +96 -0
  100. package/catalog/frontmcp-development/examples/create-skill-with-tools/basic-tool-orchestration.md +76 -0
  101. package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +149 -0
  102. package/catalog/frontmcp-development/examples/create-skill-with-tools/incident-response-skill.md +92 -0
  103. package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +62 -0
  104. package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +84 -0
  105. package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +93 -0
  106. package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +94 -0
  107. package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +60 -0
  108. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +104 -0
  109. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +63 -0
  110. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +103 -0
  111. package/catalog/frontmcp-development/examples/create-workflow/basic-deploy-pipeline.md +91 -0
  112. package/catalog/frontmcp-development/examples/create-workflow/parallel-validation-pipeline.md +90 -0
  113. package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +136 -0
  114. package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +145 -0
  115. package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +124 -0
  116. package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +149 -0
  117. package/catalog/frontmcp-development/examples/official-adapters/authenticated-adapter-with-polling.md +84 -0
  118. package/catalog/frontmcp-development/examples/official-adapters/basic-openapi-adapter.md +54 -0
  119. package/catalog/frontmcp-development/examples/official-adapters/multi-api-hub-with-inline-spec.md +130 -0
  120. package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +117 -0
  121. package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +147 -0
  122. package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +104 -0
  123. package/catalog/frontmcp-development/references/create-adapter.md +9 -0
  124. package/catalog/frontmcp-development/references/create-agent-llm-config.md +9 -0
  125. package/catalog/frontmcp-development/references/create-agent.md +10 -0
  126. package/catalog/frontmcp-development/references/create-job.md +10 -0
  127. package/catalog/frontmcp-development/references/create-plugin-hooks.md +10 -0
  128. package/catalog/frontmcp-development/references/create-plugin.md +10 -0
  129. package/catalog/frontmcp-development/references/create-prompt.md +10 -0
  130. package/catalog/frontmcp-development/references/create-provider.md +9 -0
  131. package/catalog/frontmcp-development/references/create-resource.md +52 -15
  132. package/catalog/frontmcp-development/references/create-skill-with-tools.md +10 -0
  133. package/catalog/frontmcp-development/references/create-skill.md +10 -0
  134. package/catalog/frontmcp-development/references/create-tool-annotations.md +9 -0
  135. package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +10 -0
  136. package/catalog/frontmcp-development/references/create-tool.md +10 -0
  137. package/catalog/frontmcp-development/references/create-workflow.md +10 -0
  138. package/catalog/frontmcp-development/references/decorators-guide.md +10 -0
  139. package/catalog/frontmcp-development/references/official-adapters.md +10 -0
  140. package/catalog/frontmcp-development/references/official-plugins.md +10 -0
  141. package/catalog/frontmcp-extensibility/SKILL.md +1 -1
  142. package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +175 -0
  143. package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +138 -0
  144. package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +103 -0
  145. package/catalog/frontmcp-extensibility/references/vectoriadb.md +10 -0
  146. package/catalog/frontmcp-guides/SKILL.md +2 -2
  147. package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +160 -0
  148. package/catalog/frontmcp-guides/examples/example-knowledge-base/multi-app-composition.md +92 -0
  149. package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +135 -0
  150. package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +135 -0
  151. package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +148 -0
  152. package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +129 -0
  153. package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +75 -0
  154. package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +142 -0
  155. package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +74 -0
  156. package/catalog/frontmcp-guides/references/example-knowledge-base.md +10 -0
  157. package/catalog/frontmcp-guides/references/example-task-manager.md +10 -0
  158. package/catalog/frontmcp-guides/references/example-weather-api.md +10 -0
  159. package/catalog/frontmcp-production-readiness/SKILL.md +2 -2
  160. package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +102 -0
  161. package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +104 -0
  162. package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +95 -0
  163. package/catalog/frontmcp-production-readiness/examples/production-browser/browser-bundle-config.md +93 -0
  164. package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +116 -0
  165. package/catalog/frontmcp-production-readiness/examples/production-browser/security-and-performance.md +128 -0
  166. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/binary-build-config.md +109 -0
  167. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +132 -0
  168. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +82 -0
  169. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +107 -0
  170. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +119 -0
  171. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +124 -0
  172. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +103 -0
  173. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +89 -0
  174. package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +122 -0
  175. package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +107 -0
  176. package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +138 -0
  177. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/basic-sdk-lifecycle.md +85 -0
  178. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +110 -0
  179. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/package-json-config.md +107 -0
  180. package/catalog/frontmcp-production-readiness/examples/production-node-server/docker-multi-stage.md +103 -0
  181. package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +87 -0
  182. package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +97 -0
  183. package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +104 -0
  184. package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +91 -0
  185. package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +78 -0
  186. package/catalog/frontmcp-production-readiness/references/common-checklist.md +10 -0
  187. package/catalog/frontmcp-production-readiness/references/production-browser.md +10 -0
  188. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +9 -0
  189. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +10 -0
  190. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +10 -0
  191. package/catalog/frontmcp-production-readiness/references/production-lambda.md +10 -0
  192. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +10 -0
  193. package/catalog/frontmcp-production-readiness/references/production-node-server.md +10 -0
  194. package/catalog/frontmcp-production-readiness/references/production-vercel.md +10 -0
  195. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/bundle-presets-scaffolding.md +61 -0
  196. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +83 -0
  197. package/catalog/frontmcp-setup/examples/multi-app-composition/local-apps-with-shared-tools.md +87 -0
  198. package/catalog/frontmcp-setup/examples/multi-app-composition/per-app-auth-and-isolation.md +88 -0
  199. package/catalog/frontmcp-setup/examples/multi-app-composition/remote-and-esm-apps.md +81 -0
  200. package/catalog/frontmcp-setup/examples/nx-workflow/build-test-affected.md +77 -0
  201. package/catalog/frontmcp-setup/examples/nx-workflow/multi-server-deployment.md +93 -0
  202. package/catalog/frontmcp-setup/examples/nx-workflow/scaffold-and-generate.md +62 -0
  203. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-generator-scaffolding.md +73 -0
  204. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +85 -0
  205. package/catalog/frontmcp-setup/examples/project-structure-nx/shared-library-usage.md +89 -0
  206. package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +64 -0
  207. package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +111 -0
  208. package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +73 -0
  209. package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +89 -0
  210. package/catalog/frontmcp-setup/examples/readme-guide/vercel-deployment-readme.md +90 -0
  211. package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +99 -0
  212. package/catalog/frontmcp-setup/examples/setup-project/cli-scaffold-with-flags.md +77 -0
  213. package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +89 -0
  214. package/catalog/frontmcp-setup/examples/setup-redis/docker-redis-local-dev.md +88 -0
  215. package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +78 -0
  216. package/catalog/frontmcp-setup/examples/setup-redis/vercel-kv-serverless.md +78 -0
  217. package/catalog/frontmcp-setup/examples/setup-sqlite/basic-sqlite-setup.md +75 -0
  218. package/catalog/frontmcp-setup/examples/setup-sqlite/encrypted-sqlite-storage.md +55 -0
  219. package/catalog/frontmcp-setup/examples/setup-sqlite/unix-socket-daemon.md +70 -0
  220. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +9 -0
  221. package/catalog/frontmcp-setup/references/multi-app-composition.md +10 -0
  222. package/catalog/frontmcp-setup/references/nx-workflow.md +10 -0
  223. package/catalog/frontmcp-setup/references/project-structure-nx.md +10 -0
  224. package/catalog/frontmcp-setup/references/project-structure-standalone.md +10 -0
  225. package/catalog/frontmcp-setup/references/readme-guide.md +9 -0
  226. package/catalog/frontmcp-setup/references/setup-project.md +10 -0
  227. package/catalog/frontmcp-setup/references/setup-redis.md +10 -0
  228. package/catalog/frontmcp-setup/references/setup-sqlite.md +10 -0
  229. package/catalog/frontmcp-testing/examples/setup-testing/fixture-based-e2e-test.md +70 -0
  230. package/catalog/frontmcp-testing/examples/setup-testing/jest-config-with-coverage.md +59 -0
  231. package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +115 -0
  232. package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +78 -0
  233. package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +88 -0
  234. package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +71 -0
  235. package/catalog/frontmcp-testing/examples/test-browser-build/browser-bundle-validation.md +58 -0
  236. package/catalog/frontmcp-testing/examples/test-browser-build/playwright-browser-test.md +69 -0
  237. package/catalog/frontmcp-testing/examples/test-cli-binary/binary-startup-test.md +77 -0
  238. package/catalog/frontmcp-testing/examples/test-cli-binary/js-bundle-import-test.md +56 -0
  239. package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +74 -0
  240. package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +79 -0
  241. package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +67 -0
  242. package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +72 -0
  243. package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +73 -0
  244. package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +69 -0
  245. package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +82 -0
  246. package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +92 -0
  247. package/catalog/frontmcp-testing/references/setup-testing.md +10 -0
  248. package/catalog/frontmcp-testing/references/test-auth.md +10 -0
  249. package/catalog/frontmcp-testing/references/test-browser-build.md +9 -0
  250. package/catalog/frontmcp-testing/references/test-cli-binary.md +9 -0
  251. package/catalog/frontmcp-testing/references/test-direct-client.md +9 -0
  252. package/catalog/frontmcp-testing/references/test-e2e-handler.md +10 -0
  253. package/catalog/frontmcp-testing/references/test-tool-unit.md +10 -0
  254. package/catalog/skills-manifest.json +2383 -67
  255. package/package.json +1 -1
  256. package/src/manifest.d.ts +23 -0
  257. package/src/manifest.js +3 -1
  258. package/src/manifest.js.map +1 -1
@@ -194,6 +194,16 @@ curl -X POST http://localhost:3001/ -H 'Content-Type: application/json' -d '{"js
194
194
  | Session not found after server restart | In-memory sessions do not survive restarts | Enable Redis persistence with `distributedMode: true` |
195
195
  | Streamable HTTP returns 404 | Streamable HTTP is not enabled in the current preset | Use `'modern'`, `'legacy'`, or `'full'` preset, or set `streamable: true` in custom config |
196
196
 
197
+ ## Examples
198
+
199
+ | Example | Level | Description |
200
+ | --------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
201
+ | [`custom-protocol-flags`](../examples/configure-transport/custom-protocol-flags.md) | Advanced | Override individual protocol flags instead of using a preset for fine-grained control. |
202
+ | [`distributed-sessions-redis`](../examples/configure-transport/distributed-sessions-redis.md) | Intermediate | Configure transport with Redis persistence for multi-instance load-balanced deployments. |
203
+ | [`stateless-serverless`](../examples/configure-transport/stateless-serverless.md) | Basic | Configure stateless transport for Vercel, Lambda, or Cloudflare deployments. |
204
+
205
+ > See all examples in [`examples/configure-transport/`](../examples/configure-transport/)
206
+
197
207
  ## Reference
198
208
 
199
209
  - **Docs:** [Runtime Modes and Transport Configuration](https://docs.agentfront.dev/frontmcp/deployment/runtime-modes)
@@ -7,3 +7,8 @@ description: Cross-reference to the full Redis configuration guide in frontmcp-s
7
7
 
8
8
  > This reference is maintained in `frontmcp-setup/references/setup-redis.md`.
9
9
  > See that file for the full Redis configuration guide including connection options, Vercel KV setup, Docker Compose examples, and troubleshooting.
10
+
11
+ ## Examples
12
+
13
+ > Examples for Redis setup are maintained alongside the canonical reference.
14
+ > See [`frontmcp-setup/examples/setup-redis/`](../../frontmcp-setup/examples/setup-redis/).
@@ -7,3 +7,8 @@ description: Cross-reference to the full SQLite configuration guide in frontmcp-
7
7
 
8
8
  > This reference is maintained in `frontmcp-setup/references/setup-sqlite.md`.
9
9
  > See that file for the full SQLite configuration guide including WAL mode, encryption, daemon mode, and troubleshooting.
10
+
11
+ ## Examples
12
+
13
+ > Examples for SQLite setup are maintained alongside the canonical reference.
14
+ > See [`frontmcp-setup/examples/setup-sqlite/`](../../frontmcp-setup/examples/setup-sqlite/).
@@ -9,7 +9,7 @@ priority: 10
9
9
  visibility: both
10
10
  license: Apache-2.0
11
11
  metadata:
12
- docs: https://docs.agentfront.dev/frontmcp/deployment/overview
12
+ docs: https://docs.agentfront.dev/frontmcp/deployment/runtime-modes
13
13
  ---
14
14
 
15
15
  # FrontMCP Deployment Router
@@ -148,5 +148,5 @@ Beyond `frontmcp build`, the CLI provides commands for the full deployment lifec
148
148
 
149
149
  ## Reference
150
150
 
151
- - [Deployment Overview](https://docs.agentfront.dev/frontmcp/deployment/overview)
151
+ - [Runtime Modes](https://docs.agentfront.dev/frontmcp/deployment/runtime-modes)
152
152
  - Related skills: `deploy-to-node`, `deploy-to-vercel`, `deploy-to-lambda`, `deploy-to-cloudflare`, `build-for-cli`, `build-for-browser`, `build-for-sdk`, `configure-transport`
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: browser-build-with-custom-entry
3
+ reference: build-for-browser
4
+ level: intermediate
5
+ description: 'Build a browser bundle using a dedicated client entry file that avoids Node.js-only imports.'
6
+ tags: [deployment, browser, node, custom, entry]
7
+ features:
8
+ - 'Creating a separate browser entry point (`src/client.ts`) that avoids importing Node.js-only modules like `fs` or `node:crypto`'
9
+ - 'Using the `-e` and `-o` flags to customize the entry file and output directory'
10
+ ---
11
+
12
+ # Browser Build with Custom Entry
13
+
14
+ Build a browser bundle using a dedicated client entry file that avoids Node.js-only imports.
15
+
16
+ ## Code
17
+
18
+ ```typescript
19
+ // src/client.ts
20
+ // Browser-safe entry point - no Node.js modules imported here
21
+ import { FrontMcpProvider, useTools, useResources } from '@frontmcp/react';
22
+
23
+ export { FrontMcpProvider, useTools, useResources };
24
+ ```
25
+
26
+ ```bash
27
+ # Build with custom entry and output directory
28
+ frontmcp build --target browser -e ./src/client.ts -o ./dist/browser
29
+ ```
30
+
31
+ ```bash
32
+ # Verify output contains no Node.js-only modules
33
+ ls dist/browser/
34
+ ```
35
+
36
+ ## What This Demonstrates
37
+
38
+ - Creating a separate browser entry point (`src/client.ts`) that avoids importing Node.js-only modules like `fs` or `node:crypto`
39
+ - Using the `-e` and `-o` flags to customize the entry file and output directory
40
+
41
+ ## Related
42
+
43
+ - See `build-for-browser` for the full browser limitations table and verification checklist
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: browser-crypto-and-storage
3
+ reference: build-for-browser
4
+ level: advanced
5
+ description: 'Use `@frontmcp/utils` crypto functions (WebCrypto API) and in-memory storage in browser environments.'
6
+ tags: [deployment, browser, database, remote, node, crypto]
7
+ features:
8
+ - 'Using `@frontmcp/utils` for PKCE and hashing in the browser (backed by WebCrypto, not `node:crypto`)'
9
+ - 'Avoiding filesystem and native database storage in browser builds by relying on a remote server for persistence'
10
+ ---
11
+
12
+ # Browser-Safe Crypto and Storage
13
+
14
+ Use `@frontmcp/utils` crypto functions (WebCrypto API) and in-memory storage in browser environments.
15
+
16
+ ## Code
17
+
18
+ ```typescript
19
+ // src/browser-auth.ts
20
+ import { generateCodeVerifier, generateCodeChallenge, sha256Base64url, randomUUID } from '@frontmcp/utils';
21
+
22
+ // PKCE flow in the browser - uses WebCrypto API automatically
23
+ async function startPkceFlow(): Promise<{
24
+ verifier: string;
25
+ challenge: string;
26
+ state: string;
27
+ }> {
28
+ const verifier = generateCodeVerifier();
29
+ const challenge = await generateCodeChallenge(verifier);
30
+ const state = randomUUID();
31
+
32
+ return { verifier, challenge, state };
33
+ }
34
+
35
+ // Hash a value using WebCrypto (works in browsers)
36
+ async function hashToken(token: string): Promise<string> {
37
+ return sha256Base64url(token);
38
+ }
39
+
40
+ export { startPkceFlow, hashToken };
41
+ ```
42
+
43
+ ```typescript
44
+ // src/client-app.tsx
45
+ import { FrontMcpProvider, useTools } from '@frontmcp/react';
46
+
47
+ // Browser environments cannot use Redis or SQLite.
48
+ // Use in-memory stores or connect to a remote server that handles persistence.
49
+ function App() {
50
+ return (
51
+ <FrontMcpProvider
52
+ config={{
53
+ serverUrl: 'https://my-mcp.example.com',
54
+ // No local storage config - the remote server handles persistence
55
+ }}
56
+ >
57
+ <ToolDashboard />
58
+ </FrontMcpProvider>
59
+ );
60
+ }
61
+
62
+ function ToolDashboard() {
63
+ const { tools, callTool } = useTools();
64
+
65
+ return (
66
+ <div>
67
+ <h1>MCP Tools</h1>
68
+ {tools.map((tool) => (
69
+ <div key={tool.name}>{tool.name}</div>
70
+ ))}
71
+ </div>
72
+ );
73
+ }
74
+
75
+ export default App;
76
+ ```
77
+
78
+ ## What This Demonstrates
79
+
80
+ - Using `@frontmcp/utils` for PKCE and hashing in the browser (backed by WebCrypto, not `node:crypto`)
81
+ - Avoiding filesystem and native database storage in browser builds by relying on a remote server for persistence
82
+
83
+ ## Related
84
+
85
+ - See `build-for-browser` for the complete browser support table and troubleshooting guide
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: react-provider-setup
3
+ reference: build-for-browser
4
+ level: basic
5
+ description: 'Connect a React application to a remote FrontMCP server using `@frontmcp/react`.'
6
+ tags: [deployment, react, browser, remote, provider, setup]
7
+ features:
8
+ - 'Wrapping your React app with `FrontMcpProvider` and pointing it at a remote server URL'
9
+ - 'Using the `useTools` hook to list and invoke MCP tools from a React component'
10
+ ---
11
+
12
+ # React Provider Setup
13
+
14
+ Connect a React application to a remote FrontMCP server using `@frontmcp/react`.
15
+
16
+ ## Code
17
+
18
+ ```typescript
19
+ // src/App.tsx
20
+ import { FrontMcpProvider, useTools } from '@frontmcp/react';
21
+
22
+ function App() {
23
+ return (
24
+ <FrontMcpProvider config={{ serverUrl: 'https://my-mcp.example.com' }}>
25
+ <ToolUI />
26
+ </FrontMcpProvider>
27
+ );
28
+ }
29
+
30
+ function ToolUI() {
31
+ const { tools, callTool } = useTools();
32
+
33
+ const handleClick = async (toolName: string) => {
34
+ const result = await callTool(toolName, { query: 'hello' });
35
+ console.log(result);
36
+ };
37
+
38
+ return (
39
+ <ul>
40
+ {tools.map((tool) => (
41
+ <li key={tool.name}>
42
+ <button onClick={() => handleClick(tool.name)}>
43
+ {tool.name}: {tool.description}
44
+ </button>
45
+ </li>
46
+ ))}
47
+ </ul>
48
+ );
49
+ }
50
+
51
+ export default App;
52
+ ```
53
+
54
+ ## What This Demonstrates
55
+
56
+ - Wrapping your React app with `FrontMcpProvider` and pointing it at a remote server URL
57
+ - Using the `useTools` hook to list and invoke MCP tools from a React component
58
+
59
+ ## Related
60
+
61
+ - See `build-for-browser` for the full build command and browser limitations
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: cli-binary-build
3
+ reference: build-for-cli
4
+ level: basic
5
+ description: 'Build a FrontMCP server as a standalone binary using Node.js Single Executable Applications (SEA).'
6
+ tags: [deployment, cli, local, node, binary]
7
+ features:
8
+ - 'Building a FrontMCP server as a self-contained binary with `--target cli`'
9
+ - 'Using `socketPath` for local communication instead of a TCP port'
10
+ - 'The `--js` flag to produce a bundled JS file without the native binary wrapper'
11
+ ---
12
+
13
+ # CLI Binary Build
14
+
15
+ Build a FrontMCP server as a standalone binary using Node.js Single Executable Applications (SEA).
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/main.ts
21
+ import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
22
+ import { z } from 'zod';
23
+
24
+ @Tool({
25
+ name: 'greet',
26
+ description: 'Greet a user by name',
27
+ inputSchema: { name: z.string() },
28
+ })
29
+ class GreetTool extends ToolContext<{ name: string }> {
30
+ async execute(input: { name: string }) {
31
+ return { content: [{ type: 'text' as const, text: `Hello, ${input.name}!` }] };
32
+ }
33
+ }
34
+
35
+ @App({ name: 'GreeterApp', tools: [GreetTool] })
36
+ class GreeterApp {}
37
+
38
+ @FrontMcp({
39
+ info: { name: 'greeter-cli', version: '1.0.0' },
40
+ apps: [GreeterApp],
41
+ http: { socketPath: '/tmp/greeter.sock' },
42
+ })
43
+ class GreeterCLI {}
44
+ ```
45
+
46
+ ```bash
47
+ # Build the SEA binary (requires Node.js 24+)
48
+ frontmcp build --target cli
49
+
50
+ # Test the binary
51
+ ./dist/greeter-cli --help
52
+
53
+ # Or build a JS bundle only (no SEA)
54
+ frontmcp build --target cli --js
55
+ node dist/greeter-cli.cjs.js
56
+ ```
57
+
58
+ ## What This Demonstrates
59
+
60
+ - Building a FrontMCP server as a self-contained binary with `--target cli`
61
+ - Using `socketPath` for local communication instead of a TCP port
62
+ - The `--js` flag to produce a bundled JS file without the native binary wrapper
63
+
64
+ ## Related
65
+
66
+ - See `build-for-cli` for SEA requirements, process management, and system service installation
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: unix-socket-daemon
3
+ reference: build-for-cli
4
+ level: intermediate
5
+ description: 'Run a FrontMCP server as a local daemon accessible via Unix socket for IDE extensions and local MCP clients.'
6
+ tags: [deployment, unix-socket, cli, transport, local, unix]
7
+ features:
8
+ - 'Configuring a FrontMCP server for Unix socket transport instead of TCP'
9
+ - 'Running the server as a background daemon with process management (`frontmcp start/stop/status`)'
10
+ - 'Installing the daemon as a system service for automatic startup on reboot'
11
+ ---
12
+
13
+ # Unix Socket Daemon Mode
14
+
15
+ Run a FrontMCP server as a local daemon accessible via Unix socket for IDE extensions and local MCP clients.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/main.ts
21
+ import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
22
+ import { z } from 'zod';
23
+
24
+ @Tool({
25
+ name: 'lookup',
26
+ description: 'Look up a term in the local database',
27
+ inputSchema: { term: z.string() },
28
+ })
29
+ class LookupTool extends ToolContext<{ term: string }> {
30
+ async execute(input: { term: string }) {
31
+ return { content: [{ type: 'text' as const, text: `Result for: ${input.term}` }] };
32
+ }
33
+ }
34
+
35
+ @App({ name: 'DaemonApp', tools: [LookupTool] })
36
+ class DaemonApp {}
37
+
38
+ @FrontMcp({
39
+ info: { name: 'my-daemon', version: '1.0.0' },
40
+ apps: [DaemonApp],
41
+ http: { socketPath: '/tmp/my-tool.sock' },
42
+ sqlite: { path: '~/.my-tool/data.db' },
43
+ })
44
+ class MyDaemonServer {}
45
+ ```
46
+
47
+ ```bash
48
+ # Start daemon in foreground
49
+ frontmcp socket ./src/main.ts -s ~/.frontmcp/sockets/my-app.sock
50
+
51
+ # Start daemon in background with a local database
52
+ frontmcp socket ./src/main.ts -b --db ~/.my-tool/data.db
53
+
54
+ # Manage the daemon process
55
+ frontmcp start my-daemon -e ./src/main.ts --max-restarts 5
56
+ frontmcp status my-daemon
57
+ frontmcp logs my-daemon -F
58
+ frontmcp stop my-daemon
59
+ ```
60
+
61
+ ```bash
62
+ # Install as a system service for automatic startup
63
+ # Linux: creates a systemd unit
64
+ # macOS: creates a launchd plist
65
+ frontmcp service install my-daemon
66
+ ```
67
+
68
+ ## What This Demonstrates
69
+
70
+ - Configuring a FrontMCP server for Unix socket transport instead of TCP
71
+ - Running the server as a background daemon with process management (`frontmcp start/stop/status`)
72
+ - Installing the daemon as a system service for automatic startup on reboot
73
+
74
+ ## Related
75
+
76
+ - See `build-for-cli` for the full process management and system service reference
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: connect-openai
3
+ reference: build-for-sdk
4
+ level: intermediate
5
+ description: "Use `connectOpenAI()` to get tools formatted for OpenAI's function-calling API."
6
+ tags: [deployment, sdk, openai, session, connect]
7
+ features:
8
+ - 'Setting `serve: false` to prevent the HTTP server from starting in library mode'
9
+ - 'Using `connectOpenAI()` to get tools in OpenAI function-calling format automatically'
10
+ - 'Passing session information via `ConnectOptions` for user context'
11
+ ---
12
+
13
+ # Connect to OpenAI Function Calling
14
+
15
+ Use `connectOpenAI()` to get tools formatted for OpenAI's function-calling API.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/openai-integration.ts
21
+ import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
22
+ import { connectOpenAI } from '@frontmcp/sdk';
23
+ import { z } from 'zod';
24
+
25
+ @Tool({
26
+ name: 'search_docs',
27
+ description: 'Search documentation by keyword',
28
+ inputSchema: { query: z.string(), limit: z.number().optional() },
29
+ })
30
+ class SearchDocsTool extends ToolContext<{ query: string; limit?: number }> {
31
+ async execute(input: { query: string; limit?: number }) {
32
+ return {
33
+ content: [{ type: 'text' as const, text: `Found results for: ${input.query}` }],
34
+ };
35
+ }
36
+ }
37
+
38
+ @App({ name: 'DocsApp', tools: [SearchDocsTool] })
39
+ class DocsApp {}
40
+
41
+ @FrontMcp({
42
+ info: { name: 'docs-sdk', version: '1.0.0' },
43
+ apps: [DocsApp],
44
+ serve: false, // No HTTP server - library mode only
45
+ })
46
+ class DocsSDK {}
47
+
48
+ // Connect with OpenAI-formatted tools
49
+ async function main() {
50
+ const client = await connectOpenAI(DocsSDK, {
51
+ session: { id: 'user-123', user: { sub: 'user-id' } },
52
+ });
53
+
54
+ // Tools are returned in OpenAI format:
55
+ // [{ type: 'function', function: { name, description, parameters, strict: true } }]
56
+ const tools = await client.listTools();
57
+ console.log(JSON.stringify(tools, null, 2));
58
+
59
+ // Call a tool
60
+ const result = await client.callTool('search_docs', { query: 'authentication' });
61
+ console.log(result);
62
+
63
+ // Always clean up
64
+ await client.close();
65
+ }
66
+
67
+ main();
68
+ ```
69
+
70
+ ## What This Demonstrates
71
+
72
+ - Setting `serve: false` to prevent the HTTP server from starting in library mode
73
+ - Using `connectOpenAI()` to get tools in OpenAI function-calling format automatically
74
+ - Passing session information via `ConnectOptions` for user context
75
+
76
+ ## Related
77
+
78
+ - See `build-for-sdk` for `connectClaude()`, `connectLangChain()`, and `connectVercelAI()` alternatives
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: create-flat-config
3
+ reference: build-for-sdk
4
+ level: basic
5
+ description: 'Spin up an in-memory FrontMCP server from a flat config object using `create()`.'
6
+ tags: [deployment, sdk, cache, flat, config]
7
+ features:
8
+ - 'Using `create()` to spin up a server without decorators or classes'
9
+ - 'Calling tools directly via `server.callTool()` with zero network overhead'
10
+ - 'Using `cacheKey` to reuse the same server instance across multiple calls'
11
+ ---
12
+
13
+ # Programmatic Server with create()
14
+
15
+ Spin up an in-memory FrontMCP server from a flat config object using `create()`.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/embedded-server.ts
21
+ import { create, tool } from '@frontmcp/sdk';
22
+ import { z } from 'zod';
23
+
24
+ async function main() {
25
+ const server = await create({
26
+ info: { name: 'my-service', version: '1.0.0' },
27
+ tools: [
28
+ tool({
29
+ name: 'calculate',
30
+ description: 'Perform calculation',
31
+ inputSchema: {
32
+ a: z.number(),
33
+ b: z.number(),
34
+ operation: z.enum(['add', 'subtract', 'multiply', 'divide']),
35
+ },
36
+ outputSchema: { result: z.number() },
37
+ })((input) => {
38
+ switch (input.operation) {
39
+ case 'add':
40
+ return { result: input.a + input.b };
41
+ case 'subtract':
42
+ return { result: input.a - input.b };
43
+ case 'multiply':
44
+ return { result: input.a * input.b };
45
+ case 'divide':
46
+ return { result: input.a / input.b };
47
+ }
48
+ }),
49
+ ],
50
+ cacheKey: 'my-service', // Reuse same instance on repeated calls
51
+ });
52
+
53
+ // Call tools directly - no HTTP involved
54
+ const result = await server.callTool('calculate', { a: 2, b: 2, operation: 'add' });
55
+ console.log(result); // { result: 4 }
56
+
57
+ // List available tools
58
+ const { tools } = await server.listTools();
59
+ console.log(tools.map((t) => t.name)); // ['calculate']
60
+
61
+ // Clean up when done
62
+ await server.dispose();
63
+ }
64
+
65
+ main();
66
+ ```
67
+
68
+ ```bash
69
+ # Build as an SDK library
70
+ frontmcp build --target sdk
71
+
72
+ # Verify outputs
73
+ ls dist/
74
+ # my-service.cjs.js my-service.esm.mjs *.d.ts
75
+ ```
76
+
77
+ ## What This Demonstrates
78
+
79
+ - Using `create()` to spin up a server without decorators or classes
80
+ - Calling tools directly via `server.callTool()` with zero network overhead
81
+ - Using `cacheKey` to reuse the same server instance across multiple calls
82
+
83
+ ## Related
84
+
85
+ - See `build-for-sdk` for the full `CreateConfig` fields and `DirectClient` API
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: multi-platform-connect
3
+ reference: build-for-sdk
4
+ level: advanced
5
+ description: 'Connect the same FrontMCP server to multiple LLM platforms using platform-specific `connect*()` functions.'
6
+ tags: [deployment, sdk, multi, platform, connect]
7
+ features:
8
+ - 'Connecting a single FrontMCP server to four different LLM platforms with automatic schema translation'
9
+ - "Each `connect*()` function returns tools in the platform's native format"
10
+ - 'All clients share the same `DirectClient` API (`listTools`, `callTool`, `close`)'
11
+ ---
12
+
13
+ # Multi-Platform Tool Connection
14
+
15
+ Connect the same FrontMCP server to multiple LLM platforms using platform-specific `connect*()` functions.
16
+
17
+ ## Code
18
+
19
+ ```typescript
20
+ // src/server.ts
21
+ import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
22
+ import { z } from 'zod';
23
+
24
+ @Tool({
25
+ name: 'translate',
26
+ description: 'Translate text to a target language',
27
+ inputSchema: { text: z.string(), targetLang: z.string() },
28
+ })
29
+ class TranslateTool extends ToolContext<{ text: string; targetLang: string }> {
30
+ async execute(input: { text: string; targetLang: string }) {
31
+ return {
32
+ content: [{ type: 'text' as const, text: `[${input.targetLang}] ${input.text}` }],
33
+ };
34
+ }
35
+ }
36
+
37
+ @App({ name: 'TranslateApp', tools: [TranslateTool] })
38
+ class TranslateApp {}
39
+
40
+ @FrontMcp({
41
+ info: { name: 'translate-sdk', version: '1.0.0' },
42
+ apps: [TranslateApp],
43
+ serve: false,
44
+ })
45
+ class TranslateSDK {}
46
+
47
+ export default TranslateSDK;
48
+ ```
49
+
50
+ ```typescript
51
+ // src/connect-all-platforms.ts
52
+ import { connectOpenAI, connectClaude, connectLangChain, connectVercelAI } from '@frontmcp/sdk';
53
+ import TranslateSDK from './server';
54
+
55
+ async function main() {
56
+ // OpenAI format: [{ type: 'function', function: { name, description, parameters, strict: true } }]
57
+ const openaiClient = await connectOpenAI(TranslateSDK, {
58
+ clientInfo: { name: 'my-app', version: '1.0' },
59
+ session: { id: 'session-1', user: { sub: 'user-1', name: 'Alice' } },
60
+ });
61
+ const openaiTools = await openaiClient.listTools();
62
+ console.log('OpenAI tools:', openaiTools);
63
+
64
+ // Claude format: [{ name, description, input_schema }]
65
+ const claudeClient = await connectClaude(TranslateSDK);
66
+ const claudeTools = await claudeClient.listTools();
67
+ console.log('Claude tools:', claudeTools);
68
+
69
+ // LangChain tool schema format
70
+ const langchainClient = await connectLangChain(TranslateSDK);
71
+ const langchainTools = await langchainClient.listTools();
72
+ console.log('LangChain tools:', langchainTools);
73
+
74
+ // Vercel AI SDK format
75
+ const vercelClient = await connectVercelAI(TranslateSDK);
76
+ const vercelTools = await vercelClient.listTools();
77
+ console.log('Vercel AI tools:', vercelTools);
78
+
79
+ // All clients share the same DirectClient API
80
+ const result = await openaiClient.callTool('translate', {
81
+ text: 'Hello',
82
+ targetLang: 'es',
83
+ });
84
+ console.log(result);
85
+
86
+ // Clean up all clients
87
+ await openaiClient.close();
88
+ await claudeClient.close();
89
+ await langchainClient.close();
90
+ await vercelClient.close();
91
+ }
92
+
93
+ main();
94
+ ```
95
+
96
+ ## What This Demonstrates
97
+
98
+ - Connecting a single FrontMCP server to four different LLM platforms with automatic schema translation
99
+ - Each `connect*()` function returns tools in the platform's native format
100
+ - All clients share the same `DirectClient` API (`listTools`, `callTool`, `close`)
101
+
102
+ ## Related
103
+
104
+ - See `build-for-sdk` for the full `DirectClient` API reference and `ConnectOptions` details