@frontmcp/skills 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +135 -0
  3. package/catalog/TEMPLATE.md +49 -0
  4. package/catalog/adapters/create-adapter/SKILL.md +127 -0
  5. package/catalog/adapters/official-adapters/SKILL.md +136 -0
  6. package/catalog/auth/configure-auth/SKILL.md +250 -0
  7. package/catalog/auth/configure-auth/references/auth-modes.md +77 -0
  8. package/catalog/auth/configure-session/SKILL.md +201 -0
  9. package/catalog/config/configure-elicitation/SKILL.md +136 -0
  10. package/catalog/config/configure-http/SKILL.md +167 -0
  11. package/catalog/config/configure-throttle/SKILL.md +189 -0
  12. package/catalog/config/configure-throttle/references/guard-config.md +68 -0
  13. package/catalog/config/configure-transport/SKILL.md +151 -0
  14. package/catalog/config/configure-transport/references/protocol-presets.md +57 -0
  15. package/catalog/deployment/build-for-browser/SKILL.md +95 -0
  16. package/catalog/deployment/build-for-cli/SKILL.md +100 -0
  17. package/catalog/deployment/build-for-sdk/SKILL.md +218 -0
  18. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +192 -0
  19. package/catalog/deployment/deploy-to-lambda/SKILL.md +304 -0
  20. package/catalog/deployment/deploy-to-node/SKILL.md +229 -0
  21. package/catalog/deployment/deploy-to-node/references/Dockerfile.example +45 -0
  22. package/catalog/deployment/deploy-to-vercel/SKILL.md +196 -0
  23. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +60 -0
  24. package/catalog/development/create-agent/SKILL.md +563 -0
  25. package/catalog/development/create-agent/references/llm-config.md +46 -0
  26. package/catalog/development/create-job/SKILL.md +566 -0
  27. package/catalog/development/create-prompt/SKILL.md +400 -0
  28. package/catalog/development/create-provider/SKILL.md +233 -0
  29. package/catalog/development/create-resource/SKILL.md +437 -0
  30. package/catalog/development/create-skill/SKILL.md +526 -0
  31. package/catalog/development/create-skill-with-tools/SKILL.md +579 -0
  32. package/catalog/development/create-tool/SKILL.md +418 -0
  33. package/catalog/development/create-tool/references/output-schema-types.md +56 -0
  34. package/catalog/development/create-tool/references/tool-annotations.md +34 -0
  35. package/catalog/development/create-workflow/SKILL.md +709 -0
  36. package/catalog/development/decorators-guide/SKILL.md +598 -0
  37. package/catalog/plugins/create-plugin/SKILL.md +336 -0
  38. package/catalog/plugins/create-plugin-hooks/SKILL.md +282 -0
  39. package/catalog/plugins/official-plugins/SKILL.md +667 -0
  40. package/catalog/setup/frontmcp-skills-usage/SKILL.md +200 -0
  41. package/catalog/setup/multi-app-composition/SKILL.md +358 -0
  42. package/catalog/setup/nx-workflow/SKILL.md +357 -0
  43. package/catalog/setup/project-structure-nx/SKILL.md +186 -0
  44. package/catalog/setup/project-structure-standalone/SKILL.md +153 -0
  45. package/catalog/setup/setup-project/SKILL.md +493 -0
  46. package/catalog/setup/setup-redis/SKILL.md +385 -0
  47. package/catalog/setup/setup-sqlite/SKILL.md +359 -0
  48. package/catalog/skills-manifest.json +414 -0
  49. package/catalog/testing/setup-testing/SKILL.md +539 -0
  50. package/catalog/testing/setup-testing/references/test-auth.md +88 -0
  51. package/catalog/testing/setup-testing/references/test-browser-build.md +57 -0
  52. package/catalog/testing/setup-testing/references/test-cli-binary.md +48 -0
  53. package/catalog/testing/setup-testing/references/test-direct-client.md +62 -0
  54. package/catalog/testing/setup-testing/references/test-e2e-handler.md +51 -0
  55. package/catalog/testing/setup-testing/references/test-tool-unit.md +41 -0
  56. package/package.json +34 -0
  57. package/src/index.d.ts +3 -0
  58. package/src/index.js +16 -0
  59. package/src/index.js.map +1 -0
  60. package/src/loader.d.ts +46 -0
  61. package/src/loader.js +75 -0
  62. package/src/loader.js.map +1 -0
  63. package/src/manifest.d.ts +81 -0
  64. package/src/manifest.js +26 -0
  65. package/src/manifest.js.map +1 -0
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: deploy-to-vercel
3
+ description: Deploy a FrontMCP server to Vercel serverless functions. Use when deploying to Vercel, configuring Vercel KV, or setting up serverless MCP.
4
+ tags:
5
+ - deployment
6
+ - vercel
7
+ - serverless
8
+ - edge
9
+ parameters:
10
+ - name: region
11
+ description: Vercel deployment region
12
+ type: string
13
+ required: false
14
+ default: iad1
15
+ - name: kv-store
16
+ description: Name of the Vercel KV store to use for session and skill storage
17
+ type: string
18
+ required: false
19
+ examples:
20
+ - scenario: Deploy to Vercel with Vercel KV
21
+ parameters:
22
+ kv-store: frontmcp-kv
23
+ expected-outcome: A FrontMCP server running as Vercel serverless functions with Vercel KV providing persistent storage for sessions and skill state.
24
+ - scenario: Deploy with custom domain
25
+ parameters:
26
+ region: cdg1
27
+ expected-outcome: A FrontMCP server accessible via a custom domain with automatic TLS, deployed to the Paris region.
28
+ compatibility: Vercel CLI required
29
+ license: Apache-2.0
30
+ visibility: both
31
+ priority: 10
32
+ metadata:
33
+ category: deployment
34
+ difficulty: intermediate
35
+ platform: vercel
36
+ docs: https://docs.agentfront.dev/frontmcp/deployment/serverless
37
+ ---
38
+
39
+ # Deploy a FrontMCP Server to Vercel
40
+
41
+ This skill guides you through deploying a FrontMCP server to Vercel serverless functions with Vercel KV for persistent storage.
42
+
43
+ ## Prerequisites
44
+
45
+ - A Vercel account (https://vercel.com)
46
+ - Vercel CLI installed: `npm install -g vercel`
47
+ - A built FrontMCP project
48
+
49
+ ## Step 1: Build for Vercel
50
+
51
+ ```bash
52
+ frontmcp build --target vercel
53
+ ```
54
+
55
+ This produces a Vercel-compatible output structure with an `api/` directory containing the serverless function entry points, optimized bundles for cold-start performance, and a `vercel.json` configuration file.
56
+
57
+ ## Step 2: Configure vercel.json
58
+
59
+ Create or update `vercel.json` in your project root:
60
+
61
+ ```json
62
+ {
63
+ "rewrites": [{ "source": "/(.*)", "destination": "/api/frontmcp" }],
64
+ "functions": {
65
+ "api/frontmcp.ts": {
66
+ "memory": 1024,
67
+ "maxDuration": 60
68
+ }
69
+ },
70
+ "regions": ["iad1"],
71
+ "headers": [
72
+ {
73
+ "source": "/(.*)",
74
+ "headers": [
75
+ { "key": "X-Content-Type-Options", "value": "nosniff" },
76
+ { "key": "X-Frame-Options", "value": "DENY" }
77
+ ]
78
+ }
79
+ ]
80
+ }
81
+ ```
82
+
83
+ The rewrite rule sends all requests to the single FrontMCP API handler, which internally routes MCP and HTTP requests.
84
+
85
+ ## Step 3: Configure Vercel KV Storage
86
+
87
+ Use the `vercel-kv` provider so FrontMCP stores sessions, skill cache, and plugin state in Vercel KV (powered by Upstash Redis):
88
+
89
+ ```typescript
90
+ import { FrontMcp, App } from '@frontmcp/sdk';
91
+
92
+ @App()
93
+ class MyApp {}
94
+
95
+ @FrontMcp({
96
+ info: { name: 'my-server', version: '1.0.0' },
97
+ apps: [MyApp],
98
+ redis: { provider: 'vercel-kv' },
99
+ skillsConfig: {
100
+ enabled: true,
101
+ cache: {
102
+ enabled: true,
103
+ redis: { provider: 'vercel-kv' },
104
+ ttlMs: 60000,
105
+ },
106
+ },
107
+ })
108
+ class MyServer {}
109
+ ```
110
+
111
+ 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.
112
+
113
+ ## Step 4: Environment Variables
114
+
115
+ 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:
116
+
117
+ ```bash
118
+ vercel env add KV_REST_API_URL "https://your-kv-store.kv.vercel-storage.com"
119
+ vercel env add KV_REST_API_TOKEN "your-token"
120
+ vercel env add NODE_ENV production
121
+ vercel env add LOG_LEVEL info
122
+ ```
123
+
124
+ | Variable | Description | Required |
125
+ | ------------------- | ------------------------------ | ----------- |
126
+ | `KV_REST_API_URL` | Vercel KV REST endpoint | If using KV |
127
+ | `KV_REST_API_TOKEN` | Vercel KV authentication token | If using KV |
128
+ | `NODE_ENV` | Runtime environment | Yes |
129
+ | `LOG_LEVEL` | Logging verbosity | No |
130
+
131
+ ## Step 5: Deploy
132
+
133
+ ### Preview Deployment
134
+
135
+ ```bash
136
+ vercel
137
+ ```
138
+
139
+ Creates a preview deployment with a unique URL for validation.
140
+
141
+ ### Production Deployment
142
+
143
+ ```bash
144
+ vercel --prod
145
+ ```
146
+
147
+ Deploys to your production domain.
148
+
149
+ ### Custom Domain
150
+
151
+ ```bash
152
+ vercel domains add mcp.example.com
153
+ ```
154
+
155
+ Configure your DNS provider to point the domain to Vercel. TLS certificates are provisioned automatically.
156
+
157
+ ## Step 6: Verify
158
+
159
+ ```bash
160
+ # Health check
161
+ curl https://your-project.vercel.app/health
162
+
163
+ # Test MCP endpoint
164
+ curl -X POST https://your-project.vercel.app/mcp \
165
+ -H "Content-Type: application/json" \
166
+ -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
167
+ ```
168
+
169
+ ## Cold Start Notes
170
+
171
+ Vercel serverless functions experience cold starts after periods of inactivity. To minimize impact:
172
+
173
+ - The `frontmcp build --target vercel` output is optimized for bundle size. Avoid adding unnecessary dependencies.
174
+ - Consider Vercel's **Fluid Compute** for latency-sensitive workloads.
175
+ - Keep function memory at 1024 MB for faster initialization.
176
+
177
+ ### Execution Limits
178
+
179
+ | Plan | Max Duration |
180
+ | ---------- | ------------ |
181
+ | Hobby | 10 seconds |
182
+ | Pro | 60 seconds |
183
+ | Enterprise | 900 seconds |
184
+
185
+ Long-running MCP operations should complete within these limits or use streaming responses.
186
+
187
+ ### Statelessness
188
+
189
+ Serverless functions are stateless between invocations. All persistent state must go through Vercel KV. FrontMCP handles this automatically when `{ provider: 'vercel-kv' }` is configured.
190
+
191
+ ## Troubleshooting
192
+
193
+ - **Function timeout**: Increase `maxDuration` in `vercel.json` or optimize the operation. Check your Vercel plan limits.
194
+ - **KV connection errors**: Verify the KV store is linked and environment variables are set. Re-link the store in the dashboard if needed.
195
+ - **404 on API routes**: Confirm the rewrite rule in `vercel.json` routes traffic to `/api/frontmcp`.
196
+ - **Bundle too large**: Run `frontmcp build --target vercel --analyze` to inspect the bundle.
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://openapi.vercel.sh/vercel.json",
3
+ "framework": null,
4
+ "buildCommand": "frontmcp build --target vercel",
5
+ "outputDirectory": "dist",
6
+ "rewrites": [
7
+ {
8
+ "source": "/(.*)",
9
+ "destination": "/api/frontmcp"
10
+ }
11
+ ],
12
+ "functions": {
13
+ "api/frontmcp.js": {
14
+ "memory": 512,
15
+ "maxDuration": 30
16
+ }
17
+ },
18
+ "regions": ["iad1"],
19
+ "headers": [
20
+ {
21
+ "source": "/health",
22
+ "headers": [
23
+ {
24
+ "key": "Cache-Control",
25
+ "value": "no-store"
26
+ }
27
+ ]
28
+ },
29
+ {
30
+ "source": "/mcp",
31
+ "headers": [
32
+ {
33
+ "key": "Cache-Control",
34
+ "value": "no-store"
35
+ },
36
+ {
37
+ "key": "X-Content-Type-Options",
38
+ "value": "nosniff"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "source": "/(.*)",
44
+ "headers": [
45
+ {
46
+ "key": "X-Frame-Options",
47
+ "value": "DENY"
48
+ },
49
+ {
50
+ "key": "X-Content-Type-Options",
51
+ "value": "nosniff"
52
+ },
53
+ {
54
+ "key": "Referrer-Policy",
55
+ "value": "strict-origin-when-cross-origin"
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ }