@frontmcp/skills 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -29
- package/catalog/TEMPLATE.md +26 -0
- package/catalog/create-tool/SKILL.md +318 -0
- package/catalog/create-tool/examples/01-basic-class-tool.md +112 -0
- package/catalog/create-tool/examples/02-basic-function-tool.md +80 -0
- package/catalog/create-tool/examples/03-tool-with-zod-shape-output.md +78 -0
- package/catalog/create-tool/examples/04-tool-with-zod-schema-output.md +97 -0
- package/catalog/create-tool/examples/05-tool-with-primitive-output.md +93 -0
- package/catalog/create-tool/examples/06-tool-with-media-output.md +109 -0
- package/catalog/create-tool/examples/08-tool-with-provider-injection.md +110 -0
- package/catalog/create-tool/examples/09-tool-with-multiple-providers.md +107 -0
- package/catalog/create-tool/examples/11-tool-with-fetch.md +94 -0
- package/catalog/create-tool/examples/12-tool-with-fetch-and-retries.md +115 -0
- package/catalog/create-tool/examples/13-tool-with-single-auth-provider.md +85 -0
- package/catalog/create-tool/examples/14-tool-with-multiple-auth-providers.md +105 -0
- package/catalog/create-tool/examples/15-tool-with-credential-vault.md +115 -0
- package/catalog/create-tool/examples/16-tool-with-rate-limit.md +71 -0
- package/catalog/create-tool/examples/17-tool-with-concurrency-and-timeout.md +101 -0
- package/catalog/create-tool/examples/18-tool-with-progress-and-notify.md +96 -0
- package/catalog/create-tool/examples/19-tool-with-elicitation.md +102 -0
- package/catalog/create-tool/examples/20-tool-with-annotations.md +125 -0
- package/catalog/create-tool/examples/21-tool-with-availability-constraints.md +107 -0
- package/catalog/create-tool/examples/22-tool-with-ui-html-template.md +93 -0
- package/catalog/create-tool/examples/23-tool-with-ui-filesource-tsx.md +112 -0
- package/catalog/create-tool/examples/24-tool-with-ui-csp-and-bridge.md +127 -0
- package/catalog/create-tool/examples/25-tool-handing-off-to-job.md +143 -0
- package/catalog/create-tool/examples/26-tool-with-resource-link-output.md +94 -0
- package/catalog/create-tool/examples/27-tool-with-examples-metadata.md +90 -0
- package/catalog/create-tool/references/annotations.md +96 -0
- package/catalog/create-tool/references/auth-providers.md +167 -0
- package/catalog/create-tool/references/availability.md +106 -0
- package/catalog/create-tool/references/decorator-options.md +95 -0
- package/catalog/create-tool/references/derived-types.md +102 -0
- package/catalog/create-tool/references/elicitation.md +128 -0
- package/catalog/create-tool/references/error-handling.md +128 -0
- package/catalog/create-tool/references/execution-context.md +158 -0
- package/catalog/create-tool/references/file-layout.md +96 -0
- package/catalog/create-tool/references/function-style-builder.md +118 -0
- package/catalog/create-tool/references/input-schema.md +141 -0
- package/catalog/create-tool/references/output-schema.md +175 -0
- package/catalog/create-tool/references/quick-start.md +124 -0
- package/catalog/create-tool/references/registration.md +132 -0
- package/catalog/create-tool/references/remote-and-esm.md +68 -0
- package/catalog/create-tool/references/testing.md +59 -0
- package/catalog/create-tool/references/throttling.md +109 -0
- package/catalog/create-tool/references/ui-widgets.md +198 -0
- package/catalog/create-tool/rules/always-define-output-schema.md +77 -0
- package/catalog/create-tool/rules/derive-execute-types.md +57 -0
- package/catalog/create-tool/rules/input-schema-is-raw-shape.md +76 -0
- package/catalog/create-tool/rules/no-toolcontext-generics.md +50 -0
- package/catalog/create-tool/rules/no-try-catch-around-execute.md +79 -0
- package/catalog/create-tool/rules/register-in-app.md +76 -0
- package/catalog/create-tool/rules/snake-case-tool-names.md +45 -0
- package/catalog/create-tool/rules/use-this-fail-for-business-errors.md +75 -0
- package/catalog/create-tool/rules/widget-paths-anchor-with-import-meta-url.md +76 -0
- package/catalog/create-tool/rules/widget-resource-mode-host-detect.md +61 -0
- package/catalog/frontmcp-auth-ui/SKILL.md +146 -0
- package/catalog/frontmcp-auth-ui/examples/custom-auth-ui/login-slot.md +97 -0
- package/catalog/frontmcp-auth-ui/examples/custom-auth-ui/multi-step-auth-extra.md +133 -0
- package/catalog/frontmcp-auth-ui/references/custom-auth-ui.md +162 -0
- package/catalog/frontmcp-authorities/SKILL.md +55 -18
- package/catalog/frontmcp-authorities/references/authority-profiles.md +25 -1
- package/catalog/frontmcp-authorities/references/custom-evaluators.md +1 -1
- package/catalog/frontmcp-authorities/references/rbac-abac-rebac.md +9 -0
- package/catalog/frontmcp-channels/SKILL.md +7 -1
- package/catalog/frontmcp-config/SKILL.md +14 -7
- package/catalog/frontmcp-config/examples/configure-auth/local-credential-vault.md +94 -0
- package/catalog/frontmcp-config/examples/configure-auth/local-secure-store.md +138 -0
- package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +45 -23
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-behind-tunnel.md +73 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-consent-enforcement.md +87 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-dcr-control.md +67 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-minimal.md +62 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-multi-provider-orchestration.md +93 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +18 -20
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-single-operator.md +66 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +37 -23
- package/catalog/frontmcp-config/examples/configure-http/custom-http-routes.md +98 -0
- package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-redis.md +17 -9
- package/catalog/frontmcp-config/references/configure-auth-modes.md +86 -23
- package/catalog/frontmcp-config/references/configure-auth.md +296 -50
- package/catalog/frontmcp-config/references/configure-deployment-targets.md +84 -1
- package/catalog/frontmcp-config/references/configure-http.md +203 -14
- package/catalog/frontmcp-config/references/configure-session.md +14 -7
- package/catalog/frontmcp-deployment/SKILL.md +17 -15
- package/catalog/frontmcp-deployment/references/build-for-mcpb.md +1 -1
- package/catalog/frontmcp-deployment/references/deploy-manifest-yaml.md +308 -0
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare-skills-only.md +174 -0
- package/catalog/frontmcp-deployment/references/mcp-client-integration.md +145 -2
- package/catalog/frontmcp-development/SKILL.md +36 -50
- package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +14 -0
- package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +85 -9
- package/catalog/frontmcp-development/references/create-job.md +45 -11
- package/catalog/frontmcp-development/references/create-provider.md +80 -8
- package/catalog/frontmcp-development/references/create-skill-with-tools.md +31 -0
- package/catalog/frontmcp-development/references/create-skill.md +45 -0
- package/catalog/frontmcp-development/references/decorators-guide.md +15 -15
- package/catalog/frontmcp-extensibility/SKILL.md +1 -1
- package/catalog/frontmcp-extensibility/examples/skill-audit-log/verify-chain.md +8 -6
- package/catalog/frontmcp-extensibility/references/skill-audit-log.md +7 -2
- package/catalog/frontmcp-guides/SKILL.md +8 -8
- package/catalog/frontmcp-observability/SKILL.md +16 -8
- package/catalog/frontmcp-observability/examples/metrics-endpoint/enable-metrics-endpoint.md +77 -0
- package/catalog/frontmcp-observability/references/metrics-endpoint.md +161 -0
- package/catalog/frontmcp-production-readiness/SKILL.md +1 -1
- package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +3 -2
- package/catalog/frontmcp-setup/SKILL.md +12 -12
- package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +19 -1
- package/catalog/frontmcp-setup/examples/multi-app-composition/per-app-auth-and-isolation.md +7 -4
- package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +260 -19
- package/catalog/frontmcp-setup/references/multi-app-composition.md +6 -5
- package/catalog/frontmcp-setup/references/setup-project.md +29 -0
- package/catalog/frontmcp-setup/references/setup-sqlite.md +68 -9
- package/catalog/frontmcp-testing/SKILL.md +26 -18
- package/catalog/frontmcp-testing/references/test-auth.md +24 -0
- package/catalog/skills-manifest.json +676 -146
- package/package.json +1 -1
- package/src/manifest.d.ts +72 -1
- package/src/manifest.js +4 -1
- package/src/manifest.js.map +1 -1
- package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +0 -61
- package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +0 -84
- package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +0 -92
- package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +0 -92
- package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +0 -59
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +0 -101
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +0 -62
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +0 -101
- package/catalog/frontmcp-development/references/create-tool-annotations.md +0 -48
- package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +0 -71
- package/catalog/frontmcp-development/references/create-tool.md +0 -728
|
@@ -396,6 +396,51 @@ class StandardsApp {}
|
|
|
396
396
|
class MyServer {}
|
|
397
397
|
```
|
|
398
398
|
|
|
399
|
+
## Installing a Project's `@Skill` on a User's Machine
|
|
400
|
+
|
|
401
|
+
A `@Skill` registered on your server is reachable two ways:
|
|
402
|
+
|
|
403
|
+
1. **Over MCP** — clients that speak the SEP-2640 `skill://` URI scheme
|
|
404
|
+
(Claude Desktop, custom MCP clients) discover registered skills
|
|
405
|
+
automatically when they connect to your server.
|
|
406
|
+
2. **On the filesystem** — Claude Code's plugin/filesystem loader looks
|
|
407
|
+
for `SKILL.md` files under `.claude/skills/<name>/`. Decorator-only
|
|
408
|
+
registration is **not enough**; the SKILL.md (and any
|
|
409
|
+
`references/` / `examples/` directories) has to be copied to disk.
|
|
410
|
+
|
|
411
|
+
The `frontmcp` CLI bridges the two via `frontmcp skills install
|
|
412
|
+
--from-entry` / `--from-package`. The command bundles the entry file,
|
|
413
|
+
boots the SDK in-memory, enumerates every `@Skill` you registered, and
|
|
414
|
+
writes a Claude-Code-loadable `SKILL.md` for each (synthesizing
|
|
415
|
+
frontmatter from the decorator metadata when the source markdown
|
|
416
|
+
doesn't already have one):
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
# From the project checkout, during development
|
|
420
|
+
frontmcp skills install example-project --from-entry src/main.ts -p claude
|
|
421
|
+
frontmcp skills install --from-entry src/main.ts --all -p claude
|
|
422
|
+
|
|
423
|
+
# From a published package the user has installed
|
|
424
|
+
frontmcp skills install --from-package my-frontmcp-server --all -p claude
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
The resulting `.claude/skills/<skill-name>/` tree is the same shape as a
|
|
428
|
+
catalog-installed skill, so the CLAUDE.md auto-generated block, the
|
|
429
|
+
`/plugins` listing in Claude Code, and Cursor/Windsurf exports all work
|
|
430
|
+
uniformly. See `frontmcp-skills-usage` for the full flag list and
|
|
431
|
+
selector matrix.
|
|
432
|
+
|
|
433
|
+
If you also want to ship slash commands and a `.claude-plugin/plugin.json`
|
|
434
|
+
manifest, install the project as a Claude Code plugin instead of just the
|
|
435
|
+
skills:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
my-frontmcp-server install -p claude # MCP server + commands + skills, all in one
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
The plugin path internally uses the same `@Skill` enumeration, so
|
|
442
|
+
nothing about the decorator changes.
|
|
443
|
+
|
|
399
444
|
## HTTP Discovery
|
|
400
445
|
|
|
401
446
|
When skills have `visibility` set to `'http'` or `'both'`, they are discoverable via HTTP endpoints.
|
|
@@ -156,21 +156,21 @@ class AnalyticsApp {}
|
|
|
156
156
|
|
|
157
157
|
**Key fields:**
|
|
158
158
|
|
|
159
|
-
| Field | Description
|
|
160
|
-
| -------------------- |
|
|
161
|
-
| `name` | Tool name (used in MCP protocol, snake_case)
|
|
162
|
-
| `description` | Human-readable description for the LLM
|
|
163
|
-
| `inputSchema` | Zod raw shape defining input parameters
|
|
164
|
-
| `outputSchema?` | Output type: Zod schema, `'string'`, `'image'`, `'audio'`, etc.
|
|
165
|
-
| `annotations?` | MCP tool annotations (`readOnlyHint`, `destructiveHint`, etc.)
|
|
166
|
-
| `tags?` | Categorization tags for filtering
|
|
167
|
-
| `hideFromDiscovery?` | Hide from `tools/list` (still callable directly)
|
|
168
|
-
| `examples?` | Usage examples: `[{ description, input, output? }]`
|
|
169
|
-
| `authProviders?` | Per-tool auth providers: `['
|
|
170
|
-
| `rateLimit?` | Rate limiting: `{ maxRequests, windowMs, partitionBy }`
|
|
171
|
-
| `concurrency?` | Concurrency control: `{ maxConcurrent }`
|
|
172
|
-
| `timeout?` | Execution timeout: `{ executeMs }`
|
|
173
|
-
| `ui?` | UI widget configuration for tool rendering
|
|
159
|
+
| Field | Description |
|
|
160
|
+
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
161
|
+
| `name` | Tool name (used in MCP protocol, snake_case) |
|
|
162
|
+
| `description` | Human-readable description for the LLM |
|
|
163
|
+
| `inputSchema` | Zod raw shape defining input parameters |
|
|
164
|
+
| `outputSchema?` | Output type: Zod schema, `'string'`, `'image'`, `'audio'`, etc. |
|
|
165
|
+
| `annotations?` | MCP tool annotations (`readOnlyHint`, `destructiveHint`, etc.) |
|
|
166
|
+
| `tags?` | Categorization tags for filtering |
|
|
167
|
+
| `hideFromDiscovery?` | Hide from `tools/list` (still callable directly) |
|
|
168
|
+
| `examples?` | Usage examples: `[{ description, input, output? }]` |
|
|
169
|
+
| `authProviders?` | Per-tool auth providers: `['github']` or `[{ name, required?, scopes?, alias? }]` (default `required: true` — a missing required credential aborts the call before `execute()` with `-32001`; `scopes` feed PRM `scopes_supported`) |
|
|
170
|
+
| `rateLimit?` | Rate limiting: `{ maxRequests, windowMs, partitionBy }` |
|
|
171
|
+
| `concurrency?` | Concurrency control: `{ maxConcurrent }` |
|
|
172
|
+
| `timeout?` | Execution timeout: `{ executeMs }` |
|
|
173
|
+
| `ui?` | UI widget configuration for tool rendering |
|
|
174
174
|
|
|
175
175
|
```typescript
|
|
176
176
|
import { Tool, ToolContext, z } from '@frontmcp/sdk';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-extensibility
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Use when extending FrontMCP beyond the core SDK by integrating external npm packages, libraries, or third-party services into providers and tools. Covers VectoriaDB for in-memory semantic and vector search (ML-based embeddings or TF-IDF keyword engines, with persistence) and the tamper-evident, hash-chained skill audit log (pluggable signer and store, with chain verification). Triggers: add semantic search, vector search, embeddings, similarity search, recommendations, ML features, audit logging, or integrate an external library, database, or API beyond the built-in SDK.'
|
|
4
4
|
tags: [extensibility, vectoriadb, search, integration, npm, provider, external-services]
|
|
5
5
|
category: extensibility
|
|
6
6
|
targets: [all]
|
|
@@ -20,14 +20,16 @@ Verify a stored chain offline using verifyChain and the bundle-signing key regis
|
|
|
20
20
|
```typescript
|
|
21
21
|
// scripts/verify-audit-chain.ts
|
|
22
22
|
import { defaultAuditSignatureVerifier, StorageAdapterAuditStore, verifyChain } from '@frontmcp/adapters/skills';
|
|
23
|
-
import {
|
|
23
|
+
import { createStorage } from '@frontmcp/utils';
|
|
24
24
|
|
|
25
25
|
async function main() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
// createStorage() returns a RootStorage, which is a StorageAdapter.
|
|
27
|
+
const storage = await createStorage({
|
|
28
|
+
type: 'redis',
|
|
29
|
+
redis: {
|
|
30
|
+
config: { host: process.env.REDIS_HOST!, port: 6379 },
|
|
31
|
+
keyPrefix: 'mcp:skill-audit:',
|
|
32
|
+
},
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
const store = new StorageAdapterAuditStore(storage);
|
|
@@ -124,10 +124,15 @@ const signer = new Rs256AuditSigner(privateJwk, 'bundle-signing-2026-01');
|
|
|
124
124
|
|
|
125
125
|
```typescript
|
|
126
126
|
import { StorageAdapterAuditStore } from '@frontmcp/adapters/skills';
|
|
127
|
-
import {
|
|
127
|
+
import { createStorage } from '@frontmcp/utils';
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
// createStorage() returns a RootStorage, which is a StorageAdapter.
|
|
130
|
+
const storage = await createStorage({ type: 'redis', redis: { config: { host: 'localhost', port: 6379 } } });
|
|
130
131
|
const store = new StorageAdapterAuditStore(storage);
|
|
132
|
+
|
|
133
|
+
// Or construct a concrete adapter directly:
|
|
134
|
+
// import { RedisStorageAdapter } from '@frontmcp/utils';
|
|
135
|
+
// const store = new StorageAdapterAuditStore(new RedisStorageAdapter({ config: { host: 'localhost', port: 6379 } }));
|
|
131
136
|
```
|
|
132
137
|
|
|
133
138
|
A custom store implements:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-guides
|
|
3
|
-
description: 'Tutorials,
|
|
3
|
+
description: 'Tutorials, end-to-end walkthroughs, and complete reference projects for FrontMCP. Use when you want a getting-started guide, a full worked example, or to learn best practices by following a step-by-step build rather than a single API reference. Includes a beginner weather-API server (tool plus static resource, Zod schemas, E2E tests), an authenticated task manager (CRUD tools, Redis storage, OAuth, Vercel deploy, authenticated E2E tests), and a multi-app knowledge base (vector search, semantic resources, an AI research agent, audit logging). Triggers: tutorial, walkthrough, how do I build, getting started, end-to-end example, sample project, learn FrontMCP, full app example.'
|
|
4
4
|
tags: [guides, examples, best-practices, architecture, walkthrough, end-to-end]
|
|
5
5
|
category: guides
|
|
6
6
|
targets: [all]
|
|
@@ -39,11 +39,11 @@ Complete build walkthroughs and best practices for FrontMCP servers. Each exampl
|
|
|
39
39
|
|
|
40
40
|
### Skip When
|
|
41
41
|
|
|
42
|
-
- You need to learn one specific component type (use the specific
|
|
43
|
-
- Looking for the right
|
|
42
|
+
- You need to learn one specific component type (use the specific reference, e.g., `create-tool` under `frontmcp-development/references/`)
|
|
43
|
+
- Looking for the right reference for a task (use domain routers: `frontmcp-development`, `frontmcp-deployment`, etc.)
|
|
44
44
|
- You need CLI/install instructions for the skills system (see `frontmcp-skills-usage`)
|
|
45
45
|
|
|
46
|
-
> **Decision:** Use this skill when you want to see how everything fits together.
|
|
46
|
+
> **Decision:** Use this skill when you want to see how everything fits together. Open individual references under each router's `references/` directory when you need focused instruction.
|
|
47
47
|
|
|
48
48
|
## Prerequisites
|
|
49
49
|
|
|
@@ -362,7 +362,7 @@ export class ResearcherAgent extends AgentContext {}
|
|
|
362
362
|
|
|
363
363
|
### Planning
|
|
364
364
|
|
|
365
|
-
| Practice | Why |
|
|
365
|
+
| Practice | Why | Reference |
|
|
366
366
|
| ------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------- |
|
|
367
367
|
| Start with the `@App` boundaries, not individual tools | Apps define module boundaries; tools are implementation details | `multi-app-composition` |
|
|
368
368
|
| Choose auth mode and storage before writing tools | Auth affects session handling, which affects storage requirements | `configure-auth`, `configure-session` |
|
|
@@ -370,7 +370,7 @@ export class ResearcherAgent extends AgentContext {}
|
|
|
370
370
|
|
|
371
371
|
### Organizing Code
|
|
372
372
|
|
|
373
|
-
| Practice | Why |
|
|
373
|
+
| Practice | Why | Reference |
|
|
374
374
|
| ------------------------------------------------- | ----------------------------------------------------------- | ------------------------------ |
|
|
375
375
|
| One class per file with `<name>.<type>.ts` naming | Consistency, generator compatibility, clear imports | `project-structure-standalone` |
|
|
376
376
|
| Group by feature, not by type, for 10+ components | Feature folders scale better than flat `tools/` directories | `project-structure-standalone` |
|
|
@@ -378,7 +378,7 @@ export class ResearcherAgent extends AgentContext {}
|
|
|
378
378
|
|
|
379
379
|
### Writing Code
|
|
380
380
|
|
|
381
|
-
| Practice | Why |
|
|
381
|
+
| Practice | Why | Reference |
|
|
382
382
|
| ----------------------------------------------- | ------------------------------------------------------------- | ----------------- |
|
|
383
383
|
| Always define `outputSchema` on tools | Prevents data leaks, enables CodeCall chaining | `create-tool` |
|
|
384
384
|
| Use `this.fail()` with MCP error classes | Proper error codes in protocol responses | `create-tool` |
|
|
@@ -473,5 +473,5 @@ when a server has been configured to host this skill.
|
|
|
473
473
|
|
|
474
474
|
- [Your First Tool](https://docs.agentfront.dev/frontmcp/guides/your-first-tool)
|
|
475
475
|
- Domain routers: `frontmcp-development`, `frontmcp-deployment`, `frontmcp-testing`, `frontmcp-config`
|
|
476
|
-
- Core
|
|
476
|
+
- Core references: `setup-project`, `create-tool`, `create-resource`, `create-provider`, `create-agent`, `configure-auth`, `setup-testing` (each lives under its parent router's `references/` directory, e.g. `frontmcp-development/references/create-tool.md`)
|
|
477
477
|
- Mandatory boundaries: import MCP protocol types and `McpError` from `@frontmcp/protocol` (never directly from `@modelcontextprotocol/sdk`); use `@frontmcp/utils` for crypto and file-system operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-observability
|
|
3
|
-
description: 'Use when
|
|
3
|
+
description: 'Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and configurable sinks (Winston, Pino, stdout); the off-by-default /metrics endpoint (process and framework metrics, Prometheus-compatible); vendor integrations (Coralogix, Datadog, Logz.io, Grafana Cloud, or any OTLP backend); and testing spans, log correlation, and instrumentation. Triggers: observability, telemetry, tracing, logging, monitoring, OpenTelemetry, OTel, spans, metrics, Prometheus, Datadog, Coralogix, Logz.io, Grafana, Winston, Pino.'
|
|
4
4
|
tags: [router, observability, telemetry, tracing, logging, monitoring, opentelemetry, otel, spans]
|
|
5
5
|
category: observability
|
|
6
6
|
targets: [all]
|
|
@@ -54,6 +54,7 @@ Router for adding observability to FrontMCP servers. Covers distributed tracing
|
|
|
54
54
|
| Create custom spans in tools/plugins | `references/telemetry-api.md` |
|
|
55
55
|
| Connect Coralogix, Datadog, Logz.io, Grafana | `references/vendor-integrations.md` |
|
|
56
56
|
| Test that spans and logs are correct | `references/testing-observability.md` |
|
|
57
|
+
| Expose Prometheus `/metrics` endpoint | `references/metrics-endpoint.md` |
|
|
57
58
|
|
|
58
59
|
## Step 2: Enable Observability
|
|
59
60
|
|
|
@@ -83,13 +84,14 @@ Follow the scenario routing table above to find the right reference for your use
|
|
|
83
84
|
|
|
84
85
|
## Scenario Routing Table
|
|
85
86
|
|
|
86
|
-
| Scenario
|
|
87
|
-
|
|
|
88
|
-
| Enable OpenTelemetry tracing
|
|
89
|
-
| Add JSON logs with trace correlation
|
|
90
|
-
| Custom spans in tools/plugins
|
|
91
|
-
| Connect to monitoring platforms
|
|
92
|
-
| Test spans and log entries
|
|
87
|
+
| Scenario | Reference | Description |
|
|
88
|
+
| ------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------- |
|
|
89
|
+
| Enable OpenTelemetry tracing | `references/tracing-setup.md` | Zero-config auto-instrumentation, setupOTel(), span hierarchy |
|
|
90
|
+
| Add JSON logs with trace correlation | `references/structured-logging.md` | Sinks (stdout, console, OTLP, winston, pino), redaction, log format |
|
|
91
|
+
| Custom spans in tools/plugins | `references/telemetry-api.md` | `this.telemetry.startSpan()`, `withSpan()`, `addEvent()`, `setAttributes()` |
|
|
92
|
+
| Connect to monitoring platforms | `references/vendor-integrations.md` | Coralogix, Datadog, Logz.io, Grafana — OTLP and direct |
|
|
93
|
+
| Test spans and log entries | `references/testing-observability.md` | `createTestTracer()`, `assertSpanExists()`, integration test patterns |
|
|
94
|
+
| Expose Prometheus `/metrics` endpoint | `references/metrics-endpoint.md` | Off-by-default Prometheus scrape endpoint with process + framework counters |
|
|
93
95
|
|
|
94
96
|
## Common Patterns
|
|
95
97
|
|
|
@@ -187,6 +189,12 @@ Each reference has matching examples under [`examples/<reference>/`](./examples/
|
|
|
187
189
|
| [`test-custom-spans`](./examples/testing-observability/test-custom-spans.md) | Basic | Verify that your tool creates the expected child spans with correct attributes. |
|
|
188
190
|
| [`test-log-correlation`](./examples/testing-observability/test-log-correlation.md) | Intermediate | Verify that structured log entries include trace context fields for correlation with spans. |
|
|
189
191
|
|
|
192
|
+
### `metrics-endpoint`
|
|
193
|
+
|
|
194
|
+
| Example | Level | Description |
|
|
195
|
+
| ----------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------------- |
|
|
196
|
+
| [`enable-metrics-endpoint`](./examples/metrics-endpoint/enable-metrics-endpoint.md) | Basic | Turn on the /metrics endpoint with defaults and scrape it with curl. |
|
|
197
|
+
|
|
190
198
|
## Accessing This Skill
|
|
191
199
|
|
|
192
200
|
Skills are distributed as plain SKILL.md files plus a sibling `references/`
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enable-metrics-endpoint
|
|
3
|
+
reference: metrics-endpoint
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'Turn on the /metrics endpoint with defaults and scrape it with curl.'
|
|
6
|
+
tags: [observability, metrics, prometheus]
|
|
7
|
+
features:
|
|
8
|
+
- 'Setting `metrics: { enabled: true }` on `@FrontMcp` to register `GET /metrics`'
|
|
9
|
+
- 'Verifying the Prometheus text-exposition response with `curl`'
|
|
10
|
+
- 'Reading process metrics + framework counters from a single scrape'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Enable the /metrics endpoint
|
|
14
|
+
|
|
15
|
+
Turn on the /metrics endpoint with defaults and scrape it with curl.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// src/main.ts
|
|
21
|
+
import { App, FrontMcp, Tool, ToolContext, z } from '@frontmcp/sdk';
|
|
22
|
+
|
|
23
|
+
@Tool({
|
|
24
|
+
name: 'echo',
|
|
25
|
+
description: 'Echo the input back',
|
|
26
|
+
inputSchema: { message: z.string() },
|
|
27
|
+
outputSchema: { message: z.string() },
|
|
28
|
+
})
|
|
29
|
+
class EchoTool extends ToolContext {
|
|
30
|
+
async execute(input: { message: string }): Promise<{ message: string }> {
|
|
31
|
+
return { message: input.message };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@App({ name: 'main', tools: [EchoTool] })
|
|
36
|
+
class MainApp {}
|
|
37
|
+
|
|
38
|
+
@FrontMcp({
|
|
39
|
+
info: { name: 'my-server', version: '1.0.0' },
|
|
40
|
+
apps: [MainApp],
|
|
41
|
+
// Off by default — turn it on explicitly.
|
|
42
|
+
metrics: { enabled: true },
|
|
43
|
+
})
|
|
44
|
+
export default class Server {}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# In a terminal:
|
|
49
|
+
$ frontmcp dev
|
|
50
|
+
[dev] listening on port 3000
|
|
51
|
+
|
|
52
|
+
# In a second terminal:
|
|
53
|
+
$ curl -s http://localhost:3000/metrics | head -20
|
|
54
|
+
# HELP frontmcp_process_resident_memory_bytes Resident memory size in bytes
|
|
55
|
+
# TYPE frontmcp_process_resident_memory_bytes gauge
|
|
56
|
+
frontmcp_process_resident_memory_bytes 50331648
|
|
57
|
+
# HELP frontmcp_process_uptime_seconds Time since process start in seconds
|
|
58
|
+
# TYPE frontmcp_process_uptime_seconds gauge
|
|
59
|
+
frontmcp_process_uptime_seconds 14
|
|
60
|
+
# HELP frontmcp_process_cpu_seconds_total CPU time consumed since collector start, by mode (seconds)
|
|
61
|
+
# TYPE frontmcp_process_cpu_seconds_total counter
|
|
62
|
+
frontmcp_process_cpu_seconds_total{mode="user"} 0.123
|
|
63
|
+
frontmcp_process_cpu_seconds_total{mode="system"} 0.045
|
|
64
|
+
|
|
65
|
+
$ curl -sI http://localhost:3000/metrics | grep -i content-type
|
|
66
|
+
content-type: text/plain; version=0.0.4; charset=utf-8
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## What This Demonstrates
|
|
70
|
+
|
|
71
|
+
- Setting `metrics: { enabled: true }` on `@FrontMcp` to register `GET /metrics`
|
|
72
|
+
- Verifying the Prometheus text-exposition response with `curl`
|
|
73
|
+
- Reading process metrics + framework counters from a single scrape
|
|
74
|
+
|
|
75
|
+
## Related
|
|
76
|
+
|
|
77
|
+
- See `metrics-endpoint` for full configuration (auth, format, include filter, custom counters via `createCounter()`)
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: metrics-endpoint
|
|
3
|
+
description: Configure the off-by-default /metrics endpoint that exposes process metrics and framework counters in Prometheus text format
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /metrics Endpoint (issue #397)
|
|
7
|
+
|
|
8
|
+
Expose process metrics (CPU, RSS, heap, event-loop lag) and every framework counter (`frontmcp_skills_*_total`, plus any counter emitted via `createCounter()`) as a Prometheus scrape endpoint on the same HTTP listener as `/healthz`. The endpoint is **OFF by default** — turn it on with `metrics: { enabled: true }`.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- Cluster operators want a `/metrics` URL for Prometheus / Grafana Agent / OpenTelemetry Collector to scrape.
|
|
13
|
+
- Kubernetes HPA / Vercel autoscaling needs a pull endpoint instead of an OTel push pipeline.
|
|
14
|
+
- On-call engineers need `curl :PORT/metrics | grep event_loop` without installing cluster-side tooling first.
|
|
15
|
+
- The host wants both push (via OTel `MeterProvider`) and pull (this endpoint) — they read from the same in-memory counter store, so values stay consistent.
|
|
16
|
+
|
|
17
|
+
## Enable with defaults
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { FrontMcp } from '@frontmcp/sdk';
|
|
21
|
+
|
|
22
|
+
@FrontMcp({
|
|
23
|
+
info: { name: 'my-server', version: '1.0.0' },
|
|
24
|
+
apps: [MyApp],
|
|
25
|
+
metrics: { enabled: true },
|
|
26
|
+
})
|
|
27
|
+
class Server {}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then scrape: `curl http://localhost:3001/metrics` — Content-Type is the canonical Prometheus `text/plain; version=0.0.4; charset=utf-8`.
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
@FrontMcp({
|
|
36
|
+
metrics: {
|
|
37
|
+
enabled: true, // default: false
|
|
38
|
+
path: '/metrics', // default: '/metrics'
|
|
39
|
+
format: 'prometheus', // 'prometheus' | 'json'
|
|
40
|
+
auth: 'public', // 'public' | 'token' | { token: string }
|
|
41
|
+
tokenEnv: 'FRONTMCP_METRICS_TOKEN', // env var read at startup when auth: 'token'
|
|
42
|
+
include: ['process', 'skills'], // optional category filter
|
|
43
|
+
process: {
|
|
44
|
+
eventLoopLag: true, // mean + p99 event-loop lag gauge
|
|
45
|
+
fdCount: true, // Linux /proc/self/fd count
|
|
46
|
+
activeHandles: true, // libuv handle / request counts
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## What gets emitted
|
|
53
|
+
|
|
54
|
+
| Category | Examples |
|
|
55
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
+
| Process gauges | `frontmcp_process_resident_memory_bytes`, `frontmcp_process_heap_bytes`, `frontmcp_process_uptime_seconds`, `frontmcp_process_cpu_seconds_total{mode}` |
|
|
57
|
+
| Node.js gauges | `frontmcp_nodejs_eventloop_lag_seconds{quantile}`, `frontmcp_nodejs_active_handles`, `frontmcp_nodejs_active_requests`, `frontmcp_nodejs_open_fds` (Linux only) |
|
|
58
|
+
| Framework counters | `frontmcp_skills_bundle_pulls_total`, `frontmcp_skills_signature_*_total`, `frontmcp_skills_replay_*_total`, `frontmcp_skills_audit_*_total` |
|
|
59
|
+
| Custom counters | Anything emitted via `createCounter('my_total').inc()` from `@frontmcp/observability` |
|
|
60
|
+
|
|
61
|
+
## Token auth
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
metrics: {
|
|
65
|
+
enabled: true,
|
|
66
|
+
auth: 'token',
|
|
67
|
+
tokenEnv: 'FRONTMCP_METRICS_TOKEN',
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Fails fast at startup with `MetricsTokenNotConfiguredError` when the env var is unset — a token-gated endpoint never silently downgrades to public.
|
|
72
|
+
|
|
73
|
+
| Request | Status |
|
|
74
|
+
| --------------------------------- | ------ |
|
|
75
|
+
| no `Authorization` header | 401 |
|
|
76
|
+
| `Authorization: Bearer <wrong>` | 403 |
|
|
77
|
+
| `Authorization: Bearer <correct>` | 200 |
|
|
78
|
+
|
|
79
|
+
## Off-by-default rationale
|
|
80
|
+
|
|
81
|
+
Process metrics, framework counter names, and tool vocabularies can hint at deployment scale and feature usage (e.g. `frontmcp_skills_signature_failures_total` reveals a signing infra exists). Recommendations:
|
|
82
|
+
|
|
83
|
+
- **Internet-exposed deployments**: use `auth: 'token'` or terminate at a sidecar/ingress with a network ACL.
|
|
84
|
+
- **Cluster-local deployments**: `auth: 'public'` matches the Prometheus / Kubernetes convention.
|
|
85
|
+
|
|
86
|
+
## Add custom counters
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { createCounter } from '@frontmcp/observability';
|
|
90
|
+
|
|
91
|
+
const cacheHits = createCounter('my_cache_hits_total', 'Cache hits by tier');
|
|
92
|
+
|
|
93
|
+
// In a tool / provider:
|
|
94
|
+
cacheHits.inc(1, { tier: 'l1' });
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The next scrape will include:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
# TYPE my_cache_hits_total counter
|
|
101
|
+
my_cache_hits_total{tier="l1"} 1
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Keep label values bounded (status codes, enum members, tool names) — unbounded values blow up the timeseries count.
|
|
105
|
+
|
|
106
|
+
## Path conflict guard
|
|
107
|
+
|
|
108
|
+
`metrics.path` MUST NOT collide with MCP transport paths (`/mcp`, `/sse`, `/messages`). The service constructor throws `MetricsPathConflictError` at startup if it detects an overlap.
|
|
109
|
+
|
|
110
|
+
## Common Patterns
|
|
111
|
+
|
|
112
|
+
| Pattern | Correct | Incorrect | Why |
|
|
113
|
+
| ----------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
114
|
+
| Enable endpoint | `metrics: { enabled: true }` | Omit `metrics:` and hope it's on | The endpoint is opt-in; default is OFF for security |
|
|
115
|
+
| Internet exposure | `metrics: { enabled: true, auth: 'token', tokenEnv: 'FRONTMCP_METRICS_TOKEN' }` | `metrics: { enabled: true, auth: 'public' }` on a public host | `auth: 'public'` is for cluster-local convention only |
|
|
116
|
+
| Custom counters | `createCounter('foo_total').inc(1, { status: 'ok' })` | `prom-client` `new Counter({...})` | The framework reads from `@frontmcp/observability`'s in-memory store; only `createCounter()` flows through it |
|
|
117
|
+
| Label cardinality | `{ status: 'ok' \| 'error' }` | `{ user_id: '<jwt-sub>' }` | Unbounded label values blow up the timeseries count |
|
|
118
|
+
|
|
119
|
+
## Verification Checklist
|
|
120
|
+
|
|
121
|
+
### Configuration
|
|
122
|
+
|
|
123
|
+
- [ ] `metrics: { enabled: true }` is set in `@FrontMcp({ ... })`
|
|
124
|
+
- [ ] For internet-exposed deployments, `auth: 'token'` + `tokenEnv` are set AND the env var is exported in the deployment
|
|
125
|
+
- [ ] `metrics.path` does NOT start with `/mcp`, `/sse`, or `/messages`
|
|
126
|
+
- [ ] If using `include[]`, every category name is from the enum (`process` | `tools` | `resources` | `http` | `storage` | `skills` | `auth` | `sessions`)
|
|
127
|
+
|
|
128
|
+
### Runtime
|
|
129
|
+
|
|
130
|
+
- [ ] `curl http://<host>:<port>/metrics` returns 200 with Content-Type `text/plain; version=0.0.4; charset=utf-8`
|
|
131
|
+
- [ ] Output contains at least one `frontmcp_process_*` gauge (proves the process-stats collector ran)
|
|
132
|
+
- [ ] Output contains every `frontmcp_skills_*_total` counter incremented since startup
|
|
133
|
+
- [ ] When `auth: 'token'`, requests without `Authorization: Bearer …` return 401 and wrong tokens return 403
|
|
134
|
+
- [ ] Default `@FrontMcp({})` (no `metrics:` key) → `GET /metrics` returns 404 (route was never registered)
|
|
135
|
+
|
|
136
|
+
## Troubleshooting
|
|
137
|
+
|
|
138
|
+
| Problem | Cause | Solution |
|
|
139
|
+
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
140
|
+
| `GET /metrics` returns 404 | `metrics.enabled` is `false` (default) | Set `metrics: { enabled: true }` |
|
|
141
|
+
| Server throws `MetricsTokenNotConfiguredError` at boot | `auth: 'token'` set but the env var is empty | Export the env var, or switch `auth` to `'public'` / `{ token: '...' }` |
|
|
142
|
+
| Server throws `MetricsPathConflictError` at boot | `metrics.path` starts with `/mcp`, `/sse`, or `/messages` | Pick a non-MCP path like `/metrics` or `/internal/metrics` |
|
|
143
|
+
| Custom `createCounter()` values missing from the scrape | Counter was created on a different `@frontmcp/observability` module instance (e.g. duplicated in node_modules) | Ensure single `@frontmcp/observability` install via `yarn dedupe` / `npm ls @frontmcp/observability` |
|
|
144
|
+
| OTel push pipeline and `/metrics` show different values | Counters created outside `createCounter()` (e.g. raw `prom-client`) bypass the in-memory store | Use `createCounter()` from `@frontmcp/observability` for everything; both paths read the same store |
|
|
145
|
+
|
|
146
|
+
## Examples
|
|
147
|
+
|
|
148
|
+
| Example | Level | Description |
|
|
149
|
+
| ------------------------------------------------------------------------------------ | ----- | -------------------------------------------------------------------- |
|
|
150
|
+
| [`enable-metrics-endpoint`](../examples/metrics-endpoint/enable-metrics-endpoint.md) | Basic | Turn on the /metrics endpoint with defaults and scrape it with curl. |
|
|
151
|
+
|
|
152
|
+
## Accessing This Skill
|
|
153
|
+
|
|
154
|
+
This skill is available over MCP under `skill://frontmcp-observability/SKILL.md` per SEP-2640. This reference page is served at `skill://frontmcp-observability/references/metrics-endpoint.md`.
|
|
155
|
+
|
|
156
|
+
## Reference
|
|
157
|
+
|
|
158
|
+
- Docs: https://docs.agentfront.dev/frontmcp/deployment/metrics
|
|
159
|
+
- Issue tracker: https://github.com/agentfront/frontmcp/issues/397
|
|
160
|
+
- SDK exports: `MetricsService`, `registerMetricsRoutes`, `MetricsPathConflictError`, `MetricsTokenNotConfiguredError`
|
|
161
|
+
- Observability exports: `renderPrometheusExposition`, `renderJsonExposition`, `ProcessStatsCollector`, `PROMETHEUS_CONTENT_TYPE`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-production-readiness
|
|
3
|
-
description: 'Pre-production audit and
|
|
3
|
+
description: 'Pre-production audit, hardening, and go-live checklists for FrontMCP servers. Use before shipping to verify security hardening, performance, reliability, and observability, and for target-specific production checklists: Node server (Docker, graceful shutdown, Redis session scaling), Vercel and edge (cold-start, stateless design), AWS Lambda (cold start, scaling, monitoring), Cloudflare Workers (KV, Durable Objects, runtime limits), CLI binary and local daemon (stdio and socket transport), browser SDK bundle, and embedded npm SDK. Also configuring /healthz and /readyz health and readiness endpoints with custom probes, and distributed high-availability (multi-pod heartbeat, session takeover, notification relay). Triggers: production ready, security audit, hardening, performance check, production checklist, go live, pre-launch review.'
|
|
4
4
|
tags: [production, security, performance, reliability, observability, audit, best-practices]
|
|
5
5
|
category: production
|
|
6
6
|
targets: [all]
|
package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md
CHANGED
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
SkillAuditWriterToken,
|
|
106
106
|
StorageAdapterAuditStore,
|
|
107
107
|
} from '@frontmcp/adapters/skills';
|
|
108
|
-
import {
|
|
108
|
+
import { createStorage } from '@frontmcp/utils';
|
|
109
109
|
|
|
110
110
|
// 1. Audit subsystem
|
|
111
111
|
//
|
|
@@ -127,8 +127,9 @@ export const auditSigner = new Rs256AuditSigner(
|
|
|
127
127
|
'bundle-signing-2026-01',
|
|
128
128
|
);
|
|
129
129
|
|
|
130
|
+
// createStorage() returns a RootStorage, which is a StorageAdapter.
|
|
130
131
|
export const auditStore = new StorageAdapterAuditStore(
|
|
131
|
-
await
|
|
132
|
+
await createStorage({ type: 'redis', redis: { config: { host: process.env.REDIS_HOST!, port: 6379 } } }),
|
|
132
133
|
);
|
|
133
134
|
|
|
134
135
|
// 2. Meter provider — exports framework counters (bundle pulls, signature failures, ...)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-setup
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when starting, scaffolding, or organizing a FrontMCP project. Covers creating a new project (CLI scaffold or manual) for Node, Vercel, and other targets; standalone versus Nx-monorepo layout, naming conventions, generators, and dependency rules; composing multiple @App classes, ESM packages, and remote MCP servers into one server; provisioning session and storage backends (Redis, Vercel KV, SQLite with WAL and optional encryption); generating deployment-target-aware README files; and searching, installing, and managing the FrontMCP skill catalog for AI agents (Claude Code, Codex). Triggers: create a new project, how do I start, scaffold, project layout, folder structure, Nx monorepo, add Redis, set up SQLite or a database, compose apps, create a new app, manage skills.'
|
|
4
4
|
tags: [router, setup, scaffold, project, nx, redis, sqlite, structure, guide]
|
|
5
5
|
category: setup
|
|
6
6
|
targets: [all]
|
|
@@ -52,17 +52,17 @@ Entry point for project setup and scaffolding. This skill helps you find the rig
|
|
|
52
52
|
|
|
53
53
|
## Scenario Routing Table
|
|
54
54
|
|
|
55
|
-
| Scenario | Reference | Description
|
|
56
|
-
| --------------------------------------------- | -------------------------------------------- |
|
|
57
|
-
| Scaffold a new project with `frontmcp create` | `references/setup-project.md` | CLI scaffolder (flags: `--target`, `--redis`, `--skills <bundle>`, `--cicd`, `--nx`, `--pm`)
|
|
58
|
-
| Organize a standalone (non-Nx) project | `references/project-structure-standalone.md` | File layout, naming conventions (`<name>.<type>.ts`), folder hierarchy
|
|
59
|
-
| Organize an Nx monorepo | `references/project-structure-nx.md` | apps/, libs/, servers/ layout, generators, dependency rules
|
|
60
|
-
| Set up Redis for production storage | `references/setup-redis.md` | Docker Redis, Vercel KV, pub/sub for distributed subscriptions (single-server uses in-memory)
|
|
61
|
-
| Set up SQLite for local development | `references/setup-sqlite.md` | WAL mode, migration helpers, encryption
|
|
62
|
-
| Compose multiple apps into one server | `references/multi-app-composition.md` | `@FrontMcp` with multiple `@App` classes, cross-app providers
|
|
63
|
-
| Use Nx build, test, and CI commands | `references/nx-workflow.md` | `nx build`, `nx test`, `nx run-many`, caching, affected commands
|
|
64
|
-
| Browse, install, and manage skills | `references/frontmcp-skills-usage.md` | CLI commands, bundles, categories,
|
|
65
|
-
| Generate or update project README.md | `references/readme-guide.md` | Deployment-target-aware README for npm, CLI, Docker, serverless
|
|
55
|
+
| Scenario | Reference | Description |
|
|
56
|
+
| --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
57
|
+
| Scaffold a new project with `frontmcp create` | `references/setup-project.md` | CLI scaffolder (flags: `--target`, `--redis`, `--skills <bundle>`, `--cicd`, `--nx`, `--pm`) |
|
|
58
|
+
| Organize a standalone (non-Nx) project | `references/project-structure-standalone.md` | File layout, naming conventions (`<name>.<type>.ts`), folder hierarchy |
|
|
59
|
+
| Organize an Nx monorepo | `references/project-structure-nx.md` | apps/, libs/, servers/ layout, generators, dependency rules |
|
|
60
|
+
| Set up Redis for production storage | `references/setup-redis.md` | Docker Redis, Vercel KV, pub/sub for distributed subscriptions (single-server uses in-memory) |
|
|
61
|
+
| Set up SQLite for local development | `references/setup-sqlite.md` | WAL mode, migration helpers, encryption |
|
|
62
|
+
| Compose multiple apps into one server | `references/multi-app-composition.md` | `@FrontMcp` with multiple `@App` classes, cross-app providers |
|
|
63
|
+
| Use Nx build, test, and CI commands | `references/nx-workflow.md` | `nx build`, `nx test`, `nx run-many`, caching, affected commands |
|
|
64
|
+
| Browse, install, and manage skills | `references/frontmcp-skills-usage.md` | CLI commands (search, list, install, read, export, publish), bundles, categories, bulk install |
|
|
65
|
+
| Generate or update project README.md | `references/readme-guide.md` | Deployment-target-aware README for npm, CLI, Docker, serverless |
|
|
66
66
|
|
|
67
67
|
## Recommended Reading Order
|
|
68
68
|
|
|
@@ -3,11 +3,13 @@ name: install-and-search-skills
|
|
|
3
3
|
reference: frontmcp-skills-usage
|
|
4
4
|
level: basic
|
|
5
5
|
description: 'Install skills statically for Claude Code and use dynamic CLI search for on-demand discovery.'
|
|
6
|
-
tags: [setup, cli, anthropic, skills, usage, install]
|
|
6
|
+
tags: [setup, cli, anthropic, skills, usage, install, bulk, export]
|
|
7
7
|
features:
|
|
8
8
|
- '`frontmcp skills list` and `search` for discovering available skills'
|
|
9
9
|
- '`frontmcp skills read` for viewing skill content and references on demand'
|
|
10
10
|
- '`frontmcp skills install --provider claude` for static installation to `.claude/skills/`'
|
|
11
|
+
- '`frontmcp skills install --all` / `--category` / `--tag` for bulk install in one command'
|
|
12
|
+
- '`frontmcp skills export` to ship a skill to Cursor / Windsurf / Copilot rule files'
|
|
11
13
|
- 'Installed skills are auto-loaded by Claude Code in its system prompt context'
|
|
12
14
|
---
|
|
13
15
|
|
|
@@ -52,6 +54,20 @@ frontmcp skills install frontmcp-development --provider codex
|
|
|
52
54
|
|
|
53
55
|
# Install to a custom directory
|
|
54
56
|
frontmcp skills install frontmcp-guides --dir ./my-skills
|
|
57
|
+
|
|
58
|
+
# Bulk install — every skill in a category in one command
|
|
59
|
+
frontmcp skills install --category development --provider claude
|
|
60
|
+
|
|
61
|
+
# Bulk install — every skill in the catalog
|
|
62
|
+
frontmcp skills install --all --provider claude
|
|
63
|
+
|
|
64
|
+
# Bulk install by tag
|
|
65
|
+
frontmcp skills install --tag middleware --provider codex
|
|
66
|
+
|
|
67
|
+
# Export a skill as a Cursor / Windsurf / Copilot rule file (for skills-unaware IDEs)
|
|
68
|
+
frontmcp skills export --name frontmcp-development --target cursor
|
|
69
|
+
frontmcp skills export --all --target windsurf
|
|
70
|
+
frontmcp skills export --all --target copilot --out ./.github
|
|
55
71
|
```
|
|
56
72
|
|
|
57
73
|
After installation, the directory structure:
|
|
@@ -76,6 +92,8 @@ my-project/
|
|
|
76
92
|
- `frontmcp skills list` and `search` for discovering available skills
|
|
77
93
|
- `frontmcp skills read` for viewing skill content and references on demand
|
|
78
94
|
- `frontmcp skills install --provider claude` for static installation to `.claude/skills/`
|
|
95
|
+
- `frontmcp skills install --all` / `--category` / `--tag` for bulk install in one command
|
|
96
|
+
- `frontmcp skills export` to ship a skill to Cursor / Windsurf / Copilot rule files
|
|
79
97
|
- Installed skills are auto-loaded by Claude Code in its system prompt context
|
|
80
98
|
|
|
81
99
|
## Related
|