@frontmcp/skills 1.1.2 → 1.2.1

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 (176) hide show
  1. package/catalog/TEMPLATE.md +16 -11
  2. package/catalog/frontmcp-authorities/SKILL.md +116 -11
  3. package/catalog/frontmcp-authorities/references/authority-profiles.md +39 -36
  4. package/catalog/frontmcp-authorities/references/claims-mapping.md +7 -0
  5. package/catalog/frontmcp-authorities/references/custom-evaluators.md +63 -14
  6. package/catalog/frontmcp-channels/SKILL.md +36 -0
  7. package/catalog/frontmcp-channels/examples/channel-sources/file-watcher.md +8 -2
  8. package/catalog/frontmcp-channels/examples/channel-sources/replay-buffer.md +111 -30
  9. package/catalog/frontmcp-channels/examples/channel-two-way/whatsapp-bridge.md +45 -3
  10. package/catalog/frontmcp-channels/references/channel-sources.md +11 -3
  11. package/catalog/frontmcp-channels/references/channel-two-way.md +60 -89
  12. package/catalog/frontmcp-config/SKILL.md +111 -8
  13. package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +4 -4
  14. package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +7 -1
  15. package/catalog/frontmcp-config/examples/configure-deployment-targets/distributed-ha-config.md +1 -1
  16. package/catalog/frontmcp-config/examples/configure-deployment-targets/json-schema-ide-support.md +1 -1
  17. package/catalog/frontmcp-config/examples/configure-deployment-targets/multi-target-with-security.md +12 -9
  18. package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +2 -2
  19. package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +1 -1
  20. package/catalog/frontmcp-config/examples/configure-security-headers/csp-report-only.md +1 -1
  21. package/catalog/frontmcp-config/examples/configure-security-headers/full-production-headers.md +1 -1
  22. package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-basic.md +76 -0
  23. package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-redis.md +116 -0
  24. package/catalog/frontmcp-config/examples/configure-skills-http/inject-instructions.md +59 -0
  25. package/catalog/frontmcp-config/references/configure-auth-modes.md +5 -5
  26. package/catalog/frontmcp-config/references/configure-deployment-targets.md +27 -24
  27. package/catalog/frontmcp-config/references/configure-http.md +14 -10
  28. package/catalog/frontmcp-config/references/configure-security-headers.md +2 -2
  29. package/catalog/frontmcp-config/references/configure-session.md +25 -25
  30. package/catalog/frontmcp-config/references/configure-skills-http.md +157 -0
  31. package/catalog/frontmcp-config/references/configure-throttle.md +1 -1
  32. package/catalog/frontmcp-config/references/configure-transport.md +2 -2
  33. package/catalog/frontmcp-deployment/SKILL.md +112 -9
  34. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +23 -11
  35. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +44 -17
  36. package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +53 -21
  37. package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +1 -1
  38. package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +1 -1
  39. package/catalog/frontmcp-deployment/examples/build-for-mcpb/mcpb-bundle-build.md +1 -1
  40. package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +1 -1
  41. package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +1 -1
  42. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +7 -8
  43. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +8 -6
  44. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +5 -4
  45. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +8 -5
  46. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +20 -18
  47. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +8 -5
  48. package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +3 -3
  49. package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +1 -1
  50. package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +2 -2
  51. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +2 -2
  52. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +1 -1
  53. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +23 -21
  54. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +25 -22
  55. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +23 -30
  56. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +52 -28
  57. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +32 -55
  58. package/catalog/frontmcp-deployment/examples/mcp-client-integration/http-remote.md +9 -0
  59. package/catalog/frontmcp-deployment/references/build-for-browser.md +40 -17
  60. package/catalog/frontmcp-deployment/references/build-for-cli.md +8 -8
  61. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +43 -24
  62. package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +36 -25
  63. package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +56 -14
  64. package/catalog/frontmcp-deployment/references/deploy-to-node.md +9 -6
  65. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +57 -58
  66. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +49 -59
  67. package/catalog/frontmcp-deployment/references/mcp-client-integration.md +2 -0
  68. package/catalog/frontmcp-development/SKILL.md +186 -11
  69. package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +1 -1
  70. package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +30 -27
  71. package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +13 -8
  72. package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +33 -23
  73. package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +19 -10
  74. package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +3 -3
  75. package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +6 -4
  76. package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +1 -1
  77. package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +13 -8
  78. package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +50 -23
  79. package/catalog/frontmcp-development/references/create-agent.md +47 -30
  80. package/catalog/frontmcp-development/references/create-job.md +69 -54
  81. package/catalog/frontmcp-development/references/create-plugin-hooks.md +45 -28
  82. package/catalog/frontmcp-development/references/create-plugin.md +10 -8
  83. package/catalog/frontmcp-development/references/create-prompt.md +3 -3
  84. package/catalog/frontmcp-development/references/create-provider.md +91 -51
  85. package/catalog/frontmcp-development/references/create-resource.md +3 -3
  86. package/catalog/frontmcp-development/references/create-skill.md +2 -2
  87. package/catalog/frontmcp-development/references/create-tool.md +7 -7
  88. package/catalog/frontmcp-development/references/create-workflow.md +8 -10
  89. package/catalog/frontmcp-development/references/decorators-guide.md +92 -56
  90. package/catalog/frontmcp-development/references/official-plugins.md +4 -3
  91. package/catalog/frontmcp-development/references/openapi-adapter.md +1 -1
  92. package/catalog/frontmcp-extensibility/SKILL.md +70 -10
  93. package/catalog/frontmcp-extensibility/examples/skill-audit-log/custom-store.md +197 -0
  94. package/catalog/frontmcp-extensibility/examples/skill-audit-log/verify-chain.md +68 -0
  95. package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +3 -5
  96. package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +4 -11
  97. package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +41 -30
  98. package/catalog/frontmcp-extensibility/references/skill-audit-log.md +233 -0
  99. package/catalog/frontmcp-extensibility/references/vectoriadb.md +73 -63
  100. package/catalog/frontmcp-guides/SKILL.md +84 -27
  101. package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +72 -62
  102. package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +32 -43
  103. package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +24 -17
  104. package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +23 -21
  105. package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +47 -39
  106. package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +16 -6
  107. package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +9 -8
  108. package/catalog/frontmcp-guides/references/example-knowledge-base.md +192 -265
  109. package/catalog/frontmcp-guides/references/example-task-manager.md +60 -54
  110. package/catalog/frontmcp-guides/references/example-weather-api.md +22 -24
  111. package/catalog/frontmcp-observability/SKILL.md +66 -2
  112. package/catalog/frontmcp-observability/examples/telemetry-api/skill-counters.md +100 -0
  113. package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +7 -2
  114. package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +6 -2
  115. package/catalog/frontmcp-observability/references/telemetry-api.md +72 -8
  116. package/catalog/frontmcp-observability/references/testing-observability.md +33 -49
  117. package/catalog/frontmcp-observability/references/tracing-setup.md +12 -5
  118. package/catalog/frontmcp-observability/references/vendor-integrations.md +46 -1
  119. package/catalog/frontmcp-production-readiness/SKILL.md +134 -3
  120. package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +57 -36
  121. package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +1 -1
  122. package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +102 -6
  123. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +2 -1
  124. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +66 -58
  125. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +5 -3
  126. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +2 -1
  127. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +55 -76
  128. package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +43 -40
  129. package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +63 -94
  130. package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +28 -18
  131. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +29 -14
  132. package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +58 -42
  133. package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +5 -2
  134. package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +41 -24
  135. package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +56 -65
  136. package/catalog/frontmcp-production-readiness/references/common-checklist.md +17 -5
  137. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +5 -5
  138. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +5 -5
  139. package/catalog/frontmcp-production-readiness/references/production-lambda.md +5 -5
  140. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +5 -5
  141. package/catalog/frontmcp-production-readiness/references/production-node-server.md +1 -1
  142. package/catalog/frontmcp-production-readiness/references/production-vercel.md +5 -5
  143. package/catalog/frontmcp-setup/SKILL.md +88 -0
  144. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +10 -4
  145. package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +21 -8
  146. package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +3 -3
  147. package/catalog/frontmcp-setup/references/multi-app-composition.md +4 -3
  148. package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -6
  149. package/catalog/frontmcp-setup/references/project-structure-standalone.md +18 -15
  150. package/catalog/frontmcp-setup/references/readme-guide.md +1 -1
  151. package/catalog/frontmcp-setup/references/setup-project.md +19 -5
  152. package/catalog/frontmcp-setup/references/setup-redis.md +27 -39
  153. package/catalog/frontmcp-setup/references/setup-sqlite.md +25 -18
  154. package/catalog/frontmcp-testing/SKILL.md +102 -15
  155. package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +3 -3
  156. package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +50 -39
  157. package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +52 -29
  158. package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +37 -20
  159. package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +25 -15
  160. package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +27 -21
  161. package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +29 -20
  162. package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +5 -3
  163. package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +35 -26
  164. package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +8 -3
  165. package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +4 -1
  166. package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +6 -3
  167. package/catalog/frontmcp-testing/references/setup-testing.md +35 -39
  168. package/catalog/frontmcp-testing/references/test-auth.md +86 -43
  169. package/catalog/frontmcp-testing/references/test-browser-build.md +1 -1
  170. package/catalog/frontmcp-testing/references/test-direct-client.md +29 -19
  171. package/catalog/frontmcp-testing/references/test-e2e-handler.md +31 -19
  172. package/catalog/frontmcp-testing/references/test-tool-unit.md +6 -2
  173. package/catalog/skills-manifest.json +428 -339
  174. package/package.json +1 -1
  175. package/src/manifest.d.ts +13 -0
  176. package/src/manifest.js.map +1 -1
