@frontmcp/skills 1.0.0-beta.9 → 1.0.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 +2 -2
- package/catalog/TEMPLATE.md +69 -0
- package/catalog/frontmcp-config/SKILL.md +38 -22
- package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +87 -0
- package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +63 -0
- package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +76 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +77 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +73 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +64 -0
- package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +83 -0
- package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +87 -0
- package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +52 -0
- package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +72 -0
- package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +64 -0
- package/catalog/frontmcp-config/examples/configure-session/multi-server-key-prefix.md +68 -0
- package/catalog/frontmcp-config/examples/configure-session/redis-session-store.md +52 -0
- package/catalog/frontmcp-config/examples/configure-session/vercel-kv-session.md +52 -0
- package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +94 -0
- package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +92 -0
- package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +83 -0
- package/catalog/frontmcp-config/examples/configure-throttle-guard-config/full-guard-config.md +99 -0
- package/catalog/frontmcp-config/examples/configure-throttle-guard-config/minimal-guard-config.md +55 -0
- package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +74 -0
- package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +86 -0
- package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +69 -0
- package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +65 -0
- package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +69 -0
- package/catalog/frontmcp-config/references/configure-auth-modes.md +15 -0
- package/catalog/frontmcp-config/references/configure-auth.md +15 -0
- package/catalog/frontmcp-config/references/configure-elicitation.md +14 -0
- package/catalog/frontmcp-config/references/configure-http.md +15 -0
- package/catalog/frontmcp-config/references/configure-session.md +15 -0
- package/catalog/frontmcp-config/references/configure-throttle-guard-config.md +14 -0
- package/catalog/frontmcp-config/references/configure-throttle.md +15 -0
- package/catalog/frontmcp-config/references/configure-transport-protocol-presets.md +14 -0
- package/catalog/frontmcp-config/references/configure-transport.md +15 -0
- package/catalog/frontmcp-config/references/setup-redis.md +10 -0
- package/catalog/frontmcp-config/references/setup-sqlite.md +10 -0
- package/catalog/frontmcp-deployment/SKILL.md +40 -12
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +43 -0
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +85 -0
- package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +61 -0
- package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +66 -0
- package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +76 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +78 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +85 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +104 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +82 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +97 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +92 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +92 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +113 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +100 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +101 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +79 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +92 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +63 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +89 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +69 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +82 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +90 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +49 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +92 -0
- package/catalog/frontmcp-deployment/references/build-for-browser.md +15 -0
- package/catalog/frontmcp-deployment/references/build-for-cli.md +65 -3
- package/catalog/frontmcp-deployment/references/build-for-sdk.md +15 -0
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +15 -0
- package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +18 -3
- package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +16 -2
- package/catalog/frontmcp-deployment/references/deploy-to-node.md +19 -4
- package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +14 -0
- package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +15 -0
- package/catalog/frontmcp-development/SKILL.md +25 -17
- package/catalog/frontmcp-development/examples/create-adapter/basic-api-adapter.md +92 -0
- package/catalog/frontmcp-development/examples/create-adapter/namespaced-adapter.md +124 -0
- package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +121 -0
- package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +95 -0
- package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +111 -0
- package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +81 -0
- package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +80 -0
- package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +87 -0
- package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +117 -0
- package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +88 -0
- package/catalog/frontmcp-development/examples/create-plugin/basic-plugin-with-provider.md +69 -0
- package/catalog/frontmcp-development/examples/create-plugin/configurable-dynamic-plugin.md +178 -0
- package/catalog/frontmcp-development/examples/create-plugin/plugin-with-context-extension.md +107 -0
- package/catalog/frontmcp-development/examples/create-plugin-hooks/basic-logging-plugin.md +69 -0
- package/catalog/frontmcp-development/examples/create-plugin-hooks/caching-with-around.md +80 -0
- package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +100 -0
- package/catalog/frontmcp-development/examples/create-prompt/basic-prompt.md +72 -0
- package/catalog/frontmcp-development/examples/create-prompt/dynamic-rag-prompt.md +92 -0
- package/catalog/frontmcp-development/examples/create-prompt/multi-turn-debug-session.md +86 -0
- package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +113 -0
- package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +107 -0
- package/catalog/frontmcp-development/examples/create-resource/basic-static-resource.md +72 -0
- package/catalog/frontmcp-development/examples/create-resource/binary-and-multi-content.md +111 -0
- package/catalog/frontmcp-development/examples/create-resource/parameterized-template.md +84 -0
- package/catalog/frontmcp-development/examples/create-skill/basic-inline-skill.md +96 -0
- package/catalog/frontmcp-development/examples/create-skill/directory-based-skill.md +115 -0
- package/catalog/frontmcp-development/examples/create-skill/parameterized-skill.md +96 -0
- package/catalog/frontmcp-development/examples/create-skill-with-tools/basic-tool-orchestration.md +76 -0
- package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +149 -0
- package/catalog/frontmcp-development/examples/create-skill-with-tools/incident-response-skill.md +92 -0
- package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +62 -0
- package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +84 -0
- package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +93 -0
- package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +94 -0
- package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +60 -0
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +104 -0
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +63 -0
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +103 -0
- package/catalog/frontmcp-development/examples/create-workflow/basic-deploy-pipeline.md +91 -0
- package/catalog/frontmcp-development/examples/create-workflow/parallel-validation-pipeline.md +90 -0
- package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +136 -0
- package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +145 -0
- package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +124 -0
- package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +149 -0
- package/catalog/frontmcp-development/examples/official-adapters/authenticated-adapter-with-polling.md +84 -0
- package/catalog/frontmcp-development/examples/official-adapters/basic-openapi-adapter.md +54 -0
- package/catalog/frontmcp-development/examples/official-adapters/multi-api-hub-with-inline-spec.md +130 -0
- package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +117 -0
- package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +147 -0
- package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +104 -0
- package/catalog/frontmcp-development/references/create-adapter.md +14 -0
- package/catalog/frontmcp-development/references/create-agent-llm-config.md +14 -0
- package/catalog/frontmcp-development/references/create-agent.md +15 -0
- package/catalog/frontmcp-development/references/create-job.md +15 -0
- package/catalog/frontmcp-development/references/create-plugin-hooks.md +51 -0
- package/catalog/frontmcp-development/references/create-plugin.md +186 -11
- package/catalog/frontmcp-development/references/create-prompt.md +17 -0
- package/catalog/frontmcp-development/references/create-provider.md +14 -0
- package/catalog/frontmcp-development/references/create-resource.md +127 -0
- package/catalog/frontmcp-development/references/create-skill-with-tools.md +126 -7
- package/catalog/frontmcp-development/references/create-skill.md +57 -12
- package/catalog/frontmcp-development/references/create-tool-annotations.md +14 -0
- package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +15 -0
- package/catalog/frontmcp-development/references/create-tool.md +205 -1
- package/catalog/frontmcp-development/references/create-workflow.md +15 -0
- package/catalog/frontmcp-development/references/decorators-guide.md +155 -78
- package/catalog/frontmcp-development/references/official-adapters.md +31 -16
- package/catalog/frontmcp-development/references/official-plugins.md +62 -28
- package/catalog/frontmcp-extensibility/SKILL.md +103 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +175 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +138 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +103 -0
- package/catalog/frontmcp-extensibility/references/vectoriadb.md +299 -0
- package/catalog/frontmcp-guides/SKILL.md +7 -4
- package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +160 -0
- package/catalog/frontmcp-guides/examples/example-knowledge-base/multi-app-composition.md +92 -0
- package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +135 -0
- package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +135 -0
- package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +148 -0
- package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +129 -0
- package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +75 -0
- package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +142 -0
- package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +74 -0
- package/catalog/frontmcp-guides/references/example-knowledge-base.md +15 -0
- package/catalog/frontmcp-guides/references/example-task-manager.md +30 -21
- package/catalog/frontmcp-guides/references/example-weather-api.md +18 -6
- package/catalog/frontmcp-observability/SKILL.md +144 -0
- package/catalog/frontmcp-observability/examples/structured-logging/stdout-logging.md +71 -0
- package/catalog/frontmcp-observability/examples/structured-logging/winston-integration.md +70 -0
- package/catalog/frontmcp-observability/examples/telemetry-api/agent-nested-tracing.md +86 -0
- package/catalog/frontmcp-observability/examples/telemetry-api/plugin-telemetry.md +93 -0
- package/catalog/frontmcp-observability/examples/telemetry-api/tool-custom-spans.md +72 -0
- package/catalog/frontmcp-observability/examples/testing-observability/test-custom-spans.md +90 -0
- package/catalog/frontmcp-observability/examples/testing-observability/test-log-correlation.md +104 -0
- package/catalog/frontmcp-observability/examples/tracing-setup/basic-tracing.md +82 -0
- package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +73 -0
- package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +74 -0
- package/catalog/frontmcp-observability/references/structured-logging.md +114 -0
- package/catalog/frontmcp-observability/references/telemetry-api.md +155 -0
- package/catalog/frontmcp-observability/references/testing-observability.md +169 -0
- package/catalog/frontmcp-observability/references/tracing-setup.md +146 -0
- package/catalog/frontmcp-observability/references/vendor-integrations.md +164 -0
- package/catalog/frontmcp-production-readiness/SKILL.md +99 -0
- package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +102 -0
- package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +104 -0
- package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +95 -0
- package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/basic-health-setup.md +81 -0
- package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/custom-probes.md +136 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/browser-bundle-config.md +93 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +116 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/security-and-performance.md +128 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-binary/binary-build-config.md +109 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +132 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +82 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +107 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +119 -0
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +124 -0
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +103 -0
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +89 -0
- package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +122 -0
- package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +107 -0
- package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +138 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/basic-sdk-lifecycle.md +85 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +110 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/package-json-config.md +107 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-server/docker-multi-stage.md +103 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +87 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +97 -0
- package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +104 -0
- package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +91 -0
- package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +78 -0
- package/catalog/frontmcp-production-readiness/references/common-checklist.md +175 -0
- package/catalog/frontmcp-production-readiness/references/health-readiness-endpoints.md +198 -0
- package/catalog/frontmcp-production-readiness/references/production-browser.md +56 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +71 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +71 -0
- package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +62 -0
- package/catalog/frontmcp-production-readiness/references/production-lambda.md +63 -0
- package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +76 -0
- package/catalog/frontmcp-production-readiness/references/production-node-server.md +71 -0
- package/catalog/frontmcp-production-readiness/references/production-vercel.md +62 -0
- package/catalog/frontmcp-setup/SKILL.md +19 -14
- package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/bundle-presets-scaffolding.md +61 -0
- package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +83 -0
- package/catalog/frontmcp-setup/examples/multi-app-composition/local-apps-with-shared-tools.md +87 -0
- package/catalog/frontmcp-setup/examples/multi-app-composition/per-app-auth-and-isolation.md +88 -0
- package/catalog/frontmcp-setup/examples/multi-app-composition/remote-and-esm-apps.md +81 -0
- package/catalog/frontmcp-setup/examples/nx-workflow/build-test-affected.md +77 -0
- package/catalog/frontmcp-setup/examples/nx-workflow/multi-server-deployment.md +93 -0
- package/catalog/frontmcp-setup/examples/nx-workflow/scaffold-and-generate.md +62 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/nx-generator-scaffolding.md +73 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +85 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/shared-library-usage.md +89 -0
- package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +64 -0
- package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +111 -0
- package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +73 -0
- package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +89 -0
- package/catalog/frontmcp-setup/examples/readme-guide/vercel-deployment-readme.md +90 -0
- package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +99 -0
- package/catalog/frontmcp-setup/examples/setup-project/cli-scaffold-with-flags.md +77 -0
- package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +89 -0
- package/catalog/frontmcp-setup/examples/setup-redis/docker-redis-local-dev.md +88 -0
- package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +78 -0
- package/catalog/frontmcp-setup/examples/setup-redis/vercel-kv-serverless.md +78 -0
- package/catalog/frontmcp-setup/examples/setup-sqlite/basic-sqlite-setup.md +75 -0
- package/catalog/frontmcp-setup/examples/setup-sqlite/encrypted-sqlite-storage.md +55 -0
- package/catalog/frontmcp-setup/examples/setup-sqlite/unix-socket-daemon.md +70 -0
- package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +33 -9
- package/catalog/frontmcp-setup/references/multi-app-composition.md +15 -0
- package/catalog/frontmcp-setup/references/nx-workflow.md +15 -0
- package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -0
- package/catalog/frontmcp-setup/references/project-structure-standalone.md +15 -0
- package/catalog/frontmcp-setup/references/readme-guide.md +235 -0
- package/catalog/frontmcp-setup/references/setup-project.md +16 -1
- package/catalog/frontmcp-setup/references/setup-redis.md +15 -0
- package/catalog/frontmcp-setup/references/setup-sqlite.md +15 -0
- package/catalog/frontmcp-testing/SKILL.md +41 -27
- package/catalog/frontmcp-testing/examples/setup-testing/fixture-based-e2e-test.md +70 -0
- package/catalog/frontmcp-testing/examples/setup-testing/jest-config-with-coverage.md +59 -0
- package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +115 -0
- package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +78 -0
- package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +88 -0
- package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +71 -0
- package/catalog/frontmcp-testing/examples/test-browser-build/browser-bundle-validation.md +58 -0
- package/catalog/frontmcp-testing/examples/test-browser-build/playwright-browser-test.md +69 -0
- package/catalog/frontmcp-testing/examples/test-cli-binary/binary-startup-test.md +77 -0
- package/catalog/frontmcp-testing/examples/test-cli-binary/js-bundle-import-test.md +56 -0
- package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +74 -0
- package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +79 -0
- package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +67 -0
- package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +72 -0
- package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +73 -0
- package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +69 -0
- package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +82 -0
- package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +92 -0
- package/catalog/frontmcp-testing/references/setup-testing.md +17 -0
- package/catalog/frontmcp-testing/references/test-auth.md +15 -0
- package/catalog/frontmcp-testing/references/test-browser-build.md +14 -0
- package/catalog/frontmcp-testing/references/test-cli-binary.md +14 -0
- package/catalog/frontmcp-testing/references/test-direct-client.md +14 -0
- package/catalog/frontmcp-testing/references/test-e2e-handler.md +15 -0
- package/catalog/frontmcp-testing/references/test-tool-unit.md +15 -0
- package/catalog/skills-manifest.json +2849 -32
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js.map +1 -1
- package/src/loader.js +0 -1
- package/src/loader.js.map +1 -1
- package/src/manifest.d.ts +36 -1
- package/src/manifest.js +6 -1
- package/src/manifest.js.map +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cdk-deployment
|
|
3
|
+
reference: deploy-to-lambda
|
|
4
|
+
level: advanced
|
|
5
|
+
description: 'Deploy a FrontMCP server to AWS Lambda using CDK with provisioned concurrency and secrets management.'
|
|
6
|
+
tags: [deployment, lambda, performance, cdk]
|
|
7
|
+
features:
|
|
8
|
+
- 'Using AWS CDK instead of SAM for infrastructure-as-code deployment'
|
|
9
|
+
- 'Provisioned concurrency via a Lambda alias to eliminate cold starts on critical endpoints'
|
|
10
|
+
- 'Referencing secrets from SSM Parameter Store with `{{resolve:ssm:...}}` instead of hardcoding'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# CDK Deployment with Provisioned Concurrency
|
|
14
|
+
|
|
15
|
+
Deploy a FrontMCP server to AWS Lambda using CDK with provisioned concurrency and secrets management.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// lib/frontmcp-stack.ts
|
|
21
|
+
import * as cdk from 'aws-cdk-lib';
|
|
22
|
+
import * as lambda from 'aws-cdk-lib/aws-lambda';
|
|
23
|
+
import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
|
|
24
|
+
import * as integrations from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
|
25
|
+
import { Construct } from 'constructs';
|
|
26
|
+
|
|
27
|
+
export class FrontMcpStack extends cdk.Stack {
|
|
28
|
+
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
|
|
29
|
+
super(scope, id, props);
|
|
30
|
+
|
|
31
|
+
const fn = new lambda.Function(this, 'FrontMcpHandler', {
|
|
32
|
+
runtime: lambda.Runtime.NODEJS_24_X,
|
|
33
|
+
handler: 'handler.handler',
|
|
34
|
+
code: lambda.Code.fromAsset('.'),
|
|
35
|
+
memorySize: 512,
|
|
36
|
+
timeout: cdk.Duration.seconds(30),
|
|
37
|
+
architecture: lambda.Architecture.ARM_64,
|
|
38
|
+
environment: {
|
|
39
|
+
NODE_ENV: 'production',
|
|
40
|
+
LOG_LEVEL: 'info',
|
|
41
|
+
// Use SSM for secrets instead of plaintext
|
|
42
|
+
FRONTMCP_AUTH_SECRET: cdk.Fn.sub('{{resolve:ssm-secure:/frontmcp/auth-secret}}'),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Provisioned concurrency for predictable latency
|
|
47
|
+
const alias = new lambda.Alias(this, 'ProdAlias', {
|
|
48
|
+
aliasName: 'prod',
|
|
49
|
+
version: fn.currentVersion,
|
|
50
|
+
provisionedConcurrentExecutions: 5,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const api = new apigw.HttpApi(this, 'FrontMcpApi', {
|
|
54
|
+
defaultIntegration: new integrations.HttpLambdaIntegration(
|
|
55
|
+
'LambdaIntegration',
|
|
56
|
+
alias, // Route traffic to the alias with provisioned concurrency
|
|
57
|
+
),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
new cdk.CfnOutput(this, 'ApiEndpoint', {
|
|
61
|
+
value: api.apiEndpoint,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Build the FrontMCP server
|
|
69
|
+
frontmcp build --target lambda
|
|
70
|
+
|
|
71
|
+
# Store secrets in SSM Parameter Store
|
|
72
|
+
aws ssm put-parameter \
|
|
73
|
+
--name "/frontmcp/auth-secret" \
|
|
74
|
+
--type "SecureString" \
|
|
75
|
+
--value "your-secret-value"
|
|
76
|
+
|
|
77
|
+
# Deploy with CDK
|
|
78
|
+
cdk deploy
|
|
79
|
+
|
|
80
|
+
# Verify
|
|
81
|
+
curl https://abc123.execute-api.us-east-1.amazonaws.com/health
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## What This Demonstrates
|
|
85
|
+
|
|
86
|
+
- Using AWS CDK instead of SAM for infrastructure-as-code deployment
|
|
87
|
+
- Provisioned concurrency via a Lambda alias to eliminate cold starts on critical endpoints
|
|
88
|
+
- Referencing secrets from SSM Parameter Store with `{{resolve:ssm:...}}` instead of hardcoding
|
|
89
|
+
|
|
90
|
+
## Related
|
|
91
|
+
|
|
92
|
+
- See `deploy-to-lambda` for the SAM alternative, cold start benchmarks, and VPC configuration for ElastiCache
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lambda-handler-with-cors
|
|
3
|
+
reference: deploy-to-lambda
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'Create a custom Lambda handler with an explicit API Gateway definition for CORS support.'
|
|
6
|
+
tags: [deployment, lambda, handler, cors]
|
|
7
|
+
features:
|
|
8
|
+
- 'Creating a custom Lambda handler with `createLambdaHandler()` from `@frontmcp/adapters/lambda`'
|
|
9
|
+
- 'Defining an explicit HTTP API resource with CORS configuration for cross-origin requests'
|
|
10
|
+
- 'Linking the function events to the explicit API via `ApiId: !Ref`'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Lambda Handler with CORS and API Gateway
|
|
14
|
+
|
|
15
|
+
Create a custom Lambda handler with an explicit API Gateway definition for CORS support.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// src/lambda.ts
|
|
21
|
+
import { createLambdaHandler } from '@frontmcp/adapters/lambda';
|
|
22
|
+
import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
|
|
23
|
+
import { z } from 'zod';
|
|
24
|
+
|
|
25
|
+
@Tool({
|
|
26
|
+
name: 'analyze',
|
|
27
|
+
description: 'Analyze text content',
|
|
28
|
+
inputSchema: { text: z.string() },
|
|
29
|
+
})
|
|
30
|
+
class AnalyzeTool extends ToolContext<{ text: string }> {
|
|
31
|
+
async execute(input: { text: string }) {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: 'text' as const, text: `Analysis of: ${input.text}` }],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@App({ name: 'AnalyzerApp', tools: [AnalyzeTool] })
|
|
39
|
+
class AnalyzerApp {}
|
|
40
|
+
|
|
41
|
+
@FrontMcp({
|
|
42
|
+
info: { name: 'analyzer', version: '1.0.0' },
|
|
43
|
+
apps: [AnalyzerApp],
|
|
44
|
+
})
|
|
45
|
+
class AnalyzerServer {}
|
|
46
|
+
|
|
47
|
+
export const handler = createLambdaHandler(AnalyzerServer, {
|
|
48
|
+
streaming: false,
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
# template.yaml - with explicit API Gateway and CORS
|
|
54
|
+
AWSTemplateFormatVersion: '2010-09-09'
|
|
55
|
+
Transform: AWS::Serverless-2016-10-31
|
|
56
|
+
Description: FrontMCP server with CORS
|
|
57
|
+
|
|
58
|
+
Globals:
|
|
59
|
+
Function:
|
|
60
|
+
Timeout: 30
|
|
61
|
+
Runtime: nodejs24.x
|
|
62
|
+
MemorySize: 512
|
|
63
|
+
|
|
64
|
+
Resources:
|
|
65
|
+
FrontMcpApi:
|
|
66
|
+
Type: AWS::Serverless::HttpApi
|
|
67
|
+
Properties:
|
|
68
|
+
StageName: prod
|
|
69
|
+
CorsConfiguration:
|
|
70
|
+
AllowOrigins:
|
|
71
|
+
- 'https://your-domain.com'
|
|
72
|
+
AllowMethods:
|
|
73
|
+
- GET
|
|
74
|
+
- POST
|
|
75
|
+
- OPTIONS
|
|
76
|
+
AllowHeaders:
|
|
77
|
+
- Content-Type
|
|
78
|
+
- Authorization
|
|
79
|
+
|
|
80
|
+
FrontMcpFunction:
|
|
81
|
+
Type: AWS::Serverless::Function
|
|
82
|
+
Properties:
|
|
83
|
+
Handler: handler.handler
|
|
84
|
+
CodeUri: .
|
|
85
|
+
Architectures:
|
|
86
|
+
- arm64
|
|
87
|
+
Environment:
|
|
88
|
+
Variables:
|
|
89
|
+
NODE_ENV: production
|
|
90
|
+
Events:
|
|
91
|
+
McpApi:
|
|
92
|
+
Type: HttpApi
|
|
93
|
+
Properties:
|
|
94
|
+
ApiId: !Ref FrontMcpApi
|
|
95
|
+
Path: /{proxy+}
|
|
96
|
+
Method: ANY
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Build and deploy
|
|
101
|
+
frontmcp build --target lambda
|
|
102
|
+
sam build && sam deploy
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## What This Demonstrates
|
|
106
|
+
|
|
107
|
+
- Creating a custom Lambda handler with `createLambdaHandler()` from `@frontmcp/adapters/lambda`
|
|
108
|
+
- Defining an explicit HTTP API resource with CORS configuration for cross-origin requests
|
|
109
|
+
- Linking the function events to the explicit API via `ApiId: !Ref`
|
|
110
|
+
|
|
111
|
+
## Related
|
|
112
|
+
|
|
113
|
+
- See `deploy-to-lambda` for secrets management, provisioned concurrency, and CDK deployment
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sam-template-basic
|
|
3
|
+
reference: deploy-to-lambda
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'Deploy a FrontMCP server to AWS Lambda with API Gateway using a SAM template.'
|
|
6
|
+
tags: [deployment, lambda, performance, sam, template]
|
|
7
|
+
features:
|
|
8
|
+
- 'A minimal SAM template with ARM64 architecture for faster cold starts and lower cost'
|
|
9
|
+
- "The `/{proxy+}` catch-all route that forwards all requests to FrontMCP's internal router"
|
|
10
|
+
- 'CloudWatch log group with 14-day retention'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Basic SAM Template for Lambda
|
|
14
|
+
|
|
15
|
+
Deploy a FrontMCP server to AWS Lambda with API Gateway using a SAM template.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
# template.yaml
|
|
21
|
+
AWSTemplateFormatVersion: '2010-09-09'
|
|
22
|
+
Transform: AWS::Serverless-2016-10-31
|
|
23
|
+
Description: FrontMCP server on AWS Lambda
|
|
24
|
+
|
|
25
|
+
Globals:
|
|
26
|
+
Function:
|
|
27
|
+
Timeout: 30
|
|
28
|
+
Runtime: nodejs24.x
|
|
29
|
+
MemorySize: 512
|
|
30
|
+
Environment:
|
|
31
|
+
Variables:
|
|
32
|
+
NODE_ENV: production
|
|
33
|
+
LOG_LEVEL: info
|
|
34
|
+
|
|
35
|
+
Resources:
|
|
36
|
+
FrontMcpFunction:
|
|
37
|
+
Type: AWS::Serverless::Function
|
|
38
|
+
Properties:
|
|
39
|
+
Handler: handler.handler
|
|
40
|
+
CodeUri: .
|
|
41
|
+
Description: FrontMCP MCP server
|
|
42
|
+
Architectures:
|
|
43
|
+
- arm64
|
|
44
|
+
Events:
|
|
45
|
+
McpApi:
|
|
46
|
+
Type: HttpApi
|
|
47
|
+
Properties:
|
|
48
|
+
Path: /{proxy+}
|
|
49
|
+
Method: ANY
|
|
50
|
+
HealthCheck:
|
|
51
|
+
Type: HttpApi
|
|
52
|
+
Properties:
|
|
53
|
+
Path: /health
|
|
54
|
+
Method: GET
|
|
55
|
+
|
|
56
|
+
FrontMcpLogGroup:
|
|
57
|
+
Type: AWS::Logs::LogGroup
|
|
58
|
+
Properties:
|
|
59
|
+
LogGroupName: !Sub /aws/lambda/${FrontMcpFunction}
|
|
60
|
+
RetentionInDays: 14
|
|
61
|
+
|
|
62
|
+
Outputs:
|
|
63
|
+
ApiEndpoint:
|
|
64
|
+
Description: API Gateway endpoint URL
|
|
65
|
+
Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com'
|
|
66
|
+
FunctionArn:
|
|
67
|
+
Description: Lambda function ARN
|
|
68
|
+
Value: !GetAtt FrontMcpFunction.Arn
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Build for Lambda
|
|
73
|
+
frontmcp build --target lambda
|
|
74
|
+
|
|
75
|
+
# Deploy with guided prompts (first time)
|
|
76
|
+
sam build
|
|
77
|
+
sam deploy --guided
|
|
78
|
+
|
|
79
|
+
# Subsequent deploys
|
|
80
|
+
sam build && sam deploy
|
|
81
|
+
|
|
82
|
+
# Get the endpoint URL
|
|
83
|
+
aws cloudformation describe-stacks \
|
|
84
|
+
--stack-name frontmcp-prod \
|
|
85
|
+
--query "Stacks[0].Outputs[?OutputKey=='ApiEndpoint'].OutputValue" \
|
|
86
|
+
--output text
|
|
87
|
+
|
|
88
|
+
# Verify
|
|
89
|
+
curl https://abc123.execute-api.us-east-1.amazonaws.com/health
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## What This Demonstrates
|
|
93
|
+
|
|
94
|
+
- A minimal SAM template with ARM64 architecture for faster cold starts and lower cost
|
|
95
|
+
- The `/{proxy+}` catch-all route that forwards all requests to FrontMCP's internal router
|
|
96
|
+
- CloudWatch log group with 14-day retention
|
|
97
|
+
|
|
98
|
+
## Related
|
|
99
|
+
|
|
100
|
+
- See `deploy-to-lambda` for Redis/ElastiCache integration, CDK alternative, and provisioned concurrency
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docker-compose-with-redis
|
|
3
|
+
reference: deploy-to-node
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'Deploy a FrontMCP server with Redis using Docker Compose for production.'
|
|
6
|
+
tags: [deployment, docker-compose, redis, dockerfile, docker, session]
|
|
7
|
+
features:
|
|
8
|
+
- 'Multi-stage Dockerfile that keeps the production image small and secure'
|
|
9
|
+
- 'Docker Compose configuration with Redis for session storage'
|
|
10
|
+
- 'Health checks on both the FrontMCP server and Redis, with `depends_on` ensuring Redis starts first'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Docker Compose with Redis
|
|
14
|
+
|
|
15
|
+
Deploy a FrontMCP server with Redis using Docker Compose for production.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
# docker-compose.yml
|
|
21
|
+
version: '3.9'
|
|
22
|
+
|
|
23
|
+
services:
|
|
24
|
+
frontmcp:
|
|
25
|
+
build:
|
|
26
|
+
context: .
|
|
27
|
+
dockerfile: Dockerfile
|
|
28
|
+
ports:
|
|
29
|
+
- '${PORT:-3000}:3000'
|
|
30
|
+
environment:
|
|
31
|
+
- NODE_ENV=production
|
|
32
|
+
- PORT=3000
|
|
33
|
+
- REDIS_URL=redis://redis:6379
|
|
34
|
+
- LOG_LEVEL=info
|
|
35
|
+
depends_on:
|
|
36
|
+
redis:
|
|
37
|
+
condition: service_healthy
|
|
38
|
+
restart: unless-stopped
|
|
39
|
+
healthcheck:
|
|
40
|
+
test: ['CMD', 'wget', '-qO-', 'http://localhost:3000/health']
|
|
41
|
+
interval: 30s
|
|
42
|
+
timeout: 5s
|
|
43
|
+
retries: 3
|
|
44
|
+
start_period: 10s
|
|
45
|
+
|
|
46
|
+
redis:
|
|
47
|
+
image: redis:7-alpine
|
|
48
|
+
volumes:
|
|
49
|
+
- redis-data:/data
|
|
50
|
+
healthcheck:
|
|
51
|
+
test: ['CMD', 'redis-cli', 'ping']
|
|
52
|
+
interval: 10s
|
|
53
|
+
timeout: 3s
|
|
54
|
+
retries: 5
|
|
55
|
+
restart: unless-stopped
|
|
56
|
+
|
|
57
|
+
volumes:
|
|
58
|
+
redis-data:
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```dockerfile
|
|
62
|
+
# Dockerfile
|
|
63
|
+
FROM node:24-alpine AS builder
|
|
64
|
+
WORKDIR /app
|
|
65
|
+
COPY package.json yarn.lock ./
|
|
66
|
+
RUN yarn install --frozen-lockfile
|
|
67
|
+
COPY . .
|
|
68
|
+
RUN npx frontmcp build --target node
|
|
69
|
+
|
|
70
|
+
FROM node:24-alpine AS production
|
|
71
|
+
WORKDIR /app
|
|
72
|
+
ENV NODE_ENV=production
|
|
73
|
+
COPY --from=builder /app/dist ./dist
|
|
74
|
+
COPY --from=builder /app/package.json ./
|
|
75
|
+
COPY --from=builder /app/yarn.lock ./
|
|
76
|
+
RUN yarn install --frozen-lockfile --production && yarn cache clean
|
|
77
|
+
EXPOSE 3000
|
|
78
|
+
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=10s \
|
|
79
|
+
CMD wget -qO- http://localhost:3000/health || exit 1
|
|
80
|
+
CMD ["node", "dist/main.js"]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Build and start
|
|
85
|
+
docker compose up -d
|
|
86
|
+
|
|
87
|
+
# Verify
|
|
88
|
+
docker compose ps
|
|
89
|
+
curl http://localhost:3000/health
|
|
90
|
+
# {"status":"ok","uptime":12345}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## What This Demonstrates
|
|
94
|
+
|
|
95
|
+
- Multi-stage Dockerfile that keeps the production image small and secure
|
|
96
|
+
- Docker Compose configuration with Redis for session storage
|
|
97
|
+
- Health checks on both the FrontMCP server and Redis, with `depends_on` ensuring Redis starts first
|
|
98
|
+
|
|
99
|
+
## Related
|
|
100
|
+
|
|
101
|
+
- See `deploy-to-node` for PM2 process management, NGINX reverse proxy, and environment variable configuration
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pm2-with-nginx
|
|
3
|
+
reference: deploy-to-node
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'Deploy a FrontMCP server on bare metal using PM2 for process management and NGINX for TLS termination.'
|
|
6
|
+
tags: [deployment, nx, node, pm2, nginx]
|
|
7
|
+
features:
|
|
8
|
+
- 'Using PM2 with `-i max` for multi-core clustering and automatic restarts'
|
|
9
|
+
- 'Configuring NGINX as a reverse proxy for TLS termination in front of the FrontMCP server'
|
|
10
|
+
- 'Setting environment variables via `.env` for production configuration'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# PM2 Process Manager with NGINX Reverse Proxy
|
|
14
|
+
|
|
15
|
+
Deploy a FrontMCP server on bare metal using PM2 for process management and NGINX for TLS termination.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Build the server
|
|
21
|
+
frontmcp build --target node
|
|
22
|
+
|
|
23
|
+
# Install PM2 globally
|
|
24
|
+
npm install -g pm2
|
|
25
|
+
|
|
26
|
+
# Start with cluster mode (one instance per CPU core)
|
|
27
|
+
pm2 start dist/main.js --name frontmcp-server -i max
|
|
28
|
+
|
|
29
|
+
# Save the process list for auto-restart on reboot
|
|
30
|
+
pm2 save
|
|
31
|
+
pm2 startup
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```nginx
|
|
35
|
+
# /etc/nginx/sites-available/mcp.example.com
|
|
36
|
+
server {
|
|
37
|
+
listen 443 ssl;
|
|
38
|
+
server_name mcp.example.com;
|
|
39
|
+
|
|
40
|
+
ssl_certificate /etc/ssl/certs/mcp.example.com.pem;
|
|
41
|
+
ssl_certificate_key /etc/ssl/private/mcp.example.com.key;
|
|
42
|
+
|
|
43
|
+
location / {
|
|
44
|
+
proxy_pass http://127.0.0.1:3000;
|
|
45
|
+
proxy_set_header Host $host;
|
|
46
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
47
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
48
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# .env
|
|
55
|
+
PORT=3000
|
|
56
|
+
NODE_ENV=production
|
|
57
|
+
HOST=0.0.0.0
|
|
58
|
+
REDIS_URL=redis://localhost:6379
|
|
59
|
+
LOG_LEVEL=info
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Enable the NGINX site and reload
|
|
64
|
+
sudo ln -s /etc/nginx/sites-available/mcp.example.com /etc/nginx/sites-enabled/
|
|
65
|
+
sudo nginx -t && sudo systemctl reload nginx
|
|
66
|
+
|
|
67
|
+
# Verify
|
|
68
|
+
curl https://mcp.example.com/health
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## What This Demonstrates
|
|
72
|
+
|
|
73
|
+
- Using PM2 with `-i max` for multi-core clustering and automatic restarts
|
|
74
|
+
- Configuring NGINX as a reverse proxy for TLS termination in front of the FrontMCP server
|
|
75
|
+
- Setting environment variables via `.env` for production configuration
|
|
76
|
+
|
|
77
|
+
## Related
|
|
78
|
+
|
|
79
|
+
- See `deploy-to-node` for Docker Compose deployment, resource limits, and the full environment variable reference
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: resource-limits
|
|
3
|
+
reference: deploy-to-node
|
|
4
|
+
level: advanced
|
|
5
|
+
description: 'Configure resource limits, health checks, and environment variables for a production FrontMCP deployment.'
|
|
6
|
+
tags: [deployment, docker-compose, docker, node, resource, limits]
|
|
7
|
+
features:
|
|
8
|
+
- 'Setting CPU and memory limits/reservations in Docker Compose to prevent OOM kills'
|
|
9
|
+
- 'Using `NODE_OPTIONS=--max-old-space-size` to align the V8 heap limit with the container memory'
|
|
10
|
+
- 'Configuring health checks with appropriate `start_period` to allow the server time to initialize'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Production Resource Limits and Health Checks
|
|
14
|
+
|
|
15
|
+
Configure resource limits, health checks, and environment variables for a production FrontMCP deployment.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```yaml
|
|
20
|
+
# docker-compose.yml with resource limits
|
|
21
|
+
version: '3.9'
|
|
22
|
+
|
|
23
|
+
services:
|
|
24
|
+
frontmcp:
|
|
25
|
+
build:
|
|
26
|
+
context: .
|
|
27
|
+
dockerfile: Dockerfile
|
|
28
|
+
ports:
|
|
29
|
+
- '${PORT:-3000}:3000'
|
|
30
|
+
environment:
|
|
31
|
+
- NODE_ENV=production
|
|
32
|
+
- PORT=3000
|
|
33
|
+
- REDIS_URL=redis://redis:6379
|
|
34
|
+
- LOG_LEVEL=info
|
|
35
|
+
- NODE_OPTIONS=--max-old-space-size=384
|
|
36
|
+
depends_on:
|
|
37
|
+
redis:
|
|
38
|
+
condition: service_healthy
|
|
39
|
+
restart: unless-stopped
|
|
40
|
+
deploy:
|
|
41
|
+
resources:
|
|
42
|
+
limits:
|
|
43
|
+
memory: 512M
|
|
44
|
+
cpus: '1.0'
|
|
45
|
+
reservations:
|
|
46
|
+
memory: 256M
|
|
47
|
+
cpus: '0.5'
|
|
48
|
+
healthcheck:
|
|
49
|
+
test: ['CMD', 'wget', '-qO-', 'http://localhost:3000/health']
|
|
50
|
+
interval: 30s
|
|
51
|
+
timeout: 5s
|
|
52
|
+
retries: 3
|
|
53
|
+
start_period: 10s
|
|
54
|
+
|
|
55
|
+
redis:
|
|
56
|
+
image: redis:7-alpine
|
|
57
|
+
volumes:
|
|
58
|
+
- redis-data:/data
|
|
59
|
+
deploy:
|
|
60
|
+
resources:
|
|
61
|
+
limits:
|
|
62
|
+
memory: 128M
|
|
63
|
+
cpus: '0.5'
|
|
64
|
+
healthcheck:
|
|
65
|
+
test: ['CMD', 'redis-cli', 'ping']
|
|
66
|
+
interval: 10s
|
|
67
|
+
timeout: 3s
|
|
68
|
+
retries: 5
|
|
69
|
+
restart: unless-stopped
|
|
70
|
+
|
|
71
|
+
volumes:
|
|
72
|
+
redis-data:
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Verify health check endpoint
|
|
77
|
+
curl http://localhost:3000/health
|
|
78
|
+
# {"status":"ok","uptime":12345}
|
|
79
|
+
|
|
80
|
+
# Monitor resource usage
|
|
81
|
+
docker stats --no-stream
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## What This Demonstrates
|
|
85
|
+
|
|
86
|
+
- Setting CPU and memory limits/reservations in Docker Compose to prevent OOM kills
|
|
87
|
+
- Using `NODE_OPTIONS=--max-old-space-size` to align the V8 heap limit with the container memory
|
|
88
|
+
- Configuring health checks with appropriate `start_period` to allow the server time to initialize
|
|
89
|
+
|
|
90
|
+
## Related
|
|
91
|
+
|
|
92
|
+
- See `deploy-to-node` for the full deployment guide including Dockerfile, PM2, and NGINX setup
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: basic-multistage-dockerfile
|
|
3
|
+
reference: deploy-to-node-dockerfile
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'A minimal multi-stage Dockerfile for building and running a FrontMCP server in production.'
|
|
6
|
+
tags: [deployment, dockerfile, docker, node, multistage]
|
|
7
|
+
features:
|
|
8
|
+
- 'Two-stage build: the first stage installs all dependencies and builds; the second copies only production artifacts'
|
|
9
|
+
- 'Using `yarn install --production` in the production stage to exclude dev dependencies'
|
|
10
|
+
- 'A health check that verifies the server is responding'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Basic Multi-Stage Dockerfile
|
|
14
|
+
|
|
15
|
+
A minimal multi-stage Dockerfile for building and running a FrontMCP server in production.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```dockerfile
|
|
20
|
+
# Dockerfile
|
|
21
|
+
|
|
22
|
+
# ---- Build Stage ----
|
|
23
|
+
FROM node:24-alpine AS builder
|
|
24
|
+
WORKDIR /app
|
|
25
|
+
COPY package.json yarn.lock ./
|
|
26
|
+
RUN yarn install --frozen-lockfile
|
|
27
|
+
COPY . .
|
|
28
|
+
RUN yarn frontmcp build --target node
|
|
29
|
+
|
|
30
|
+
# ---- Production Stage ----
|
|
31
|
+
FROM node:24-alpine AS production
|
|
32
|
+
WORKDIR /app
|
|
33
|
+
ENV NODE_ENV=production
|
|
34
|
+
ENV PORT=3000
|
|
35
|
+
COPY --from=builder /app/dist ./dist
|
|
36
|
+
COPY --from=builder /app/package.json ./
|
|
37
|
+
COPY --from=builder /app/yarn.lock ./
|
|
38
|
+
RUN yarn install --frozen-lockfile --production && \
|
|
39
|
+
yarn cache clean
|
|
40
|
+
EXPOSE 3000
|
|
41
|
+
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
42
|
+
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
|
|
43
|
+
CMD ["node", "dist/main.js"]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Build and run the container
|
|
48
|
+
docker build -t my-frontmcp-server .
|
|
49
|
+
docker run -p 3000:3000 -e NODE_ENV=production my-frontmcp-server
|
|
50
|
+
|
|
51
|
+
# Verify
|
|
52
|
+
curl http://localhost:3000/health
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## What This Demonstrates
|
|
56
|
+
|
|
57
|
+
- Two-stage build: the first stage installs all dependencies and builds; the second copies only production artifacts
|
|
58
|
+
- Using `yarn install --production` in the production stage to exclude dev dependencies
|
|
59
|
+
- A health check that verifies the server is responding
|
|
60
|
+
|
|
61
|
+
## Related
|
|
62
|
+
|
|
63
|
+
- See `deploy-to-node-dockerfile` for the complete reference Dockerfile with security hardening
|