@frontmcp/skills 1.0.0-beta.13 → 1.0.0-beta.14
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 +55 -0
- package/catalog/frontmcp-config/SKILL.md +2 -2
- 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 +10 -0
- package/catalog/frontmcp-config/references/configure-auth.md +10 -0
- package/catalog/frontmcp-config/references/configure-elicitation.md +9 -0
- package/catalog/frontmcp-config/references/configure-http.md +10 -0
- package/catalog/frontmcp-config/references/configure-session.md +10 -0
- package/catalog/frontmcp-config/references/configure-throttle-guard-config.md +9 -0
- package/catalog/frontmcp-config/references/configure-throttle.md +10 -0
- package/catalog/frontmcp-config/references/configure-transport-protocol-presets.md +9 -0
- package/catalog/frontmcp-config/references/configure-transport.md +10 -0
- package/catalog/frontmcp-config/references/setup-redis.md +5 -0
- package/catalog/frontmcp-config/references/setup-sqlite.md +5 -0
- package/catalog/frontmcp-deployment/SKILL.md +2 -2
- 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 +10 -0
- package/catalog/frontmcp-deployment/references/build-for-cli.md +9 -0
- package/catalog/frontmcp-deployment/references/build-for-sdk.md +10 -0
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +10 -0
- package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +10 -0
- package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +9 -0
- package/catalog/frontmcp-deployment/references/deploy-to-node.md +10 -0
- package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +9 -0
- package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +10 -0
- package/catalog/frontmcp-development/SKILL.md +2 -2
- 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 +9 -0
- package/catalog/frontmcp-development/references/create-agent-llm-config.md +9 -0
- package/catalog/frontmcp-development/references/create-agent.md +10 -0
- package/catalog/frontmcp-development/references/create-job.md +10 -0
- package/catalog/frontmcp-development/references/create-plugin-hooks.md +10 -0
- package/catalog/frontmcp-development/references/create-plugin.md +10 -0
- package/catalog/frontmcp-development/references/create-prompt.md +10 -0
- package/catalog/frontmcp-development/references/create-provider.md +9 -0
- package/catalog/frontmcp-development/references/create-resource.md +52 -15
- package/catalog/frontmcp-development/references/create-skill-with-tools.md +10 -0
- package/catalog/frontmcp-development/references/create-skill.md +10 -0
- package/catalog/frontmcp-development/references/create-tool-annotations.md +9 -0
- package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +10 -0
- package/catalog/frontmcp-development/references/create-tool.md +10 -0
- package/catalog/frontmcp-development/references/create-workflow.md +10 -0
- package/catalog/frontmcp-development/references/decorators-guide.md +10 -0
- package/catalog/frontmcp-development/references/official-adapters.md +10 -0
- package/catalog/frontmcp-development/references/official-plugins.md +10 -0
- package/catalog/frontmcp-extensibility/SKILL.md +1 -1
- 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 +10 -0
- package/catalog/frontmcp-guides/SKILL.md +2 -2
- 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 +10 -0
- package/catalog/frontmcp-guides/references/example-task-manager.md +10 -0
- package/catalog/frontmcp-guides/references/example-weather-api.md +10 -0
- package/catalog/frontmcp-production-readiness/SKILL.md +2 -2
- 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/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 +10 -0
- package/catalog/frontmcp-production-readiness/references/production-browser.md +10 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +9 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +10 -0
- package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +10 -0
- package/catalog/frontmcp-production-readiness/references/production-lambda.md +10 -0
- package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +10 -0
- package/catalog/frontmcp-production-readiness/references/production-node-server.md +10 -0
- package/catalog/frontmcp-production-readiness/references/production-vercel.md +10 -0
- 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 +9 -0
- package/catalog/frontmcp-setup/references/multi-app-composition.md +10 -0
- package/catalog/frontmcp-setup/references/nx-workflow.md +10 -0
- package/catalog/frontmcp-setup/references/project-structure-nx.md +10 -0
- package/catalog/frontmcp-setup/references/project-structure-standalone.md +10 -0
- package/catalog/frontmcp-setup/references/readme-guide.md +9 -0
- package/catalog/frontmcp-setup/references/setup-project.md +10 -0
- package/catalog/frontmcp-setup/references/setup-redis.md +10 -0
- package/catalog/frontmcp-setup/references/setup-sqlite.md +10 -0
- 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 +10 -0
- package/catalog/frontmcp-testing/references/test-auth.md +10 -0
- package/catalog/frontmcp-testing/references/test-browser-build.md +9 -0
- package/catalog/frontmcp-testing/references/test-cli-binary.md +9 -0
- package/catalog/frontmcp-testing/references/test-direct-client.md +9 -0
- package/catalog/frontmcp-testing/references/test-e2e-handler.md +10 -0
- package/catalog/frontmcp-testing/references/test-tool-unit.md +10 -0
- package/catalog/skills-manifest.json +2383 -67
- package/package.json +1 -1
- package/src/manifest.d.ts +23 -0
- package/src/manifest.js +3 -1
- package/src/manifest.js.map +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: basic-worker-deploy
|
|
3
|
+
reference: deploy-to-cloudflare
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'Deploy a FrontMCP server to Cloudflare Workers with a minimal configuration.'
|
|
6
|
+
tags: [deployment, cloudflare, transport, local, worker]
|
|
7
|
+
features:
|
|
8
|
+
- 'A minimal FrontMCP server configured for Cloudflare Workers with SSE transport'
|
|
9
|
+
- 'The `wrangler.toml` configuration with `main` pointing to the build output'
|
|
10
|
+
- 'Using `wrangler dev` for local testing before deploying with `wrangler deploy`'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Basic Cloudflare Workers Deployment
|
|
14
|
+
|
|
15
|
+
Deploy a FrontMCP server to Cloudflare Workers with a minimal configuration.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// src/server.ts
|
|
21
|
+
import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
|
|
22
|
+
import { z } from 'zod';
|
|
23
|
+
|
|
24
|
+
@Tool({
|
|
25
|
+
name: 'echo',
|
|
26
|
+
description: 'Echo back the input',
|
|
27
|
+
inputSchema: { message: z.string() },
|
|
28
|
+
})
|
|
29
|
+
class EchoTool extends ToolContext<{ message: string }> {
|
|
30
|
+
async execute(input: { message: string }) {
|
|
31
|
+
return { content: [{ type: 'text' as const, text: input.message }] };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@App({ name: 'MyApp', tools: [EchoTool] })
|
|
36
|
+
class MyApp {}
|
|
37
|
+
|
|
38
|
+
@FrontMcp({
|
|
39
|
+
info: { name: 'my-worker', version: '1.0.0' },
|
|
40
|
+
apps: [MyApp],
|
|
41
|
+
transport: {
|
|
42
|
+
protocol: 'legacy',
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
class MyServer {}
|
|
46
|
+
|
|
47
|
+
export default MyServer;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```toml
|
|
51
|
+
# wrangler.toml
|
|
52
|
+
name = "frontmcp-worker"
|
|
53
|
+
main = "dist/index.js"
|
|
54
|
+
compatibility_date = "2024-01-01"
|
|
55
|
+
|
|
56
|
+
[vars]
|
|
57
|
+
NODE_ENV = "production"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Build for Cloudflare Workers
|
|
62
|
+
frontmcp build --target cloudflare
|
|
63
|
+
|
|
64
|
+
# Preview locally
|
|
65
|
+
wrangler dev
|
|
66
|
+
|
|
67
|
+
# Deploy to production
|
|
68
|
+
wrangler deploy
|
|
69
|
+
|
|
70
|
+
# Verify
|
|
71
|
+
curl https://frontmcp-worker.your-subdomain.workers.dev/health
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## What This Demonstrates
|
|
75
|
+
|
|
76
|
+
- A minimal FrontMCP server configured for Cloudflare Workers with SSE transport
|
|
77
|
+
- The `wrangler.toml` configuration with `main` pointing to the build output
|
|
78
|
+
- Using `wrangler dev` for local testing before deploying with `wrangler deploy`
|
|
79
|
+
|
|
80
|
+
## Related
|
|
81
|
+
|
|
82
|
+
- See `deploy-to-cloudflare` for KV storage, D1, bundle size limits, and troubleshooting
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker-custom-domain
|
|
3
|
+
reference: deploy-to-cloudflare
|
|
4
|
+
level: advanced
|
|
5
|
+
description: 'Scaffold a FrontMCP project targeting Cloudflare, configure a custom domain, and verify the deployment.'
|
|
6
|
+
tags: [deployment, json-rpc, cloudflare, worker, custom, domain]
|
|
7
|
+
features:
|
|
8
|
+
- 'Using `frontmcp create --target cloudflare` to scaffold a project with `wrangler.toml` and deploy scripts'
|
|
9
|
+
- 'Adding a custom domain with `wrangler domains add` for production-ready URLs'
|
|
10
|
+
- 'End-to-end verification of both the health check and MCP JSON-RPC endpoint'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Cloudflare Worker with Custom Domain and Project Scaffold
|
|
14
|
+
|
|
15
|
+
Scaffold a FrontMCP project targeting Cloudflare, configure a custom domain, and verify the deployment.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Scaffold a new project targeting Cloudflare
|
|
21
|
+
npx frontmcp create my-app --target cloudflare
|
|
22
|
+
cd my-app
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
// src/server.ts
|
|
27
|
+
import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
|
|
28
|
+
import { z } from 'zod';
|
|
29
|
+
|
|
30
|
+
@Tool({
|
|
31
|
+
name: 'translate',
|
|
32
|
+
description: 'Translate text',
|
|
33
|
+
inputSchema: { text: z.string(), lang: z.string() },
|
|
34
|
+
})
|
|
35
|
+
class TranslateTool extends ToolContext<{ text: string; lang: string }> {
|
|
36
|
+
async execute(input: { text: string; lang: string }) {
|
|
37
|
+
return {
|
|
38
|
+
content: [{ type: 'text' as const, text: `[${input.lang}] ${input.text}` }],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@App({ name: 'TranslateApp', tools: [TranslateTool] })
|
|
44
|
+
class TranslateApp {}
|
|
45
|
+
|
|
46
|
+
@FrontMcp({
|
|
47
|
+
info: { name: 'translate-worker', version: '1.0.0' },
|
|
48
|
+
apps: [TranslateApp],
|
|
49
|
+
transport: {
|
|
50
|
+
type: 'sse',
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
class TranslateServer {}
|
|
54
|
+
|
|
55
|
+
export default TranslateServer;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```toml
|
|
59
|
+
# wrangler.toml
|
|
60
|
+
name = "translate-worker"
|
|
61
|
+
main = "dist/index.js"
|
|
62
|
+
compatibility_date = "2024-01-01"
|
|
63
|
+
|
|
64
|
+
[[kv_namespaces]]
|
|
65
|
+
binding = "FRONTMCP_KV"
|
|
66
|
+
id = "your-kv-namespace-id"
|
|
67
|
+
|
|
68
|
+
[vars]
|
|
69
|
+
NODE_ENV = "production"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Build and deploy
|
|
74
|
+
frontmcp build --target cloudflare
|
|
75
|
+
wrangler deploy
|
|
76
|
+
|
|
77
|
+
# Add a custom domain
|
|
78
|
+
wrangler domains add mcp.example.com
|
|
79
|
+
|
|
80
|
+
# Verify health endpoint
|
|
81
|
+
curl https://mcp.example.com/health
|
|
82
|
+
|
|
83
|
+
# Test MCP endpoint
|
|
84
|
+
curl -X POST https://mcp.example.com/mcp \
|
|
85
|
+
-H "Content-Type: application/json" \
|
|
86
|
+
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## What This Demonstrates
|
|
90
|
+
|
|
91
|
+
- Using `frontmcp create --target cloudflare` to scaffold a project with `wrangler.toml` and deploy scripts
|
|
92
|
+
- Adding a custom domain with `wrangler domains add` for production-ready URLs
|
|
93
|
+
- End-to-end verification of both the health check and MCP JSON-RPC endpoint
|
|
94
|
+
|
|
95
|
+
## Related
|
|
96
|
+
|
|
97
|
+
- See `deploy-to-cloudflare` for bundle size limits, CPU time constraints, and the full storage options table
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker-with-kv-storage
|
|
3
|
+
reference: deploy-to-cloudflare
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'Deploy a FrontMCP server to Cloudflare Workers with KV namespace for session and state storage.'
|
|
6
|
+
tags: [deployment, cloudflare, cli, session, worker, kv]
|
|
7
|
+
features:
|
|
8
|
+
- 'Binding a KV namespace in `wrangler.toml` with `[[kv_namespaces]]`'
|
|
9
|
+
- 'Using `wrangler secret put` for sensitive values instead of `[vars]` (which are visible in plaintext)'
|
|
10
|
+
- 'Creating the KV namespace via CLI and copying the ID into the configuration'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Cloudflare Worker with KV Storage
|
|
14
|
+
|
|
15
|
+
Deploy a FrontMCP server to Cloudflare Workers with KV namespace for session and state storage.
|
|
16
|
+
|
|
17
|
+
## Code
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// src/server.ts
|
|
21
|
+
import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
|
|
22
|
+
import { z } from 'zod';
|
|
23
|
+
|
|
24
|
+
@Tool({
|
|
25
|
+
name: 'store_value',
|
|
26
|
+
description: 'Store a value by key',
|
|
27
|
+
inputSchema: { key: z.string(), value: z.string() },
|
|
28
|
+
})
|
|
29
|
+
class StoreValueTool extends ToolContext<{ key: string; value: string }> {
|
|
30
|
+
async execute(input: { key: string; value: string }) {
|
|
31
|
+
return {
|
|
32
|
+
content: [{ type: 'text' as const, text: `Stored: ${input.key}` }],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@App({ name: 'StorageApp', tools: [StoreValueTool] })
|
|
38
|
+
class StorageApp {}
|
|
39
|
+
|
|
40
|
+
@FrontMcp({
|
|
41
|
+
info: { name: 'my-worker', version: '1.0.0' },
|
|
42
|
+
apps: [StorageApp],
|
|
43
|
+
transport: {
|
|
44
|
+
type: 'sse',
|
|
45
|
+
},
|
|
46
|
+
})
|
|
47
|
+
class MyServer {}
|
|
48
|
+
|
|
49
|
+
export default MyServer;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
```toml
|
|
53
|
+
# wrangler.toml
|
|
54
|
+
name = "frontmcp-worker"
|
|
55
|
+
main = "dist/index.js"
|
|
56
|
+
compatibility_date = "2024-01-01"
|
|
57
|
+
|
|
58
|
+
[[kv_namespaces]]
|
|
59
|
+
binding = "FRONTMCP_KV"
|
|
60
|
+
id = "your-kv-namespace-id"
|
|
61
|
+
|
|
62
|
+
[vars]
|
|
63
|
+
NODE_ENV = "production"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Create the KV namespace
|
|
68
|
+
wrangler kv:namespace create FRONTMCP_KV
|
|
69
|
+
# Copy the returned id into wrangler.toml
|
|
70
|
+
|
|
71
|
+
# Store secrets securely (not in [vars])
|
|
72
|
+
wrangler secret put MY_API_KEY
|
|
73
|
+
|
|
74
|
+
# Build and deploy
|
|
75
|
+
frontmcp build --target cloudflare
|
|
76
|
+
wrangler deploy
|
|
77
|
+
|
|
78
|
+
# Verify
|
|
79
|
+
curl -X POST https://frontmcp-worker.your-subdomain.workers.dev/mcp \
|
|
80
|
+
-H "Content-Type: application/json" \
|
|
81
|
+
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## What This Demonstrates
|
|
85
|
+
|
|
86
|
+
- Binding a KV namespace in `wrangler.toml` with `[[kv_namespaces]]`
|
|
87
|
+
- Using `wrangler secret put` for sensitive values instead of `[vars]` (which are visible in plaintext)
|
|
88
|
+
- Creating the KV namespace via CLI and copying the ID into the configuration
|
|
89
|
+
|
|
90
|
+
## Related
|
|
91
|
+
|
|
92
|
+
- See `deploy-to-cloudflare` for D1, Durable Objects, bundle size limits, and storage comparison table
|
|
@@ -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
|