@@ -46,7 +46,7 @@ services:
46
46
  memory: 256M
47
47
  cpus: '0.5'
48
48
  healthcheck:
49
- test: ['CMD', 'wget', '-qO-', 'http://localhost:3000/health']
49
+ test: ['CMD', 'wget', '-qO-', 'http://localhost:3000/healthz']
50
50
  interval: 30s
51
51
  timeout: 5s
52
52
  retries: 3
@@ -74,7 +74,7 @@ volumes:
74
74
 
75
75
  ```bash
76
76
  # Verify health check endpoint
77
- curl http://localhost:3000/health
77
+ curl http://localhost:3000/healthz
78
78
  # {"status":"ok","uptime":12345}
79
79
 
80
80
  # Monitor resource usage
@@ -39,7 +39,7 @@ RUN yarn install --frozen-lockfile --production && \
39
39
  yarn cache clean
40
40
  EXPOSE 3000
41
41
  HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
42
- CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
42
+ CMD wget --no-verbose --tries=1 --spider http://localhost:3000/healthz || exit 1
43
43
  CMD ["node", "dist/main.js"]
44
44
  ```
45
45
 
@@ -49,7 +49,7 @@ docker build -t my-frontmcp-server .
49
49
  docker run -p 3000:3000 -e NODE_ENV=production my-frontmcp-server
