@frontmcp/skills 1.1.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/TEMPLATE.md +16 -11
- package/catalog/frontmcp-authorities/SKILL.md +116 -11
- package/catalog/frontmcp-authorities/references/authority-profiles.md +39 -36
- package/catalog/frontmcp-authorities/references/claims-mapping.md +7 -0
- package/catalog/frontmcp-authorities/references/custom-evaluators.md +63 -14
- package/catalog/frontmcp-channels/SKILL.md +36 -0
- package/catalog/frontmcp-channels/examples/channel-sources/file-watcher.md +8 -2
- package/catalog/frontmcp-channels/examples/channel-sources/replay-buffer.md +111 -30
- package/catalog/frontmcp-channels/examples/channel-two-way/whatsapp-bridge.md +45 -3
- package/catalog/frontmcp-channels/references/channel-sources.md +11 -3
- package/catalog/frontmcp-channels/references/channel-two-way.md +60 -89
- package/catalog/frontmcp-config/SKILL.md +111 -8
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +4 -4
- package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +7 -1
- package/catalog/frontmcp-config/examples/configure-deployment-targets/distributed-ha-config.md +1 -1
- package/catalog/frontmcp-config/examples/configure-deployment-targets/json-schema-ide-support.md +1 -1
- package/catalog/frontmcp-config/examples/configure-deployment-targets/multi-target-with-security.md +12 -9
- package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +2 -2
- package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +1 -1
- package/catalog/frontmcp-config/examples/configure-security-headers/csp-report-only.md +1 -1
- package/catalog/frontmcp-config/examples/configure-security-headers/full-production-headers.md +1 -1
- package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-basic.md +76 -0
- package/catalog/frontmcp-config/examples/configure-skills-http/audit-log-redis.md +116 -0
- package/catalog/frontmcp-config/examples/configure-skills-http/inject-instructions.md +59 -0
- package/catalog/frontmcp-config/references/configure-auth-modes.md +5 -5
- package/catalog/frontmcp-config/references/configure-deployment-targets.md +27 -24
- package/catalog/frontmcp-config/references/configure-http.md +14 -10
- package/catalog/frontmcp-config/references/configure-security-headers.md +2 -2
- package/catalog/frontmcp-config/references/configure-session.md +25 -25
- package/catalog/frontmcp-config/references/configure-skills-http.md +157 -0
- package/catalog/frontmcp-config/references/configure-throttle.md +1 -1
- package/catalog/frontmcp-config/references/configure-transport.md +2 -2
- package/catalog/frontmcp-deployment/SKILL.md +112 -9
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +23 -11
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +44 -17
- package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +53 -21
- package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-mcpb/mcpb-bundle-build.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +1 -1
- package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +1 -1
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +7 -8
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +8 -6
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +5 -4
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +8 -5
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +20 -18
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +8 -5
- package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +3 -3
- package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +1 -1
- package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +2 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +2 -2
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +1 -1
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +23 -21
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +25 -22
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +23 -30
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +52 -28
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +32 -55
- package/catalog/frontmcp-deployment/examples/mcp-client-integration/http-remote.md +9 -0
- package/catalog/frontmcp-deployment/references/build-for-browser.md +40 -17
- package/catalog/frontmcp-deployment/references/build-for-cli.md +8 -8
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +43 -24
- package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +36 -25
- package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +56 -14
- package/catalog/frontmcp-deployment/references/deploy-to-node.md +9 -6
- package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +57 -58
- package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +49 -59
- package/catalog/frontmcp-deployment/references/mcp-client-integration.md +2 -0
- package/catalog/frontmcp-development/SKILL.md +186 -11
- package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +1 -1
- package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +30 -27
- package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +13 -8
- package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +33 -23
- package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +19 -10
- package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +3 -3
- package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +6 -4
- package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +1 -1
- package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +13 -8
- package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +50 -23
- package/catalog/frontmcp-development/references/create-agent.md +47 -30
- package/catalog/frontmcp-development/references/create-job.md +69 -54
- package/catalog/frontmcp-development/references/create-plugin-hooks.md +45 -28
- package/catalog/frontmcp-development/references/create-plugin.md +10 -8
- package/catalog/frontmcp-development/references/create-prompt.md +3 -3
- package/catalog/frontmcp-development/references/create-provider.md +91 -51
- package/catalog/frontmcp-development/references/create-resource.md +3 -3
- package/catalog/frontmcp-development/references/create-skill.md +2 -2
- package/catalog/frontmcp-development/references/create-tool.md +7 -7
- package/catalog/frontmcp-development/references/create-workflow.md +8 -10
- package/catalog/frontmcp-development/references/decorators-guide.md +92 -56
- package/catalog/frontmcp-development/references/official-plugins.md +4 -3
- package/catalog/frontmcp-development/references/openapi-adapter.md +1 -1
- package/catalog/frontmcp-extensibility/SKILL.md +70 -10
- package/catalog/frontmcp-extensibility/examples/skill-audit-log/custom-store.md +197 -0
- package/catalog/frontmcp-extensibility/examples/skill-audit-log/verify-chain.md +68 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +3 -5
- package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +4 -11
- package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +41 -30
- package/catalog/frontmcp-extensibility/references/skill-audit-log.md +233 -0
- package/catalog/frontmcp-extensibility/references/vectoriadb.md +73 -63
- package/catalog/frontmcp-guides/SKILL.md +84 -27
- package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +72 -62
- package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +32 -43
- package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +24 -17
- package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +23 -21
- package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +47 -39
- package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +16 -6
- package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +9 -8
- package/catalog/frontmcp-guides/references/example-knowledge-base.md +192 -265
- package/catalog/frontmcp-guides/references/example-task-manager.md +60 -54
- package/catalog/frontmcp-guides/references/example-weather-api.md +22 -24
- package/catalog/frontmcp-observability/SKILL.md +66 -2
- package/catalog/frontmcp-observability/examples/telemetry-api/skill-counters.md +100 -0
- package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +7 -2
- package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +6 -2
- package/catalog/frontmcp-observability/references/telemetry-api.md +72 -8
- package/catalog/frontmcp-observability/references/testing-observability.md +33 -49
- package/catalog/frontmcp-observability/references/tracing-setup.md +12 -5
- package/catalog/frontmcp-observability/references/vendor-integrations.md +46 -1
- package/catalog/frontmcp-production-readiness/SKILL.md +134 -3
- package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +57 -36
- package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +1 -1
- package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +102 -6
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +2 -1
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +66 -58
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +5 -3
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +2 -1
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +55 -76
- package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +43 -40
- package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +63 -94
- package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +28 -18
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +29 -14
- package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +58 -42
- package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +5 -2
- package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +41 -24
- package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +56 -65
- package/catalog/frontmcp-production-readiness/references/common-checklist.md +17 -5
- package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-lambda.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +5 -5
- package/catalog/frontmcp-production-readiness/references/production-node-server.md +1 -1
- package/catalog/frontmcp-production-readiness/references/production-vercel.md +5 -5
- package/catalog/frontmcp-setup/SKILL.md +88 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +10 -4
- package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +21 -8
- package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +3 -3
- package/catalog/frontmcp-setup/references/multi-app-composition.md +4 -3
- package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -6
- package/catalog/frontmcp-setup/references/project-structure-standalone.md +18 -15
- package/catalog/frontmcp-setup/references/readme-guide.md +1 -1
- package/catalog/frontmcp-setup/references/setup-project.md +19 -5
- package/catalog/frontmcp-setup/references/setup-redis.md +27 -39
- package/catalog/frontmcp-setup/references/setup-sqlite.md +25 -18
- package/catalog/frontmcp-testing/SKILL.md +102 -15
- package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +3 -3
- package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +50 -39
- package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +52 -29
- package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +37 -20
- package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +25 -15
- package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +27 -21
- package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +29 -20
- package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +5 -3
- package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +35 -26
- package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +8 -3
- package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +4 -1
- package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +6 -3
- package/catalog/frontmcp-testing/references/setup-testing.md +35 -39
- package/catalog/frontmcp-testing/references/test-auth.md +86 -43
- package/catalog/frontmcp-testing/references/test-browser-build.md +1 -1
- package/catalog/frontmcp-testing/references/test-direct-client.md +29 -19
- package/catalog/frontmcp-testing/references/test-e2e-handler.md +31 -19
- package/catalog/frontmcp-testing/references/test-tool-unit.md +6 -2
- package/catalog/skills-manifest.json +428 -339
- package/package.json +1 -1
- package/src/manifest.d.ts +13 -0
- package/src/manifest.js.map +1 -1
|
@@ -65,8 +65,9 @@ Entry point for configuring FrontMCP servers. This skill helps you find the righ
|
|
|
65
65
|
| Understand auth mode details (public/transparent/local/remote) | `configure-auth-modes` | Authentication mode details (public, transparent, local, remote) |
|
|
66
66
|
| Fine-tune guard configuration for throttling | `configure-throttle-guard-config` | Advanced guard configuration for throttling |
|
|
67
67
|
| Use transport protocol presets | `configure-transport-protocol-presets` | Transport protocol preset configurations |
|
|
68
|
-
| Configure multi-target deployments and frontmcp.config.ts | `configure-deployment-targets` | Typed config with defineConfig(),
|
|
68
|
+
| Configure multi-target deployments and frontmcp.config.ts | `configure-deployment-targets` | Typed config with defineConfig(), 9 deployment targets, JSON schema |
|
|
69
69
|
| Add CSP, HSTS, X-Frame-Options, and other security headers | `configure-security-headers` | CSP directives, report-only mode, HSTS preload, custom headers |
|
|
70
|
+
| Configure skills HTTP, instructions injection, or audit log | `configure-skills-http` | Full `skillsConfig` reference: auth, cache, instructions, audit log |
|
|
70
71
|
| Split apps into separate scopes (`splitByApp`) | `decorators-guide` | Per-app scope and basePath isolation on `@FrontMcp` |
|
|
71
72
|
| Enable widget-to-host communication (ext-apps) | `decorators-guide` | `extApps` host capabilities, session validation, widget comms |
|
|
72
73
|
| Enable background jobs and workflows | `decorators-guide` | `jobs: { enabled: true, store? }` on `@FrontMcp` |
|
|
@@ -144,13 +145,115 @@ Server (@FrontMcp) ← Global defaults
|
|
|
144
145
|
|
|
145
146
|
## Troubleshooting
|
|
146
147
|
|
|
147
|
-
| Problem | Cause | Solution
|
|
148
|
-
| --------------------------------------- | ------------------------------------------------ |
|
|
149
|
-
| Server fails to start with config error | Invalid or missing required config field | Check the error message; FrontMCP validates config at startup and reports the specific invalid field
|
|
150
|
-
| CORS blocked in browser | Missing or incorrect CORS origin config | Add the client's origin to `http.cors.origin`; see `configure-http`
|
|
151
|
-
| Rate limit too aggressive | Global limit applied to all tools | Add per-tool overrides for cheap tools with higher limits; see `configure-throttle`
|
|
152
|
-
| Sessions lost on serverless | Using memory session store on stateless platform | Switch to Redis or Vercel KV; see `configure-session`
|
|
153
|
-
| Auth callback fails | OAuth redirect URI mismatch | Ensure the
|
|
148
|
+
| Problem | Cause | Solution |
|
|
149
|
+
| --------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
150
|
+
| Server fails to start with config error | Invalid or missing required config field | Check the error message; FrontMCP validates config at startup and reports the specific invalid field |
|
|
151
|
+
| CORS blocked in browser | Missing or incorrect CORS origin config | Add the client's origin to `http.cors.origin`; see `configure-http` |
|
|
152
|
+
| Rate limit too aggressive | Global limit applied to all tools | Add per-tool overrides for cheap tools with higher limits; see `configure-throttle` |
|
|
153
|
+
| Sessions lost on serverless | Using memory session store on stateless platform | Switch to Redis or Vercel KV; see `configure-session` |
|
|
154
|
+
| Auth callback fails | OAuth redirect URI mismatch | Ensure the redirect URI registered with your OAuth provider matches the server's `/oauth/callback` endpoint; see `configure-auth` |
|
|
155
|
+
|
|
156
|
+
## Examples
|
|
157
|
+
|
|
158
|
+
Each reference has matching examples under [`examples/<reference>/`](./examples/):
|
|
159
|
+
|
|
160
|
+
### `configure-auth-modes`
|
|
161
|
+
|
|
162
|
+
| Example | Level | Description |
|
|
163
|
+
| --------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------- |
|
|
164
|
+
| [`local-self-signed-tokens`](./examples/configure-auth-modes/local-self-signed-tokens.md) | Intermediate | Configure a server that signs its own JWT tokens with consent and incremental auth enabled. |
|
|
165
|
+
| [`remote-enterprise-oauth`](./examples/configure-auth-modes/remote-enterprise-oauth.md) | Advanced | Delegate authentication to an external OAuth orchestrator with Redis-backed token storage. |
|
|
166
|
+
| [`transparent-jwt-validation`](./examples/configure-auth-modes/transparent-jwt-validation.md) | Basic | Validate externally-issued JWTs without managing token lifecycle on the server. |
|
|
167
|
+
|
|
168
|
+
### `configure-auth`
|
|
169
|
+
|
|
170
|
+
| Example | Level | Description |
|
|
171
|
+
| --------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
172
|
+
| [`multi-app-auth`](./examples/configure-auth/multi-app-auth.md) | Advanced | Configure a single FrontMCP server with multiple apps, each using a different auth mode -- public for open endpoints and remote for admin endpoints. |
|
|
173
|
+
| [`public-mode-setup`](./examples/configure-auth/public-mode-setup.md) | Basic | Set up a FrontMCP server with public (unauthenticated) access and anonymous scopes. |
|
|
174
|
+
| [`remote-oauth-with-vault`](./examples/configure-auth/remote-oauth-with-vault.md) | Intermediate | Configure a FrontMCP server with remote OAuth 2.1 authentication and use the credential vault to call downstream APIs on behalf of the authenticated user. |
|
|
175
|
+
|
|
176
|
+
### `configure-elicitation`
|
|
177
|
+
|
|
178
|
+
| Example | Level | Description |
|
|
179
|
+
| ---------------------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------- |
|
|
180
|
+
| [`basic-confirmation-gate`](./examples/configure-elicitation/basic-confirmation-gate.md) | Basic | Request user confirmation before executing a destructive action. |
|
|
181
|
+
| [`distributed-elicitation-redis`](./examples/configure-elicitation/distributed-elicitation-redis.md) | Intermediate | Configure elicitation with Redis storage for multi-instance production deployments. |
|
|
182
|
+
|
|
183
|
+
### `configure-http`
|
|
184
|
+
|
|
185
|
+
| Example | Level | Description |
|
|
186
|
+
| ----------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------ |
|
|
187
|
+
| [`cors-restricted-origins`](./examples/configure-http/cors-restricted-origins.md) | Basic | Configure CORS to allow only specific frontend origins with credentials. |
|
|
188
|
+
| [`entry-path-reverse-proxy`](./examples/configure-http/entry-path-reverse-proxy.md) | Intermediate | Mount the MCP server under a URL prefix for reverse proxy or multi-service setups. |
|
|
189
|
+
| [`unix-socket-local`](./examples/configure-http/unix-socket-local.md) | Intermediate | Bind the server to a unix socket instead of a TCP port for local-only communication. |
|
|
190
|
+
|
|
191
|
+
### `configure-session`
|
|
192
|
+
|
|
193
|
+
| Example | Level | Description |
|
|
194
|
+
| ------------------------------------------------------------------------------------ | ------------ | -------------------------------------------------------------------------------- |
|
|
195
|
+
| [`multi-server-key-prefix`](./examples/configure-session/multi-server-key-prefix.md) | Intermediate | Use unique key prefixes when multiple FrontMCP servers share one Redis instance. |
|
|
196
|
+
| [`redis-session-store`](./examples/configure-session/redis-session-store.md) | Basic | Configure Redis-backed session storage for production deployments. |
|
|
197
|
+
| [`vercel-kv-session`](./examples/configure-session/vercel-kv-session.md) | Intermediate | Configure Vercel KV for session storage in serverless Vercel deployments. |
|
|
198
|
+
|
|
199
|
+
### `configure-throttle-guard-config`
|
|
200
|
+
|
|
201
|
+
| Example | Level | Description |
|
|
202
|
+
| -------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------ |
|
|
203
|
+
| [`full-guard-config`](./examples/configure-throttle-guard-config/full-guard-config.md) | Advanced | Complete GuardConfig using every available field for maximum protection. |
|
|
204
|
+
| [`minimal-guard-config`](./examples/configure-throttle-guard-config/minimal-guard-config.md) | Basic | Enable throttle with just a global rate limit and default timeout. |
|
|
205
|
+
|
|
206
|
+
### `configure-throttle`
|
|
207
|
+
|
|
208
|
+
| Example | Level | Description |
|
|
209
|
+
| ------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------- |
|
|
210
|
+
| [`distributed-redis-throttle`](./examples/configure-throttle/distributed-redis-throttle.md) | Advanced | Configure Redis-backed rate limiting for multi-instance deployments behind a load balancer. |
|
|
211
|
+
| [`per-tool-rate-limit`](./examples/configure-throttle/per-tool-rate-limit.md) | Intermediate | Override server defaults with per-tool rate limits and concurrency caps. |
|
|
212
|
+
| [`server-level-rate-limit`](./examples/configure-throttle/server-level-rate-limit.md) | Basic | Configure global rate limits and IP filtering at the server level. |
|
|
213
|
+
|
|
214
|
+
### `configure-transport-protocol-presets`
|
|
215
|
+
|
|
216
|
+
| Example | Level | Description |
|
|
217
|
+
| --------------------------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------- |
|
|
218
|
+
| [`legacy-preset-nodejs`](./examples/configure-transport-protocol-presets/legacy-preset-nodejs.md) | Basic | Use the default legacy preset for maximum compatibility with all MCP clients. |
|
|
219
|
+
| [`stateless-api-serverless`](./examples/configure-transport-protocol-presets/stateless-api-serverless.md) | Intermediate | Use the stateless-api preset for Vercel, Lambda, or Cloudflare Workers. |
|
|
220
|
+
|
|
221
|
+
### `configure-transport`
|
|
222
|
+
|
|
223
|
+
| Example | Level | Description |
|
|
224
|
+
| -------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
|
|
225
|
+
| [`custom-protocol-flags`](./examples/configure-transport/custom-protocol-flags.md) | Advanced | Override individual protocol flags instead of using a preset for fine-grained control. |
|
|
226
|
+
| [`distributed-sessions-redis`](./examples/configure-transport/distributed-sessions-redis.md) | Intermediate | Configure transport with Redis persistence for multi-instance load-balanced deployments. |
|
|
227
|
+
| [`stateless-serverless`](./examples/configure-transport/stateless-serverless.md) | Basic | Configure stateless transport for Vercel, Lambda, or Cloudflare deployments. |
|
|
228
|
+
|
|
229
|
+
### `configure-deployment-targets`
|
|
230
|
+
|
|
231
|
+
| Example | Level | Description |
|
|
232
|
+
| ----------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
233
|
+
| [`multi-target-with-security`](./examples/configure-deployment-targets/multi-target-with-security.md) | Intermediate | Configure a FrontMCP project with node + distributed targets, CSP headers, and HSTS |
|
|
234
|
+
| [`distributed-ha-config`](./examples/configure-deployment-targets/distributed-ha-config.md) | Advanced | Configure a distributed deployment target with HA settings for heartbeat, session takeover, and Redis-backed session persistence |
|
|
235
|
+
| [`json-schema-ide-support`](./examples/configure-deployment-targets/json-schema-ide-support.md) | Basic | Use frontmcp.config.json with JSON Schema for VS Code and WebStorm autocomplete |
|
|
236
|
+
|
|
237
|
+
### `configure-security-headers`
|
|
238
|
+
|
|
239
|
+
| Example | Level | Description |
|
|
240
|
+
| --------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------- |
|
|
241
|
+
| [`csp-report-only`](./examples/configure-security-headers/csp-report-only.md) | Basic | Test CSP policies in report-only mode to identify violations before enforcement |
|
|
242
|
+
| [`full-production-headers`](./examples/configure-security-headers/full-production-headers.md) | Intermediate | Complete security headers configuration for production with CSP enforcement, HSTS preload, and clickjacking protection |
|
|
243
|
+
|
|
244
|
+
## Accessing This Skill
|
|
245
|
+
|
|
246
|
+
Skills are distributed as plain SKILL.md files plus a sibling `references/`
|
|
247
|
+
and `examples/` tree, so consumers can pick whichever access mode fits:
|
|
248
|
+
|
|
249
|
+
| Mode | How it works |
|
|
250
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
251
|
+
| **Filesystem** | Read `libs/skills/catalog/frontmcp-config/` directly from a clone of the catalog repo, or from a published `@frontmcp/skills` install. SKILL.md is the entry point. |
|
|
252
|
+
| **`frontmcp` CLI** | `frontmcp skills list`, `frontmcp skills read frontmcp-config`, `frontmcp skills read frontmcp-config:references/<file>.md`, `frontmcp skills install frontmcp-config` — no server required. |
|
|
253
|
+
| **MCP `skill://`** | When a developer mounts this skill into their own FrontMCP server (`@FrontMcp({ skills: [...] })`), the SDK exposes it via SEP-2640 resources: `skill://frontmcp-config/SKILL.md`, `skill://frontmcp-config/references/{file}.md`, etc. The server’s `skill://index.json` returns the SEP-2640 discovery document for everything mounted on it. |
|
|
254
|
+
|
|
255
|
+
The catalog itself is **not** an MCP server. The `skill://` URIs only resolve
|
|
256
|
+
when a server has been configured to host this skill.
|
|
154
257
|
|
|
155
258
|
## Reference
|
|
156
259
|
|
|
@@ -6,7 +6,7 @@ description: 'Configure a server that signs its own JWT tokens with consent and
|
|
|
6
6
|
tags: [config, auth, redis, local, auth-modes, modes]
|
|
7
7
|
features:
|
|
8
8
|
- "Using `mode: 'local'` so the server signs its own JWTs"
|
|
9
|
-
- 'Setting `local.issuer` and `
|
|
9
|
+
- 'Setting `local.issuer` and `expectedAudience` to control token claims'
|
|
10
10
|
- 'Enabling `consent` for explicit user authorization flow'
|
|
11
11
|
- 'Enabling `incrementalAuth` to request additional scopes progressively'
|
|
12
12
|
- 'Using Redis for token storage in production'
|
|
@@ -40,9 +40,9 @@ class ManageUsersTool extends ToolContext {
|
|
|
40
40
|
mode: 'local',
|
|
41
41
|
local: {
|
|
42
42
|
issuer: 'my-internal-server',
|
|
43
|
-
audience: 'internal-api',
|
|
44
43
|
},
|
|
45
|
-
|
|
44
|
+
expectedAudience: 'internal-api',
|
|
45
|
+
tokenStorage: { redis: { host: process.env['REDIS_HOST'] ?? 'localhost', port: 6379 } },
|
|
46
46
|
consent: { enabled: true },
|
|
47
47
|
incrementalAuth: { enabled: true },
|
|
48
48
|
},
|
|
@@ -65,7 +65,7 @@ class Server {}
|
|
|
65
65
|
## What This Demonstrates
|
|
66
66
|
|
|
67
67
|
- Using `mode: 'local'` so the server signs its own JWTs
|
|
68
|
-
- Setting `local.issuer` and `
|
|
68
|
+
- Setting `local.issuer` and `expectedAudience` to control token claims
|
|
69
69
|
- Enabling `consent` for explicit user authorization flow
|
|
70
70
|
- Enabling `incrementalAuth` to request additional scopes progressively
|
|
71
71
|
- Using Redis for token storage in production
|
|
@@ -40,7 +40,13 @@ class QueryDataTool extends ToolContext {
|
|
|
40
40
|
provider: 'https://auth.example.com',
|
|
41
41
|
clientId: process.env['OAUTH_CLIENT_ID']!,
|
|
42
42
|
clientSecret: process.env['OAUTH_CLIENT_SECRET'],
|
|
43
|
-
tokenStorage:
|
|
43
|
+
tokenStorage: {
|
|
44
|
+
redis: {
|
|
45
|
+
host: process.env['REDIS_HOST'] ?? 'redis.internal',
|
|
46
|
+
port: Number(process.env['REDIS_PORT'] ?? 6379),
|
|
47
|
+
password: process.env['REDIS_PASSWORD'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
44
50
|
},
|
|
45
51
|
tools: [QueryDataTool],
|
|
46
52
|
})
|
package/catalog/frontmcp-config/examples/configure-deployment-targets/distributed-ha-config.md
CHANGED
|
@@ -19,7 +19,7 @@ Configure a distributed deployment target with HA settings for heartbeat, sessio
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
21
|
// frontmcp.config.ts
|
|
22
|
-
import { defineConfig } from '
|
|
22
|
+
import { defineConfig } from 'frontmcp';
|
|
23
23
|
|
|
24
24
|
export default defineConfig({
|
|
25
25
|
name: 'ha-server',
|
package/catalog/frontmcp-config/examples/configure-deployment-targets/json-schema-ide-support.md
CHANGED
|
@@ -18,7 +18,7 @@ Use frontmcp.config.json with JSON Schema for VS Code and WebStorm autocomplete
|
|
|
18
18
|
|
|
19
19
|
```json
|
|
20
20
|
{
|
|
21
|
-
"$schema": "./node_modules
|
|
21
|
+
"$schema": "./node_modules/frontmcp/frontmcp.schema.json",
|
|
22
22
|
"name": "my-server",
|
|
23
23
|
"version": "1.0.0",
|
|
24
24
|
"deployments": [
|
package/catalog/frontmcp-config/examples/configure-deployment-targets/multi-target-with-security.md
CHANGED
|
@@ -20,7 +20,7 @@ Configure a FrontMCP project with node + distributed targets, CSP headers, and H
|
|
|
20
20
|
|
|
21
21
|
```typescript
|
|
22
22
|
// frontmcp.config.ts
|
|
23
|
-
import { defineConfig } from '
|
|
23
|
+
import { defineConfig } from 'frontmcp';
|
|
24
24
|
|
|
25
25
|
export default defineConfig({
|
|
26
26
|
name: 'secure-server',
|
|
@@ -33,13 +33,13 @@ export default defineConfig({
|
|
|
33
33
|
http: { port: 3000 },
|
|
34
34
|
csp: {
|
|
35
35
|
enabled: true,
|
|
36
|
-
directives:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
'img-src * data:',
|
|
41
|
-
'upgrade-insecure-requests',
|
|
42
|
-
|
|
36
|
+
directives: {
|
|
37
|
+
'default-src': "'self'",
|
|
38
|
+
'script-src': "'self' https://cdn.example.com",
|
|
39
|
+
'style-src': "'self' 'unsafe-inline'",
|
|
40
|
+
'img-src': '* data:',
|
|
41
|
+
'upgrade-insecure-requests': '', // value-less directive
|
|
42
|
+
},
|
|
43
43
|
},
|
|
44
44
|
headers: {
|
|
45
45
|
hsts: 'max-age=31536000; includeSubDomains; preload',
|
|
@@ -60,7 +60,10 @@ export default defineConfig({
|
|
|
60
60
|
server: {
|
|
61
61
|
csp: {
|
|
62
62
|
enabled: true,
|
|
63
|
-
directives:
|
|
63
|
+
directives: {
|
|
64
|
+
'default-src': "'self'",
|
|
65
|
+
'upgrade-insecure-requests': '',
|
|
66
|
+
},
|
|
64
67
|
reportUri: 'https://report.example.com/csp',
|
|
65
68
|
reportOnly: false,
|
|
66
69
|
},
|
|
@@ -19,7 +19,7 @@ Configure CORS to allow only specific frontend origins with credentials.
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
21
|
// src/server.ts
|
|
22
|
-
import {
|
|
22
|
+
import { App, FrontMcp } from '@frontmcp/sdk';
|
|
23
23
|
|
|
24
24
|
@App({ name: 'my-app' })
|
|
25
25
|
class MyApp {}
|
|
@@ -28,7 +28,7 @@ class MyApp {}
|
|
|
28
28
|
info: { name: 'cors-server', version: '1.0.0' },
|
|
29
29
|
apps: [MyApp],
|
|
30
30
|
http: {
|
|
31
|
-
port: Number(process.env['PORT']) ||
|
|
31
|
+
port: Number(process.env['PORT']) || 3000,
|
|
32
32
|
cors: {
|
|
33
33
|
origin: ['https://myapp.com', 'https://staging.myapp.com'],
|
|
34
34
|
credentials: true,
|
|
@@ -18,7 +18,7 @@ Test CSP policies in report-only mode to identify violations before enforcement
|
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
20
|
// frontmcp.config.ts
|
|
21
|
-
import { defineConfig } from '
|
|
21
|
+
import { defineConfig } from 'frontmcp';
|
|
22
22
|
|
|
23
23
|
export default defineConfig({
|
|
24
24
|
name: 'csp-test-server',
|
package/catalog/frontmcp-config/examples/configure-security-headers/full-production-headers.md
CHANGED
|
@@ -19,7 +19,7 @@ Complete security headers configuration for production with CSP enforcement, HST
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
21
|
// frontmcp.config.ts
|
|
22
|
-
import { defineConfig } from '
|
|
22
|
+
import { defineConfig } from 'frontmcp';
|
|
23
23
|
|
|
24
24
|
export default defineConfig({
|
|
25
25
|
name: 'production-server',
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-log-basic
|
|
3
|
+
reference: configure-skills-http
|
|
4
|
+
level: basic
|
|
5
|
+
description: Enable the skill audit log with the in-memory store and HS256 signer for development and tests.
|
|
6
|
+
tags: [config, skills, audit, hs256, development]
|
|
7
|
+
features:
|
|
8
|
+
- 'Bootstraps the audit subsystem via setSkillAuditFactory(...) before FrontMcp registers'
|
|
9
|
+
- 'MemoryAuditStore keeps records in-process — perfect for tests, lost on restart'
|
|
10
|
+
- 'Hs256AuditSigner refuses to start when NODE_ENV === production with a random key'
|
|
11
|
+
- "subjectMode: 'hash' redacts user identifiers while keeping them correlatable"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Audit Log (Basic, Dev-Mode)
|
|
15
|
+
|
|
16
|
+
Enable the skill audit log with the in-memory store and HS256 signer for development and tests.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// src/server.ts
|
|
22
|
+
import {
|
|
23
|
+
Hs256AuditSigner,
|
|
24
|
+
MemoryAuditStore,
|
|
25
|
+
setSkillAuditFactory,
|
|
26
|
+
SkillAuditWriter,
|
|
27
|
+
SkillAuditWriterToken,
|
|
28
|
+
} from '@frontmcp/adapters/skills';
|
|
29
|
+
import { FrontMcp } from '@frontmcp/sdk';
|
|
30
|
+
import { randomBytes } from '@frontmcp/utils';
|
|
31
|
+
|
|
32
|
+
import { MainApp } from './main.app';
|
|
33
|
+
|
|
34
|
+
// Register the audit module record with the SDK at boot. The SDK constructs
|
|
35
|
+
// the writer using the positional signature
|
|
36
|
+
// `new SkillAuditWriter(store, signer, logger, metrics?, options?)` and
|
|
37
|
+
// forwards `subjectMode` from `skillsConfig.audit`. The SDK does NOT
|
|
38
|
+
// statically depend on @frontmcp/adapters/skills — this keeps the static
|
|
39
|
+
// dependency graph clean and works in Edge / CSP runtimes.
|
|
40
|
+
setSkillAuditFactory(() => ({
|
|
41
|
+
SkillAuditWriterToken,
|
|
42
|
+
SkillAuditWriter,
|
|
43
|
+
Hs256AuditSigner,
|
|
44
|
+
MemoryAuditStore,
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
@FrontMcp({
|
|
48
|
+
info: { name: 'dev-server', version: '1.0.0' },
|
|
49
|
+
apps: [MainApp],
|
|
50
|
+
skillsConfig: {
|
|
51
|
+
enabled: true,
|
|
52
|
+
audit: {
|
|
53
|
+
enabled: true,
|
|
54
|
+
// WARNING: Hs256AuditSigner with a randomBytes() key refuses to fire
|
|
55
|
+
// when NODE_ENV === 'production'. Use Rs256AuditSigner in prod.
|
|
56
|
+
// Constructor signature: new Hs256AuditSigner(secret, keyId)
|
|
57
|
+
signer: new Hs256AuditSigner(randomBytes(32), 'dev'),
|
|
58
|
+
store: new MemoryAuditStore(),
|
|
59
|
+
subjectMode: 'hash',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
export default class DevServer {}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What This Demonstrates
|
|
67
|
+
|
|
68
|
+
- Bootstraps the audit subsystem via setSkillAuditFactory(...) before FrontMcp registers
|
|
69
|
+
- MemoryAuditStore keeps records in-process — perfect for tests, lost on restart
|
|
70
|
+
- Hs256AuditSigner refuses to start when NODE_ENV === production with a random key
|
|
71
|
+
- subjectMode: 'hash' redacts user identifiers while keeping them correlatable
|
|
72
|
+
|
|
73
|
+
## Related
|
|
74
|
+
|
|
75
|
+
- See `skill-audit-log` for the full architecture, threat model, and verification recipe
|
|
76
|
+
- See `audit-log-redis` for the production-grade variant with persistent storage
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-log-redis
|
|
3
|
+
reference: configure-skills-http
|
|
4
|
+
level: advanced
|
|
5
|
+
description: Production-grade audit log with the Redis-backed StorageAdapterAuditStore and the RS256 bundle-signing key.
|
|
6
|
+
tags: [config, skills, audit, rs256, redis, production]
|
|
7
|
+
features:
|
|
8
|
+
- 'StorageAdapterAuditStore persists records to Redis via the standard storage adapter'
|
|
9
|
+
- 'Rs256AuditSigner reuses the bundle-signing keypair for forensic-friendly signatures'
|
|
10
|
+
- 'Single-writer constraint: only one pod should write the chain in v1.2.0'
|
|
11
|
+
- 'verifyChain(records, trustedKeys, defaultAuditSignatureVerifier) detects tampering'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Audit Log (Production, Redis + RS256)
|
|
15
|
+
|
|
16
|
+
Production-grade audit log with the Redis-backed StorageAdapterAuditStore and the RS256 bundle-signing key.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// src/server.ts — must be an ES module (`"type": "module"` in package.json,
|
|
22
|
+
// or `.mts` extension) so the top-level `await createStorageAdapter(...)`
|
|
23
|
+
// below is allowed. CommonJS consumers should wrap the bootstrap inside an
|
|
24
|
+
// `async function init() { ... }` and await it before constructing the
|
|
25
|
+
// FrontMcp class.
|
|
26
|
+
import {
|
|
27
|
+
Hs256AuditSigner,
|
|
28
|
+
MemoryAuditStore,
|
|
29
|
+
Rs256AuditSigner,
|
|
30
|
+
setSkillAuditFactory,
|
|
31
|
+
SkillAuditWriter,
|
|
32
|
+
SkillAuditWriterToken,
|
|
33
|
+
StorageAdapterAuditStore,
|
|
34
|
+
} from '@frontmcp/adapters/skills';
|
|
35
|
+
import { FrontMcp } from '@frontmcp/sdk';
|
|
36
|
+
import { createStorageAdapter } from '@frontmcp/utils';
|
|
37
|
+
|
|
38
|
+
import { MainApp } from './main.app';
|
|
39
|
+
|
|
40
|
+
// Register the audit module record with the SDK. The SDK constructs the
|
|
41
|
+
// writer with the positional signature
|
|
42
|
+
// `new SkillAuditWriter(store, signer, logger, metrics?, options?)` and
|
|
43
|
+
// forwards `subjectMode` from `skillsConfig.audit` into the options bag.
|
|
44
|
+
setSkillAuditFactory(() => ({
|
|
45
|
+
SkillAuditWriterToken,
|
|
46
|
+
SkillAuditWriter,
|
|
47
|
+
Hs256AuditSigner,
|
|
48
|
+
MemoryAuditStore,
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
const auditStorage = await createStorageAdapter({
|
|
52
|
+
provider: 'redis',
|
|
53
|
+
host: process.env.REDIS_HOST!,
|
|
54
|
+
port: 6379,
|
|
55
|
+
keyPrefix: 'mcp:skill-audit:',
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// Constructor signature: new Rs256AuditSigner(privateJwk, keyId).
|
|
59
|
+
// Convert a PEM secret to a JWK first if your secret store ships PEMs.
|
|
60
|
+
const auditSigner = new Rs256AuditSigner(JSON.parse(process.env.BUNDLE_SIGNING_PRIVATE_JWK!), 'bundle-signing-2026-01');
|
|
61
|
+
|
|
62
|
+
@FrontMcp({
|
|
63
|
+
info: { name: 'prod-server', version: '1.0.0' },
|
|
64
|
+
apps: [MainApp],
|
|
65
|
+
redis: { provider: 'redis', host: process.env.REDIS_HOST!, port: 6379 },
|
|
66
|
+
skillsConfig: {
|
|
67
|
+
enabled: true,
|
|
68
|
+
auth: 'bearer',
|
|
69
|
+
jwt: { issuer: process.env.JWT_ISSUER!, audience: 'skills-api' },
|
|
70
|
+
cache: {
|
|
71
|
+
enabled: true,
|
|
72
|
+
redis: { provider: 'redis', host: process.env.REDIS_HOST!, port: 6379 },
|
|
73
|
+
ttlMs: 60_000,
|
|
74
|
+
},
|
|
75
|
+
audit: {
|
|
76
|
+
enabled: true,
|
|
77
|
+
signer: auditSigner,
|
|
78
|
+
store: new StorageAdapterAuditStore(auditStorage),
|
|
79
|
+
subjectMode: 'hash',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
export default class ProductionServer {}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
// scripts/verify-audit-chain.ts — run in CI
|
|
88
|
+
import { defaultAuditSignatureVerifier, StorageAdapterAuditStore, verifyChain } from '@frontmcp/adapters/skills';
|
|
89
|
+
import { createStorageAdapter } from '@frontmcp/utils';
|
|
90
|
+
|
|
91
|
+
const storage = await createStorageAdapter({ provider: 'redis', host: process.env.REDIS_HOST!, port: 6379 });
|
|
92
|
+
const store = new StorageAdapterAuditStore(storage);
|
|
93
|
+
const records = await store.iterate();
|
|
94
|
+
|
|
95
|
+
const trustedKeys = {
|
|
96
|
+
'bundle-signing-2026-01': process.env.BUNDLE_SIGNING_PUBLIC_KEY!,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const result = verifyChain(records, trustedKeys, defaultAuditSignatureVerifier);
|
|
100
|
+
if (!result.ok) {
|
|
101
|
+
console.error('Audit chain broken at', result.breakAt, result.reason);
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## What This Demonstrates
|
|
107
|
+
|
|
108
|
+
- StorageAdapterAuditStore persists records to Redis via the standard storage adapter
|
|
109
|
+
- Rs256AuditSigner reuses the bundle-signing keypair for forensic-friendly signatures
|
|
110
|
+
- Single-writer constraint: only one pod should write the chain in v1.2.0
|
|
111
|
+
- verifyChain(records, trustedKeys, defaultAuditSignatureVerifier) detects tampering
|
|
112
|
+
|
|
113
|
+
## Related
|
|
114
|
+
|
|
115
|
+
- See `skill-audit-log` for the architecture, threat model, and custom signer / custom store recipes
|
|
116
|
+
- See `audit-log-basic` for the dev-mode variant
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: inject-instructions
|
|
3
|
+
reference: configure-skills-http
|
|
4
|
+
level: basic
|
|
5
|
+
description: Set a server-level instructions string and append the skill catalog summary on every initialize response.
|
|
6
|
+
tags: [config, skills, instructions, injection, initialize]
|
|
7
|
+
features:
|
|
8
|
+
- 'Top-level `instructions` on `@FrontMcp` exposes a global system prompt to MCP clients'
|
|
9
|
+
- "`skillsConfig.injectInstructions: 'append'` adds the skill catalog summary after the user prompt"
|
|
10
|
+
- 'Dynamic skills are picked up because the composer runs on every initialize request'
|
|
11
|
+
- 'Catalog summary is bounded at 16 KB with a truncation footer pointing at skill://catalog'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Inject Instructions on Initialize
|
|
15
|
+
|
|
16
|
+
Set a server-level instructions string and append the skill catalog summary on every initialize response.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// src/server.ts
|
|
22
|
+
import { FrontMcp } from '@frontmcp/sdk';
|
|
23
|
+
|
|
24
|
+
import { MainApp } from './main.app';
|
|
25
|
+
|
|
26
|
+
@FrontMcp({
|
|
27
|
+
info: { name: 'flight-bot', version: '1.0.0' },
|
|
28
|
+
apps: [MainApp],
|
|
29
|
+
|
|
30
|
+
// Server-level instructions surfaced to MCP clients
|
|
31
|
+
instructions: [
|
|
32
|
+
'You are a helpful assistant for booking flights.',
|
|
33
|
+
'Always confirm dates with the user before issuing a booking.',
|
|
34
|
+
].join('\n'),
|
|
35
|
+
|
|
36
|
+
skillsConfig: {
|
|
37
|
+
enabled: true,
|
|
38
|
+
mcpResources: true,
|
|
39
|
+
// 'append' (default) — the skill catalog summary is appended after instructions
|
|
40
|
+
// 'prepend' — summary first, then instructions
|
|
41
|
+
// 'replace' — summary only (skills drive the entire system prompt)
|
|
42
|
+
// 'off' — instructions sent as-is, no summary
|
|
43
|
+
injectInstructions: 'append',
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
export default class FlightBotServer {}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## What This Demonstrates
|
|
50
|
+
|
|
51
|
+
- Top-level `instructions` on `@FrontMcp` exposes a global system prompt to MCP clients
|
|
52
|
+
- `skillsConfig.injectInstructions: 'append'` adds the skill catalog summary after the user prompt
|
|
53
|
+
- Dynamic skills are picked up because the composer runs on every initialize request
|
|
54
|
+
- Catalog summary is bounded at 16 KB with a truncation footer pointing at skill://catalog
|
|
55
|
+
|
|
56
|
+
## Related
|
|
57
|
+
|
|
58
|
+
- See `configure-skills-http` for the full `skillsConfig` reference
|
|
59
|
+
- See `decorators-guide` for the `@FrontMcp` decorator's complete option table
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-auth-modes
|
|
3
|
-
description: Detailed comparison of public, transparent,
|
|
3
|
+
description: Detailed comparison of public, transparent, local, and remote auth modes
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Auth Modes Detailed Comparison
|
|
@@ -14,7 +14,7 @@ auth: {
|
|
|
14
14
|
mode: 'public',
|
|
15
15
|
sessionTtl: 3600,
|
|
16
16
|
anonymousScopes: ['read', 'write'],
|
|
17
|
-
publicAccess: { tools:
|
|
17
|
+
publicAccess: { tools: 'all', prompts: 'all' },
|
|
18
18
|
}
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -44,9 +44,9 @@ auth: {
|
|
|
44
44
|
mode: 'local',
|
|
45
45
|
local: {
|
|
46
46
|
issuer: 'my-server',
|
|
47
|
-
audience: 'my-api',
|
|
48
47
|
},
|
|
49
|
-
|
|
48
|
+
expectedAudience: 'my-api',
|
|
49
|
+
tokenStorage: { redis: { host: process.env['REDIS_HOST'] ?? 'localhost', port: 6379 } },
|
|
50
50
|
consent: { enabled: true },
|
|
51
51
|
incrementalAuth: { enabled: true },
|
|
52
52
|
}
|
|
@@ -64,7 +64,7 @@ auth: {
|
|
|
64
64
|
provider: 'https://auth.example.com',
|
|
65
65
|
clientId: 'my-client-id',
|
|
66
66
|
clientSecret: process.env.AUTH_SECRET,
|
|
67
|
-
tokenStorage:
|
|
67
|
+
tokenStorage: { redis: { host: process.env['REDIS_HOST'] ?? 'localhost', port: 6379 } },
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|