@frontmcp/skills 0.0.1 → 1.0.0-beta.11

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 (104) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +58 -13
  3. package/catalog/frontmcp-config/SKILL.md +156 -0
  4. package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +5 -0
  5. package/catalog/frontmcp-config/references/configure-auth.md +243 -0
  6. package/catalog/frontmcp-config/references/configure-elicitation.md +183 -0
  7. package/catalog/frontmcp-config/references/configure-http.md +210 -0
  8. package/catalog/frontmcp-config/references/configure-session.md +210 -0
  9. package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +5 -0
  10. package/catalog/frontmcp-config/references/configure-throttle.md +234 -0
  11. package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +5 -0
  12. package/catalog/frontmcp-config/references/configure-transport.md +200 -0
  13. package/catalog/frontmcp-config/references/setup-redis.md +9 -0
  14. package/catalog/frontmcp-config/references/setup-sqlite.md +9 -0
  15. package/catalog/frontmcp-deployment/SKILL.md +152 -0
  16. package/catalog/frontmcp-deployment/references/build-for-browser.md +143 -0
  17. package/catalog/frontmcp-deployment/references/build-for-cli.md +191 -0
  18. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +66 -20
  19. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +218 -0
  20. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +77 -59
  21. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +18 -4
  22. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +69 -36
  23. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +65 -0
  24. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +229 -0
  25. package/catalog/frontmcp-development/SKILL.md +126 -0
  26. package/catalog/frontmcp-development/references/create-adapter.md +170 -0
  27. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +10 -5
  28. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +83 -40
  29. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +62 -15
  30. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +100 -7
  31. package/catalog/frontmcp-development/references/create-plugin.md +506 -0
  32. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +65 -22
  33. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +63 -23
  34. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +148 -26
  35. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +174 -20
  36. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +114 -28
  37. package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +5 -0
  38. package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +5 -0
  39. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +172 -23
  40. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +61 -14
  41. package/catalog/frontmcp-development/references/decorators-guide.md +754 -0
  42. package/catalog/frontmcp-development/references/official-adapters.md +199 -0
  43. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +97 -27
  44. package/catalog/frontmcp-extensibility/SKILL.md +103 -0
  45. package/catalog/frontmcp-extensibility/references/vectoriadb.md +289 -0
  46. package/catalog/frontmcp-guides/SKILL.md +420 -0
  47. package/catalog/frontmcp-guides/references/example-knowledge-base.md +641 -0
  48. package/catalog/frontmcp-guides/references/example-task-manager.md +517 -0
  49. package/catalog/frontmcp-guides/references/example-weather-api.md +297 -0
  50. package/catalog/frontmcp-production-readiness/SKILL.md +98 -0
  51. package/catalog/frontmcp-production-readiness/references/common-checklist.md +156 -0
  52. package/catalog/frontmcp-production-readiness/references/production-browser.md +46 -0
  53. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +62 -0
  54. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +61 -0
  55. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +52 -0
  56. package/catalog/frontmcp-production-readiness/references/production-lambda.md +53 -0
  57. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +66 -0
  58. package/catalog/frontmcp-production-readiness/references/production-node-server.md +61 -0
  59. package/catalog/frontmcp-production-readiness/references/production-vercel.md +52 -0
  60. package/catalog/frontmcp-setup/SKILL.md +132 -0
  61. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +280 -0
  62. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +66 -19
  63. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +79 -17
  64. package/catalog/frontmcp-setup/references/project-structure-nx.md +251 -0
  65. package/catalog/frontmcp-setup/references/project-structure-standalone.md +217 -0
  66. package/catalog/frontmcp-setup/references/readme-guide.md +226 -0
  67. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +63 -58
  68. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +60 -82
  69. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +65 -72
  70. package/catalog/frontmcp-testing/SKILL.md +135 -0
  71. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +79 -63
  72. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +5 -0
  73. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +5 -0
  74. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +5 -0
  75. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +5 -0
  76. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +5 -0
  77. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +6 -0
  78. package/catalog/skills-manifest.json +337 -382
  79. package/package.json +2 -2
  80. package/src/index.d.ts +1 -1
  81. package/src/index.js.map +1 -1
  82. package/src/loader.js +0 -1
  83. package/src/loader.js.map +1 -1
  84. package/src/manifest.d.ts +15 -3
  85. package/src/manifest.js +3 -3
  86. package/src/manifest.js.map +1 -1
  87. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  88. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  89. package/catalog/auth/configure-auth/SKILL.md +0 -250
  90. package/catalog/auth/configure-session/SKILL.md +0 -201
  91. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  92. package/catalog/config/configure-http/SKILL.md +0 -167
  93. package/catalog/config/configure-throttle/SKILL.md +0 -189
  94. package/catalog/config/configure-transport/SKILL.md +0 -151
  95. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  96. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  97. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  98. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  99. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  100. package/catalog/development/decorators-guide/SKILL.md +0 -598
  101. package/catalog/plugins/create-plugin/SKILL.md +0 -336
  102. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  103. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  104. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