50
50
 
51
51
  # Verify
52
- curl http://localhost:3000/health
52
+ curl http://localhost:3000/healthz
53
53
  ```
54
54
 
55
55
  ## What This Demonstrates
@@ -55,7 +55,7 @@ ENV PORT=3000
55
55
  EXPOSE 3000
56
56
 
57
57
  HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
58
- CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
58
+ CMD wget --no-verbose --tries=1 --spider http://localhost:3000/healthz || exit 1
59
59
 
60
60
  CMD ["node", "dist/main.js"]
61
61
  ```
@@ -2,23 +2,28 @@
2
2
  name: vercel-mcp-endpoint-test
3
3
  reference: deploy-to-vercel
4
4
  level: advanced
5
- description: 'Verify a Vercel-deployed FrontMCP server by testing health, tool listing, and tool invocation.'
6
- tags: [deployment, json-rpc, vercel, mcp, endpoint]
5
+ description: Verify a Vercel-deployed FrontMCP server by testing health, tool listing, and tool invocation. The CLI emits the Build Output API v3 structure — there is no `api/frontmcp.ts` to test against; the function lives at `.vercel/output/functions/index.func/handler.cjs` and is routed via `.vercel/output/config.json`.
6
+ tags:
7
+ - deployment
8
+ - json-rpc
9
+ - vercel
10
+ - mcp
11
+ - endpoint
7
12
  features:
8
- - 'Testing the health endpoint and MCP JSON-RPC API of a deployed Vercel function'
9
- - 'Using preview deployments to validate changes before promoting to production'
10
- - 'Setting `maxDuration` according to your Vercel plan (Hobby: 10s, Pro: 60s, Enterprise: 900s)'
13
+ - Testing the health endpoint (`/healthz`) and MCP JSON-RPC API of a deployed Vercel function
14
+ - Using preview deployments to validate changes before promoting to production
15
+ - "Vercel plan limits for `maxDuration` (Hobby: 10s, Pro: 60s, Enterprise: 900s) — configure these in the Vercel dashboard, not via `functions: { 'api/frontmcp.ts': ... }`"
11
16
  ---
12
17
 
13
18
  # Testing a Vercel MCP Endpoint
14
19
 
15
- Verify a Vercel-deployed FrontMCP server by testing health, tool listing, and tool invocation.
20
+ Verify a Vercel-deployed FrontMCP server by testing health, tool listing, and tool invocation. The CLI emits the Build Output API v3 structure — there is no `api/frontmcp.ts` to test against; the function lives at `.vercel/output/functions/index.func/handler.cjs` and is routed via `.vercel/output/config.json`.
16
21
 
