@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: deploy-to-lambda
|
|
3
|
+
description: Deploy a FrontMCP server to AWS Lambda with API Gateway using SAM or CDK
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Deploy a FrontMCP Server to AWS Lambda
|
|
2
7
|
|
|
3
8
|
This skill walks you through deploying a FrontMCP server to AWS Lambda with API Gateway using SAM or CDK.
|
|
@@ -29,7 +34,7 @@ This skill walks you through deploying a FrontMCP server to AWS Lambda with API
|
|
|
29
34
|
- AWS account with appropriate IAM permissions
|
|
30
35
|
- AWS CLI configured: `aws configure`
|
|
31
36
|
- SAM CLI installed: `brew install aws-sam-cli` (macOS) or see AWS docs
|
|
32
|
-
- Node.js
|
|
37
|
+
- Node.js 24 or later
|
|
33
38
|
- A FrontMCP project ready to build
|
|
34
39
|
|
|
35
40
|
## Step 1: Build for Lambda
|
|
@@ -52,7 +57,7 @@ Description: FrontMCP server on AWS Lambda
|
|
|
52
57
|
Globals:
|
|
53
58
|
Function:
|
|
54
59
|
Timeout: 30
|
|
55
|
-
Runtime:
|
|
60
|
+
Runtime: nodejs24.x
|
|
56
61
|
MemorySize: 512
|
|
57
62
|
Environment:
|
|
58
63
|
Variables:
|
|
@@ -202,7 +207,7 @@ import * as apigw from 'aws-cdk-lib/aws-apigatewayv2';
|
|
|
202
207
|
import * as integrations from 'aws-cdk-lib/aws-apigatewayv2-integrations';
|
|
203
208
|
|
|
204
209
|
const fn = new lambda.Function(this, 'FrontMcpHandler', {
|
|
205
|
-
runtime: lambda.Runtime.
|
|
210
|
+
runtime: lambda.Runtime.NODEJS_24_X,
|
|
206
211
|
handler: 'handler.handler',
|
|
207
212
|
code: lambda.Code.fromAsset('.'),
|
|
208
213
|
memorySize: 512,
|
|
@@ -311,6 +316,16 @@ Lambda cold starts occur when a new execution environment is initialized. Strate
|
|
|
311
316
|
| Redis connection refused from Lambda | Lambda not in the same VPC as ElastiCache | Place the Lambda in the ElastiCache VPC with appropriate security group rules |
|
|
312
317
|
| `sam deploy` fails with IAM error | Insufficient permissions for CloudFormation stack creation | Ensure the deploying IAM user/role has `cloudformation:*`, `lambda:*`, `apigateway:*`, and `iam:PassRole` |
|
|
313
318
|
|
|
319
|
+
## Examples
|
|
320
|
+
|
|
321
|
+
| Example | Level | Description |
|
|
322
|
+
| -------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------- |
|
|
323
|
+
| [`cdk-deployment`](../examples/deploy-to-lambda/cdk-deployment.md) | Advanced | Deploy a FrontMCP server to AWS Lambda using CDK with provisioned concurrency and secrets management. |
|
|
324
|
+
| [`lambda-handler-with-cors`](../examples/deploy-to-lambda/lambda-handler-with-cors.md) | Intermediate | Create a custom Lambda handler with an explicit API Gateway definition for CORS support. |
|
|
325
|
+
| [`sam-template-basic`](../examples/deploy-to-lambda/sam-template-basic.md) | Basic | Deploy a FrontMCP server to AWS Lambda with API Gateway using a SAM template. |
|
|
326
|
+
|
|
327
|
+
> See all examples in [`examples/deploy-to-lambda/`](../examples/deploy-to-lambda/)
|
|
328
|
+
|
|
314
329
|
## Reference
|
|
315
330
|
|
|
316
331
|
- **Docs:** https://docs.agentfront.dev/frontmcp/deployment/serverless
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-to-node-dockerfile
|
|
3
|
+
description: Multi-stage Dockerfile for building and running a FrontMCP server in production
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# ---- Build Stage ----
|
|
2
7
|
|
|
3
|
-
FROM node:
|
|
8
|
+
FROM node:24-alpine AS builder
|
|
4
9
|
|
|
5
10
|
WORKDIR /app
|
|
6
11
|
|
|
@@ -16,7 +21,7 @@ RUN yarn frontmcp build --target node
|
|
|
16
21
|
|
|
17
22
|
# ---- Production Stage ----
|
|
18
23
|
|
|
19
|
-
FROM node:
|
|
24
|
+
FROM node:24-alpine AS production
|
|
20
25
|
|
|
21
26
|
WORKDIR /app
|
|
22
27
|
|
|
@@ -52,3 +57,12 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
|
52
57
|
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
|
|
53
58
|
|
|
54
59
|
CMD ["node", "dist/main.js"]
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
| Example | Level | Description |
|
|
64
|
+
| ----------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------ |
|
|
65
|
+
| [`basic-multistage-dockerfile`](../examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md) | Basic | A minimal multi-stage Dockerfile for building and running a FrontMCP server in production. |
|
|
66
|
+
| [`secure-nonroot-dockerfile`](../examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md) | Advanced | A production Dockerfile with a non-root user, proper ownership, and security hardening. |
|
|
67
|
+
|
|
68
|
+
> See all examples in [`examples/deploy-to-node-dockerfile/`](../examples/deploy-to-node-dockerfile/)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-to-node
|
|
3
|
+
description: Deploy a FrontMCP server as a standalone Node.js app with Docker and process managers
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Deploy a FrontMCP Server to Node.js
|
|
2
7
|
|
|
3
8
|
This skill walks you through deploying a FrontMCP server as a standalone Node.js application, optionally containerized with Docker for production use.
|
|
@@ -26,7 +31,7 @@ This skill walks you through deploying a FrontMCP server as a standalone Node.js
|
|
|
26
31
|
|
|
27
32
|
## Prerequisites
|
|
28
33
|
|
|
29
|
-
- Node.js
|
|
34
|
+
- Node.js 24 or later
|
|
30
35
|
- Docker and Docker Compose (recommended for production)
|
|
31
36
|
- A FrontMCP project ready to build
|
|
32
37
|
|
|
@@ -44,7 +49,7 @@ Create a multi-stage `Dockerfile` in your project root:
|
|
|
44
49
|
|
|
45
50
|
```dockerfile
|
|
46
51
|
# Stage 1: Build
|
|
47
|
-
FROM node:
|
|
52
|
+
FROM node:24-alpine AS builder
|
|
48
53
|
WORKDIR /app
|
|
49
54
|
COPY package.json yarn.lock ./
|
|
50
55
|
RUN yarn install --frozen-lockfile
|
|
@@ -52,7 +57,7 @@ COPY . .
|
|
|
52
57
|
RUN npx frontmcp build --target node
|
|
53
58
|
|
|
54
59
|
# Stage 2: Production
|
|
55
|
-
FROM node:
|
|
60
|
+
FROM node:24-alpine AS production
|
|
56
61
|
WORKDIR /app
|
|
57
62
|
ENV NODE_ENV=production
|
|
58
63
|
COPY --from=builder /app/dist ./dist
|
|
@@ -215,7 +220,7 @@ services:
|
|
|
215
220
|
| Pattern | Correct | Incorrect | Why |
|
|
216
221
|
| ------------------------- | ------------------------------------ | ------------------------------------------------ | ------------------------------------------------------------------- |
|
|
217
222
|
| Build command | `frontmcp build --target node` | `tsc && node dist/main.js` | The FrontMCP build bundles deps and produces an optimized output |
|
|
218
|
-
| Docker base image | `node:
|
|
223
|
+
| Docker base image | `node:24-alpine` (multi-stage) | `node:24` (single stage with dev deps) | Multi-stage keeps the production image small and secure |
|
|
219
224
|
| Process manager | PM2 with `-i max` cluster mode | Running `node dist/main.js` directly via `nohup` | PM2 handles restarts, logging, and multi-core clustering |
|
|
220
225
|
| Redis hostname in Compose | Service name `redis` | `localhost` or `127.0.0.1` | Containers communicate via Docker's internal DNS, not localhost |
|
|
221
226
|
| Environment config | `.env` file or orchestrator env vars | Hardcoded values in source code | Keeps secrets out of the codebase and allows per-environment config |
|
|
@@ -251,6 +256,16 @@ services:
|
|
|
251
256
|
| Out of memory (OOM kill) | Container memory limit is too low | Increase the memory limit in Docker or set `NODE_OPTIONS="--max-old-space-size=1024"` |
|
|
252
257
|
| PM2 not restarting on reboot | Startup hook was not saved | Run `pm2 save && pm2 startup` to persist the process list across reboots |
|
|
253
258
|
|
|
259
|
+
## Examples
|
|
260
|
+
|
|
261
|
+
| Example | Level | Description |
|
|
262
|
+
| -------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
|
|
263
|
+
| [`docker-compose-with-redis`](../examples/deploy-to-node/docker-compose-with-redis.md) | Basic | Deploy a FrontMCP server with Redis using Docker Compose for production. |
|
|
264
|
+
| [`pm2-with-nginx`](../examples/deploy-to-node/pm2-with-nginx.md) | Intermediate | Deploy a FrontMCP server on bare metal using PM2 for process management and NGINX for TLS termination. |
|
|
265
|
+
| [`resource-limits`](../examples/deploy-to-node/resource-limits.md) | Advanced | Configure resource limits, health checks, and environment variables for a production FrontMCP deployment. |
|
|
266
|
+
|
|
267
|
+
> See all examples in [`examples/deploy-to-node/`](../examples/deploy-to-node/)
|
|
268
|
+
|
|
254
269
|
## Reference
|
|
255
270
|
|
|
256
271
|
- **Docs:** https://docs.agentfront.dev/frontmcp/deployment/production-build
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-to-vercel-config
|
|
3
|
+
description: Reference vercel.json configuration for deploying a FrontMCP server to Vercel
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
{
|
|
2
7
|
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
3
8
|
"framework": null,
|
|
@@ -58,3 +63,12 @@
|
|
|
58
63
|
}
|
|
59
64
|
]
|
|
60
65
|
}
|
|
66
|
+
|
|
67
|
+
## Examples
|
|
68
|
+
|
|
69
|
+
| Example | Level | Description |
|
|
70
|
+
| ------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------- |
|
|
71
|
+
| [`minimal-vercel-config`](../examples/deploy-to-vercel-config/minimal-vercel-config.md) | Basic | The minimum `vercel.json` needed to deploy a FrontMCP server to Vercel. |
|
|
72
|
+
| [`vercel-config-with-security-headers`](../examples/deploy-to-vercel-config/vercel-config-with-security-headers.md) | Intermediate | A complete `vercel.json` with per-route security headers for health, MCP, and all other endpoints. |
|
|
73
|
+
|
|
74
|
+
> See all examples in [`examples/deploy-to-vercel-config/`](../examples/deploy-to-vercel-config/)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-to-vercel
|
|
3
|
+
description: Deploy a FrontMCP server to Vercel serverless functions with Vercel KV storage
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Deploy a FrontMCP Server to Vercel
|
|
2
7
|
|
|
3
8
|
This skill guides you through deploying a FrontMCP server to Vercel serverless functions with Vercel KV for persistent storage.
|
|
@@ -218,6 +223,16 @@ Serverless functions are stateless between invocations. All persistent state mus
|
|
|
218
223
|
| Bundle too large | Unnecessary dependencies included | Review dependencies and remove unused packages to reduce bundle size |
|
|
219
224
|
| Cold starts too slow | Low function memory or large bundle | Increase memory to 1024 MB; audit dependencies; consider Vercel Fluid Compute |
|
|
220
225
|
|
|
226
|
+
## Examples
|
|
227
|
+
|
|
228
|
+
| Example | Level | Description |
|
|
229
|
+
| -------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------- |
|
|
230
|
+
| [`vercel-mcp-endpoint-test`](../examples/deploy-to-vercel/vercel-mcp-endpoint-test.md) | Advanced | Verify a Vercel-deployed FrontMCP server by testing health, tool listing, and tool invocation. |
|
|
231
|
+
| [`vercel-with-kv`](../examples/deploy-to-vercel/vercel-with-kv.md) | Basic | Deploy a FrontMCP server to Vercel serverless functions with Vercel KV for session persistence. |
|
|
232
|
+
| [`vercel-with-skills-cache`](../examples/deploy-to-vercel/vercel-with-skills-cache.md) | Intermediate | Deploy a FrontMCP server to Vercel with skills enabled and KV-backed skill caching. |
|
|
233
|
+
|
|
234
|
+
> See all examples in [`examples/deploy-to-vercel/`](../examples/deploy-to-vercel/)
|
|
235
|
+
|
|
221
236
|
## Reference
|
|
222
237
|
|
|
223
238
|
- **Docs:** https://docs.agentfront.dev/frontmcp/deployment/serverless
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: frontmcp-development
|
|
3
|
-
description:
|
|
3
|
+
description: 'Use when you want to create a tool, add a resource, build a prompt, write a provider, implement an adapter, add OpenAPI integration, create a plugin, agent, job, or workflow. The skill for BUILDING any FrontMCP component.'
|
|
4
4
|
tags: [router, development, tools, resources, prompts, agents, skills, guide]
|
|
5
|
+
category: development
|
|
6
|
+
targets: [all]
|
|
7
|
+
bundle: [recommended, minimal, 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 Development Router
|
|
@@ -37,20 +40,25 @@ Entry point for building MCP server components. This skill helps you find the ri
|
|
|
37
40
|
|
|
38
41
|
## Scenario Routing Table
|
|
39
42
|
|
|
40
|
-
| Scenario | Skill
|
|
41
|
-
| -------------------------------------------------------- |
|
|
42
|
-
| Expose an executable action that AI clients can call | `create-tool`
|
|
43
|
-
| Expose read-only data via a URI | `create-resource`
|
|
44
|
-
| Create a reusable conversation template or system prompt | `create-prompt`
|
|
45
|
-
| Build an autonomous AI loop that orchestrates tools | `create-agent`
|
|
46
|
-
| Register shared services or configuration via DI | `create-provider`
|
|
47
|
-
| Run a background task with progress and retries | `create-job`
|
|
48
|
-
| Chain multiple jobs into a sequential pipeline | `create-workflow`
|
|
49
|
-
| Write instruction-only AI guidance (no code execution) | `create-skill`
|
|
50
|
-
| Write AI guidance that also orchestrates tools | `create-skill-with-tools`
|
|
51
|
-
| Look up any decorator signature or option | `decorators-guide`
|
|
52
|
-
| Integrate an external API via OpenAPI spec | `official-adapters`
|
|
53
|
-
| Use official plugins (caching, remember, feature flags) | `official-plugins`
|
|
43
|
+
| Scenario | Skill | Description |
|
|
44
|
+
| -------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------- |
|
|
45
|
+
| Expose an executable action that AI clients can call | `create-tool` | Class-based or function-style tools with Zod input/output validation |
|
|
46
|
+
| Expose read-only data via a URI | `create-resource` | Static resources or URI template resources for dynamic data |
|
|
47
|
+
| Create a reusable conversation template or system prompt | `create-prompt` | Prompt entries with arguments and multi-turn message sequences |
|
|
48
|
+
| Build an autonomous AI loop that orchestrates tools | `create-agent` | Agent entries with LLM config, inner tools, and swarm handoff |
|
|
49
|
+
| Register shared services or configuration via DI | `create-provider` | Dependency injection tokens, lifecycle hooks, factory providers |
|
|
50
|
+
| Run a background task with progress and retries | `create-job` | Job entries with attempt tracking, retry config, and progress |
|
|
51
|
+
| Chain multiple jobs into a sequential pipeline | `create-workflow` | Workflow entries that compose jobs with data passing |
|
|
52
|
+
| Write instruction-only AI guidance (no code execution) | `create-skill` | Skill entries with markdown instructions from files, strings, or URLs |
|
|
53
|
+
| Write AI guidance that also orchestrates tools | `create-skill-with-tools` | Skill entries that combine instructions with registered tools |
|
|
54
|
+
| Look up any decorator signature or option | `decorators-guide` | Complete reference for @Tool, @Resource, @Prompt, @Agent, @App, @FrontMcp, and more |
|
|
55
|
+
| Integrate an external API via OpenAPI spec | `official-adapters` | OpenapiAdapter with auth, polling, inline specs, and multiple API composition |
|
|
56
|
+
| Use official plugins (caching, remember, feature flags) | `official-plugins` | Built-in plugins for caching, session memory, approval, and feature flags (dashboard is beta) |
|
|
57
|
+
| Connect to an external data source via a custom adapter | `create-adapter` | Create custom adapters for external data sources |
|
|
58
|
+
| Configure LLM settings for an agent component | `create-agent-llm-config` | Configure LLM settings for agent components |
|
|
59
|
+
| Add will/did/around lifecycle hooks to a plugin | `create-plugin-hooks` | Add lifecycle hooks to plugins (will/did/around) |
|
|
60
|
+
| Annotate tools with client hints for AI clients | `create-tool-annotations` | Add MCP tool annotations for client hints |
|
|
61
|
+
| Define typed output schemas for tool responses | `create-tool-output-schema-types` | Define typed output schemas for tools |
|
|
54
62
|
|
|
55
63
|
## Recommended Reading Order
|
|
56
64
|
|
|
@@ -114,5 +122,5 @@ Entry point for building MCP server components. This skill helps you find the ri
|
|
|
114
122
|
|
|
115
123
|
## Reference
|
|
116
124
|
|
|
117
|
-
- [
|
|
125
|
+
- [FrontMCP Overview](https://docs.agentfront.dev/frontmcp/fundamentals/overview)
|
|
118
126
|
- Related skills: `create-tool`, `create-resource`, `create-prompt`, `create-agent`, `create-provider`, `create-job`, `create-workflow`, `create-skill`, `create-skill-with-tools`, `decorators-guide`, `official-adapters`, `official-plugins`
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: basic-api-adapter
|
|
3
|
+
reference: create-adapter
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'A minimal adapter that fetches operation definitions from an external API and generates MCP tools.'
|
|
6
|
+
tags: [development, adapter, api]
|
|
7
|
+
features:
|
|
8
|
+
- 'Extending `DynamicAdapter<TOptions>` with a typed options interface'
|
|
9
|
+
- 'Declaring `__options_brand` for proper TypeScript inference on `init()`'
|
|
10
|
+
- 'Implementing `fetch()` to return `FrontMcpAdapterResponse` with tools, resources, and prompts'
|
|
11
|
+
- 'Registering the adapter via the static `init()` method in the `adapters` array'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Basic Dynamic Adapter
|
|
15
|
+
|
|
16
|
+
A minimal adapter that fetches operation definitions from an external API and generates MCP tools.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// src/adapters/my-api.adapter.ts
|
|
22
|
+
import { DynamicAdapter, type FrontMcpAdapterResponse } from '@frontmcp/sdk';
|
|
23
|
+
|
|
24
|
+
interface MyAdapterOptions {
|
|
25
|
+
endpoint: string;
|
|
26
|
+
apiKey: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
class MyApiAdapter extends DynamicAdapter<MyAdapterOptions> {
|
|
30
|
+
declare __options_brand: MyAdapterOptions;
|
|
31
|
+
|
|
32
|
+
async fetch(): Promise<FrontMcpAdapterResponse> {
|
|
33
|
+
// Fetch definitions from external source
|
|
34
|
+
const res = await globalThis.fetch(this.options.endpoint, {
|
|
35
|
+
headers: { Authorization: `Bearer ${this.options.apiKey}` },
|
|
36
|
+
});
|
|
37
|
+
const schema = await res.json();
|
|
38
|
+
|
|
39
|
+
// Convert to MCP tool definitions
|
|
40
|
+
return {
|
|
41
|
+
tools: schema.operations.map((op: { name: string; description: string; params: Record<string, unknown> }) => ({
|
|
42
|
+
name: op.name,
|
|
43
|
+
description: op.description,
|
|
44
|
+
inputSchema: this.convertParams(op.params),
|
|
45
|
+
execute: async (input: Record<string, unknown>) => {
|
|
46
|
+
return this.callApi(op.name, input);
|
|
47
|
+
},
|
|
48
|
+
})),
|
|
49
|
+
resources: [],
|
|
50
|
+
prompts: [],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
private convertParams(params: Record<string, unknown>) {
|
|
55
|
+
// Convert external param definitions to Zod schemas
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private async callApi(operation: string, input: Record<string, unknown>) {
|
|
60
|
+
// Call the external API
|
|
61
|
+
return {};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
// src/server.ts
|
|
68
|
+
import { App } from '@frontmcp/sdk';
|
|
69
|
+
|
|
70
|
+
@App({
|
|
71
|
+
name: 'MyApp',
|
|
72
|
+
adapters: [
|
|
73
|
+
MyApiAdapter.init({
|
|
74
|
+
name: 'my-api',
|
|
75
|
+
endpoint: 'https://api.example.com/schema',
|
|
76
|
+
apiKey: process.env.API_KEY!,
|
|
77
|
+
}),
|
|
78
|
+
],
|
|
79
|
+
})
|
|
80
|
+
class MyApp {}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## What This Demonstrates
|
|
84
|
+
|
|
85
|
+
- Extending `DynamicAdapter<TOptions>` with a typed options interface
|
|
86
|
+
- Declaring `__options_brand` for proper TypeScript inference on `init()`
|
|
87
|
+
- Implementing `fetch()` to return `FrontMcpAdapterResponse` with tools, resources, and prompts
|
|
88
|
+
- Registering the adapter via the static `init()` method in the `adapters` array
|
|
89
|
+
|
|
90
|
+
## Related
|
|
91
|
+
|
|
92
|
+
- See `create-adapter` for namespacing, error handling, and the full adapter response interface
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: namespaced-adapter
|
|
3
|
+
reference: create-adapter
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'An adapter that namespaces generated tools to avoid collisions and includes proper error handling for startup failures.'
|
|
6
|
+
tags: [development, adapter, namespaced]
|
|
7
|
+
features:
|
|
8
|
+
- "Namespacing tools with `name: 'adapter-name:operation-name'` to prevent collisions"
|
|
9
|
+
- 'Throwing descriptive errors in `fetch()` so misconfigurations surface at startup'
|
|
10
|
+
- 'Registering multiple instances of the same adapter class with different configurations'
|
|
11
|
+
- 'Validating the external response shape before generating tool definitions'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Namespaced Adapter with Error Handling
|
|
15
|
+
|
|
16
|
+
An adapter that namespaces generated tools to avoid collisions and includes proper error handling for startup failures.
|
|
17
|
+
|
|
18
|
+
## Code
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
// src/adapters/graphql-api.adapter.ts
|
|
22
|
+
import { DynamicAdapter, type FrontMcpAdapterResponse } from '@frontmcp/sdk';
|
|
23
|
+
|
|
24
|
+
interface GraphqlAdapterOptions {
|
|
25
|
+
endpoint: string;
|
|
26
|
+
apiKey: string;
|
|
27
|
+
namespace?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class GraphqlApiAdapter extends DynamicAdapter<GraphqlAdapterOptions> {
|
|
31
|
+
declare __options_brand: GraphqlAdapterOptions;
|
|
32
|
+
|
|
33
|
+
async fetch(): Promise<FrontMcpAdapterResponse> {
|
|
34
|
+
const namespace = this.options.namespace ?? this.options.name;
|
|
35
|
+
|
|
36
|
+
// Fetch schema from GraphQL introspection
|
|
37
|
+
const res = await globalThis.fetch(this.options.endpoint, {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
headers: {
|
|
40
|
+
'Content-Type': 'application/json',
|
|
41
|
+
Authorization: `Bearer ${this.options.apiKey}`,
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify({
|
|
44
|
+
query: '{ __schema { queryType { fields { name description } } } }',
|
|
45
|
+
}),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
if (!res.ok) {
|
|
49
|
+
throw new Error(`GraphQL adapter failed to fetch schema from ${this.options.endpoint}: HTTP ${res.status}`);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const schema = await res.json();
|
|
53
|
+
const fields = schema.data?.__schema?.queryType?.fields;
|
|
54
|
+
|
|
55
|
+
if (!fields || !Array.isArray(fields)) {
|
|
56
|
+
throw new Error(`GraphQL adapter received unexpected schema format from ${this.options.endpoint}`);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Namespace tools to prevent collisions across adapters
|
|
60
|
+
return {
|
|
61
|
+
tools: fields.map((field: { name: string; description: string }) => ({
|
|
62
|
+
name: `${namespace}:${field.name}`,
|
|
63
|
+
description: field.description || `Query ${field.name} from GraphQL API`,
|
|
64
|
+
inputSchema: {},
|
|
65
|
+
execute: async (input: Record<string, unknown>) => {
|
|
66
|
+
return this.executeQuery(field.name, input);
|
|
67
|
+
},
|
|
68
|
+
})),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private async executeQuery(queryName: string, variables: Record<string, unknown>) {
|
|
73
|
+
const res = await globalThis.fetch(this.options.endpoint, {
|
|
74
|
+
method: 'POST',
|
|
75
|
+
headers: {
|
|
76
|
+
'Content-Type': 'application/json',
|
|
77
|
+
Authorization: `Bearer ${this.options.apiKey}`,
|
|
78
|
+
},
|
|
79
|
+
body: JSON.stringify({ query: `{ ${queryName} }`, variables }),
|
|
80
|
+
});
|
|
81
|
+
return res.json();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
// src/server.ts
|
|
88
|
+
import { FrontMcp, App } from '@frontmcp/sdk';
|
|
89
|
+
|
|
90
|
+
@App({
|
|
91
|
+
name: 'DataApp',
|
|
92
|
+
adapters: [
|
|
93
|
+
// Each adapter uses its name for tool namespacing
|
|
94
|
+
GraphqlApiAdapter.init({
|
|
95
|
+
name: 'users-api',
|
|
96
|
+
endpoint: 'https://users.example.com/graphql',
|
|
97
|
+
apiKey: process.env.USERS_API_KEY!,
|
|
98
|
+
}),
|
|
99
|
+
GraphqlApiAdapter.init({
|
|
100
|
+
name: 'orders-api',
|
|
101
|
+
endpoint: 'https://orders.example.com/graphql',
|
|
102
|
+
apiKey: process.env.ORDERS_API_KEY!,
|
|
103
|
+
}),
|
|
104
|
+
],
|
|
105
|
+
})
|
|
106
|
+
class DataApp {}
|
|
107
|
+
|
|
108
|
+
@FrontMcp({
|
|
109
|
+
info: { name: 'data-server', version: '1.0.0' },
|
|
110
|
+
apps: [DataApp],
|
|
111
|
+
})
|
|
112
|
+
class DataServer {}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## What This Demonstrates
|
|
116
|
+
|
|
117
|
+
- Namespacing tools with `name: 'adapter-name:operation-name'` to prevent collisions
|
|
118
|
+
- Throwing descriptive errors in `fetch()` so misconfigurations surface at startup
|
|
119
|
+
- Registering multiple instances of the same adapter class with different configurations
|
|
120
|
+
- Validating the external response shape before generating tool definitions
|
|
121
|
+
|
|
122
|
+
## Related
|
|
123
|
+
|
|
124
|
+
- See `create-adapter` for the full `FrontMcpAdapterResponse` interface, Nx generator, and verification checklist
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: basic-agent-with-tools
|
|
3
|
+
reference: create-agent
|
|
4
|
+
level: basic
|
|
5
|
+
description: 'An autonomous agent that uses inner tools to review GitHub pull requests.'
|
|
6
|
+
tags: [development, anthropic, agent, tools]
|
|
7
|
+
features:
|
|
8
|
+
- 'Creating an agent with `@Agent` decorator, `llm` config, and `inputSchema`'
|
|
9
|
+
- 'Defining inner tools in the `tools` array that the agent can invoke during its reasoning loop'
|
|
10
|
+
- "Using `{ env: 'ANTHROPIC_API_KEY' }` for safe API key configuration"
|
|
11
|
+
- 'Inner tools are private to the agent and not exposed to external MCP clients'
|
|
12
|
+
- 'The default `execute()` runs the full agent loop without needing an override'
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Basic Agent with Inner Tools
|
|
16
|
+
|
|
17
|
+
An autonomous agent that uses inner tools to review GitHub pull requests.
|
|
18
|
+
|
|
19
|
+
## Code
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// src/apps/review/tools/fetch-pr.tool.ts
|
|
23
|
+
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
24
|
+
import { z } from 'zod';
|
|
25
|
+
|
|
26
|
+
@Tool({
|
|
27
|
+
name: 'fetch_pr',
|
|
28
|
+
description: 'Fetch pull request details from GitHub',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
owner: z.string(),
|
|
31
|
+
repo: z.string(),
|
|
32
|
+
number: z.number(),
|
|
33
|
+
},
|
|
34
|
+
})
|
|
35
|
+
class FetchPRTool extends ToolContext {
|
|
36
|
+
async execute(input: { owner: string; repo: string; number: number }) {
|
|
37
|
+
const response = await this.fetch(
|
|
38
|
+
`https://api.github.com/repos/${input.owner}/${input.repo}/pulls/${input.number}`,
|
|
39
|
+
);
|
|
40
|
+
return response.json();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
// src/apps/review/tools/post-review.tool.ts
|
|
47
|
+
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
48
|
+
import { z } from 'zod';
|
|
49
|
+
|
|
50
|
+
@Tool({
|
|
51
|
+
name: 'post_review_comment',
|
|
52
|
+
description: 'Post a review comment on a PR',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
owner: z.string(),
|
|
55
|
+
repo: z.string(),
|
|
56
|
+
number: z.number(),
|
|
57
|
+
body: z.string(),
|
|
58
|
+
},
|
|
59
|
+
})
|
|
60
|
+
class PostReviewCommentTool extends ToolContext {
|
|
61
|
+
async execute(input: { owner: string; repo: string; number: number; body: string }) {
|
|
62
|
+
await this.fetch(`https://api.github.com/repos/${input.owner}/${input.repo}/pulls/${input.number}/reviews`, {
|
|
63
|
+
method: 'POST',
|
|
64
|
+
body: JSON.stringify({ body: input.body, event: 'COMMENT' }),
|
|
65
|
+
});
|
|
66
|
+
return 'Comment posted';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
// src/apps/review/agents/pr-reviewer.agent.ts
|
|
73
|
+
import { Agent, AgentContext } from '@frontmcp/sdk';
|
|
74
|
+
import { z } from 'zod';
|
|
75
|
+
|
|
76
|
+
@Agent({
|
|
77
|
+
name: 'pr_reviewer',
|
|
78
|
+
description: 'Autonomously reviews GitHub pull requests',
|
|
79
|
+
llm: {
|
|
80
|
+
provider: 'anthropic',
|
|
81
|
+
model: 'claude-sonnet-4-20250514',
|
|
82
|
+
apiKey: { env: 'ANTHROPIC_API_KEY' },
|
|
83
|
+
},
|
|
84
|
+
inputSchema: {
|
|
85
|
+
owner: z.string().describe('Repository owner'),
|
|
86
|
+
repo: z.string().describe('Repository name'),
|
|
87
|
+
prNumber: z.number().describe('PR number to review'),
|
|
88
|
+
},
|
|
89
|
+
systemInstructions: 'You are a senior code reviewer. Fetch the PR, analyze changes, and post a thorough review.',
|
|
90
|
+
tools: [FetchPRTool, PostReviewCommentTool],
|
|
91
|
+
})
|
|
92
|
+
class PRReviewerAgent extends AgentContext {
|
|
93
|
+
// Default execute() runs the agent loop.
|
|
94
|
+
// The agent will autonomously call FetchPRTool, analyze the diff,
|
|
95
|
+
// and call PostReviewCommentTool to leave a review.
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// src/apps/review/index.ts
|
|
101
|
+
import { App } from '@frontmcp/sdk';
|
|
102
|
+
|
|
103
|
+
@App({
|
|
104
|
+
name: 'review-app',
|
|
105
|
+
agents: [PRReviewerAgent],
|
|
106
|
+
})
|
|
107
|
+
class ReviewApp {}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## What This Demonstrates
|
|
111
|
+
|
|
112
|
+
- Creating an agent with `@Agent` decorator, `llm` config, and `inputSchema`
|
|
113
|
+
- Defining inner tools in the `tools` array that the agent can invoke during its reasoning loop
|
|
114
|
+
- Using `{ env: 'ANTHROPIC_API_KEY' }` for safe API key configuration
|
|
115
|
+
- Inner tools are private to the agent and not exposed to external MCP clients
|
|
116
|
+
- The default `execute()` runs the full agent loop without needing an override
|
|
117
|
+
|
|
118
|
+
## Related
|
|
119
|
+
|
|
120
|
+
- See `create-agent` for custom execute, sub-agents, swarm configuration, and exported tools
|
|
121
|
+
- See `create-agent-llm-config` for all supported LLM providers and model options
|