@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
package/README.md
CHANGED
|
@@ -39,14 +39,14 @@ export default class Server {}
|
|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
42
|
-
**Node.js
|
|
42
|
+
**Node.js 24+** required.
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
# New project (recommended)
|
|
46
46
|
npx frontmcp create my-app
|
|
47
47
|
|
|
48
48
|
# Existing project
|
|
49
|
-
npm i -D frontmcp @types/node@^
|
|
49
|
+
npm i -D frontmcp @types/node@^24
|
|
50
50
|
npx frontmcp init
|
|
51
51
|
```
|
|
52
52
|
|
package/catalog/TEMPLATE.md
CHANGED
|
@@ -88,6 +88,75 @@ Continue with subsequent steps.
|
|
|
88
88
|
| -------------------- | -------------- | ------------- |
|
|
89
89
|
| Common error message | Why it happens | How to fix it |
|
|
90
90
|
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
Each reference file has a corresponding `examples/<reference-name>/` directory with standalone, copy-pasteable examples.
|
|
94
|
+
|
|
95
|
+
### Example file structure
|
|
96
|
+
|
|
97
|
+
````markdown
|
|
98
|
+
---
|
|
99
|
+
name: example-name
|
|
100
|
+
reference: parent-reference-name
|
|
101
|
+
level: basic | intermediate | advanced
|
|
102
|
+
description: One sentence describing the exact scenario this example covers.
|
|
103
|
+
tags: [keyword1, keyword2, keyword3]
|
|
104
|
+
features:
|
|
105
|
+
- Concrete API or pattern this example demonstrates
|
|
106
|
+
- Another concrete behavior shown in the code
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
# Example Title
|
|
110
|
+
|
|
111
|
+
One sentence expanding slightly on the frontmatter description.
|
|
112
|
+
|
|
113
|
+
## Code
|
|
114
|
+
|
|
115
|
+
\```typescript
|
|
116
|
+
// src/path/to/file.ts
|
|
117
|
+
import { ... } from '@frontmcp/sdk';
|
|
118
|
+
// Complete, self-contained code
|
|
119
|
+
\```
|
|
120
|
+
|
|
121
|
+
## What This Demonstrates
|
|
122
|
+
|
|
123
|
+
- Key pattern or API shown
|
|
124
|
+
|
|
125
|
+
## Related
|
|
126
|
+
|
|
127
|
+
- See `reference-name` for the full API reference
|
|
128
|
+
````
|
|
129
|
+
|
|
130
|
+
Use the example file frontmatter as the single source of truth for example metadata. Reference `## Examples` tables and `skills-manifest.json` should mirror `name`, `level`, `description`, `tags`, and `features` from the example file.
|
|
131
|
+
|
|
132
|
+
### Linking from references
|
|
133
|
+
|
|
134
|
+
Add a `## Examples` section at the bottom of each reference file (before `## Reference`):
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
## Examples
|
|
138
|
+
|
|
139
|
+
| Example | Level | Description |
|
|
140
|
+
| ------------------------------------------------------------ | ----- | ------------- |
|
|
141
|
+
| [`example-name`](../examples/reference-name/example-name.md) | Basic | What it shows |
|
|
142
|
+
|
|
143
|
+
> See all examples in [`examples/reference-name/`](../examples/reference-name/)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Resource Access
|
|
147
|
+
|
|
148
|
+
Skills are accessible via the `skills://` URI scheme as MCP resources with auto-complete:
|
|
149
|
+
|
|
150
|
+
| URI | Returns |
|
|
151
|
+
| ------------------------------------------------- | ----------------------------------------- |
|
|
152
|
+
| `skills://catalog` | JSON list of all available skills |
|
|
153
|
+
| `skills://{skillName}` | Full SKILL.md content (formatted for LLM) |
|
|
154
|
+
| `skills://{skillName}/SKILL.md` | Same as above (explicit path alias) |
|
|
155
|
+
| `skills://{skillName}/references` | JSON list of references for this skill |
|
|
156
|
+
| `skills://{skillName}/references/{referenceName}` | Reference markdown content |
|
|
157
|
+
| `skills://{skillName}/examples` | JSON list of examples for this skill |
|
|
158
|
+
| `skills://{skillName}/examples/{exampleName}` | Example markdown content |
|
|
159
|
+
|
|
91
160
|
## Reference
|
|
92
161
|
|
|
93
162
|
- [Documentation](https://docs.agentfront.dev/frontmcp/...)
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-config
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when you want to configure auth, set up CORS, add rate limiting, throttle requests, manage sessions, choose transport, set HTTP options, add authentication, configure JWT, or set up OAuth. The skill for server CONFIGURATION.'
|
|
4
4
|
tags: [router, config, transport, http, auth, session, redis, sqlite, throttle, guide]
|
|
5
|
+
category: config
|
|
6
|
+
targets: [all]
|
|
7
|
+
bundle: [recommended, full]
|
|
5
8
|
priority: 10
|
|
6
9
|
visibility: both
|
|
7
10
|
license: Apache-2.0
|
|
8
11
|
metadata:
|
|
9
|
-
docs: https://docs.agentfront.dev/frontmcp/
|
|
12
|
+
docs: https://docs.agentfront.dev/frontmcp/fundamentals/overview
|
|
10
13
|
---
|
|
11
14
|
|
|
12
15
|
# FrontMCP Configuration Router
|
|
@@ -38,7 +41,7 @@ Entry point for configuring FrontMCP servers. This skill helps you find the righ
|
|
|
38
41
|
## Prerequisites
|
|
39
42
|
|
|
40
43
|
- A FrontMCP project scaffolded with `frontmcp create` (see `frontmcp-setup`)
|
|
41
|
-
- Node.js
|
|
44
|
+
- Node.js 24+ and npm/yarn installed
|
|
42
45
|
|
|
43
46
|
## Steps
|
|
44
47
|
|
|
@@ -49,16 +52,24 @@ Entry point for configuring FrontMCP servers. This skill helps you find the righ
|
|
|
49
52
|
|
|
50
53
|
## Scenario Routing Table
|
|
51
54
|
|
|
52
|
-
| Scenario
|
|
53
|
-
|
|
|
54
|
-
| Choose between SSE, Streamable HTTP, or stdio
|
|
55
|
-
| Set up CORS, port, base path, or request limits
|
|
56
|
-
| Add rate limiting, concurrency, or IP filtering
|
|
57
|
-
| Enable tools to ask users for input
|
|
58
|
-
| Set up authentication (public, transparent, local, remote)
|
|
59
|
-
| Configure session storage backends
|
|
60
|
-
| Add Redis for production storage
|
|
61
|
-
| Add SQLite for local development
|
|
55
|
+
| Scenario | Skill | Description |
|
|
56
|
+
| -------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------- |
|
|
57
|
+
| Choose between SSE, Streamable HTTP, or stdio | `configure-transport` | Transport protocol selection with distributed session options |
|
|
58
|
+
| Set up CORS, port, base path, or request limits | `configure-http` | HTTP server options for Streamable HTTP and SSE transports |
|
|
59
|
+
| Add rate limiting, concurrency, or IP filtering | `configure-throttle` | Server-level and per-tool throttle configuration |
|
|
60
|
+
| Enable tools to ask users for input | `configure-elicitation` | Elicitation schemas, stores, and multi-step flows |
|
|
61
|
+
| Set up authentication (public, transparent, local, remote) | `configure-auth` | OAuth flows, credential vault, multi-app auth |
|
|
62
|
+
| Configure session storage backends | `configure-session` | Memory, Redis, Vercel KV, and custom session stores |
|
|
63
|
+
| Add Redis for production storage | `setup-redis` | Docker Redis, Vercel KV, pub/sub for subscriptions |
|
|
64
|
+
| Add SQLite for local development | `setup-sqlite` | SQLite with WAL mode, migration helpers |
|
|
65
|
+
| Understand auth mode details (public/transparent/local/remote) | `configure-auth-modes` | Authentication mode details (public, transparent, local, remote) |
|
|
66
|
+
| Fine-tune guard configuration for throttling | `configure-throttle-guard-config` | Advanced guard configuration for throttling |
|
|
67
|
+
| Use transport protocol presets | `configure-transport-protocol-presets` | Transport protocol preset configurations |
|
|
68
|
+
| Split apps into separate scopes (`splitByApp`) | `decorators-guide` | Per-app scope and basePath isolation on `@FrontMcp` |
|
|
69
|
+
| Enable widget-to-host communication (ext-apps) | `decorators-guide` | `extApps` host capabilities, session validation, widget comms |
|
|
70
|
+
| Enable background jobs and workflows | `decorators-guide` | `jobs: { enabled: true, store? }` on `@FrontMcp` |
|
|
71
|
+
| Configure pagination for list operations | `decorators-guide` | `pagination` defaults for `tools/list` endpoint |
|
|
72
|
+
| Configure npm/ESM package loader for remote apps | `decorators-guide` | `loader` config for `App.esm()` / `App.remote()` resolution |
|
|
62
73
|
|
|
63
74
|
## Configuration Layers
|
|
64
75
|
|
|
@@ -70,14 +81,19 @@ Server (@FrontMcp) ← Global defaults
|
|
|
70
81
|
└── Tool (@Tool) ← Per-tool overrides
|
|
71
82
|
```
|
|
72
83
|
|
|
73
|
-
| Setting | Server
|
|
74
|
-
| --------------------- |
|
|
75
|
-
| Transport | Yes
|
|
76
|
-
| HTTP (CORS, port) | Yes
|
|
77
|
-
| Throttle (rate limit) | Yes (global) | No
|
|
78
|
-
| Auth mode | Yes
|
|
79
|
-
|
|
|
80
|
-
|
|
|
84
|
+
| Setting | Server (`@FrontMcp`) | App (`@App`) | Tool (`@Tool`) |
|
|
85
|
+
| --------------------- | -------------------------------- | --------------------- | ------------------------------------------- |
|
|
86
|
+
| Transport | Yes | No | No |
|
|
87
|
+
| HTTP (CORS, port) | Yes | No | No |
|
|
88
|
+
| Throttle (rate limit) | Yes (`throttle` global defaults) | No | Yes (`rateLimit`, `concurrency`, `timeout`) |
|
|
89
|
+
| Auth mode | Yes | Yes (override) | No |
|
|
90
|
+
| Auth providers | No | Yes (`authProviders`) | Yes (`authProviders`) |
|
|
91
|
+
| Session store | Yes | No | No |
|
|
92
|
+
| Elicitation | Yes (enable: `elicitation`) | No | Yes (usage: `this.elicit()`) |
|
|
93
|
+
| ExtApps | Yes | No | No |
|
|
94
|
+
| Jobs / Workflows | Yes (`jobs: { enabled }`) | No | No |
|
|
95
|
+
| Pagination | Yes | No | No |
|
|
96
|
+
| SplitByApp | Yes | No | No |
|
|
81
97
|
|
|
82
98
|
## Cross-Cutting Patterns
|
|
83
99
|
|
|
@@ -136,5 +152,5 @@ Server (@FrontMcp) ← Global defaults
|
|
|
136
152
|
|
|
137
153
|
## Reference
|
|
138
154
|
|
|
139
|
-
- [
|
|
155
|
+
- [FrontMCP Overview](https://docs.agentfront.dev/frontmcp/fundamentals/overview)
|
|
140
156
|
- Related skills: `configure-transport`, `configure-http`, `configure-throttle`, `configure-elicitation`, `configure-auth`, `configure-session`, `setup-redis`, `setup-sqlite`
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-app-auth
|
|
3
|
+
reference: configure-auth
|
|
4
|
+
level: advanced
|
|
5
|
+
description: 'Configure a single FrontMCP server with multiple apps, each using a different auth mode -- public for open endpoints and remote for admin endpoints.'
|
|
6
|
+
tags: [config, auth, security, multi-app, remote, multi]
|
|
7
|
+
features:
|
|
8
|
+
- 'Hosting multiple `@App` instances on a single FrontMCP server with different auth modes'
|
|
9
|
+
- 'Using `public` mode for open-access endpoints alongside `remote` mode for admin-only endpoints'
|
|
10
|
+
- 'Isolating tools per app so each security posture governs only its own tools'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Multi-App Auth with Different Security Postures
|
|
14
|
+
|
|
15
|
+
Configure a single FrontMCP server with multiple apps, each using a different auth mode -- public for open endpoints and remote for admin endpoints.
|
|
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: 'public_search',
|
|
26
|
+
description: 'Search public records',
|
|
27
|
+
inputSchema: { query: z.string() },
|
|
28
|
+
outputSchema: { results: z.array(z.string()) },
|
|
29
|
+
})
|
|
30
|
+
class PublicSearchTool extends ToolContext {
|
|
31
|
+
async execute(input: { query: string }) {
|
|
32
|
+
return { results: [`Public result: ${input.query}`] };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@Tool({
|
|
37
|
+
name: 'admin_config',
|
|
38
|
+
description: 'Modify server configuration (admin only)',
|
|
39
|
+
inputSchema: { key: z.string(), value: z.string() },
|
|
40
|
+
outputSchema: { updated: z.boolean() },
|
|
41
|
+
})
|
|
42
|
+
class AdminConfigTool extends ToolContext {
|
|
43
|
+
async execute(input: { key: string; value: string }) {
|
|
44
|
+
// Only authenticated admins can reach this tool
|
|
45
|
+
return { updated: true };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@App({
|
|
50
|
+
name: 'public-api',
|
|
51
|
+
auth: {
|
|
52
|
+
mode: 'public',
|
|
53
|
+
sessionTtl: 3600,
|
|
54
|
+
anonymousScopes: ['read'],
|
|
55
|
+
},
|
|
56
|
+
tools: [PublicSearchTool],
|
|
57
|
+
})
|
|
58
|
+
class PublicApi {}
|
|
59
|
+
|
|
60
|
+
@App({
|
|
61
|
+
name: 'admin-api',
|
|
62
|
+
auth: {
|
|
63
|
+
mode: 'remote',
|
|
64
|
+
provider: 'https://auth.example.com',
|
|
65
|
+
clientId: process.env['ADMIN_OAUTH_CLIENT_ID'] ?? 'admin-client',
|
|
66
|
+
},
|
|
67
|
+
tools: [AdminConfigTool],
|
|
68
|
+
})
|
|
69
|
+
class AdminApi {}
|
|
70
|
+
|
|
71
|
+
@FrontMcp({
|
|
72
|
+
info: { name: 'multi-app-server', version: '1.0.0' },
|
|
73
|
+
apps: [PublicApi, AdminApi],
|
|
74
|
+
})
|
|
75
|
+
class Server {}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## What This Demonstrates
|
|
79
|
+
|
|
80
|
+
- Hosting multiple `@App` instances on a single FrontMCP server with different auth modes
|
|
81
|
+
- Using `public` mode for open-access endpoints alongside `remote` mode for admin-only endpoints
|
|
82
|
+
- Isolating tools per app so each security posture governs only its own tools
|
|
83
|
+
|
|
84
|
+
## Related
|
|
85
|
+
|
|
86
|
+
- See `configure-auth` for individual auth mode configuration details
|
|
87
|
+
- See `configure-auth-modes` for a feature comparison table across all modes
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: public-mode-setup
|
|
3
|
+
reference: configure-auth
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'Set up a FrontMCP server with public (unauthenticated) access and anonymous scopes.'
|
|
6
|
+
tags: [config, auth, session, public, mode, setup]
|
|
7
|
+
features:
|
|
8
|
+
- "Configuring `mode: 'public'` for unauthenticated access"
|
|
9
|
+
- 'Setting `sessionTtl` to control anonymous session lifetime'
|
|
10
|
+
- 'Granting `anonymousScopes` so tools can check scope-based permissions even without auth'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Public Auth Mode Setup
|
|
14
|
+
|
|
15
|
+
Set up a FrontMCP server with public (unauthenticated) access and anonymous scopes.
|
|
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: 'search',
|
|
26
|
+
description: 'Search public records',
|
|
27
|
+
inputSchema: { query: z.string() },
|
|
28
|
+
outputSchema: { results: z.array(z.string()) },
|
|
29
|
+
})
|
|
30
|
+
class SearchTool extends ToolContext {
|
|
31
|
+
async execute(input: { query: string }) {
|
|
32
|
+
return { results: [`Result for: ${input.query}`] };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@App({
|
|
37
|
+
name: 'public-api',
|
|
38
|
+
auth: {
|
|
39
|
+
mode: 'public',
|
|
40
|
+
sessionTtl: 3600,
|
|
41
|
+
anonymousScopes: ['read'],
|
|
42
|
+
},
|
|
43
|
+
tools: [SearchTool],
|
|
44
|
+
})
|
|
45
|
+
class PublicApi {}
|
|
46
|
+
|
|
47
|
+
@FrontMcp({
|
|
48
|
+
info: { name: 'my-server', version: '1.0.0' },
|
|
49
|
+
apps: [PublicApi],
|
|
50
|
+
})
|
|
51
|
+
class Server {}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## What This Demonstrates
|
|
55
|
+
|
|
56
|
+
- Configuring `mode: 'public'` for unauthenticated access
|
|
57
|
+
- Setting `sessionTtl` to control anonymous session lifetime
|
|
58
|
+
- Granting `anonymousScopes` so tools can check scope-based permissions even without auth
|
|
59
|
+
|
|
60
|
+
## Related
|
|
61
|
+
|
|
62
|
+
- See `configure-auth` for all four auth modes
|
|
63
|
+
- See `configure-auth-modes` for a detailed comparison of modes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remote-oauth-with-vault
|
|
3
|
+
reference: configure-auth
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'Configure a FrontMCP server with remote OAuth 2.1 authentication and use the credential vault to call downstream APIs on behalf of the authenticated user.'
|
|
6
|
+
tags: [config, oauth, auth, remote, vault]
|
|
7
|
+
features:
|
|
8
|
+
- "Configuring `mode: 'remote'` for full OAuth 2.1 authorization flow"
|
|
9
|
+
- 'Loading `clientId` from environment variables instead of hardcoding'
|
|
10
|
+
- "Using `this.authProviders.headers('github')` to get pre-formatted auth headers for downstream API calls"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Remote OAuth Mode with Credential Vault
|
|
14
|
+
|
|
15
|
+
Configure a FrontMCP server with remote OAuth 2.1 authentication and use the credential vault to call downstream APIs on behalf of the authenticated user.
|
|
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: 'create_github_issue',
|
|
26
|
+
description: 'Create a GitHub issue on behalf of the user',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
repo: z.string(),
|
|
29
|
+
title: z.string(),
|
|
30
|
+
body: z.string(),
|
|
31
|
+
},
|
|
32
|
+
outputSchema: { issueUrl: z.string() },
|
|
33
|
+
})
|
|
34
|
+
class CreateGithubIssueTool extends ToolContext {
|
|
35
|
+
async execute(input: { repo: string; title: string; body: string }) {
|
|
36
|
+
// Access downstream credentials via the authProviders context extension
|
|
37
|
+
const headers = await this.authProviders.headers('github');
|
|
38
|
+
|
|
39
|
+
const response = await fetch(`https://api.github.com/repos/${input.repo}/issues`, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
42
|
+
body: JSON.stringify({ title: input.title, body: input.body }),
|
|
43
|
+
});
|
|
44
|
+
const issue = await response.json();
|
|
45
|
+
return { issueUrl: issue.html_url };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@App({
|
|
50
|
+
name: 'dev-tools',
|
|
51
|
+
auth: {
|
|
52
|
+
mode: 'remote',
|
|
53
|
+
provider: 'https://auth.example.com',
|
|
54
|
+
clientId: process.env['OAUTH_CLIENT_ID'] ?? 'mcp-client-id',
|
|
55
|
+
},
|
|
56
|
+
tools: [CreateGithubIssueTool],
|
|
57
|
+
})
|
|
58
|
+
class DevToolsApp {}
|
|
59
|
+
|
|
60
|
+
@FrontMcp({
|
|
61
|
+
info: { name: 'dev-tools-server', version: '1.0.0' },
|
|
62
|
+
apps: [DevToolsApp],
|
|
63
|
+
})
|
|
64
|
+
class Server {}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## What This Demonstrates
|
|
68
|
+
|
|
69
|
+
- Configuring `mode: 'remote'` for full OAuth 2.1 authorization flow
|
|
70
|
+
- Loading `clientId` from environment variables instead of hardcoding
|
|
71
|
+
- Using `this.authProviders.headers('github')` to get pre-formatted auth headers for downstream API calls
|
|
72
|
+
|
|
73
|
+
## Related
|
|
74
|
+
|
|
75
|
+
- See `configure-auth` for credential vault API (`get`, `headers`, `has`, `refresh`)
|
|
76
|
+
- See `configure-session` for setting up Redis-based session storage in production
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: local-self-signed-tokens
|
|
3
|
+
reference: configure-auth-modes
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'Configure a server that signs its own JWT tokens with consent and incremental auth enabled.'
|
|
6
|
+
tags: [config, auth, redis, local, auth-modes, modes]
|
|
7
|
+
features:
|
|
8
|
+
- "Using `mode: 'local'` so the server signs its own JWTs"
|
|
9
|
+
- 'Setting `local.issuer` and `local.audience` to control token claims'
|
|
10
|
+
- 'Enabling `consent` for explicit user authorization flow'
|
|
11
|
+
- 'Enabling `incrementalAuth` to request additional scopes progressively'
|
|
12
|
+
- 'Using Redis for token storage in production'
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Local Self-Signed Tokens
|
|
16
|
+
|
|
17
|
+
Configure a server that signs its own JWT tokens with consent and incremental auth enabled.
|
|
18
|
+
|
|
19
|
+
## Code
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// src/server.ts
|
|
23
|
+
import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
|
|
24
|
+
import { z } from 'zod';
|
|
25
|
+
|
|
26
|
+
@Tool({
|
|
27
|
+
name: 'manage_users',
|
|
28
|
+
description: 'Manage user accounts',
|
|
29
|
+
inputSchema: { action: z.enum(['list', 'create', 'delete']), userId: z.string().optional() },
|
|
30
|
+
outputSchema: { success: z.boolean(), message: z.string() },
|
|
31
|
+
})
|
|
32
|
+
class ManageUsersTool extends ToolContext {
|
|
33
|
+
async execute(input: { action: string; userId?: string }) {
|
|
34
|
+
return { success: true, message: `Action ${input.action} completed` };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@App({
|
|
39
|
+
name: 'internal-api',
|
|
40
|
+
auth: {
|
|
41
|
+
mode: 'local',
|
|
42
|
+
local: {
|
|
43
|
+
issuer: 'my-internal-server',
|
|
44
|
+
audience: 'internal-api',
|
|
45
|
+
},
|
|
46
|
+
tokenStorage: 'redis',
|
|
47
|
+
consent: { enabled: true },
|
|
48
|
+
incrementalAuth: { enabled: true },
|
|
49
|
+
},
|
|
50
|
+
tools: [ManageUsersTool],
|
|
51
|
+
})
|
|
52
|
+
class InternalApi {}
|
|
53
|
+
|
|
54
|
+
@FrontMcp({
|
|
55
|
+
info: { name: 'local-auth-server', version: '1.0.0' },
|
|
56
|
+
apps: [InternalApi],
|
|
57
|
+
redis: {
|
|
58
|
+
provider: 'redis',
|
|
59
|
+
host: process.env['REDIS_HOST'] ?? 'localhost',
|
|
60
|
+
port: 6379,
|
|
61
|
+
},
|
|
62
|
+
})
|
|
63
|
+
class Server {}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What This Demonstrates
|
|
67
|
+
|
|
68
|
+
- Using `mode: 'local'` so the server signs its own JWTs
|
|
69
|
+
- Setting `local.issuer` and `local.audience` to control token claims
|
|
70
|
+
- Enabling `consent` for explicit user authorization flow
|
|
71
|
+
- Enabling `incrementalAuth` to request additional scopes progressively
|
|
72
|
+
- Using Redis for token storage in production
|
|
73
|
+
|
|
74
|
+
## Related
|
|
75
|
+
|
|
76
|
+
- See `configure-auth-modes` for a comparison of all auth modes
|
|
77
|
+
- See `configure-session` for session storage configuration
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remote-enterprise-oauth
|
|
3
|
+
reference: configure-auth-modes
|
|
4
|
+
level: advanced
|
|
5
|
+
description: 'Delegate authentication to an external OAuth orchestrator with Redis-backed token storage.'
|
|
6
|
+
tags: [config, oauth, auth, redis, remote, auth-modes]
|
|
7
|
+
features:
|
|
8
|
+
- "Using `mode: 'remote'` to delegate to an external OAuth 2.1 authorization server"
|
|
9
|
+
- 'Loading `clientId` and `clientSecret` from environment variables (never hardcoded)'
|
|
10
|
+
- 'Configuring Redis-backed token storage for production persistence'
|
|
11
|
+
- 'Full OAuth flow: clients are redirected to the provider and return with an authorization code'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Remote Enterprise OAuth
|
|
15
|
+
|
|
16
|
+
Delegate authentication to an external OAuth orchestrator with Redis-backed token storage.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// src/server.ts
|
|
22
|
+
import { FrontMcp, App, Tool, ToolContext } from '@frontmcp/sdk';
|
|
23
|
+
import { z } from 'zod';
|
|
24
|
+
|
|
25
|
+
@Tool({
|
|
26
|
+
name: 'query_data',
|
|
27
|
+
description: 'Query enterprise data warehouse',
|
|
28
|
+
inputSchema: { sql: z.string() },
|
|
29
|
+
outputSchema: { rows: z.array(z.record(z.string(), z.unknown())), rowCount: z.number() },
|
|
30
|
+
})
|
|
31
|
+
class QueryDataTool extends ToolContext {
|
|
32
|
+
async execute(input: { sql: string }) {
|
|
33
|
+
return { rows: [{ id: 1, name: 'example' }], rowCount: 1 };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@App({
|
|
38
|
+
name: 'enterprise-api',
|
|
39
|
+
auth: {
|
|
40
|
+
mode: 'remote',
|
|
41
|
+
provider: 'https://auth.example.com',
|
|
42
|
+
clientId: process.env['OAUTH_CLIENT_ID']!,
|
|
43
|
+
clientSecret: process.env['OAUTH_CLIENT_SECRET'],
|
|
44
|
+
tokenStorage: 'redis',
|
|
45
|
+
},
|
|
46
|
+
tools: [QueryDataTool],
|
|
47
|
+
})
|
|
48
|
+
class EnterpriseApi {}
|
|
49
|
+
|
|
50
|
+
@FrontMcp({
|
|
51
|
+
info: { name: 'enterprise-server', version: '1.0.0' },
|
|
52
|
+
apps: [EnterpriseApi],
|
|
53
|
+
redis: {
|
|
54
|
+
provider: 'redis',
|
|
55
|
+
host: process.env['REDIS_HOST'] ?? 'redis.internal',
|
|
56
|
+
port: Number(process.env['REDIS_PORT'] ?? 6379),
|
|
57
|
+
password: process.env['REDIS_PASSWORD'],
|
|
58
|
+
},
|
|
59
|
+
})
|
|
60
|
+
class Server {}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## What This Demonstrates
|
|
64
|
+
|
|
65
|
+
- Using `mode: 'remote'` to delegate to an external OAuth 2.1 authorization server
|
|
66
|
+
- Loading `clientId` and `clientSecret` from environment variables (never hardcoded)
|
|
67
|
+
- Configuring Redis-backed token storage for production persistence
|
|
68
|
+
- Full OAuth flow: clients are redirected to the provider and return with an authorization code
|
|
69
|
+
|
|
70
|
+
## Related
|
|
71
|
+
|
|
72
|
+
- See `configure-auth-modes` for a comparison of all auth modes
|
|
73
|
+
- See `setup-redis` for Redis provisioning details
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transparent-jwt-validation
|
|
3
|
+
reference: configure-auth-modes
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'Validate externally-issued JWTs without managing token lifecycle on the server.'
|
|
6
|
+
tags: [config, auth, transparent, auth-modes, modes, jwt]
|
|
7
|
+
features:
|
|
8
|
+
- "Using `mode: 'transparent'` to validate tokens from an external identity provider"
|
|
9
|
+
- 'Setting `expectedAudience` to restrict which tokens are accepted'
|
|
10
|
+
- 'The server fetches JWKS from `{provider}/.well-known/jwks.json` automatically'
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Transparent JWT Validation
|
|
14
|
+
|
|
15
|
+
Validate externally-issued JWTs without managing token lifecycle on the server.
|
|
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: 'get_profile',
|
|
26
|
+
description: 'Get the authenticated user profile',
|
|
27
|
+
inputSchema: { userId: z.string() },
|
|
28
|
+
outputSchema: { id: z.string(), email: z.string() },
|
|
29
|
+
})
|
|
30
|
+
class GetProfileTool extends ToolContext {
|
|
31
|
+
async execute(input: { userId: string }) {
|
|
32
|
+
return { id: input.userId, email: `${input.userId}@example.com` };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@App({
|
|
37
|
+
name: 'api',
|
|
38
|
+
auth: {
|
|
39
|
+
mode: 'transparent',
|
|
40
|
+
provider: 'https://auth.example.com',
|
|
41
|
+
expectedAudience: 'my-api',
|
|
42
|
+
clientId: 'my-client-id',
|
|
43
|
+
},
|
|
44
|
+
tools: [GetProfileTool],
|
|
45
|
+
})
|
|
46
|
+
class ApiApp {}
|
|
47
|
+
|
|
48
|
+
@FrontMcp({
|
|
49
|
+
info: { name: 'transparent-server', version: '1.0.0' },
|
|
50
|
+
apps: [ApiApp],
|
|
51
|
+
})
|
|
52
|
+
class Server {}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## What This Demonstrates
|
|
56
|
+
|
|
57
|
+
- Using `mode: 'transparent'` to validate tokens from an external identity provider
|
|
58
|
+
- Setting `expectedAudience` to restrict which tokens are accepted
|
|
59
|
+
- The server fetches JWKS from `{provider}/.well-known/jwks.json` automatically
|
|
60
|
+
|
|
61
|
+
## Related
|
|
62
|
+
|
|
63
|
+
- See `configure-auth-modes` for a comparison of all auth modes
|
|
64
|
+
- See `configure-auth` for the full authentication setup guide
|