17
22
  ## Code
18
23
 
19
24
  ```bash
20
- # Health check
21
- curl https://your-project.vercel.app/health
25
+ # Health check (FrontMCP serves /healthz by default; /health is a legacy alias)
26
+ curl https://your-project.vercel.app/healthz
22
27
  # {"status":"ok"}
23
28
 
24
29
  # List tools via JSON-RPC
@@ -33,36 +38,33 @@ curl -X POST https://your-project.vercel.app/mcp \
33
38
  ```
34
39
 
35
40
  ```bash
36
- # Preview deployment for PR testing
41
+ # Build, then preview deployment for PR testing
42
+ frontmcp build --target vercel
37
43
  vercel
38
44
  # Creates a unique preview URL: https://my-project-abc123.vercel.app
39
45
 
40
46
  # Test the preview before promoting to production
41
- curl https://my-project-abc123.vercel.app/health
47
+ curl https://my-project-abc123.vercel.app/healthz
42
48
 
43
49
  # Promote to production
44
50
  vercel --prod
45
51
  ```
46
52
 
47
53
  ```json
48
- // vercel.json - with maxDuration matching your plan
54
+ // vercel.json — auto-written by the build adapter; do not add `functions` or
55
+ // `rewrites` keyed on `api/frontmcp.ts`/`.js` (no such file exists).
49
56
  {
50
- "rewrites": [{ "source": "/(.*)", "destination": "/api/frontmcp" }],
51
- "functions": {
52
- "api/frontmcp.ts": {
53
- "memory": 1024,
54
- "maxDuration": 10
55
- }
56
- },
57
- "regions": ["iad1"]
57
+ "version": 2,
58
+ "buildCommand": "yarn build",
59
+ "installCommand": "yarn install"
58
60
  }
59
61
  ```
60
62
 
61
63
  ## What This Demonstrates
62
64
 
63
- - Testing the health endpoint and MCP JSON-RPC API of a deployed Vercel function
65
+ - Testing the health endpoint (`/healthz`) and MCP JSON-RPC API of a deployed Vercel function
64
66
  - Using preview deployments to validate changes before promoting to production
65
- - Setting `maxDuration` according to your Vercel plan (Hobby: 10s, Pro: 60s, Enterprise: 900s)
67
+ - Vercel plan limits for `maxDuration` (Hobby: 10s, Pro: 60s, Enterprise: 900s) — configure these in the Vercel dashboard, not via `functions: { 'api/frontmcp.ts': ... }`
66
68
 
67
69
  ## Related
68
70
 
@@ -2,22 +2,28 @@
2
2
  name: vercel-with-kv
3
3
  reference: deploy-to-vercel
4
4
  level: basic
5
- description: 'Deploy a FrontMCP server to Vercel serverless functions with Vercel KV for session persistence.'
6
- tags: [deployment, vercel-kv, vercel, session, performance, serverless]
5
+ description: Deploy a FrontMCP server to Vercel serverless functions with Vercel KV for session persistence. The CLI emits the full Build Output API v3 structure for you — you do **not** author `api/frontmcp.ts` and you do **not** add a `rewrites` block.
6
+ tags:
7
+ - deployment
8
+ - vercel-kv
9
+ - vercel
10
+ - session
11
+ - performance
12
+ - serverless
7
13
  features:
8
14
  - "Configuring `{ provider: 'vercel-kv' }` for automatic Vercel KV session storage"
9
- - 'The `vercel.json` catch-all rewrite that routes all requests to the single FrontMCP handler'
10
- - 'Setting function memory to 1024 MB for faster cold starts'
15
+ - Letting the CLI produce the Build Output API v3 structure (no manual `api/` directory or `rewrites`)
16
+ - Deploying with `vercel --prod` after the build emits `.vercel/output/`
11
17
  ---
12
18
 
13
19
  # Deploy to Vercel with KV Storage
14
20
 
15
- Deploy a FrontMCP server to Vercel serverless functions with Vercel KV for session persistence.
21
+ Deploy a FrontMCP server to Vercel serverless functions with Vercel KV for session persistence. The CLI emits the full Build Output API v3 structure for you — you do **not** author `api/frontmcp.ts` and you do **not** add a `rewrites` block.
16
22
 
17
23
  ## Code
18
24
 
