@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
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: decorators-guide
|
|
3
|
+
description: Complete reference for the hierarchical decorator system from @FrontMcp to @Tool
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# FrontMCP Decorators - Complete Reference
|
|
2
7
|
|
|
3
8
|
## Architecture Overview
|
|
@@ -56,28 +61,34 @@ FrontMCP uses a hierarchical decorator system. The nesting order is:
|
|
|
56
61
|
|
|
57
62
|
**Key fields:**
|
|
58
63
|
|
|
59
|
-
| Field | Description
|
|
60
|
-
| --------------- |
|
|
61
|
-
| `info` | Server name, version, and description
|
|
62
|
-
| `apps` | Array of `@App` classes to mount
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
64
|
+
| Field | Description |
|
|
65
|
+
| --------------- | -------------------------------------------------------------------------------- |
|
|
66
|
+
| `info` | Server name, version, and description |
|
|
67
|
+
| `apps` | Array of `@App` classes to mount |
|
|
68
|
+
| `serve?` | Auto-start HTTP server (default: `true`). Set `false` for programmatic usage |
|
|
69
|
+
| `splitByApp?` | If `true`, each app gets its own scope and basePath. Default: `false` |
|
|
70
|
+
| `redis?` | Redis / Vercel KV connection for sessions, transport persistence, auth tokens |
|
|
71
|
+
| `plugins?` | Global plugins (instantiated per scope) |
|
|
72
|
+
| `providers?` | Global DI providers available to all apps |
|
|
73
|
+
| `tools?` | Standalone tools (outside apps, merged with app tools) |
|
|
74
|
+
| `resources?` | Standalone resources (merged with app resources) |
|
|
75
|
+
| `skills?` | Standalone skills (merged with app skills) |
|
|
76
|
+
| `skillsConfig?` | Skills HTTP endpoints (`/llm.txt`, `/skills`) and MCP tool config |
|
|
77
|
+
| `transport?` | Transport preset (`'modern'`, `'legacy'`, `'stateless-api'`, `'full'`) or object |
|
|
78
|
+
| `auth?` | Authentication mode: `'public'`, `'transparent'`, `'local'`, `'remote'` |
|
|
79
|
+
| `http?` | HTTP server options (port, host, cors, socketPath) |
|
|
80
|
+
| `logging?` | Logging configuration (transports and levels) |
|
|
81
|
+
| `elicitation?` | Enable interactive user input during tool execution |
|
|
82
|
+
| `sqlite?` | SQLite storage for local deployments (sessions, events) |
|
|
83
|
+
| `pubsub?` | Redis pub/sub for resource subscriptions (falls back to `redis` config) |
|
|
84
|
+
| `jobs?` | Background jobs/workflows system (`{ enabled, store? }`) |
|
|
85
|
+
| `throttle?` | Server-level guard config (see note below) |
|
|
86
|
+
| `pagination?` | List operation pagination (`tools/list` endpoint) |
|
|
87
|
+
| `ui?` | UI rendering config (CDN overrides for widget imports) |
|
|
88
|
+
| `extApps?` | Widget-to-host MCP Apps communication (host capabilities, session validation) |
|
|
89
|
+
| `loader?` | Default npm/ESM package loader for `App.esm()` / `App.remote()` apps |
|
|
90
|
+
|
|
91
|
+
> **Throttle vs per-tool guards:** Server-level `throttle` is a `GuardConfig` object with `global`, `defaultRateLimit`, `defaultConcurrency`, `defaultTimeout` sub-fields that set server-wide defaults. Tool-level `rateLimit`, `concurrency`, `timeout` fields (on `@Tool`) override these defaults per tool.
|
|
81
92
|
|
|
82
93
|
```typescript
|
|
83
94
|
import { FrontMcp } from '@frontmcp/sdk';
|
|
@@ -103,21 +114,23 @@ class MyServer {}
|
|
|
103
114
|
|
|
104
115
|
**Key fields:**
|
|
105
116
|
|
|
106
|
-
| Field
|
|
107
|
-
|
|
|
108
|
-
| `name`
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
117
|
+
| Field | Description |
|
|
118
|
+
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
119
|
+
| `name` | Application name (unique within server) |
|
|
120
|
+
| `description?` | Human-readable description for docs and UIs |
|
|
121
|
+
| `tools?` | Array of tool classes or function-built tools |
|
|
122
|
+
| `resources?` | Array of resource classes or function-built resources |
|
|
123
|
+
| `prompts?` | Array of prompt classes or function-built prompts |
|
|
124
|
+
| `agents?` | Array of agent classes (each exposed as `use-agent:<name>` tool) |
|
|
125
|
+
| `skills?` | Array of skill definitions |
|
|
126
|
+
| `plugins?` | App-scoped plugins |
|
|
127
|
+
| `providers?` | App-scoped DI providers |
|
|
128
|
+
| `authProviders?` | Named auth providers (e.g., GitHub, Google OAuth) separate from `auth` |
|
|
129
|
+
| `adapters?` | External source adapters (e.g., OpenAPI) |
|
|
130
|
+
| `auth?` | App-level auth config (overrides server default) |
|
|
131
|
+
| `standalone?` | `boolean \| 'includeInParent'` — `true`: isolated scope, excluded. `'includeInParent'`: isolated scope but tools exposed in parent |
|
|
132
|
+
| `jobs?` | Background job definitions |
|
|
133
|
+
| `workflows?` | Multi-step workflow definitions |
|
|
121
134
|
|
|
122
135
|
```typescript
|
|
123
136
|
import { App } from '@frontmcp/sdk';
|
|
@@ -142,19 +155,21 @@ class AnalyticsApp {}
|
|
|
142
155
|
|
|
143
156
|
**Key fields:**
|
|
144
157
|
|
|
145
|
-
| Field | Description
|
|
146
|
-
| -------------------- |
|
|
147
|
-
| `name` | Tool name (used in MCP protocol)
|
|
148
|
-
| `description` | Human-readable description for the LLM
|
|
149
|
-
| `inputSchema` | Zod raw shape defining input parameters
|
|
150
|
-
| `outputSchema?` | Zod schema
|
|
151
|
-
| `annotations?` | MCP tool annotations (readOnlyHint
|
|
152
|
-
| `tags?` | Categorization tags
|
|
153
|
-
| `hideFromDiscovery?` | Hide from
|
|
154
|
-
| `
|
|
155
|
-
| `
|
|
156
|
-
| `
|
|
157
|
-
| `
|
|
158
|
+
| Field | Description |
|
|
159
|
+
| -------------------- | -------------------------------------------------------------------- |
|
|
160
|
+
| `name` | Tool name (used in MCP protocol, snake_case) |
|
|
161
|
+
| `description` | Human-readable description for the LLM |
|
|
162
|
+
| `inputSchema` | Zod raw shape defining input parameters |
|
|
163
|
+
| `outputSchema?` | Output type: Zod schema, `'string'`, `'image'`, `'audio'`, etc. |
|
|
164
|
+
| `annotations?` | MCP tool annotations (`readOnlyHint`, `destructiveHint`, etc.) |
|
|
165
|
+
| `tags?` | Categorization tags for filtering |
|
|
166
|
+
| `hideFromDiscovery?` | Hide from `tools/list` (still callable directly) |
|
|
167
|
+
| `examples?` | Usage examples: `[{ description, input, output? }]` |
|
|
168
|
+
| `authProviders?` | Per-tool auth providers: `['GitHub']` or `[{ name, scopes, alias }]` |
|
|
169
|
+
| `rateLimit?` | Rate limiting: `{ maxRequests, windowMs, partitionBy }` |
|
|
170
|
+
| `concurrency?` | Concurrency control: `{ maxConcurrent }` |
|
|
171
|
+
| `timeout?` | Execution timeout: `{ executeMs }` |
|
|
172
|
+
| `ui?` | UI widget configuration for tool rendering |
|
|
158
173
|
|
|
159
174
|
```typescript
|
|
160
175
|
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
@@ -188,9 +203,11 @@ class SearchUsersTool extends ToolContext {
|
|
|
188
203
|
|
|
189
204
|
| Field | Description |
|
|
190
205
|
| -------------- | ------------------------------------------------------------------- |
|
|
191
|
-
| `name` | Prompt name
|
|
206
|
+
| `name` | Prompt name (used in MCP protocol) |
|
|
207
|
+
| `title?` | Human-readable display title for UIs |
|
|
192
208
|
| `description?` | What this prompt does |
|
|
193
209
|
| `arguments?` | Array of argument definitions (`{ name, description?, required? }`) |
|
|
210
|
+
| `icons?` | Array of Icon objects for UI representation (per MCP spec) |
|
|
194
211
|
|
|
195
212
|
```typescript
|
|
196
213
|
import { Prompt, PromptContext } from '@frontmcp/sdk';
|
|
@@ -232,10 +249,12 @@ class CodeReviewPrompt extends PromptContext {
|
|
|
232
249
|
|
|
233
250
|
| Field | Description |
|
|
234
251
|
| -------------- | -------------------------------------------- |
|
|
235
|
-
| `name` | Resource name
|
|
252
|
+
| `name` | Resource name (used in MCP protocol) |
|
|
253
|
+
| `title?` | Human-readable display title for UIs |
|
|
236
254
|
| `uri` | Fixed URI (e.g., `config://app/settings`) |
|
|
237
255
|
| `description?` | What this resource provides |
|
|
238
256
|
| `mimeType?` | Content MIME type (e.g., `application/json`) |
|
|
257
|
+
| `icons?` | Array of Icon objects for UI representation |
|
|
239
258
|
|
|
240
259
|
```typescript
|
|
241
260
|
import { Resource, ResourceContext } from '@frontmcp/sdk';
|
|
@@ -267,9 +286,11 @@ class AppConfigResource extends ResourceContext {
|
|
|
267
286
|
| Field | Description |
|
|
268
287
|
| -------------- | --------------------------------------------------------------- |
|
|
269
288
|
| `name` | Resource template name |
|
|
289
|
+
| `title?` | Human-readable display title for UIs |
|
|
270
290
|
| `uriTemplate` | URI template with parameters (e.g., `users://{userId}/profile`) |
|
|
271
291
|
| `description?` | What this resource provides |
|
|
272
292
|
| `mimeType?` | Content MIME type |
|
|
293
|
+
| `icons?` | Array of Icon objects for UI representation |
|
|
273
294
|
|
|
274
295
|
```typescript
|
|
275
296
|
import { ResourceTemplate, ResourceContext } from '@frontmcp/sdk';
|
|
@@ -340,16 +361,24 @@ class ResearchAgent extends AgentContext {
|
|
|
340
361
|
|
|
341
362
|
**Key fields:**
|
|
342
363
|
|
|
343
|
-
| Field
|
|
344
|
-
|
|
|
345
|
-
| `name`
|
|
346
|
-
| `description`
|
|
347
|
-
| `instructions`
|
|
348
|
-
| `tools?`
|
|
349
|
-
| `parameters?`
|
|
350
|
-
| `examples?`
|
|
351
|
-
| `visibility?`
|
|
352
|
-
| `toolValidation?`
|
|
364
|
+
| Field | Description |
|
|
365
|
+
| -------------------- | ------------------------------------------------------------------------------ |
|
|
366
|
+
| `name` | Skill name (kebab-case, max 64 chars) |
|
|
367
|
+
| `description` | What this skill enables (max 1024 chars, no HTML/XML) |
|
|
368
|
+
| `instructions` | Inline string, `{ file: '...' }`, or `{ url: '...' }` |
|
|
369
|
+
| `tools?` | Tool classes, names, or `{ tool/name, purpose?, required? }` refs |
|
|
370
|
+
| `parameters?` | Input parameters: `[{ name, description?, type?, default? }]` |
|
|
371
|
+
| `examples?` | Usage examples: `[{ scenario, parameters?, expectedOutcome? }]` |
|
|
372
|
+
| `visibility?` | Discovery scope: `'mcp'`, `'http'`, or `'both'` (default: `'both'`) |
|
|
373
|
+
| `toolValidation?` | `'strict'` \| `'warn'` \| `'ignore'` for missing tool refs (default: `'warn'`) |
|
|
374
|
+
| `priority?` | Search ranking weight (higher = earlier). Default: `0` |
|
|
375
|
+
| `hideFromDiscovery?` | Hide from search results; still loadable by ID |
|
|
376
|
+
| `tags?` | Tags for categorization and search |
|
|
377
|
+
| `license?` | License identifier (per Agent Skills spec, e.g., `'MIT'`) |
|
|
378
|
+
| `compatibility?` | Environment requirements (max 500 chars, e.g., `'Node.js 18+'`) |
|
|
379
|
+
| `specMetadata?` | Arbitrary key-value map (Agent Skills spec `metadata` field) |
|
|
380
|
+
| `allowedTools?` | Space-delimited pre-approved tool names (Agent Skills spec) |
|
|
381
|
+
| `resources?` | Bundled dirs: `{ scripts?, references?, assets? }` (Agent Skills spec) |
|
|
353
382
|
|
|
354
383
|
```typescript
|
|
355
384
|
import { Skill } from '@frontmcp/sdk';
|
|
@@ -493,23 +522,35 @@ class ApprovalFlow {}
|
|
|
493
522
|
|
|
494
523
|
**Key fields:**
|
|
495
524
|
|
|
496
|
-
| Field
|
|
497
|
-
|
|
|
498
|
-
| `name`
|
|
499
|
-
| `description`
|
|
500
|
-
| `
|
|
525
|
+
| Field | Description |
|
|
526
|
+
| -------------------- | ------------------------------------------------------------- |
|
|
527
|
+
| `name` | Job name |
|
|
528
|
+
| `description` | What the job does |
|
|
529
|
+
| `inputSchema` | Zod schema for job input parameters |
|
|
530
|
+
| `outputSchema` | Zod schema for job output |
|
|
531
|
+
| `retry?` | `{ maxAttempts, backoffMs, backoffMultiplier, maxBackoffMs }` |
|
|
532
|
+
| `timeout?` | Execution timeout in ms |
|
|
533
|
+
| `tags?` | Categorization tags |
|
|
534
|
+
| `labels?` | Key-value labels (e.g., `{ env: 'prod' }`) |
|
|
535
|
+
| `hideFromDiscovery?` | Hide from job listing |
|
|
536
|
+
| `permissions?` | Access control: `[{ action: 'execute', roles: ['admin'] }]` |
|
|
501
537
|
|
|
502
538
|
```typescript
|
|
503
539
|
import { Job, JobContext } from '@frontmcp/sdk';
|
|
540
|
+
import { z } from 'zod';
|
|
504
541
|
|
|
505
542
|
@Job({
|
|
506
543
|
name: 'sync_data',
|
|
507
544
|
description: 'Synchronize data from external sources',
|
|
508
|
-
|
|
545
|
+
inputSchema: z.object({ source: z.string().describe('Data source to sync') }),
|
|
546
|
+
outputSchema: z.object({ synced: z.number() }),
|
|
547
|
+
retry: { maxAttempts: 3, backoffMs: 1000, backoffMultiplier: 2, maxBackoffMs: 60_000 },
|
|
548
|
+
timeout: 300_000,
|
|
509
549
|
})
|
|
510
550
|
class SyncDataJob extends JobContext {
|
|
511
|
-
async execute() {
|
|
512
|
-
await this.get(SyncService).runFullSync();
|
|
551
|
+
async execute(input: { source: string }) {
|
|
552
|
+
const count = await this.get(SyncService).runFullSync(input.source);
|
|
553
|
+
return { synced: count };
|
|
513
554
|
}
|
|
514
555
|
}
|
|
515
556
|
```
|
|
@@ -524,11 +565,34 @@ class SyncDataJob extends JobContext {
|
|
|
524
565
|
|
|
525
566
|
**Key fields:**
|
|
526
567
|
|
|
527
|
-
| Field
|
|
528
|
-
|
|
|
529
|
-
| `name`
|
|
530
|
-
| `description`
|
|
531
|
-
| `steps`
|
|
568
|
+
| Field | Description |
|
|
569
|
+
| -------------------- | ------------------------------------------------------------------ |
|
|
570
|
+
| `name` | Workflow name |
|
|
571
|
+
| `description` | What this workflow accomplishes |
|
|
572
|
+
| `steps` | Array of step definitions (see step fields below) |
|
|
573
|
+
| `trigger?` | `'manual'` \| `'webhook'` \| `'event'` |
|
|
574
|
+
| `webhook?` | `{ path, secret, methods }` — required when trigger is `'webhook'` |
|
|
575
|
+
| `timeout?` | Overall workflow timeout in ms |
|
|
576
|
+
| `maxConcurrency?` | Maximum parallel step concurrency (default: 5) |
|
|
577
|
+
| `tags?` | Categorization tags |
|
|
578
|
+
| `labels?` | Key-value labels (e.g., `{ env: 'prod' }`) |
|
|
579
|
+
| `hideFromDiscovery?` | Hide from workflow listing |
|
|
580
|
+
| `permissions?` | Access control: `[{ action: 'execute', roles: ['admin'] }]` |
|
|
581
|
+
| `inputSchema?` | Zod schema for workflow input parameters |
|
|
582
|
+
| `outputSchema?` | Zod schema for workflow output |
|
|
583
|
+
|
|
584
|
+
**Step fields:**
|
|
585
|
+
|
|
586
|
+
| Step Field | Description |
|
|
587
|
+
| ------------------ | --------------------------------------------------------------- |
|
|
588
|
+
| `id` | Unique step identifier |
|
|
589
|
+
| `jobName` | Name of the `@Job` to execute |
|
|
590
|
+
| `input?` | Static object or `(steps) => object` function for dynamic input |
|
|
591
|
+
| `dependsOn?` | Array of step IDs that must complete first |
|
|
592
|
+
| `condition?` | `(steps) => boolean` — skip step if returns false |
|
|
593
|
+
| `continueOnError?` | Continue workflow if this step fails (default: `false`) |
|
|
594
|
+
| `timeout?` | Per-step timeout in ms |
|
|
595
|
+
| `retry?` | Per-step retry config (same shape as `@Job.retry`) |
|
|
532
596
|
|
|
533
597
|
```typescript
|
|
534
598
|
import { Workflow } from '@frontmcp/sdk';
|
|
@@ -536,10 +600,13 @@ import { Workflow } from '@frontmcp/sdk';
|
|
|
536
600
|
@Workflow({
|
|
537
601
|
name: 'deploy_pipeline',
|
|
538
602
|
description: 'Full deployment pipeline',
|
|
603
|
+
trigger: 'webhook',
|
|
604
|
+
webhookConfig: { path: '/hooks/deploy', secret: process.env.WEBHOOK_SECRET!, methods: ['POST'] },
|
|
605
|
+
timeout: 600_000,
|
|
539
606
|
steps: [
|
|
540
|
-
{
|
|
541
|
-
{
|
|
542
|
-
{
|
|
607
|
+
{ id: 'build', jobName: 'build_app', input: { env: 'production' } },
|
|
608
|
+
{ id: 'test', jobName: 'run_tests', dependsOn: ['build'] },
|
|
609
|
+
{ id: 'deploy', jobName: 'deploy_app', dependsOn: ['test'], condition: (steps) => steps.test.success },
|
|
543
610
|
],
|
|
544
611
|
})
|
|
545
612
|
class DeployPipeline {}
|
|
@@ -677,6 +744,16 @@ class AuditHooks {
|
|
|
677
744
|
|
|
678
745
|
---
|
|
679
746
|
|
|
747
|
+
## Examples
|
|
748
|
+
|
|
749
|
+
| Example | Level | Description |
|
|
750
|
+
| -------------------------------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
751
|
+
| [`agent-skill-job-workflow`](../examples/decorators-guide/agent-skill-job-workflow.md) | Advanced | Demonstrates the advanced decorator types: `@Agent` for autonomous AI agents, `@Skill` for knowledge packages, `@Job` for background tasks, and `@Workflow` for multi-step orchestration. |
|
|
752
|
+
| [`basic-server-with-app-and-tools`](../examples/decorators-guide/basic-server-with-app-and-tools.md) | Basic | Demonstrates the minimal decorator hierarchy to create a working FrontMCP server with one app containing a tool and a resource. |
|
|
753
|
+
| [`multi-app-with-plugins-and-providers`](../examples/decorators-guide/multi-app-with-plugins-and-providers.md) | Intermediate | Demonstrates a server with multiple `@App` modules, a `@Provider` for dependency injection, and a `@Plugin` for cross-cutting concerns. |
|
|
754
|
+
|
|
755
|
+
> See all examples in [`examples/decorators-guide/`](../examples/decorators-guide/)
|
|
756
|
+
|
|
680
757
|
## Reference
|
|
681
758
|
|
|
682
759
|
- **Official docs:** [FrontMCP Decorators Overview](https://docs.agentfront.dev/frontmcp/sdk-reference/decorators/overview)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: official-adapters
|
|
3
|
+
description: Convert OpenAPI specs and external definitions into MCP tools automatically
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Official Adapters
|
|
2
7
|
|
|
3
8
|
Adapters convert external definitions (OpenAPI specs, Lambda functions, etc.) into MCP tools, resources, and prompts automatically.
|
|
@@ -22,7 +27,7 @@ Adapters convert external definitions (OpenAPI specs, Lambda functions, etc.) in
|
|
|
22
27
|
- You need cross-cutting behavior like caching or logging (see `create-plugin` or `official-plugins`)
|
|
23
28
|
- You are building tools manually without an external spec (see `create-tool`)
|
|
24
29
|
|
|
25
|
-
> **Decision:** Use this skill when you have an OpenAPI/Swagger spec and want to automatically generate MCP tools from it using `
|
|
30
|
+
> **Decision:** Use this skill when you have an OpenAPI/Swagger spec and want to automatically generate MCP tools from it using `OpenapiAdapter`.
|
|
26
31
|
|
|
27
32
|
## OpenAPI Adapter
|
|
28
33
|
|
|
@@ -31,12 +36,12 @@ The primary official adapter. Converts OpenAPI/Swagger specifications into MCP t
|
|
|
31
36
|
### Installation
|
|
32
37
|
|
|
33
38
|
```typescript
|
|
34
|
-
import {
|
|
39
|
+
import { OpenapiAdapter } from '@frontmcp/adapters';
|
|
35
40
|
|
|
36
41
|
@App({
|
|
37
42
|
name: 'MyApp',
|
|
38
43
|
adapters: [
|
|
39
|
-
|
|
44
|
+
OpenapiAdapter.init({
|
|
40
45
|
name: 'petstore',
|
|
41
46
|
url: 'https://petstore3.swagger.io/api/v3/openapi.json',
|
|
42
47
|
}),
|
|
@@ -51,7 +56,7 @@ Each OpenAPI operation becomes an MCP tool named `petstore:operationId`.
|
|
|
51
56
|
|
|
52
57
|
```typescript
|
|
53
58
|
// API Key via static auth
|
|
54
|
-
|
|
59
|
+
OpenapiAdapter.init({
|
|
55
60
|
name: 'my-api',
|
|
56
61
|
url: 'https://api.example.com/openapi.json',
|
|
57
62
|
baseUrl: 'https://api.example.com',
|
|
@@ -61,7 +66,7 @@ OpenApiAdapter.init({
|
|
|
61
66
|
});
|
|
62
67
|
|
|
63
68
|
// API Key via additional headers
|
|
64
|
-
|
|
69
|
+
OpenapiAdapter.init({
|
|
65
70
|
name: 'my-api',
|
|
66
71
|
url: 'https://api.example.com/openapi.json',
|
|
67
72
|
baseUrl: 'https://api.example.com',
|
|
@@ -71,7 +76,7 @@ OpenApiAdapter.init({
|
|
|
71
76
|
});
|
|
72
77
|
|
|
73
78
|
// Bearer token via static auth
|
|
74
|
-
|
|
79
|
+
OpenapiAdapter.init({
|
|
75
80
|
name: 'my-api',
|
|
76
81
|
url: 'https://api.example.com/openapi.json',
|
|
77
82
|
baseUrl: 'https://api.example.com',
|
|
@@ -81,7 +86,7 @@ OpenApiAdapter.init({
|
|
|
81
86
|
});
|
|
82
87
|
|
|
83
88
|
// Dynamic auth per tool using securityResolver
|
|
84
|
-
|
|
89
|
+
OpenapiAdapter.init({
|
|
85
90
|
name: 'my-api',
|
|
86
91
|
url: 'https://api.example.com/openapi.json',
|
|
87
92
|
baseUrl: 'https://api.example.com',
|
|
@@ -96,7 +101,7 @@ OpenApiAdapter.init({
|
|
|
96
101
|
Automatically refresh the OpenAPI spec at intervals:
|
|
97
102
|
|
|
98
103
|
```typescript
|
|
99
|
-
|
|
104
|
+
OpenapiAdapter.init({
|
|
100
105
|
name: 'evolving-api',
|
|
101
106
|
url: 'https://api.example.com/openapi.json',
|
|
102
107
|
polling: {
|
|
@@ -110,7 +115,7 @@ OpenApiAdapter.init({
|
|
|
110
115
|
Provide the OpenAPI spec directly instead of fetching from URL:
|
|
111
116
|
|
|
112
117
|
```typescript
|
|
113
|
-
|
|
118
|
+
OpenapiAdapter.init({
|
|
114
119
|
name: 'my-api',
|
|
115
120
|
spec: {
|
|
116
121
|
openapi: '3.0.0',
|
|
@@ -128,9 +133,9 @@ Register adapters from different APIs in the same app:
|
|
|
128
133
|
@App({
|
|
129
134
|
name: 'IntegrationHub',
|
|
130
135
|
adapters: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
OpenapiAdapter.init({ name: 'github', url: 'https://api.github.com/openapi.json' }),
|
|
137
|
+
OpenapiAdapter.init({ name: 'jira', url: 'https://jira.example.com/openapi.json' }),
|
|
138
|
+
OpenapiAdapter.init({ name: 'slack', url: 'https://slack.com/openapi.json' }),
|
|
134
139
|
],
|
|
135
140
|
})
|
|
136
141
|
class IntegrationHub {}
|
|
@@ -150,18 +155,18 @@ class IntegrationHub {}
|
|
|
150
155
|
|
|
151
156
|
| Pattern | Correct | Incorrect | Why |
|
|
152
157
|
| -------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
153
|
-
| Adapter registration | `
|
|
158
|
+
| Adapter registration | `OpenapiAdapter.init({ name: 'petstore', url: '...' })` in `adapters` array | Placing adapter in `plugins` array | Adapters go in `adapters`, not `plugins`; they serve different purposes |
|
|
154
159
|
| Tool naming | Tools auto-named as `petstore:operationId` using adapter `name` as namespace | Expecting flat names like `listPets` | Adapter name is prepended to prevent collisions across multiple adapters |
|
|
155
160
|
| Auth configuration | `staticAuth: { jwt: process.env.API_TOKEN! }` or `additionalHeaders` | Hardcoding secrets: `staticAuth: { jwt: 'sk-xxx' }` | Always use environment variables for secrets; never commit tokens |
|
|
156
161
|
| Spec source | Use `url` for hosted specs or `spec` for inline definitions | Using both `url` and `spec` simultaneously | Only one source should be provided; `spec` takes precedence and `url` is ignored |
|
|
157
|
-
| Multiple APIs | Register separate `
|
|
162
|
+
| Multiple APIs | Register separate `OpenapiAdapter.init()` calls with unique `name` values | Using the same `name` for different adapters | Duplicate names cause tool naming collisions |
|
|
158
163
|
|
|
159
164
|
## Verification Checklist
|
|
160
165
|
|
|
161
166
|
### Configuration
|
|
162
167
|
|
|
163
168
|
- [ ] `@frontmcp/adapters` package is installed
|
|
164
|
-
- [ ] `
|
|
169
|
+
- [ ] `OpenapiAdapter.init()` is in the `adapters` array of `@App`
|
|
165
170
|
- [ ] Adapter has a unique `name` for tool namespacing
|
|
166
171
|
- [ ] `url` points to a valid, reachable OpenAPI JSON/YAML endpoint (or `spec` is inline)
|
|
167
172
|
|
|
@@ -186,7 +191,17 @@ class IntegrationHub {}
|
|
|
186
191
|
| Authentication errors on API calls | Wrong auth config or missing credentials | Configure `staticAuth` for fixed credentials, `securityResolver`/`authProviderMapper` for dynamic auth, or `additionalHeaders` for header-based tokens; verify env vars are set |
|
|
187
192
|
| Duplicate tool name error | Two adapters registered with the same `name` | Give each adapter a unique `name` (e.g., `'github'`, `'jira'`) |
|
|
188
193
|
| Stale tools after API update | Spec polling not configured | Add `polling: { intervalMs: 300000 }` to refresh every 5 minutes |
|
|
189
|
-
| TypeScript error importing adapter | Wrong import path | Import from `@frontmcp/adapters`: `import {
|
|
194
|
+
| TypeScript error importing adapter | Wrong import path | Import from `@frontmcp/adapters`: `import { OpenapiAdapter } from '@frontmcp/adapters'` |
|
|
195
|
+
|
|
196
|
+
## Examples
|
|
197
|
+
|
|
198
|
+
| Example | Level | Description |
|
|
199
|
+
| ----------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
200
|
+
| [`authenticated-adapter-with-polling`](../examples/official-adapters/authenticated-adapter-with-polling.md) | Intermediate | Demonstrates configuring authentication (API key and bearer token) and automatic spec polling for OpenAPI adapters. |
|
|
201
|
+
| [`basic-openapi-adapter`](../examples/official-adapters/basic-openapi-adapter.md) | Basic | Demonstrates converting an OpenAPI specification into MCP tools automatically using `OpenapiAdapter` with minimal configuration. |
|
|
202
|
+
| [`multi-api-hub-with-inline-spec`](../examples/official-adapters/multi-api-hub-with-inline-spec.md) | Advanced | Demonstrates registering multiple OpenAPI adapters from different APIs in a single app, including one with an inline spec definition instead of a remote URL. |
|
|
203
|
+
|
|
204
|
+
> See all examples in [`examples/official-adapters/`](../examples/official-adapters/)
|
|
190
205
|
|
|
191
206
|
## Reference
|
|
192
207
|
|