@@ -0,0 +1,297 @@
1
+ ---
2
+ name: example-weather-api
3
+ description: Beginner MCP server with a weather lookup tool, static resource, Zod schemas, and E2E tests
4
+ ---
5
+
6
+ # Example: Weather API (Beginner)
7
+
8
+ > Skills used: setup-project, create-tool, create-resource, setup-testing, deploy-to-node
9
+
10
+ A complete beginner MCP server that exposes a weather lookup tool and a static resource listing supported cities. Demonstrates server setup, Zod input/output schemas, `this.fetch()` for HTTP calls, `this.fail()` for error handling, and both unit and E2E tests.
11
+
12
+ ---
13
+
14
+ ## Project Setup
15
+
16
+ ```jsonc
17
+ // package.json
18
+ {
19
+ "name": "weather-api",
20
+ "version": "1.0.0",
21
+ "private": true,
22
+ "scripts": {
23
+ "build": "frontmcp build",
24
+ "start": "frontmcp start",
25
+ "test": "jest --coverage",
26
+ },
27
+ "dependencies": {
28
+ "@frontmcp/sdk": "^1.0.0",
29
+ "zod": "^3.23.0",
30
+ },
31
+ "devDependencies": {
32
+ "@frontmcp/testing": "^1.0.0",
33
+ "jest": "^29.0.0",
34
+ "ts-jest": "^29.0.0",
35
+ "typescript": "^5.4.0",
36
+ },
37
+ }
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Server Entry Point
43
+
44
+ ```typescript
45
+ // src/main.ts
46
+ import { FrontMcp } from '@frontmcp/sdk';
47
+ import { WeatherApp } from './weather.app';
48
+
49
+ @FrontMcp({
50
+ info: { name: 'weather-api', version: '1.0.0' },
51
+ apps: [WeatherApp],
52
+ })
53
+ export default class WeatherServer {}
54
+ ```
55
+
56
+ ---
57
+
58
+ ## App Registration
59
+
60
+ ```typescript
61
+ // src/weather.app.ts
62
+ import { App } from '@frontmcp/sdk';
63
+ import { GetWeatherTool } from './tools/get-weather.tool';
64
+ import { CitiesResource } from './resources/cities.resource';
65
+
66
+ @App({
67
+ name: 'Weather',
68
+ description: 'Weather lookup tools and city data',
69
+ tools: [GetWeatherTool],
70
+ resources: [CitiesResource],
71
+ })
72
+ export class WeatherApp {}
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Tool: Get Weather
78
+
79
+ ```typescript
80
+ // src/tools/get-weather.tool.ts
81
+ import { Tool, ToolContext } from '@frontmcp/sdk';
82
+ import { z } from 'zod';
83
+
84
+ @Tool({
85
+ name: 'get_weather',
86
+ description: 'Get current weather for a city',
87
+ inputSchema: {
88
+ city: z.string().min(1).describe('City name'),
89
+ units: z.enum(['celsius', 'fahrenheit']).default('celsius').describe('Temperature units'),
90
+ },
91
+ outputSchema: {
92
+ temperature: z.number(),
93
+ condition: z.string(),
94
+ humidity: z.number(),
95
+ city: z.string(),
96
+ },
97
+ })
98
+ export class GetWeatherTool extends ToolContext {
99
+ async execute(input: { city: string; units: 'celsius' | 'fahrenheit' }) {
100
+ const url = `https://api.weather.example.com/v1/current?city=${encodeURIComponent(input.city)}&units=${input.units}`;
101
+
102
+ let response: Response;
103
+ try {
104
+ response = await this.fetch(url);
105
+ } catch (err) {
106
+ this.fail(new Error(`Weather API unreachable: ${String(err)}`));
107
+ }
108
+
109
+ if (!response.ok) {
110
+ this.fail(new Error(`Weather API error: ${response.status} ${response.statusText}`));
111
+ }
112
+
113
+ const data = await response.json();
114
+
115
+ return {
116
+ temperature: data.temp,
117
+ condition: data.condition,
118
+ humidity: data.humidity,
119
+ city: input.city,
120
+ };
121
+ }
122
+ }
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Resource: Supported Cities
128
+
129
+ ```typescript
130
+ // src/resources/cities.resource.ts
131
+ import { Resource, ResourceContext } from '@frontmcp/sdk';
132
+
133
+ const SUPPORTED_CITIES = ['London', 'Tokyo', 'New York', 'Paris', 'Sydney', 'Berlin', 'Toronto', 'Mumbai'];
134
+
135
+ @Resource({
136
+ uri: 'weather://cities',
137
+ name: 'Supported Cities',
138
+ description: 'List of cities with available weather data',
139
+ mimeType: 'application/json',
140
+ })
141
+ export class CitiesResource extends ResourceContext {
142
+ async read() {
143
+ return JSON.stringify(SUPPORTED_CITIES);
144
+ }
145
+ }
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Unit Test: GetWeatherTool
151
+
152
+ ```typescript
153
+ // test/get-weather.tool.spec.ts
154
+ import { ToolContext } from '@frontmcp/sdk';
155
+ import { GetWeatherTool } from '../src/tools/get-weather.tool';
156
+
157
+ describe('GetWeatherTool', () => {
158
+ let tool: GetWeatherTool;
159
+
160
+ beforeEach(() => {
161
+ tool = new GetWeatherTool();
162
+ });
163
+
164
+ it('should return weather data for a valid city', async () => {
165
+ const mockResponse = {
166
+ ok: true,
167
+ json: async () => ({
168
+ temp: 22,
169
+ condition: 'Sunny',
170
+ humidity: 45,
171
+ }),
172
+ } as unknown as Response;
173
+
174
+ const ctx = {
175
+ fetch: jest.fn().mockResolvedValue(mockResponse),
176
+ fail: jest.fn((err: Error) => {
177
+ throw err;
178
+ }),
179
+ mark: jest.fn(),
180
+ get: jest.fn(),
181
+ tryGet: jest.fn(),
182
+ notify: jest.fn(),
183
+ respondProgress: jest.fn(),
184
+ } as unknown as ToolContext;
185
+ Object.assign(tool, ctx);
186
+
187
+ const result = await tool.execute({ city: 'London', units: 'celsius' });
188
+
189
+ expect(result).toEqual({
190
+ temperature: 22,
191
+ condition: 'Sunny',
192
+ humidity: 45,
193
+ city: 'London',
194
+ });
195
+ expect(ctx.fetch).toHaveBeenCalledWith(expect.stringContaining('city=London'));
196
+ });
197
+
198
+ it('should fail when city is empty (Zod validation)', () => {
199
+ const { z } = require('zod');
200
+ const schema = z.object({
201
+ city: z.string().min(1),
202
+ units: z.enum(['celsius', 'fahrenheit']).default('celsius'),
203
+ });
204
+
205
+ expect(() => schema.parse({ city: '' })).toThrow();
206
+ });
207
+
208
+ it('should fail when the weather API returns an error', async () => {
209
+ const mockResponse = {
210
+ ok: false,
211
+ status: 404,
212
+ statusText: 'Not Found',
213
+ } as unknown as Response;
214
+
215
+ const failFn = jest.fn((err: Error) => {
216
+ throw err;
217
+ });
218
+ const ctx = {
219
+ fetch: jest.fn().mockResolvedValue(mockResponse),
220
+ fail: failFn,
221
+ mark: jest.fn(),
222
+ get: jest.fn(),
223
+ tryGet: jest.fn(),
224
+ notify: jest.fn(),
225
+ respondProgress: jest.fn(),
226
+ } as unknown as ToolContext;
227
+ Object.assign(tool, ctx);
228
+
229
+ await expect(tool.execute({ city: 'Atlantis', units: 'celsius' })).rejects.toThrow(
230
+ 'Weather API error: 404 Not Found',
231
+ );
232
+
233
+ expect(failFn).toHaveBeenCalled();
234
+ });
235
+ });
236
+ ```
237
+
238
+ ---
239
+
240
+ ## E2E Test: Weather Server
241
+
242
+ ```typescript
243
+ // test/weather.e2e.spec.ts
244
+ import { McpTestClient, TestServer } from '@frontmcp/testing';
245
+ import Server from '../src/main';
246
+
247
+ describe('Weather Server E2E', () => {
248
+ let client: McpTestClient;
249
+ let server: TestServer;
250
+
251
+ beforeAll(async () => {
252
+ server = await TestServer.start({ command: 'npx tsx src/main.ts' });
253
+ client = await McpTestClient.create({ baseUrl: server.info.baseUrl }).buildAndConnect();
254
+ });
255
+
256
+ afterAll(async () => {
257
+ await client.disconnect();
258
+ await server.stop();
259
+ });
260
+
261
+ it('should list tools including get_weather', async () => {
262
+ const { tools } = await client.listTools();
263
+
264
+ expect(tools.length).toBeGreaterThan(0);
265
+ expect(tools).toContainTool('get_weather');
266
+ });
267
+
268
+ it('should call get_weather with a valid city', async () => {
269
+ const result = await client.callTool('get_weather', {
270
+ city: 'London',
271
+ units: 'celsius',
272
+ });
273
+
274
+ expect(result).toBeSuccessful();
275
+ expect(result.content[0].text).toBeDefined();
276
+
277
+ const parsed = JSON.parse(result.content[0].text);
278
+ expect(parsed).toHaveProperty('temperature');
279
+ expect(parsed).toHaveProperty('condition');
280
+ expect(parsed).toHaveProperty('humidity');
281
+ expect(parsed).toHaveProperty('city', 'London');
282
+ });
283
+
284
+ it('should read the cities resource', async () => {
285
+ const { resources } = await client.listResources();
286
+ const citiesResource = resources.find((r) => r.uri === 'weather://cities');
287
+ expect(citiesResource).toBeDefined();
288
+
289
+ const result = await client.readResource('weather://cities');
290
+ const cities = JSON.parse(result.contents[0].text);
291
+
292
+ expect(Array.isArray(cities)).toBe(true);
293
+ expect(cities).toContain('London');
294
+ expect(cities).toContain('Tokyo');
295
+ });
296
+ });
297
+ ```
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: frontmcp-production-readiness
3
+ description: 'Pre-production audit and checklist for FrontMCP servers. Use before go-live to verify security hardening, performance checks, observability, monitoring, and health checks. Triggers: production ready, security audit, performance check, production checklist, hardening, go live.'
4
+ tags: [production, security, performance, reliability, observability, audit, best-practices]
5
+ category: production
6
+ targets: [all]
7
+ bundle: [recommended, full]
8
+ priority: 10
9
+ visibility: both
10
+ license: Apache-2.0
11
+ metadata:
12
+ docs: https://docs.agentfront.dev/frontmcp/production/overview
13
+ ---
14
+
15
+ # FrontMCP Production Readiness Audit
16
+
17
+ Router for production readiness checklists. Start with the common checklist (security, performance, reliability, observability), then follow the target-specific checklist for your deployment environment.
18
+
19
+ ## When to Use This Skill
20
+
21
+ ### Must Use
22
+
23
+ - Before deploying a FrontMCP server to production for the first time
24
+ - After major feature additions or architectural changes
25
+ - During security reviews or compliance audits
26
+
27
+ ### Recommended
28
+
29
+ - As part of PR reviews for infrastructure-touching changes
30
+ - Quarterly health checks on production deployments
31
+ - When switching deployment targets
32
+
33
+ ### Skip When
34
+
35
+ - Building a prototype or proof-of-concept
36
+ - Running in development/local mode only
37
+
38
+ > **Decision:** Use this skill when preparing for production. Start with `common-checklist`, then pick your deployment target.
39
+
40
+ ## Step 1: Detect Deployment Target
41
+
42
+ Check the project to determine the deployment target:
43
+
44
+ 1. Look at `package.json` scripts for `frontmcp build --target <target>`
45
+ 2. Check for target-specific files: `ci/Dockerfile` (node), `vercel.json` (vercel), `wrangler.toml` (cloudflare), `ci/template.yaml` (lambda)
46
+ 3. Check if the build target is `cli` or `browser` in the build config
47
+ 4. If unclear, ask the user which environment they're deploying to
48
+
49
+ ## Step 2: Run Common Checklist
50
+
51
+ Always start with the common checklist — it covers security, performance, reliability, and observability that apply to every target.
52
+
53
+ ## Step 3: Run Target-Specific Checklist
54
+
55
+ After the common checklist, run the checklist for your deployment target.
56
+
57
+ ## Scenario Routing Table
58
+
59
+ | Scenario | Reference | Description |
60
+ | -------------------------------------------------------- | -------------------------------------- | --------------------------------------------------- |
61
+ | Common security, performance, reliability, observability | `references/common-checklist.md` | Applies to ALL targets — run this first |
62
+ | Standalone Node.js server with Docker | `references/production-node-server.md` | Docker, health checks, Redis, scaling, CI/CD |
63
+ | Node.js SDK / direct client (npm package) | `references/production-node-sdk.md` | create()/connect() API, disposal, npm publishing |
64
+ | Vercel serverless / edge | `references/production-vercel.md` | Vercel config, edge runtime, cold starts, Vercel KV |
65
+ | Cloudflare Workers | `references/production-cloudflare.md` | Wrangler, Workers runtime, KV, Durable Objects |
66
+ | AWS Lambda | `references/production-lambda.md` | SAM template, cold starts, DynamoDB, API Gateway |
67
+ | CLI daemon (local MCP server) | `references/production-cli-daemon.md` | Process manager, socket files, service registration |
68
+ | CLI binary (one-shot execution) | `references/production-cli-binary.md` | Fast startup, stdio transport, exit codes, npm bin |
69
+ | Browser SDK | `references/production-browser.md` | Bundle size, browser APIs, CSP, CDN distribution |
70
+
71
+ ## Quick Reference: Target Detection
72
+
73
+ | File / Signal Found | Target |
74
+ | ----------------------------------------------------- | ----------------------------------------------- |
75
+ | `ci/Dockerfile` or `ci/docker-compose.yml` | Standalone server → `production-node-server.md` |
76
+ | `serve: false` or `create()` API usage | SDK / direct client → `production-node-sdk.md` |
77
+ | `vercel.json` | Vercel → `production-vercel.md` |
78
+ | `wrangler.toml` | Cloudflare → `production-cloudflare.md` |
79
+ | `ci/template.yaml` | Lambda → `production-lambda.md` |
80
+ | `frontmcp start` / `socket` / `service install` usage | CLI daemon → `production-cli-daemon.md` |
81
+ | `build --target cli` + `bin` in package.json | CLI binary → `production-cli-binary.md` |
82
+ | `build --target browser` in scripts | Browser → `production-browser.md` |
83
+
84
+ ## Verification Checklist
85
+
86
+ After completing both common and target-specific checklists:
87
+
88
+ 1. Run `frontmcp doctor` to check project configuration
89
+ 2. Run `frontmcp test` to ensure all tests pass
90
+ 3. Run `frontmcp build` to verify production build succeeds
91
+ 4. Deploy to staging and run E2E tests against it
92
+ 5. Review logs for any warnings or errors during startup
93
+ 6. Update README for the deployment target (see `frontmcp-setup` → `references/readme-guide.md`)
94
+
95
+ ## Reference
96
+
97
+ - [FrontMCP Production Guide](https://docs.agentfront.dev/frontmcp/production)
98
+ - Related skills: `frontmcp-config`, `frontmcp-deployment`, `frontmcp-testing`, `frontmcp-setup`
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: common-checklist
3
+ description: Security, performance, reliability, and observability checks for all deployment targets
4
+ ---
5
+
6
+ # Common Production Readiness Checklist
7
+
8
+ These checks apply to ALL deployment targets. Run them first, then proceed to your target-specific checklist.
9
+
10
+ ## Security
11
+
12
+ ### Authentication & Authorization
13
+
14
+ - [ ] JWT_SECRET is set to a strong random value (not the default)
15
+ - [ ] Authentication is enabled (`auth` config in `@FrontMcp` or `@frontmcp/auth`)
16
+ - [ ] API keys/tokens are loaded from environment variables, never hardcoded
17
+ - [ ] Session storage uses Redis or platform-native store (not in-memory) for multi-instance
18
+ - [ ] Session TTL is configured appropriately (not infinite)
19
+ - [ ] Tool-level authorization is enforced where needed (ApprovalPlugin or custom)
20
+ - [ ] OAuth redirect URIs are restricted to known domains
21
+
22
+ ### CORS Configuration
23
+
24
+ - [ ] CORS is NOT permissive (don't allow all origins in production)
25
+ - [ ] Specific allowed origins are listed: `cors: { origin: ['https://your-app.com'] }`
26
+ - [ ] Credentials mode is only enabled if cookies/sessions are needed
27
+ - [ ] Preflight cache (`maxAge`) is set to reduce OPTIONS requests
28
+
29
+ ### Input Validation
30
+
31
+ - [ ] All tool inputs use Zod schemas (never trust raw input)
32
+ - [ ] All tool outputs use `outputSchema` to prevent data leaks
33
+ - [ ] Path parameters and query params are validated
34
+ - [ ] File paths are sanitized to prevent directory traversal
35
+ - [ ] SQL queries use parameterized statements (never string interpolation)
36
+
37
+ ### Secrets Management
38
+
39
+ - [ ] No secrets in source code or git history
40
+ - [ ] `.env` files are in `.gitignore`
41
+ - [ ] Production secrets are managed via secret manager (AWS SSM, Vault, etc.)
42
+ - [ ] API keys have minimum required permissions
43
+ - [ ] Secrets are rotated on a schedule
44
+
45
+ ### Rate Limiting
46
+
47
+ - [ ] Rate limiting is configured for public-facing endpoints
48
+ - [ ] Per-client/per-IP limits are set
49
+ - [ ] Throttle configuration uses `@FrontMcp({ throttle: {...} })`
50
+ - [ ] Large payload limits are set to prevent memory exhaustion
51
+
52
+ ### Dependencies
53
+
54
+ - [ ] `npm audit` shows no high/critical vulnerabilities
55
+ - [ ] Dependencies are pinned or use tilde ranges (not `*` or `latest`)
56
+ - [ ] No unused dependencies in package.json
57
+
58
+ ## Performance
59
+
60
+ ### Caching
61
+
62
+ - [ ] CachePlugin is configured for read-heavy tools
63
+ - [ ] Cache TTL is tuned per tool (not one-size-fits-all)
64
+ - [ ] Stale cache invalidation strategy is defined
65
+
66
+ ### Response Optimization
67
+
68
+ - [ ] Large responses are paginated or streamed
69
+ - [ ] Tools return only necessary data (no over-fetching)
70
+ - [ ] Binary data uses proper encoding (base64 only when necessary)
71
+
72
+ ### Memory Management
73
+
74
+ - [ ] No memory leaks from event listeners or unclosed connections
75
+ - [ ] Large data processing uses streams instead of buffering
76
+ - [ ] Provider lifecycle `dispose()` is implemented for cleanup
77
+ - [ ] Session storage has TTL to prevent unbounded growth
78
+
79
+ ## Reliability
80
+
81
+ ### Error Handling
82
+
83
+ - [ ] All tools use `this.fail()` with specific MCP error classes
84
+ - [ ] Unknown errors are caught and wrapped (never expose stack traces)
85
+ - [ ] Error responses include MCP error codes for client handling
86
+ - [ ] Async errors are properly caught (no unhandled promise rejections)
87
+
88
+ ### Retry & Circuit Breaking
89
+
90
+ - [ ] External API calls have retry logic with exponential backoff
91
+ - [ ] Circuit breaker pattern for unreliable downstream services
92
+ - [ ] Timeouts are set for all external calls
93
+ - [ ] Job retries have maximum attempt limits
94
+
95
+ ## Observability
96
+
97
+ ### Logging
98
+
99
+ - [ ] Logs use structured format (JSON in production)
100
+ - [ ] Log levels are appropriate (info for normal, error for failures)
101
+ - [ ] Sensitive data is redacted from logs (tokens, passwords, PII)
102
+ - [ ] Request/response logging includes correlation IDs
103
+
104
+ ### Monitoring
105
+
106
+ - [ ] Request count and latency metrics are exposed
107
+ - [ ] Error rate metrics are tracked
108
+ - [ ] Tool execution duration is measured
109
+ - [ ] Error tracking service is integrated (Sentry, Datadog, etc.)
110
+
111
+ ## Jobs & Workflows (if enabled)
112
+
113
+ - [ ] Jobs Redis store is configured for production (`jobs: { enabled: true, store: { redis } }`)
114
+ - [ ] Job retry config has reasonable `maxAttempts` and `maxBackoffMs`
115
+ - [ ] Workflow timeout is set to prevent runaway workflows
116
+ - [ ] Job execution times are monitored (long-running jobs need alerting)
117
+ - [ ] Workflow step `continueOnError` is only used for non-critical steps
118
+
119
+ ## Skills HTTP Endpoints (if enabled)
120
+
121
+ - [ ] Skills HTTP auth is configured (`skillsConfig.auth: 'api-key'` or `'bearer'`)
122
+ - [ ] Skills caching is enabled for production (`skillsConfig.cache: { enabled: true }`)
123
+ - [ ] Cache TTL is tuned for skill instruction freshness requirements
124
+ - [ ] `/llm.txt` and `/skills` endpoints are tested for correct responses
125
+
126
+ ## ExtApps / Widgets (if enabled)
127
+
128
+ - [ ] Host capabilities are reviewed — only enable what widgets need
129
+ - [ ] `serverToolProxy` is disabled if widgets should not call MCP tools
130
+ - [ ] Widget session validation is active (default with HTTP transport)
131
+ - [ ] CSP headers are configured for hosted widget origins
132
+
133
+ ## SQLite (if used)
134
+
135
+ - [ ] WAL mode is enabled for concurrent read/write performance
136
+ - [ ] Database file path is writable and persistent (not ephemeral storage)
137
+ - [ ] Backup strategy is defined (periodic file copy or WAL checkpoint)
138
+ - [ ] Database size is monitored to prevent disk exhaustion
139
+
140
+ ## Documentation
141
+
142
+ - [ ] README.md is up-to-date for the deployment target (see `frontmcp-setup` → `references/readme-guide.md`)
143
+ - [ ] API documentation covers all tools and resources
144
+ - [ ] Environment variables are documented in `.env.example`
145
+
146
+ ## Common Anti-Patterns
147
+
148
+ | Anti-Pattern | Fix |
149
+ | ------------------------- | ------------------------------------------- |
150
+ | Default JWT_SECRET | Set a strong random secret |
151
+ | In-memory session store | Use Redis or platform-native storage |
152
+ | `cors: { origin: '*' }` | Restrict to known origins |
153
+ | No output schema on tools | Always define `outputSchema` |
154
+ | Synchronous file I/O | Use async operations from `@frontmcp/utils` |
155
+ | Hardcoded secrets | Use environment variables |
156
+ | Unbounded caching | Set TTL on all caches |
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: production-browser
3
+ description: Checklist for publishing FrontMCP as a browser-compatible SDK bundle
4
+ ---
5
+
6
+ # Production Readiness: Browser SDK
7
+
8
+ Target-specific checklist for publishing FrontMCP as a browser-compatible SDK.
9
+
10
+ > Run the `common-checklist` first, then use this checklist for browser-specific items.
11
+
12
+ ## Build
13
+
14
+ - [ ] `frontmcp build --target browser` produces a correct ESM/UMD bundle
15
+ - [ ] Bundle size is acceptable (check with `npx bundlesize` or similar)
16
+ - [ ] Tree-shaking works (no unnecessary code in final bundle)
17
+ - [ ] Source maps are generated for debugging (but not shipped to production CDN)
18
+
19
+ ## Browser Compatibility
20
+
21
+ - [ ] No Node.js-only APIs (`fs`, `path`, `child_process`, `net`, `crypto`)
22
+ - [ ] All crypto uses `@frontmcp/utils` (wraps Web Crypto API)
23
+ - [ ] All file operations removed or polyfilled
24
+ - [ ] Fetch API used instead of Node http/https modules
25
+ - [ ] Works in major browsers (Chrome, Firefox, Safari, Edge)
26
+
27
+ ## Security
28
+
29
+ - [ ] No secrets bundled in the client-side code
30
+ - [ ] API keys are NOT in the browser bundle (use server-side proxy)
31
+ - [ ] CORS is configured on the server to accept browser origins
32
+ - [ ] Content Security Policy (CSP) headers are compatible
33
+
34
+ ## Distribution
35
+
36
+ - [ ] Package exports both ESM and CJS: `"module"` and `"main"` in package.json
37
+ - [ ] `"browser"` field in package.json points to the browser build
38
+ - [ ] TypeScript declarations (`.d.ts`) are included
39
+ - [ ] CDN-friendly: works via `<script>` tag or `import` from CDN
40
+
41
+ ## Performance
42
+
43
+ - [ ] Bundle is minified for production
44
+ - [ ] Code splitting is used for large optional features
45
+ - [ ] No synchronous operations that block the main thread
46
+ - [ ] WebSocket/SSE connections handle reconnection gracefully
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: production-cli-binary
3
+ description: Checklist for publishing FrontMCP as a one-shot CLI binary with stdin/stdout transport
4
+ ---
5
+
6
+ # Production Readiness: CLI Binary (One-Shot Execution)
7
+
8
+ Checklist for publishing FrontMCP as a one-shot CLI binary — runs a command, processes input, exits. Not a long-running server.
9
+
10
+ > Run the `common-checklist` first, then use this checklist for binary-specific items.
11
+
12
+ ## Build
13
+
14
+ - [ ] `frontmcp build --target cli` produces a working binary
15
+ - [ ] Binary starts and responds to `--help` within 500ms
16
+ - [ ] `package.json` has correct `bin` field pointing to the built output
17
+ - [ ] Shebang line is correct: `#!/usr/bin/env node`
18
+ - [ ] Binary file has execute permissions (`chmod +x`)
19
+
20
+ ## Startup Performance
21
+
22
+ - [ ] Cold start time is under 1 second
23
+ - [ ] No heavy initialization at module scope (lazy-load dependencies)
24
+ - [ ] No network calls during startup (model downloads, API fetches)
25
+ - [ ] No async initialization that blocks first output
26
+
27
+ ## stdin/stdout Transport
28
+
29
+ - [ ] MCP stdio transport works: reads JSON-RPC from stdin, writes to stdout
30
+ - [ ] stderr is used for logging (not stdout — that's the MCP channel)
31
+ - [ ] Handles EOF on stdin gracefully (clean exit)
32
+ - [ ] Handles broken pipe on stdout gracefully (no crash)
33
+
34
+ ## Exit Behavior
35
+
36
+ - [ ] Exit code 0 on success
37
+ - [ ] Exit code 1 on user error (bad input, missing args)
38
+ - [ ] Exit code 2 on internal error
39
+ - [ ] No hanging — process exits promptly after work is done
40
+ - [ ] All async operations complete before exit (no dangling promises)
41
+
42
+ ## npm Distribution
43
+
44
+ - [ ] Package name is available on npm
45
+ - [ ] `package.json` has `name`, `version`, `description`, `keywords`, `license`
46
+ - [ ] `files` field includes only: `dist/`, `README.md`, `LICENSE`
47
+ - [ ] `.npmignore` or `files` excludes: `src/`, `e2e/`, `.env`, `coverage/`
48
+ - [ ] `README.md` has: `npm install -g <name>` and usage examples
49
+
50
+ ## Error Messages
51
+
52
+ - [ ] User errors show helpful messages (not stack traces)
53
+ - [ ] `--version` flag works correctly
54
+ - [ ] Unknown flags produce a helpful error
55
+ - [ ] Missing required arguments show usage hint
56
+
57
+ ## Security
58
+
59
+ - [ ] No secrets bundled in the binary
60
+ - [ ] No secrets logged to stderr
61
+ - [ ] No hardcoded paths (use `os.homedir()`, `os.tmpdir()`)
62
+ - [ ] No writes to unexpected locations