19
25
  ```typescript
20
- // src/server.ts
26
+ // src/main.ts
21
27
  import { App, FrontMcp, Tool, ToolContext, z } from '@frontmcp/sdk';
22
28
 
23
29
  @Tool({
@@ -25,7 +31,7 @@ import { App, FrontMcp, Tool, ToolContext, z } from '@frontmcp/sdk';
25
31
  description: 'Greet a user',
26
32
  inputSchema: { name: z.string() },
27
33
  })
28
- class GreetTool extends ToolContext<{ name: string }> {
34
+ class GreetTool extends ToolContext {
29
35
  async execute(input: { name: string }) {
30
36
  return { content: [{ type: 'text' as const, text: `Hello, ${input.name}!` }] };
31
37
  }
@@ -39,25 +45,22 @@ class MyApp {}
39
45
  apps: [MyApp],
40
46
  redis: { provider: 'vercel-kv' },
41
47
  })
42
- class MyServer {}
48
+ export default class MyServer {}
43
49
  ```
44
50
 
45
51
  ```json
46
- // vercel.json
52
+ // vercel.json — written for you by `frontmcp build --target vercel`.
53
+ // buildCommand/installCommand are detected from your lockfile.
47
54
  {
48
- "rewrites": [{ "source": "/(.*)", "destination": "/api/frontmcp" }],
49
- "functions": {
50
- "api/frontmcp.ts": {
51
- "memory": 1024,
52
- "maxDuration": 60
53
- }
54
- },
55
- "regions": ["iad1"]
55
+ "version": 2,
56
+ "buildCommand": "yarn build",
57
+ "installCommand": "yarn install"
56
58
  }
57
59
  ```
58
60
 
59
61
  ```bash
60
- # Build for Vercel
62
+ # Build for Vercel — emits .vercel/output/functions/index.func/handler.cjs
63
+ # plus .vercel/output/config.json with the catch-all route.
61
64
  frontmcp build --target vercel
62
65
 
63
66
  # Preview deployment
@@ -66,15 +69,15 @@ vercel
66
69
  # Production deployment
67
70
  vercel --prod
68
71
 
69
- # Verify
70
- curl https://your-project.vercel.app/health
72
+ # Verify (FrontMCP serves /healthz by default)
73
+ curl https://your-project.vercel.app/healthz
71
74
  ```
72
75
 
73
76
  ## What This Demonstrates
74
77
 
75
78
  - Configuring `{ provider: 'vercel-kv' }` for automatic Vercel KV session storage
76
- - The `vercel.json` catch-all rewrite that routes all requests to the single FrontMCP handler
77
- - Setting function memory to 1024 MB for faster cold starts
79
+ - Letting the CLI produce the Build Output API v3 structure (no manual `api/` directory or `rewrites`)
80
+ - Deploying with `vercel --prod` after the build emits `.vercel/output/`
78
81
 
79
82
  ## Related
80
83
 
@@ -2,23 +2,28 @@
2
2
  name: vercel-with-skills-cache
3
3
  reference: deploy-to-vercel
4
4
  level: intermediate
5
- description: 'Deploy a FrontMCP server to Vercel with skills enabled and KV-backed skill caching.'
6
- tags: [deployment, vercel-kv, vercel, cache, security, skills]
5
+ description: Deploy a FrontMCP server to Vercel with skills enabled and KV-backed skill caching. The CLI handles the Build Output API v3 emission for you — your job is to configure the server and provision Vercel KV.
6
+ tags:
7
+ - deployment
8
+ - vercel-kv
9
+ - vercel
10
+ - cache
11
+ - skills
7
12
  features:
8
- - 'Enabling skills cache backed by Vercel KV with a 60-second TTL'
9
- - 'Setting environment variables via `vercel env add` instead of hardcoding in source'
10
- - 'Adding security headers (`X-Content-Type-Options`, `X-Frame-Options`) in `vercel.json`'
13
+ - Enabling skills cache backed by Vercel KV with a 60-second TTL
14
+ - Setting environment variables via `vercel env add` instead of hardcoding in source
15
+ - Letting the CLI emit the Build Output API v3 structure rather than hand-authoring `api/frontmcp.ts`
11
16
  ---
12
17
 
13
18
  # Vercel Deployment with Skills Cache
14
19
 
15
- Deploy a FrontMCP server to Vercel with skills enabled and KV-backed skill caching.
20
+ Deploy a FrontMCP server to Vercel with skills enabled and KV-backed skill caching. The CLI handles the Build Output API v3 emission for you — your job is to configure the server and provision Vercel KV.
16
21
 
17
22
  ## Code
18
23
 
