@frontmcp/skills 1.1.2-beta.1 → 1.2.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.
- package/catalog/TEMPLATE.md +16 -11
- package/catalog/frontmcp-authorities/SKILL.md +116 -11
- package/catalog/frontmcp-authorities/references/authority-profiles.md +39 -36
- package/catalog/frontmcp-authorities/references/claims-mapping.md +7 -0
- package/catalog/frontmcp-authorities/references/custom-evaluators.md +63 -14
- package/catalog/frontmcp-channels/SKILL.md +36 -0
- package/catalog/frontmcp-channels/examples/channel-sources/file-watcher.md +8 -2
- package/catalog/frontmcp-channels/examples/channel-sources/replay-buffer.md +111 -30
- package/catalog/frontmcp-channels/examples/channel-two-way/whatsapp-bridge.md +45 -3
- package/catalog/frontmcp-channels/references/channel-sources.md +11 -3
- package/catalog/frontmcp-channels/references/channel-two-way.md +60 -89
- package/catalog/frontmcp-config/SKILL.md +111 -8
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +4 -4
- package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +7 -1
- package/catalog/frontmcp-config/examples/configure-deployment-targets/distributed-ha-config.md +1 -1
- package/catalog/frontmcp-config/examples/configure-deployment-targets/json-schema-ide-support.md +1 -1
- package/catalog/frontmcp-config/examples/configure-deployment-targets/multi-target-with-security.md +12 -9
- package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +2 -2
- package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +1 -1
- package/catalog/frontmcp-config/examples/configure-security-headers/csp-report-only.md +1 -1
- package/catalog/frontmcp-config/examples/configure-security-headers/full-production-headers.md +1 -1
- package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-basic.md +76 -0
- package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-redis.md +116 -0
- package/catalog/frontmcp-config/examples/configure-skills-http/inject-instructions.md +59 -0
- package/catalog/frontmcp-config/references/configure-auth-modes.md +5 -5
- package/catalog/frontmcp-config/references/configure-deployment-targets.md +27 -24
- package/catalog/frontmcp-config/references/configure-http.md +14 -10
- package/catalog/frontmcp-config/references/configure-security-headers.md +2 -2
- package/catalog/frontmcp-config/references/configure-session.md +25 -25
- package/catalog/frontmcp-config/references/configure-skills-http.md +157 -0
- package/catalog/frontmcp-config/references/configure-throttle.md +1 -1
- package/catalog/frontmcp-config/references/configure-transport.md +2 -2
- package/catalog/frontmcp-deployment/SKILL.md +112 -9
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +23 -11
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +44 -17
- package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +53 -21
- package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-mcpb/mcpb-bundle-build.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +1 -1
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +7 -8
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +8 -6
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +5 -4
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +8 -5
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +20 -18
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +8 -5
- package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +3 -3
- package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +1 -1
- package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +2 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +2 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +1 -1
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +23 -21
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +25 -22
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +23 -30
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +52 -28
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +32 -55
- package/catalog/frontmcp-deployment/examples/mcp-client-integration/http-remote.md +9 -0
- package/catalog/frontmcp-deployment/references/build-for-browser.md +40 -17
- package/catalog/frontmcp-deployment/references/build-for-cli.md +8 -8
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +43 -24
- package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +36 -25
- package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +56 -14
- package/catalog/frontmcp-deployment/references/deploy-to-node.md +9 -6
- package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +57 -58
- package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +49 -59
- package/catalog/frontmcp-deployment/references/mcp-client-integration.md +2 -0
- package/catalog/frontmcp-development/SKILL.md +186 -11
- package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +1 -1
- package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +30 -27
- package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +13 -8
- package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +33 -23
- package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +19 -10
- package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +3 -3
- package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +6 -4
- package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +1 -1
- package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +13 -8
- package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +50 -23
- package/catalog/frontmcp-development/references/create-agent.md +47 -30
- package/catalog/frontmcp-development/references/create-job.md +69 -54
- package/catalog/frontmcp-development/references/create-plugin-hooks.md +45 -28
- package/catalog/frontmcp-development/references/create-plugin.md +10 -8
- package/catalog/frontmcp-development/references/create-prompt.md +3 -3
- package/catalog/frontmcp-development/references/create-provider.md +91 -51
- package/catalog/frontmcp-development/references/create-resource.md +3 -3
- package/catalog/frontmcp-development/references/create-skill.md +2 -2
- package/catalog/frontmcp-development/references/create-tool.md +7 -7
- package/catalog/frontmcp-development/references/create-workflow.md +8 -10
- package/catalog/frontmcp-development/references/decorators-guide.md +92 -56
- package/catalog/frontmcp-development/references/official-plugins.md +4 -3
- package/catalog/frontmcp-development/references/openapi-adapter.md +1 -1
- package/catalog/frontmcp-extensibility/SKILL.md +70 -10
- package/catalog/frontmcp-extensibility/examples/skill-audit-log/custom-store.md +197 -0
- package/catalog/frontmcp-extensibility/examples/skill-audit-log/verify-chain.md +68 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +3 -5
- package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +4 -11
- package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +41 -30
- package/catalog/frontmcp-extensibility/references/skill-audit-log.md +233 -0
- package/catalog/frontmcp-extensibility/references/vectoriadb.md +73 -63
- package/catalog/frontmcp-guides/SKILL.md +84 -27
- package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +72 -62
- package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +32 -43
- package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +24 -17
- package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +23 -21
- package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +47 -39
- package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +16 -6
- package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +9 -8
- package/catalog/frontmcp-guides/references/example-knowledge-base.md +192 -265
- package/catalog/frontmcp-guides/references/example-task-manager.md +60 -54
- package/catalog/frontmcp-guides/references/example-weather-api.md +22 -24
- package/catalog/frontmcp-observability/SKILL.md +66 -2
- package/catalog/frontmcp-observability/examples/telemetry-api/skill-counters.md +100 -0
- package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +7 -2
- package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +6 -2
- package/catalog/frontmcp-observability/references/telemetry-api.md +72 -8
- package/catalog/frontmcp-observability/references/testing-observability.md +33 -49
- package/catalog/frontmcp-observability/references/tracing-setup.md +12 -5
- package/catalog/frontmcp-observability/references/vendor-integrations.md +46 -1
- package/catalog/frontmcp-production-readiness/SKILL.md +134 -3
- package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +57 -36
- package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +1 -1
- package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +102 -6
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +2 -1
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +66 -58
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +5 -3
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +2 -1
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +55 -76
- package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +43 -40
- package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +63 -94
- package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +28 -18
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +29 -14
- package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +58 -42
- package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +5 -2
- package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +41 -24
- package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +56 -65
- package/catalog/frontmcp-production-readiness/references/common-checklist.md +17 -5
- package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-lambda.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-node-server.md +1 -1
- package/catalog/frontmcp-production-readiness/references/production-vercel.md +5 -5
- package/catalog/frontmcp-setup/SKILL.md +88 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +10 -4
- package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +21 -8
- package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +3 -3
- package/catalog/frontmcp-setup/references/multi-app-composition.md +4 -3
- package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -6
- package/catalog/frontmcp-setup/references/project-structure-standalone.md +18 -15
- package/catalog/frontmcp-setup/references/readme-guide.md +1 -1
- package/catalog/frontmcp-setup/references/setup-project.md +19 -5
- package/catalog/frontmcp-setup/references/setup-redis.md +27 -39
- package/catalog/frontmcp-setup/references/setup-sqlite.md +25 -18
- package/catalog/frontmcp-testing/SKILL.md +102 -15
- package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +3 -3
- package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +50 -39
- package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +52 -29
- package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +37 -20
- package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +25 -15
- package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +27 -21
- package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +29 -20
- package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +5 -3
- package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +35 -26
- package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +8 -3
- package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +4 -1
- package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +6 -3
- package/catalog/frontmcp-testing/references/setup-testing.md +35 -39
- package/catalog/frontmcp-testing/references/test-auth.md +86 -43
- package/catalog/frontmcp-testing/references/test-browser-build.md +1 -1
- package/catalog/frontmcp-testing/references/test-direct-client.md +29 -19
- package/catalog/frontmcp-testing/references/test-e2e-handler.md +31 -19
- package/catalog/frontmcp-testing/references/test-tool-unit.md +6 -2
- package/catalog/skills-manifest.json +428 -339
- package/package.json +1 -1
- package/src/manifest.d.ts +13 -0
- 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/
|
|
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/
|
|
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/
|
|
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/
|
|
52
|
+
curl http://localhost:3000/healthz
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## What This Demonstrates
|
package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md
CHANGED
|
@@ -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/
|
|
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:
|
|
6
|
-
tags:
|
|
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
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
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/
|
|
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
|
-
#
|
|
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/
|
|
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 -
|
|
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
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
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
|
-
-
|
|
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:
|
|
6
|
-
tags:
|
|
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
|
-
-
|
|
10
|
-
-
|
|
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/
|
|
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
|
|
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
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
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/
|
|
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
|
-
-
|
|
77
|
-
-
|
|
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:
|
|
6
|
-
tags:
|
|
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
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
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/
|
|
21
|
-
import {
|
|
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
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
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
|
-
#
|
|
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
|
-
-
|
|
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
|
|
package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md
CHANGED
|
@@ -2,48 +2,72 @@
|
|
|
2
2
|
name: minimal-vercel-config
|
|
3
3
|
reference: deploy-to-vercel-config
|
|
4
4
|
level: basic
|
|
5
|
-
description: '
|
|
6
|
-
tags:
|
|
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
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
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
|
|
18
|
+
# Minimal vercel.json (auto-generated)
|
|
14
19
|
|
|
15
|
-
|
|
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
|
-
"
|
|
23
|
-
"buildCommand": "
|
|
24
|
-
"
|
|
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
|
|
44
|
-
-
|
|
45
|
-
-
|
|
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
|
|
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:
|
|
6
|
-
tags:
|
|
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
|
-
-
|
|
9
|
-
- '
|
|
10
|
-
- '
|
|
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
|
-
|
|
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
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
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": "/
|
|
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
|
-
|
|
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
|
-
|
|
67
|
-
|
|
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
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
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
|
|
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": {
|