@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.
- 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
|
@@ -3,72 +3,71 @@ name: deploy-to-vercel-config
|
|
|
3
3
|
description: Reference vercel.json configuration for deploying a FrontMCP server to Vercel
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
# vercel.json Reference for FrontMCP
|
|
7
|
+
|
|
8
|
+
The Vercel CLI build adapter (`frontmcp build --target vercel`) emits a project that uses Vercel's [Build Output API v3](https://vercel.com/docs/build-output-api/v3). The adapter writes `.vercel/output/functions/index.func/handler.cjs` plus a `.vercel/output/config.json` with the catch-all route.
|
|
9
|
+
|
|
10
|
+
The adapter ALSO writes a minimal `vercel.json` for you, with just `version`, `buildCommand`, and `installCommand`. You should **not** hand-author a `rewrites: [...] -> /api/frontmcp` block — there is no `api/` directory in the build output, and the Build Output API handles routing via `.vercel/output/config.json`.
|
|
11
|
+
|
|
12
|
+
## Generated vercel.json
|
|
13
|
+
|
|
14
|
+
After `frontmcp build --target vercel`, your `vercel.json` looks like:
|
|
15
|
+
|
|
16
|
+
```json
|
|
6
17
|
{
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"outputDirectory": "dist",
|
|
11
|
-
"rewrites": [
|
|
12
|
-
{
|
|
13
|
-
"source": "/(.*)",
|
|
14
|
-
"destination": "/api/frontmcp"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"functions": {
|
|
18
|
-
"api/frontmcp.js": {
|
|
19
|
-
"memory": 512,
|
|
20
|
-
"maxDuration": 30
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"regions": ["iad1"],
|
|
24
|
-
"headers": [
|
|
25
|
-
{
|
|
26
|
-
"source": "/health",
|
|
27
|
-
"headers": [
|
|
28
|
-
{
|
|
29
|
-
"key": "Cache-Control",
|
|
30
|
-
"value": "no-store"
|
|
18
|
+
"version": 2,
|
|
19
|
+
"buildCommand": "yarn build",
|
|
20
|
+
"installCommand": "yarn install"
|
|
31
21
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The `buildCommand` and `installCommand` are detected from your lockfile (`bun.lockb` -> bun, `pnpm-lock.yaml` -> pnpm, `yarn.lock` -> yarn, `package-lock.json` -> npm).
|
|
25
|
+
|
|
26
|
+
## Customizing
|
|
27
|
+
|
|
28
|
+
You can hand-edit `vercel.json` AFTER the build to add fields Vercel supports — for example, regions or environment-level headers:
|
|
29
|
+
|
|
30
|
+
```json
|
|
41
31
|
{
|
|
42
|
-
"
|
|
43
|
-
"
|
|
32
|
+
"version": 2,
|
|
33
|
+
"buildCommand": "yarn build",
|
|
34
|
+
"installCommand": "yarn install",
|
|
35
|
+
"regions": ["iad1"]
|
|
44
36
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To add response headers, prefer setting them inside your FrontMCP server (where they apply both locally and in production) rather than in `vercel.json`.
|
|
40
|
+
|
|
41
|
+
## What NOT to Do
|
|
42
|
+
|
|
43
|
+
- Do **not** add a `rewrites` block routing to `/api/frontmcp` — there is no `api/` directory in the Vercel build output.
|
|
44
|
+
- Do **not** add a `functions: { "api/frontmcp.ts": ... }` map — the function lives at `.vercel/output/functions/index.func/handler.cjs`, configured by `.vc-config.json` (runtime, handler) generated by the adapter.
|
|
45
|
+
- Do **not** set `framework` to a value the FrontMCP build doesn't match. Leaving it unset is safest.
|
|
46
|
+
|
|
47
|
+
## Function Runtime Config
|
|
48
|
+
|
|
49
|
+
The adapter writes `.vercel/output/functions/index.func/.vc-config.json` automatically:
|
|
50
|
+
|
|
51
|
+
```json
|
|
58
52
|
{
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
]
|
|
53
|
+
"runtime": "nodejs24.x",
|
|
54
|
+
"handler": "handler.cjs",
|
|
55
|
+
"launcherType": "Nodejs"
|
|
65
56
|
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If you need to change memory or maxDuration, configure them via the Vercel dashboard (Project Settings -> Functions) or `vercel.json`'s top-level Vercel-specific configuration. Per-function blocks keyed by `api/frontmcp.ts` will not work because that file does not exist.
|
|
66
60
|
|
|
67
61
|
## Examples
|
|
68
62
|
|
|
69
|
-
| Example | Level | Description
|
|
70
|
-
| ------------------------------------------------------------------------------------------------------------------- | ------------ |
|
|
71
|
-
| [`minimal-vercel-config`](../examples/deploy-to-vercel-config/minimal-vercel-config.md) | Basic |
|
|
72
|
-
| [`vercel-config-with-security-headers`](../examples/deploy-to-vercel-config/vercel-config-with-security-headers.md) | Intermediate |
|
|
63
|
+
| Example | Level | Description |
|
|
64
|
+
| ------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| [`minimal-vercel-config`](../examples/deploy-to-vercel-config/minimal-vercel-config.md) | Basic | `frontmcp build --target vercel` writes this minimal `vercel.json` for you. The package manager is detected from your lockfile. |
|
|
66
|
+
| [`vercel-config-with-security-headers`](../examples/deploy-to-vercel-config/vercel-config-with-security-headers.md) | Intermediate | 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). |
|
|
73
67
|
|
|
74
68
|
> See all examples in [`examples/deploy-to-vercel-config/`](../examples/deploy-to-vercel-config/)
|
|
69
|
+
|
|
70
|
+
## Reference
|
|
71
|
+
|
|
72
|
+
- Vercel Build Output API v3: https://vercel.com/docs/build-output-api/v3
|
|
73
|
+
- Related skills: `deploy-to-vercel`, `deploy-to-node`
|
|
@@ -7,6 +7,8 @@ description: Deploy a FrontMCP server to Vercel serverless functions with Vercel
|
|
|
7
7
|
|
|
8
8
|
This skill guides you through deploying a FrontMCP server to Vercel serverless functions with Vercel KV for persistent storage.
|
|
9
9
|
|
|
10
|
+
The FrontMCP CLI's Vercel adapter uses Vercel's [Build Output API v3](https://vercel.com/docs/build-output-api/v3): it produces `.vercel/output/functions/index.func/handler.cjs` plus `.vercel/output/config.json`. You do **not** author `api/frontmcp.ts` files, and you do **not** hand-write `rewrites` to `/api/frontmcp` — the build emits the full Build Output structure for you.
|
|
11
|
+
|
|
10
12
|
## When to Use This Skill
|
|
11
13
|
|
|
12
14
|
### Must Use
|
|
@@ -33,7 +35,7 @@ This skill guides you through deploying a FrontMCP server to Vercel serverless f
|
|
|
33
35
|
|
|
34
36
|
- A Vercel account (https://vercel.com)
|
|
35
37
|
- Vercel CLI installed: `npm install -g vercel`
|
|
36
|
-
- A
|
|
38
|
+
- A FrontMCP project ready to build
|
|
37
39
|
|
|
38
40
|
## Step 1: Build for Vercel
|
|
39
41
|
|
|
@@ -41,42 +43,29 @@ This skill guides you through deploying a FrontMCP server to Vercel serverless f
|
|
|
41
43
|
frontmcp build --target vercel
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
This produces a Vercel
|
|
45
|
-
|
|
46
|
-
## Step 2: Configure vercel.json
|
|
46
|
+
This produces a Vercel Build Output API v3 structure:
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
```text
|
|
49
|
+
.vercel/output/
|
|
50
|
+
├── config.json # routes /(.*) -> /index function
|
|
51
|
+
└── functions/
|
|
52
|
+
└── index.func/
|
|
53
|
+
├── .vc-config.json # nodejs24.x runtime + handler.cjs
|
|
54
|
+
├── handler.cjs # bundled handler (rspack CJS)
|
|
55
|
+
├── package.json # peer-dep manifest (vercel-kv, etc.)
|
|
56
|
+
└── node_modules/ # peer deps that can't be statically bundled
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
"rewrites": [{ "source": "/(.*)", "destination": "/api/frontmcp" }],
|
|
53
|
-
"functions": {
|
|
54
|
-
"api/frontmcp.ts": {
|
|
55
|
-
"memory": 1024,
|
|
56
|
-
"maxDuration": 60
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"regions": ["iad1"],
|
|
60
|
-
"headers": [
|
|
61
|
-
{
|
|
62
|
-
"source": "/(.*)",
|
|
63
|
-
"headers": [
|
|
64
|
-
{ "key": "X-Content-Type-Options", "value": "nosniff" },
|
|
65
|
-
{ "key": "X-Frame-Options", "value": "DENY" }
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
}
|
|
58
|
+
vercel.json # version, buildCommand, installCommand
|
|
70
59
|
```
|
|
71
60
|
|
|
72
|
-
The
|
|
61
|
+
The adapter detects your package manager from the lockfile and writes the matching `buildCommand`/`installCommand` into `vercel.json`. No `api/` directory is involved.
|
|
73
62
|
|
|
74
|
-
## Step
|
|
63
|
+
## Step 2: Configure the Server for Vercel KV
|
|
75
64
|
|
|
76
65
|
Use the `vercel-kv` provider so FrontMCP stores sessions, skill cache, and plugin state in Vercel KV (powered by Upstash Redis):
|
|
77
66
|
|
|
78
67
|
```typescript
|
|
79
|
-
import {
|
|
68
|
+
import { App, FrontMcp } from '@frontmcp/sdk';
|
|
80
69
|
|
|
81
70
|
@App({ name: 'MyApp' })
|
|
82
71
|
class MyApp {}
|
|
@@ -95,11 +84,13 @@ class MyApp {}
|
|
|
95
84
|
},
|
|
96
85
|
})
|
|
97
86
|
class MyServer {}
|
|
87
|
+
|
|
88
|
+
export default MyServer;
|
|
98
89
|
```
|
|
99
90
|
|
|
100
91
|
Provision the KV store in the Vercel dashboard under **Storage > Create Database > KV (Redis)**, then link it to your project. Vercel automatically injects the required environment variables.
|
|
101
92
|
|
|
102
|
-
## Step
|
|
93
|
+
## Step 3: Environment Variables
|
|
103
94
|
|
|
104
95
|
Vercel KV variables are injected automatically when the store is linked. For manual setup or additional configuration, set them in the Vercel dashboard (**Settings > Environment Variables**) or via the CLI:
|
|
105
96
|
|
|
@@ -117,7 +108,7 @@ vercel env add LOG_LEVEL info
|
|
|
117
108
|
| `NODE_ENV` | Runtime environment | Yes |
|
|
118
109
|
| `LOG_LEVEL` | Logging verbosity | No |
|
|
119
110
|
|
|
120
|
-
## Step
|
|
111
|
+
## Step 4: Deploy
|
|
121
112
|
|
|
122
113
|
### Preview Deployment
|
|
123
114
|
|
|
@@ -143,11 +134,11 @@ vercel domains add mcp.example.com
|
|
|
143
134
|
|
|
144
135
|
Configure your DNS provider to point the domain to Vercel. TLS certificates are provisioned automatically.
|
|
145
136
|
|
|
146
|
-
## Step
|
|
137
|
+
## Step 5: Verify
|
|
147
138
|
|
|
148
139
|
```bash
|
|
149
|
-
# Health check
|
|
150
|
-
curl https://your-project.vercel.app/
|
|
140
|
+
# Health check (FrontMCP serves /healthz by default; /health is a legacy alias)
|
|
141
|
+
curl https://your-project.vercel.app/healthz
|
|
151
142
|
|
|
152
143
|
# Test MCP endpoint
|
|
153
144
|
curl -X POST https://your-project.vercel.app/mcp \
|
|
@@ -159,9 +150,9 @@ curl -X POST https://your-project.vercel.app/mcp \
|
|
|
159
150
|
|
|
160
151
|
Vercel serverless functions experience cold starts after periods of inactivity. To minimize impact:
|
|
161
152
|
|
|
162
|
-
- The `frontmcp build --target vercel` output is
|
|
153
|
+
- The `frontmcp build --target vercel` output is bundled with rspack (CJS) for fast load. Avoid adding unnecessary dependencies.
|
|
163
154
|
- Consider Vercel's **Fluid Compute** for latency-sensitive workloads.
|
|
164
|
-
-
|
|
155
|
+
- Configure memory in the Vercel dashboard (Project Settings > Functions). The build-generated `.vc-config.json` does not pin memory; Vercel applies project defaults.
|
|
165
156
|
|
|
166
157
|
### Execution Limits
|
|
167
158
|
|
|
@@ -179,61 +170,60 @@ Serverless functions are stateless between invocations. All persistent state mus
|
|
|
179
170
|
|
|
180
171
|
## Common Patterns
|
|
181
172
|
|
|
182
|
-
| Pattern | Correct
|
|
183
|
-
| --------------------- |
|
|
184
|
-
| Build command | `frontmcp build --target vercel`
|
|
185
|
-
| KV provider config | `{ provider: 'vercel-kv' }`
|
|
186
|
-
|
|
|
187
|
-
|
|
|
188
|
-
|
|
|
173
|
+
| Pattern | Correct | Incorrect | Why |
|
|
174
|
+
| --------------------- | -------------------------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------- |
|
|
175
|
+
| Build command | `frontmcp build --target vercel` | `tsc` or generic `npm run build` | The Vercel adapter emits the Build Output API v3 structure |
|
|
176
|
+
| KV provider config | `{ provider: 'vercel-kv' }` | `{ provider: 'redis', host: '...' }` | Vercel KV uses its own REST API; a raw Redis provider will not connect |
|
|
177
|
+
| Function entry | `.vercel/output/functions/index.func/handler.cjs` (auto) | Hand-written `api/frontmcp.ts` | The adapter generates the function via Build Output API; no `api/` dir |
|
|
178
|
+
| Routing | `.vercel/output/config.json` (auto) | Hand-written `rewrites` to `/api/frontmcp` | The adapter writes `routes: [{ src: '/(.*)', dest: '/index' }]` for you |
|
|
179
|
+
| Environment variables | Link KV store in dashboard (auto-injected) | Hardcode `KV_REST_API_URL` in source | Linked stores inject vars automatically and rotate tokens safely |
|
|
189
180
|
|
|
190
181
|
## Verification Checklist
|
|
191
182
|
|
|
192
183
|
**Build**
|
|
193
184
|
|
|
194
185
|
- [ ] `frontmcp build --target vercel` completes without errors
|
|
195
|
-
- [ ]
|
|
186
|
+
- [ ] `.vercel/output/functions/index.func/handler.cjs` exists in the build output
|
|
187
|
+
- [ ] `.vercel/output/config.json` contains a route from `/(.*)` to `/index`
|
|
196
188
|
|
|
197
189
|
**Deployment**
|
|
198
190
|
|
|
199
191
|
- [ ] `vercel` creates a preview deployment without errors
|
|
200
192
|
- [ ] `vercel --prod` deploys to the production domain
|
|
201
|
-
- [ ] `curl https://your-project.vercel.app/
|
|
193
|
+
- [ ] `curl https://your-project.vercel.app/healthz` returns `{"status":"ok"}`
|
|
202
194
|
|
|
203
195
|
**Storage and Configuration**
|
|
204
196
|
|
|
205
197
|
- [ ] Vercel KV store is created and linked to the project
|
|
206
198
|
- [ ] `KV_REST_API_URL` and `KV_REST_API_TOKEN` are present in environment variables
|
|
207
199
|
- [ ] `NODE_ENV` is set to `production`
|
|
208
|
-
- [ ] `vercel.json` has correct rewrite, function config, and region settings
|
|
209
200
|
|
|
210
201
|
**Production Readiness**
|
|
211
202
|
|
|
212
203
|
- [ ] Custom domain is configured with DNS pointing to Vercel
|
|
213
204
|
- [ ] TLS certificate is provisioned (automatic on Vercel)
|
|
214
|
-
- [ ] `maxDuration` in `vercel.json` matches your Vercel plan limits
|
|
215
205
|
|
|
216
206
|
## Troubleshooting
|
|
217
207
|
|
|
218
|
-
| Problem | Cause
|
|
219
|
-
| -------------------- |
|
|
220
|
-
| Function timeout | Operation exceeds
|
|
221
|
-
| KV connection errors | KV store not linked or env vars missing
|
|
222
|
-
| 404 on
|
|
223
|
-
| Bundle too large | Unnecessary dependencies included
|
|
224
|
-
| Cold starts too slow |
|
|
208
|
+
| Problem | Cause | Solution |
|
|
209
|
+
| -------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
210
|
+
| Function timeout | Operation exceeds plan's max duration | Check plan limits (Hobby: 10s, Pro: 60s); upgrade plan or refactor the slow tool |
|
|
211
|
+
| KV connection errors | KV store not linked or env vars missing | Re-link the KV store in the Vercel dashboard; verify `KV_REST_API_URL` and `KV_REST_API_TOKEN` |
|
|
212
|
+
| 404 on every route | Build did not produce `.vercel/output/` | Ensure `frontmcp build --target vercel` ran before `vercel` deploys |
|
|
213
|
+
| Bundle too large | Unnecessary dependencies included | Review dependencies and remove unused packages to reduce bundle size |
|
|
214
|
+
| Cold starts too slow | Heavy decorator initialization | Lazy-load providers; defer heavy work until first tool call |
|
|
225
215
|
|
|
226
216
|
## Examples
|
|
227
217
|
|
|
228
|
-
| Example | Level | Description
|
|
229
|
-
| -------------------------------------------------------------------------------------- | ------------ |
|
|
230
|
-
| [`vercel-mcp-endpoint-test`](../examples/deploy-to-vercel/vercel-mcp-endpoint-test.md) | Advanced | Verify a Vercel-deployed FrontMCP server by testing health, tool listing, and tool invocation.
|
|
231
|
-
| [`vercel-with-kv`](../examples/deploy-to-vercel/vercel-with-kv.md) | Basic | Deploy a FrontMCP server to Vercel serverless functions with Vercel KV for session persistence. |
|
|
232
|
-
| [`vercel-with-skills-cache`](../examples/deploy-to-vercel/vercel-with-skills-cache.md) | Intermediate | Deploy a FrontMCP server to Vercel with skills enabled and KV-backed skill caching.
|
|
218
|
+
| Example | Level | Description |
|
|
219
|
+
| -------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
220
|
+
| [`vercel-mcp-endpoint-test`](../examples/deploy-to-vercel/vercel-mcp-endpoint-test.md) | Advanced | 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`. |
|
|
221
|
+
| [`vercel-with-kv`](../examples/deploy-to-vercel/vercel-with-kv.md) | Basic | 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. |
|
|
222
|
+
| [`vercel-with-skills-cache`](../examples/deploy-to-vercel/vercel-with-skills-cache.md) | Intermediate | 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. |
|
|
233
223
|
|
|
234
224
|
> See all examples in [`examples/deploy-to-vercel/`](../examples/deploy-to-vercel/)
|
|
235
225
|
|
|
236
226
|
## Reference
|
|
237
227
|
|
|
238
|
-
- **
|
|
228
|
+
- **Vercel Build Output API v3:** https://vercel.com/docs/build-output-api/v3
|
|
239
229
|
- **Related skills:** `deploy-to-node`, `deploy-to-lambda`
|
|
@@ -39,6 +39,8 @@ Configure MCP clients to connect to your FrontMCP server. Covers all transport t
|
|
|
39
39
|
| Background daemon on specific port | HTTP | `my-server daemon start -p 4000` | `type: "http"`, `url` |
|
|
40
40
|
| Vibe coding with AI agent (dev mode) | HTTP | `frontmcp dev` | `type: "http"`, `url` |
|
|
41
41
|
|
|
42
|
+
> **About `daemon` subcommands:** `daemon start | stop | status | logs` are subcommands of the **CLI binary you build with `frontmcp build --target cli`** — the build emits them into your CLI executable. They are NOT subcommands of the global `frontmcp` CLI itself. The framework-level equivalent is `frontmcp socket <entry>` (with `-b` for background, `-s` for socket path). Use whichever matches the binary the user installs.
|
|
43
|
+
|
|
42
44
|
## Development with AI Coding Agents
|
|
43
45
|
|
|
44
46
|
When building a FrontMCP server with a coding agent (Claude Code, Cursor, Windsurf), use **HTTP transport with `frontmcp dev`** for live hot reload. The agent edits code, the server auto-restarts, and the MCP client reconnects — no manual restart needed.
|
|
@@ -38,6 +38,21 @@ Entry point for building MCP server components. This skill helps you find the ri
|
|
|
38
38
|
|
|
39
39
|
> **Decision:** Use this skill when you need to figure out WHAT to build. Use the specific skill when you already know.
|
|
40
40
|
|
|
41
|
+
## Prerequisites
|
|
42
|
+
|
|
43
|
+
- A scaffolded FrontMCP project (see `frontmcp-setup` if you don't have one).
|
|
44
|
+
- Familiarity with TypeScript decorators and Zod schemas — every component is decorator-driven and validates I/O via Zod.
|
|
45
|
+
- Decide whether you're adding to an existing `@App` or composing a new one (multi-app projects: see `multi-app-composition`).
|
|
46
|
+
|
|
47
|
+
## Steps
|
|
48
|
+
|
|
49
|
+
This is a router skill. The "steps" here are how to choose the right child skill, not how to implement a component.
|
|
50
|
+
|
|
51
|
+
1. **Identify the component type** using the Scenario Routing Table below.
|
|
52
|
+
2. **Open the matching skill** (e.g. `create-tool`, `create-resource`) and follow its Steps section.
|
|
53
|
+
3. **Compose**, if needed: most non-trivial features need two or more components (e.g. tool + provider, resource + adapter). Read each child skill independently before wiring them together.
|
|
54
|
+
4. **Test before integration** (`frontmcp-testing`) — every component type has a unit-test recipe.
|
|
55
|
+
|
|
41
56
|
## Scenario Routing Table
|
|
42
57
|
|
|
43
58
|
| Scenario | Skill | Description |
|
|
@@ -76,17 +91,17 @@ Entry point for building MCP server components. This skill helps you find the ri
|
|
|
76
91
|
|
|
77
92
|
## Cross-Cutting Patterns
|
|
78
93
|
|
|
79
|
-
| Pattern | Applies To | Rule
|
|
80
|
-
| ----------------- | --------------------------------- |
|
|
81
|
-
| Naming convention | Tools | Use `snake_case` for tool names (`get_weather`, not `getWeather`)
|
|
82
|
-
| Naming convention | Skills, resources | Use `kebab-case` for skill and resource names
|
|
83
|
-
| File naming | All components | Use `<name>.<type>.ts` pattern (e.g., `fetch-weather.tool.ts`)
|
|
84
|
-
| DI access | Tools, resources, prompts, agents | Use `this.get(TOKEN)` (throws) or `this.tryGet(TOKEN)` (returns undefined)
|
|
85
|
-
| Error handling | All components | Use `this.fail(err)` with MCP error classes, not raw `throw`
|
|
86
|
-
| Input validation | Tools | Always use Zod raw shapes (not `z.object()`) for `inputSchema`
|
|
87
|
-
| Output validation | Tools | Always define `outputSchema` to prevent data leaks
|
|
88
|
-
| Registration | All components |
|
|
89
|
-
| Test files | All components | Use `.spec.ts` extension, never `.test.ts`
|
|
94
|
+
| Pattern | Applies To | Rule |
|
|
95
|
+
| ----------------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| Naming convention | Tools | Use `snake_case` for tool names (`get_weather`, not `getWeather`) |
|
|
97
|
+
| Naming convention | Skills, resources | Use `kebab-case` for skill and resource names |
|
|
98
|
+
| File naming | All components | Use `<name>.<type>.ts` pattern (e.g., `fetch-weather.tool.ts`) |
|
|
99
|
+
| DI access | Tools, resources, prompts, agents | Use `this.get(TOKEN)` (throws) or `this.tryGet(TOKEN)` (returns undefined) |
|
|
100
|
+
| Error handling | All components | Use `this.fail(err)` with MCP error classes, not raw `throw` |
|
|
101
|
+
| Input validation | Tools | Always use Zod raw shapes (not `z.object()`) for `inputSchema` |
|
|
102
|
+
| Output validation | Tools | Always define `outputSchema` to prevent data leaks |
|
|
103
|
+
| Registration | All components | **Best practice:** register components in their owning `@App`. `@FrontMcp` also accepts entity arrays at the top level (`tools`, `resources`, `skills`, `providers`, `plugins`, `jobs`, `channels`, `authorities`) for simple single-app servers, but `@App` provides modularity, per-app auth, and lifecycle hooks. |
|
|
104
|
+
| Test files | All components | Use `.spec.ts` extension, never `.test.ts` |
|
|
90
105
|
|
|
91
106
|
## Common Patterns
|
|
92
107
|
|
|
@@ -121,6 +136,166 @@ Entry point for building MCP server components. This skill helps you find the ri
|
|
|
121
136
|
| DI token not resolving | Provider not registered in scope | Register the provider in the `providers` array of the same `@App` |
|
|
122
137
|
| Need both AI guidance and tool execution | Used `create-skill` but need tools too | Switch to `create-skill-with-tools` which combines instructions with registered tools |
|
|
123
138
|
|
|
139
|
+
## Examples
|
|
140
|
+
|
|
141
|
+
Each reference has matching examples under [`examples/<reference>/`](./examples/):
|
|
142
|
+
|
|
143
|
+
### `create-adapter`
|
|
144
|
+
|
|
145
|
+
| Example | Level | Description |
|
|
146
|
+
| ----------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
147
|
+
| [`basic-api-adapter`](./examples/create-adapter/basic-api-adapter.md) | Basic | A minimal adapter that fetches operation definitions from an external API and generates MCP tools. |
|
|
148
|
+
| [`namespaced-adapter`](./examples/create-adapter/namespaced-adapter.md) | Intermediate | An adapter that namespaces generated tools to avoid collisions and includes proper error handling for startup failures. |
|
|
149
|
+
|
|
150
|
+
### `create-agent-llm-config`
|
|
151
|
+
|
|
152
|
+
| Example | Level | Description |
|
|
153
|
+
| ---------------------------------------------------------------------------- | ----- | -------------------------------------------------------------------------- |
|
|
154
|
+
| [`anthropic-config`](./examples/create-agent-llm-config/anthropic-config.md) | Basic | Configuring an agent with the Anthropic provider and common model options. |
|
|
155
|
+
| [`openai-config`](./examples/create-agent-llm-config/openai-config.md) | Basic | Configuring an agent with the OpenAI provider and different model options. |
|
|
156
|
+
|
|
157
|
+
### `create-agent`
|
|
158
|
+
|
|
159
|
+
| Example | Level | Description |
|
|
160
|
+
| --------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------- |
|
|
161
|
+
| [`basic-agent-with-tools`](./examples/create-agent/basic-agent-with-tools.md) | Basic | An autonomous agent that uses inner tools to review GitHub pull requests. |
|
|
162
|
+
| [`custom-multi-pass-agent`](./examples/create-agent/custom-multi-pass-agent.md) | Intermediate | An agent that overrides `execute()` to perform multi-pass LLM reasoning with `this.completion()`. |
|
|
163
|
+
| [`nested-agents-with-swarm`](./examples/create-agent/nested-agents-with-swarm.md) | Advanced | Composing specialized sub-agents and configuring swarm-based handoff between agents. |
|
|
164
|
+
|
|
165
|
+
### `create-job`
|
|
166
|
+
|
|
167
|
+
| Example | Level | Description |
|
|
168
|
+
| ----------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------ |
|
|
169
|
+
| [`basic-report-job`](./examples/create-job/basic-report-job.md) | Basic | A minimal job that generates a report with progress tracking and structured output. |
|
|
170
|
+
| [`job-with-permissions`](./examples/create-job/job-with-permissions.md) | Advanced | A data export job with declarative permission controls, plus a function-style job for simple tasks. |
|
|
171
|
+
| [`job-with-retry`](./examples/create-job/job-with-retry.md) | Intermediate | A job that syncs data from an external API with automatic retry, exponential backoff, and batch progress tracking. |
|
|
172
|
+
|
|
173
|
+
### `create-plugin-hooks`
|
|
174
|
+
|
|
175
|
+
| Example | Level | Description |
|
|
176
|
+
| -------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
177
|
+
| [`basic-logging-plugin`](./examples/create-plugin-hooks/basic-logging-plugin.md) | Basic | Demonstrates a plugin that logs tool execution using `@Will` and `@Did` hook decorators from the pre-built `ToolHook` export. |
|
|
178
|
+
| [`caching-with-around`](./examples/create-plugin-hooks/caching-with-around.md) | Intermediate | Demonstrates wrapping tool execution with an `@Around` hook to implement result caching with TTL-based expiry. |
|
|
179
|
+
| [`tool-level-hooks-and-stage-replacement`](./examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md) | Advanced | Demonstrates two advanced patterns: adding `@Will`/`@Did` hooks directly on a `@Tool` class (scoped to that tool only), and using `@Stage` in a plugin to replace a flow stage entirely with a filtered mock. |
|
|
180
|
+
|
|
181
|
+
### `create-plugin`
|
|
182
|
+
|
|
183
|
+
| Example | Level | Description |
|
|
184
|
+
| -------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------- |
|
|
185
|
+
| [`basic-plugin-with-provider`](./examples/create-plugin/basic-plugin-with-provider.md) | Basic | A minimal plugin that contributes an injectable service via the `providers` and `exports` arrays. |
|
|
186
|
+
| [`configurable-dynamic-plugin`](./examples/create-plugin/configurable-dynamic-plugin.md) | Advanced | A plugin that accepts runtime configuration via `DynamicPlugin` and extends decorator metadata with custom fields. |
|
|
187
|
+
| [`plugin-with-context-extension`](./examples/create-plugin/plugin-with-context-extension.md) | Intermediate | A plugin that adds a `this.auditLog` property to all execution contexts using context extensions and module augmentation. |
|
|
188
|
+
|
|
189
|
+
### `create-prompt`
|
|
190
|
+
|
|
191
|
+
| Example | Level | Description |
|
|
192
|
+
| ---------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------- |
|
|
193
|
+
| [`basic-prompt`](./examples/create-prompt/basic-prompt.md) | Basic | A simple prompt that generates a structured code review message from user-provided arguments. |
|
|
194
|
+
| [`dynamic-rag-prompt`](./examples/create-prompt/dynamic-rag-prompt.md) | Advanced | A prompt that queries a knowledge base via DI to build context-aware messages at runtime. |
|
|
195
|
+
| [`multi-turn-debug-session`](./examples/create-prompt/multi-turn-debug-session.md) | Intermediate | A prompt that uses alternating user/assistant messages to guide a structured debugging conversation. |
|
|
196
|
+
|
|
197
|
+
### `create-provider`
|
|
198
|
+
|
|
199
|
+
| Example | Level | Description |
|
|
200
|
+
| ------------------------------------------------------------------------------------ | ------------ | ----------------------------------------------------------------------------------------------------- |
|
|
201
|
+
| [`basic-database-provider`](./examples/create-provider/basic-database-provider.md) | Basic | A provider that manages a database connection pool with `onInit()` and `onDestroy()` lifecycle hooks. |
|
|
202
|
+
| [`config-and-api-providers`](./examples/create-provider/config-and-api-providers.md) | Intermediate | A configuration provider with readonly environment settings and an HTTP API client provider. |
|
|
203
|
+
|
|
204
|
+
### `create-resource`
|
|
205
|
+
|
|
206
|
+
| Example | Level | Description |
|
|
207
|
+
| ------------------------------------------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------ |
|
|
208
|
+
| [`basic-static-resource`](./examples/create-resource/basic-static-resource.md) | Basic | A static resource that exposes application configuration at a fixed URI. |
|
|
209
|
+
| [`binary-and-multi-content`](./examples/create-resource/binary-and-multi-content.md) | Advanced | A resource serving binary blob data and a resource returning multiple content items. |
|
|
210
|
+
| [`parameterized-template`](./examples/create-resource/parameterized-template.md) | Intermediate | A resource template with typed URI parameters and argument autocompletion. |
|
|
211
|
+
|
|
212
|
+
### `create-skill-with-tools`
|
|
213
|
+
|
|
214
|
+
| Example | Level | Description |
|
|
215
|
+
| ------------------------------------------------------------------------------------------------ | ------------ | -------------------------------------------------------------------------------------------------------------------- |
|
|
216
|
+
| [`basic-tool-orchestration`](./examples/create-skill-with-tools/basic-tool-orchestration.md) | Basic | A skill that guides an AI client through a deploy workflow using referenced MCP tools. |
|
|
217
|
+
| [`directory-skill-with-tools`](./examples/create-skill-with-tools/directory-skill-with-tools.md) | Advanced | A directory-based skill loaded with `skillDir()`, plus a class-based skill using Agent Skills spec metadata fields. |
|
|
218
|
+
| [`incident-response-skill`](./examples/create-skill-with-tools/incident-response-skill.md) | Intermediate | A skill that uses object-style tool references with purpose descriptions and required flags, plus strict validation. |
|
|
219
|
+
|
|
220
|
+
### `create-skill`
|
|
221
|
+
|
|
222
|
+
| Example | Level | Description |
|
|
223
|
+
| --------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
224
|
+
| [`basic-inline-skill`](./examples/create-skill/basic-inline-skill.md) | Basic | A minimal instruction-only skill with inline content and the function builder alternative. |
|
|
225
|
+
| [`directory-based-skill`](./examples/create-skill/directory-based-skill.md) | Advanced | A skill loaded from a directory structure with SKILL.md frontmatter, plus file-based and URL-based instruction sources. |
|
|
226
|
+
| [`parameterized-skill`](./examples/create-skill/parameterized-skill.md) | Intermediate | A skill with customizable parameters, usage examples for AI guidance, and controlled visibility. |
|
|
227
|
+
|
|
228
|
+
### `create-tool-annotations`
|
|
229
|
+
|
|
230
|
+
| Example | Level | Description |
|
|
231
|
+
| ------------------------------------------------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
232
|
+
| [`destructive-delete-tool`](./examples/create-tool-annotations/destructive-delete-tool.md) | Intermediate | Demonstrates annotating a tool that deletes data, enabling MCP clients to warn users before execution. |
|
|
233
|
+
| [`readonly-query-tool`](./examples/create-tool-annotations/readonly-query-tool.md) | Basic | Demonstrates annotating a tool that only reads data, signaling to MCP clients that it has no side effects and is safe to retry. |
|
|
234
|
+
|
|
235
|
+
### `create-tool-output-schema-types`
|
|
236
|
+
|
|
237
|
+
| Example | Level | Description |
|
|
238
|
+
| ---------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
239
|
+
| [`primitive-and-media-outputs`](./examples/create-tool-output-schema-types/primitive-and-media-outputs.md) | Intermediate | Demonstrates using primitive string literals and media types as `outputSchema` for tools that return plain text, images, or multi-content arrays. |
|
|
240
|
+
| [`zod-raw-shape-output`](./examples/create-tool-output-schema-types/zod-raw-shape-output.md) | Basic | Demonstrates the recommended approach of using a Zod raw shape as `outputSchema` for structured, validated JSON output. |
|
|
241
|
+
| [`zod-schema-advanced-output`](./examples/create-tool-output-schema-types/zod-schema-advanced-output.md) | Advanced | Demonstrates using full Zod schema objects (not raw shapes) as `outputSchema`, including `z.object()`, `z.array()`, `z.union()`, and `z.discriminatedUnion()`. |
|
|
242
|
+
|
|
243
|
+
### `create-tool`
|
|
244
|
+
|
|
245
|
+
| Example | Level | Description |
|
|
246
|
+
| -------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
|
|
247
|
+
| [`basic-class-tool`](./examples/create-tool/basic-class-tool.md) | Basic | A minimal tool using the class-based pattern with Zod input validation and output schema. |
|
|
248
|
+
| [`tool-with-di-and-errors`](./examples/create-tool/tool-with-di-and-errors.md) | Intermediate | A tool that resolves a database service via DI and uses `this.fail()` for business-logic errors. |
|
|
249
|
+
| [`tool-with-rate-limiting-and-progress`](./examples/create-tool/tool-with-rate-limiting-and-progress.md) | Advanced | A batch processing tool that uses rate limiting, concurrency control, progress notifications, and annotations. |
|
|
250
|
+
|
|
251
|
+
### `create-workflow`
|
|
252
|
+
|
|
253
|
+
| Example | Level | Description |
|
|
254
|
+
| -------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
255
|
+
| [`basic-deploy-pipeline`](./examples/create-workflow/basic-deploy-pipeline.md) | Basic | A linear workflow that builds, tests, and deploys a service with step dependencies and dynamic input. |
|
|
256
|
+
| [`parallel-validation-pipeline`](./examples/create-workflow/parallel-validation-pipeline.md) | Intermediate | A workflow that validates multiple datasets in parallel, then conditionally merges results or notifies on failure. |
|
|
257
|
+
| [`webhook-triggered-workflow`](./examples/create-workflow/webhook-triggered-workflow.md) | Advanced | A CI/CD workflow triggered by a webhook, featuring `continueOnError`, per-step conditions, and the `workflow()` function builder. |
|
|
258
|
+
|
|
259
|
+
### `decorators-guide`
|
|
260
|
+
|
|
261
|
+
| Example | Level | Description |
|
|
262
|
+
| ------------------------------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
263
|
+
| [`agent-skill-job-workflow`](./examples/decorators-guide/agent-skill-job-workflow.md) | Advanced | Demonstrates the advanced decorator types: `@Agent` for autonomous AI agents, `@Skill` for knowledge packages, `@Job` for background tasks, and `@Workflow` for multi-step orchestration. |
|
|
264
|
+
| [`basic-server-with-app-and-tools`](./examples/decorators-guide/basic-server-with-app-and-tools.md) | Basic | Demonstrates the minimal decorator hierarchy to create a working FrontMCP server with one app containing a tool and a resource. |
|
|
265
|
+
| [`multi-app-with-plugins-and-providers`](./examples/decorators-guide/multi-app-with-plugins-and-providers.md) | Intermediate | Demonstrates a server with multiple `@App` modules, a `@Provider` for dependency injection, and a `@Plugin` for cross-cutting concerns. |
|
|
266
|
+
|
|
267
|
+
### `openapi-adapter`
|
|
268
|
+
|
|
269
|
+
| Example | Level | Description |
|
|
270
|
+
| ---------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
271
|
+
| [`basic-openapi-adapter`](./examples/openapi-adapter/basic-openapi-adapter.md) | Basic | Demonstrates converting an OpenAPI specification into MCP tools automatically using `OpenapiAdapter` with minimal configuration. |
|
|
272
|
+
| [`authenticated-adapter-with-polling`](./examples/openapi-adapter/authenticated-adapter-with-polling.md) | Intermediate | Demonstrates configuring authentication (API key and bearer token) and automatic spec polling for OpenAPI adapters. |
|
|
273
|
+
| [`format-resolution-and-custom-resolvers`](./examples/openapi-adapter/format-resolution-and-custom-resolvers.md) | Intermediate | Demonstrates using built-in and custom format resolvers to enrich tool input schemas with concrete constraints from OpenAPI format values. |
|
|
274
|
+
| [`ref-security-and-filtering`](./examples/openapi-adapter/ref-security-and-filtering.md) | Intermediate | Demonstrates configuring $ref resolution security to prevent SSRF attacks and filtering which API operations become MCP tools. |
|
|
275
|
+
| [`multi-api-hub-with-inline-spec`](./examples/openapi-adapter/multi-api-hub-with-inline-spec.md) | Advanced | Demonstrates registering multiple OpenAPI adapters from different APIs in a single app, including one with an inline spec definition instead of a remote URL. |
|
|
276
|
+
|
|
277
|
+
### `official-plugins`
|
|
278
|
+
|
|
279
|
+
| Example | Level | Description |
|
|
280
|
+
| ------------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
281
|
+
| [`cache-and-feature-flags`](./examples/official-plugins/cache-and-feature-flags.md) | Intermediate | Demonstrates combining the Cache plugin for tool result caching with the Feature Flags plugin for gating tools behind flags. |
|
|
282
|
+
| [`production-multi-plugin-setup`](./examples/official-plugins/production-multi-plugin-setup.md) | Advanced | Demonstrates a production-ready server configuration combining CodeCall, Remember, Approval, Cache, and Feature Flags plugins with Redis storage and external flag services. |
|
|
283
|
+
| [`remember-plugin-session-memory`](./examples/official-plugins/remember-plugin-session-memory.md) | Basic | Demonstrates installing the Remember plugin and using `this.remember` in tools to store and retrieve session memory. |
|
|
284
|
+
|
|
285
|
+
## Accessing This Skill
|
|
286
|
+
|
|
287
|
+
Skills are distributed as plain SKILL.md files plus a sibling `references/`
|
|
288
|
+
and `examples/` tree, so consumers can pick whichever access mode fits:
|
|
289
|
+
|
|
290
|
+
| Mode | How it works |
|
|
291
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
292
|
+
| **Filesystem** | Read `libs/skills/catalog/frontmcp-development/` directly from a clone of the catalog repo, or from a published `@frontmcp/skills` install. SKILL.md is the entry point. |
|
|
293
|
+
| **`frontmcp` CLI** | `frontmcp skills list`, `frontmcp skills read frontmcp-development`, `frontmcp skills read frontmcp-development:references/<file>.md`, `frontmcp skills install frontmcp-development` — no server required. |
|
|
294
|
+
| **MCP `skill://`** | When a developer mounts this skill into their own FrontMCP server (`@FrontMcp({ skills: [...] })`), the SDK exposes it via SEP-2640 resources: `skill://frontmcp-development/SKILL.md`, `skill://frontmcp-development/references/{file}.md`, etc. The server’s `skill://index.json` returns the SEP-2640 discovery document for everything mounted on it. |
|
|
295
|
+
|
|
296
|
+
The catalog itself is **not** an MCP server. The `skill://` URIs only resolve
|
|
297
|
+
when a server has been configured to host this skill.
|
|
298
|
+
|
|
124
299
|
## Reference
|
|
125
300
|
|
|
126
301
|
- [FrontMCP Overview](https://docs.agentfront.dev/frontmcp/fundamentals/overview)
|
|
@@ -90,5 +90,5 @@ class ReviewApp {}
|
|
|
90
90
|
|
|
91
91
|
## Related
|
|
92
92
|
|
|
93
|
-
- See `create-agent` for streaming with `streamCompletion()`, sub-agents, and swarm
|
|
93
|
+
- See `create-agent` for streaming with `streamCompletion()`, sub-agents, and swarm visibility
|
|
94
94
|
- See `create-agent-llm-config` for provider-specific options like `maxTokens` and `temperature`
|