19
24
  ```typescript
20
- // src/server.ts
21
- import { FrontMcp, App } from '@frontmcp/sdk';
25
+ // src/main.ts
26
+ import { App, FrontMcp } from '@frontmcp/sdk';
22
27
 
23
28
  @App({ name: 'MyApp' })
24
29
  class MyApp {}
@@ -36,11 +41,12 @@ class MyApp {}
36
41
  },
37
42
  },
38
43
  })
39
- class MyServer {}
44
+ export default class MyServer {}
40
45
  ```
41
46
 
42
47
  ```bash
43
- # Set environment variables via Vercel CLI
48
+ # Set environment variables via Vercel CLI (or link KV in the dashboard
49
+ # to inject KV_REST_API_URL/KV_REST_API_TOKEN automatically)
44
50
  vercel env add KV_REST_API_URL "https://your-kv-store.kv.vercel-storage.com"
45
51
  vercel env add KV_REST_API_TOKEN "your-token"
46
52
  vercel env add NODE_ENV production
@@ -48,30 +54,17 @@ vercel env add LOG_LEVEL info
48
54
  ```
49
55
 
50
56
  ```json
51
- // vercel.json
57
+ // vercel.json — written by `frontmcp build --target vercel` from your lockfile.
58
+ // Do not add functions/rewrites referencing api/frontmcp.* (no such file).
52
59
  {
53
- "rewrites": [{ "source": "/(.*)", "destination": "/api/frontmcp" }],
54
- "functions": {
55
- "api/frontmcp.ts": {
56
- "memory": 1024,
57
- "maxDuration": 60
58
- }
59
- },
60
- "regions": ["iad1"],
61
- "headers": [
62
- {
63
- "source": "/(.*)",
64
- "headers": [
65
- { "key": "X-Content-Type-Options", "value": "nosniff" },
66
- { "key": "X-Frame-Options", "value": "DENY" }
67
- ]
68
- }
69
- ]
60
+ "version": 2,
61
+ "buildCommand": "yarn build",
62
+ "installCommand": "yarn install"
70
63
  }
71
64
  ```
72
65
 
73
66
  ```bash
74
- # Deploy to production
67
+ # Build, then deploy to production
75
68
  frontmcp build --target vercel
76
69
  vercel --prod
77
70
 
@@ -83,7 +76,7 @@ vercel domains add mcp.example.com
83
76
 
84
77
  - Enabling skills cache backed by Vercel KV with a 60-second TTL
85
78
  - Setting environment variables via `vercel env add` instead of hardcoding in source
86
- - Adding security headers (`X-Content-Type-Options`, `X-Frame-Options`) in `vercel.json`
79
+ - Letting the CLI emit the Build Output API v3 structure rather than hand-authoring `api/frontmcp.ts`
87
80
 
88
81
  ## Related
89
82
 
@@ -2,48 +2,72 @@
2
2
  name: minimal-vercel-config
3
3
  reference: deploy-to-vercel-config
4
4
  level: basic
5
- description: 'The minimum `vercel.json` needed to deploy a FrontMCP server to Vercel.'
6
- tags: [deployment, vercel, serverless, config, minimal]
5
+ description: '`frontmcp build --target vercel` writes this minimal `vercel.json` for you. The package manager is detected from your lockfile.'
6
+ tags:
7
+ - deployment
8
+ - vercel
9
+ - serverless
10
+ - config
11
+ - minimal
7
12
  features:
8
- - 'The catch-all rewrite (`/(.*) -> /api/frontmcp`) routes all requests to the single FrontMCP handler'
9
- - 'Setting `buildCommand` and `outputDirectory` so Vercel uses the FrontMCP build pipeline'
10
- - 'Configuring function memory (512 MB) and max duration (30s) for the serverless function'
13
+ - The exact shape of the auto-generated `vercel.json` three keys, nothing else
14
+ - That routing and function configuration live in `.vercel/output/`, not `vercel.json`
15
+ - That hand-authoring `api/frontmcp.ts` references in `vercel.json` is unnecessary and breaks deploys
11
16
  ---
12
17
 
13
- # Minimal vercel.json Configuration
18
+ # Minimal vercel.json (auto-generated)
14
19
 
15
- The minimum `vercel.json` needed to deploy a FrontMCP server to Vercel.
20
+ `frontmcp build --target vercel` writes this minimal `vercel.json` for you. The package manager is detected from your lockfile.
16
21
 
17
22
  ## Code
18
23
 
19
24
  ```json
20
- // vercel.json
25
+ // vercel.json — yarn project (yarn.lock present)
21
26
  {
22
- "$schema": "https://openapi.vercel.sh/vercel.json",
23
- "buildCommand": "frontmcp build --target vercel",
24
- "outputDirectory": "dist",
25
- "rewrites": [
26
- {
27
- "source": "/(.*)",
28
- "destination": "/api/frontmcp"
29
- }
30
- ],
31
- "functions": {
32
- "api/frontmcp.js": {
33
- "memory": 512,
34
- "maxDuration": 30
35
- }
36
- },
37
- "regions": ["iad1"]
27
+ "version": 2,
28
+ "buildCommand": "yarn build",
29
+ "installCommand": "yarn install"
38
30
  }
39
31
  ```
40
32
 
33
+ ```json
34
+ // vercel.json — pnpm project (pnpm-lock.yaml present)
35
+ {
36
+ "version": 2,
37
+ "buildCommand": "pnpm run build",
38
+ "installCommand": "pnpm install"
39
+ }
40
+ ```
41
+
42
+ ```json
43
+ // vercel.json — npm project (package-lock.json present)
44
+ {
45
+ "version": 2,
46
+ "buildCommand": "npm run build",
47
+ "installCommand": "npm install"
48
+ }
49
+ ```
50
+
51
+ The actual function and routes live under `.vercel/output/`:
52
+
53
+ ```text
54
+ .vercel/output/
55
+ ├── config.json # routes /(.*) -> /index function
56
+ └── functions/
57
+ └── index.func/
58
+ ├── .vc-config.json # nodejs24.x, handler: handler.cjs
59
+ ├── handler.cjs # bundled handler
60
+ ├── package.json # peer-dep manifest
61
+ └── node_modules/ # peer deps installed by the adapter
62
+ ```
63
+
41
64
  ## What This Demonstrates
42
65
 
43
- - The catch-all rewrite (`/(.*) -> /api/frontmcp`) routes all requests to the single FrontMCP handler
44
- - Setting `buildCommand` and `outputDirectory` so Vercel uses the FrontMCP build pipeline
45
- - Configuring function memory (512 MB) and max duration (30s) for the serverless function
66
+ - The exact shape of the auto-generated `vercel.json` three keys, nothing else
67
+ - That routing and function configuration live in `.vercel/output/`, not `vercel.json`
68
+ - That hand-authoring `api/frontmcp.ts` references in `vercel.json` is unnecessary and breaks deploys
46
69
 
47
70
  ## Related
48
71
 
49
- - See `deploy-to-vercel-config` for the full reference configuration with security headers
72
+ - See `deploy-to-vercel-config` for headers/regions you may safely add on top
73
+ - See `deploy-to-vercel` for the full deployment workflow
@@ -2,78 +2,54 @@
2
2
  name: vercel-config-with-security-headers
3
3
  reference: deploy-to-vercel-config
4
4
  level: intermediate
5
- description: 'A complete `vercel.json` with per-route security headers for health, MCP, and all other endpoints.'
6
- tags: [deployment, vercel, cache, security, config, headers]
5
+ description: "The Vercel adapter emits a minimal `vercel.json` (version + buildCommand + installCommand). You can layer extra Vercel-supported keys on top after the build but never add `functions: { 'api/frontmcp.ts': ... }` or `rewrites` to `/api/frontmcp` (the build does not produce an `api/` directory)."
6
+ tags:
7
+ - deployment
8
+ - vercel
9
+ - security
10
+ - config
11
+ - headers
7
12
  features:
8
- - 'Per-route header configuration: `/health` and `/mcp` get `Cache-Control: no-store` to prevent caching'
9
- - 'Global security headers (`X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`) applied to all routes'
10
- - 'Setting `framework: null` to tell Vercel this is not a framework project'
13
+ - Adding `regions` to constrain function placement (e.g., `iad1` for US East)
14
+ - 'Per-route `Cache-Control: no-store` on `/healthz` and `/mcp` to prevent caching'
15
+ - 'Global security headers applied to all routes via the catch-all `source: "/(.*)"`'
11
16
  ---
12
17
 
13
- # vercel.json with Security Headers
18
+ # vercel.json with Regions and Security Headers
14
19
 
15
- A complete `vercel.json` with per-route security headers for health, MCP, and all other endpoints.
20
+ The Vercel adapter emits a minimal `vercel.json` (version + buildCommand + installCommand). You can layer extra Vercel-supported keys on top after the build but never add `functions: { 'api/frontmcp.ts': ... }` or `rewrites` to `/api/frontmcp` (the build does not produce an `api/` directory).
21
+
22
+ > Note: header configuration is also possible inside your FrontMCP server (works locally and in production). Use `vercel.json` headers when you need them applied at the edge before reaching the function.
16
23
 
17
24
  ## Code
18
25
 
19
26
  ```json
20
- // vercel.json
27
+ // vercel.json — extends the auto-generated minimum with regions + headers.
28
+ // The adapter regenerates buildCommand/installCommand from your lockfile,
29
+ // so keep them aligned (or let the build rewrite them).
21
30
  {
22
- "$schema": "https://openapi.vercel.sh/vercel.json",
23
- "framework": null,
24
- "buildCommand": "frontmcp build --target vercel",
25
- "outputDirectory": "dist",
26
- "rewrites": [
27
- {
28
- "source": "/(.*)",
29
- "destination": "/api/frontmcp"
30
- }
31
- ],
32
- "functions": {
33
- "api/frontmcp.js": {
34
- "memory": 512,
35
- "maxDuration": 30
36
- }
37
- },
31
+ "version": 2,
32
+ "buildCommand": "yarn build",
33
+ "installCommand": "yarn install",
38
34
  "regions": ["iad1"],
39
35
  "headers": [
40
36
  {
41
- "source": "/health",
42
- "headers": [
43
- {
44
- "key": "Cache-Control",
45
- "value": "no-store"
46
- }
47
- ]
37
+ "source": "/healthz",
38
+ "headers": [{ "key": "Cache-Control", "value": "no-store" }]
48
39
  },
49
40
  {
50
41
  "source": "/mcp",
51
42
  "headers": [
52
- {
53
- "key": "Cache-Control",
54
- "value": "no-store"
55
- },
56
- {
57
- "key": "X-Content-Type-Options",
58
- "value": "nosniff"
59
- }
43
+ { "key": "Cache-Control", "value": "no-store" },
44
+ { "key": "X-Content-Type-Options", "value": "nosniff" }
60
45
  ]
61
46
  },
62
47
  {
63
48
  "source": "/(.*)",
64
49
  "headers": [
65
- {
66
- "key": "X-Frame-Options",
67
- "value": "DENY"
68
- },
69
- {
70
- "key": "X-Content-Type-Options",
71
- "value": "nosniff"
72
- },
73
- {
74
- "key": "Referrer-Policy",
75
- "value": "strict-origin-when-cross-origin"
76
- }
50
+ { "key": "X-Frame-Options", "value": "DENY" },
51
+ { "key": "X-Content-Type-Options", "value": "nosniff" },
52
+ { "key": "Referrer-Policy", "value": "strict-origin-when-cross-origin" }
77
53
  ]
78
54
  }
79
55
  ]
@@ -82,11 +58,12 @@ A complete `vercel.json` with per-route security headers for health, MCP, and al
82
58
 
83
59
  ## What This Demonstrates
84
60
 
85
- - Per-route header configuration: `/health` and `/mcp` get `Cache-Control: no-store` to prevent caching
86
- - Global security headers (`X-Frame-Options`, `X-Content-Type-Options`, `Referrer-Policy`) applied to all routes
87
- - Setting `framework: null` to tell Vercel this is not a framework project
61
+ - Adding `regions` to constrain function placement (e.g., `iad1` for US East)
62
+ - Per-route `Cache-Control: no-store` on `/healthz` and `/mcp` to prevent caching
63
+ - Global security headers applied to all routes via the catch-all `source: "/(.*)"`
88
64
 
89
65
  ## Related
90
66
 
91
- - See `deploy-to-vercel-config` for the full reference configuration
67
+ - See `deploy-to-vercel-config` for the full reference and what NOT to do
92
68
  - See `deploy-to-vercel` for the complete deployment guide
69
+ - Security hardening (CSP, HSTS, rate limits) belongs in `frontmcp-production-readiness`
@@ -53,6 +53,8 @@ my-server serve -p 3005
53
53
 
54
54
  ### Background daemon on port
55
55
 
56
+ `daemon` subcommands are generated INTO your CLI binary by `frontmcp build --target cli` — they are not subcommands of the global `frontmcp` CLI. The block below assumes `my-server` is the binary you built and installed.
57
+
56
58
  ```bash
57
59
  # Start as a background daemon on port 4000
58
60
  my-server daemon start -p 4000
@@ -68,6 +70,13 @@ my-server daemon logs
68
70
  my-server daemon stop
69
71
  ```
70
72
 
73
+ If you haven't built a CLI binary, use the framework-level alternative:
74
+
75
+ ```bash
76
+ # Start an entry file as a backgrounded socket daemon (Unix socket by default)
77
+ frontmcp socket ./src/main.ts -b
78
+ ```
79
+
71
80
  ```json Claude Code (.mcp.json)
72
81
  {
73
82
  "mcpServers": {