@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,18 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: official-plugins
|
|
3
|
+
description: Guide to the 6 official plugins for discovery, memory, auth, caching, flags, and monitoring
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Official FrontMCP Plugins
|
|
2
7
|
|
|
3
|
-
FrontMCP ships 6 official plugins that extend server behavior with cross-cutting concerns: semantic tool discovery, session memory, authorization workflows, result caching, feature gating, and visual monitoring. Install individually or via `@frontmcp/plugins` (meta-package re-exporting cache, codecall,
|
|
8
|
+
FrontMCP ships 6 official plugins that extend server behavior with cross-cutting concerns: semantic tool discovery, session memory, authorization workflows, result caching, feature gating, and visual monitoring. Install individually or via `@frontmcp/plugins` (meta-package re-exporting cache, codecall, and remember).
|
|
9
|
+
|
|
10
|
+
> **Note:** The Dashboard plugin (`@frontmcp/plugin-dashboard`) is currently in **beta** and may not work correctly in all environments. It is not recommended for production use at this time.
|
|
4
11
|
|
|
5
12
|
## When to Use This Skill
|
|
6
13
|
|
|
7
14
|
### Must Use
|
|
8
15
|
|
|
9
|
-
- Installing and configuring any official FrontMCP plugin (CodeCall, Remember, Approval, Cache, Feature Flags
|
|
16
|
+
- Installing and configuring any official FrontMCP plugin (CodeCall, Remember, Approval, Cache, Feature Flags)
|
|
10
17
|
- Adding session memory, tool caching, or authorization workflows to an existing server
|
|
11
18
|
- Integrating feature flag services (LaunchDarkly, Split.io, Unleash) to gate tools at runtime
|
|
12
19
|
|
|
13
20
|
### Recommended
|
|
14
21
|
|
|
15
|
-
-
|
|
22
|
+
- Exploring the Dashboard plugin for visual monitoring (beta — not recommended for production)
|
|
16
23
|
- Configuring CodeCall for semantic tool discovery when the server has many tools
|
|
17
24
|
- Combining multiple official plugins in a production deployment
|
|
18
25
|
|
|
@@ -22,7 +29,7 @@ FrontMCP ships 6 official plugins that extend server behavior with cross-cutting
|
|
|
22
29
|
- You only need lifecycle hooks without installing an official plugin (see `create-plugin-hooks`)
|
|
23
30
|
- You need to generate tools from an OpenAPI spec (see `official-adapters`)
|
|
24
31
|
|
|
25
|
-
> **Decision:** Use this skill when you need to install, configure, or customize one or more of the
|
|
32
|
+
> **Decision:** Use this skill when you need to install, configure, or customize one or more of the 5 stable official FrontMCP plugins. The Dashboard plugin is in beta — see its section below for details.
|
|
26
33
|
|
|
27
34
|
All plugins follow the `DynamicPlugin` pattern and are registered via `@FrontMcp({ plugins: [...] })`.
|
|
28
35
|
|
|
@@ -33,7 +40,7 @@ import RememberPlugin from '@frontmcp/plugin-remember';
|
|
|
33
40
|
import { ApprovalPlugin } from '@frontmcp/plugin-approval';
|
|
34
41
|
import CachePlugin from '@frontmcp/plugin-cache';
|
|
35
42
|
import FeatureFlagPlugin from '@frontmcp/plugin-feature-flags';
|
|
36
|
-
import DashboardPlugin from '@frontmcp/plugin-dashboard';
|
|
43
|
+
// import DashboardPlugin from '@frontmcp/plugin-dashboard'; // Beta — not recommended for production
|
|
37
44
|
|
|
38
45
|
@App({ name: 'MyApp' })
|
|
39
46
|
class MyApp {}
|
|
@@ -47,7 +54,7 @@ class MyApp {}
|
|
|
47
54
|
ApprovalPlugin.init({ mode: 'recheck' }),
|
|
48
55
|
CachePlugin.init({ type: 'memory', defaultTTL: 86400 }),
|
|
49
56
|
FeatureFlagPlugin.init({ adapter: 'static', flags: { 'new-tool': true } }),
|
|
50
|
-
DashboardPlugin.init({ enabled: true }),
|
|
57
|
+
// DashboardPlugin.init({ enabled: true }), // Beta — see Dashboard section below
|
|
51
58
|
],
|
|
52
59
|
tools: [
|
|
53
60
|
/* your tools */
|
|
@@ -90,10 +97,25 @@ class MyServer {}
|
|
|
90
97
|
|
|
91
98
|
### Modes
|
|
92
99
|
|
|
93
|
-
- `codecall_only` -- Hides all tools from `list_tools` except CodeCall meta-tools. All other tools are discovered only via `codecall:search`. Best when the server has a large number of tools and you want the AI to search-then-execute.
|
|
100
|
+
- `codecall_only` -- Hides all tools from `list_tools` except CodeCall meta-tools. All other tools are discovered only via `codecall:search`. Best when the server has a large number of tools and you want the AI to search-then-execute. When `appIds` is set, only tools from those apps are hidden — tools from other apps remain visible.
|
|
94
101
|
- `codecall_opt_in` -- Shows all tools in `list_tools` normally. Tools opt-in to CodeCall execution via metadata. Useful when only some tools benefit from orchestrated execution.
|
|
95
102
|
- `metadata_driven` -- Per-tool `metadata.codecall` controls visibility and CodeCall availability independently. Most granular control.
|
|
96
103
|
|
|
104
|
+
### Multi-App Scoping
|
|
105
|
+
|
|
106
|
+
Use `appIds` to scope CodeCall to specific apps in a multi-app server:
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
// Only hide ecommerce tools — calc tools remain visible in list_tools
|
|
110
|
+
CodeCallPlugin.init({
|
|
111
|
+
mode: 'codecall_only',
|
|
112
|
+
appIds: ['ecommerce'],
|
|
113
|
+
vm: { preset: 'secure' },
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Without `appIds`, `codecall_only` mode hides ALL tools in the server. With `appIds`, only tools from the specified apps are hidden — tools from other apps remain directly callable.
|
|
118
|
+
|
|
97
119
|
### VM Presets
|
|
98
120
|
|
|
99
121
|
The sandboxed VM runs AgentScript (a restricted JavaScript subset). Presets control security boundaries:
|
|
@@ -107,9 +129,9 @@ The sandboxed VM runs AgentScript (a restricted JavaScript subset). Presets cont
|
|
|
107
129
|
|
|
108
130
|
CodeCall contributes 4 tools to your server:
|
|
109
131
|
|
|
110
|
-
- `codecall:search` -- Semantic search over all registered tools using TF-IDF scoring with synonym expansion. Returns ranked tool names, descriptions, and relevance scores.
|
|
111
|
-
- `codecall:describe` -- Returns full input/output JSON schemas for one or more tools. Use after search to understand tool interfaces before execution.
|
|
112
|
-
- `codecall:execute` -- Runs an AgentScript program in the sandboxed VM. The script can call multiple tools, branch on results, and compose outputs.
|
|
132
|
+
- `codecall:search` -- Semantic search over all registered tools using TF-IDF scoring with synonym expansion. Input: `{ queries: string[] }` (array of atomic action phrases, max 10). Decompose complex requests into simple actions (e.g., "delete users and send email" becomes `queries: ["delete user", "send email"]`). Returns ranked tool names, descriptions, and relevance scores.
|
|
133
|
+
- `codecall:describe` -- Returns full input/output JSON schemas for one or more tools. Input: `{ toolNames: string[] }` (tool names from search results). Use after search to understand tool interfaces before execution. If `notFound` array is non-empty in the response, re-search with corrected queries.
|
|
134
|
+
- `codecall:execute` -- Runs an AgentScript program in the sandboxed VM. Input: `{ script: string }` (AgentScript code). Use `callTool(name, args)` to invoke tools within scripts. The script can call multiple tools, branch on results, and compose outputs.
|
|
113
135
|
- `codecall:invoke` -- Direct single-tool invocation (available when `directCalls` is enabled). Bypasses the VM for simple one-shot calls.
|
|
114
136
|
|
|
115
137
|
### Per-Tool CodeCall Metadata
|
|
@@ -580,7 +602,9 @@ The plugin hooks into listing and execution flows for tools, resources, prompts,
|
|
|
580
602
|
|
|
581
603
|
---
|
|
582
604
|
|
|
583
|
-
## 6. Dashboard Plugin (`@frontmcp/plugin-dashboard`)
|
|
605
|
+
## 6. Dashboard Plugin (`@frontmcp/plugin-dashboard`) — BETA
|
|
606
|
+
|
|
607
|
+
> **Warning:** The Dashboard plugin is currently in **beta** and may not work correctly. It is not recommended for production use. Expect breaking changes and missing features.
|
|
584
608
|
|
|
585
609
|
Visual monitoring web UI for your FrontMCP server. View server structure (tools, resources, prompts, apps, plugins) as an interactive graph.
|
|
586
610
|
|
|
@@ -656,7 +680,7 @@ All official plugins use the static `init()` pattern inherited from `DynamicPlug
|
|
|
656
680
|
ApprovalPlugin.init({ mode: 'recheck' }),
|
|
657
681
|
CachePlugin.init({ type: 'redis', config: { host: 'redis.internal' }, defaultTTL: 86400 }),
|
|
658
682
|
FeatureFlagPlugin.init({ adapter: 'launchdarkly', config: { sdkKey: 'sdk-xxx' } }),
|
|
659
|
-
DashboardPlugin.init({ enabled: true, auth: {
|
|
683
|
+
// DashboardPlugin.init({ enabled: true, auth: { ... } }), // Beta — not recommended for production
|
|
660
684
|
],
|
|
661
685
|
tools: [
|
|
662
686
|
/* ... */
|
|
@@ -667,13 +691,13 @@ class ProductionServer {}
|
|
|
667
691
|
|
|
668
692
|
## Common Patterns
|
|
669
693
|
|
|
670
|
-
| Pattern | Correct
|
|
671
|
-
| ------------------------ |
|
|
672
|
-
| Plugin registration | `plugins: [RememberPlugin.init({ type: 'memory' })]`
|
|
673
|
-
| Remember storage in prod | `RememberPlugin.init({ type: 'redis', config: { host: '...' } })`
|
|
674
|
-
| Cache TTL units | `defaultTTL: 3600` (seconds)
|
|
675
|
-
| Feature flag gating | `@Tool({ featureFlag: 'my-flag' })` on the tool decorator
|
|
676
|
-
| Dashboard in production
|
|
694
|
+
| Pattern | Correct | Incorrect | Why |
|
|
695
|
+
| ------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
696
|
+
| Plugin registration | `plugins: [RememberPlugin.init({ type: 'memory' })]` | `plugins: [new RememberPlugin({ type: 'memory' })]` | Official plugins use `DynamicPlugin.init()` static method; direct instantiation bypasses provider wiring |
|
|
697
|
+
| Remember storage in prod | `RememberPlugin.init({ type: 'redis', config: { host: '...' } })` | `RememberPlugin.init({ type: 'memory' })` in production | Memory storage loses data on restart; use Redis or Vercel KV for persistence |
|
|
698
|
+
| Cache TTL units | `defaultTTL: 3600` (seconds) | `defaultTTL: 3600000` (milliseconds) | Cache TTL is in seconds, not milliseconds; 3600000 = 41 days |
|
|
699
|
+
| Feature flag gating | `@Tool({ featureFlag: 'my-flag' })` on the tool decorator | Checking `this.featureFlags.isEnabled()` inside `execute()` and returning early | Decorator-level gating hides the tool from `list_tools`; manual check still exposes it |
|
|
700
|
+
| Dashboard (beta) | Avoid in production — plugin is in beta and may not work correctly | `DashboardPlugin.init({})` in production | Dashboard plugin is unstable; use only for local development experimentation |
|
|
677
701
|
|
|
678
702
|
## Verification Checklist
|
|
679
703
|
|
|
@@ -688,24 +712,34 @@ class ProductionServer {}
|
|
|
688
712
|
- [ ] `this.remember` / `this.approval` / `this.featureFlags` resolves in tool context
|
|
689
713
|
- [ ] Cache plugin returns cached results on repeated identical calls
|
|
690
714
|
- [ ] Feature-flagged tools are hidden from `list_tools` when flag is off
|
|
691
|
-
- [ ] Dashboard is accessible at configured `basePath` (default: `/dashboard`)
|
|
715
|
+
- [ ] Dashboard is accessible at configured `basePath` (default: `/dashboard`) — beta, may not work
|
|
692
716
|
- [ ] Approval plugin blocks unapproved tools and grants approval correctly
|
|
693
717
|
|
|
694
718
|
### Production
|
|
695
719
|
|
|
696
720
|
- [ ] Redis or external storage is configured for Remember and Cache plugins
|
|
697
|
-
- [ ] Dashboard authentication is enabled with a secret token
|
|
721
|
+
- [ ] Dashboard authentication is enabled with a secret token (if using beta Dashboard plugin)
|
|
698
722
|
- [ ] Feature flag adapter connects to external service (not `'static'`)
|
|
699
723
|
|
|
700
724
|
## Troubleshooting
|
|
701
725
|
|
|
702
|
-
| Problem | Cause | Solution
|
|
703
|
-
| --------------------------------- | -------------------------------------------------------------------------------- |
|
|
704
|
-
| `this.remember` is undefined | RememberPlugin not registered or missing `.init()` | Add `RememberPlugin.init({ type: 'memory' })` to `plugins` array
|
|
705
|
-
| Cache not working for a tool | Tool name does not match any `toolPatterns` glob and `cache` metadata is not set | Add `cache: true` to `@Tool` decorator or add matching pattern to `toolPatterns`
|
|
706
|
-
| Feature flag always returns false | Using `'static'` adapter with flag not in the `flags` map | Add the flag key to `flags: { 'my-flag': true }` or check adapter connection
|
|
707
|
-
| Dashboard returns 404 | Plugin auto-disabled in production (`NODE_ENV=production`)
|
|
708
|
-
| Approval webhook times out | Callback URL not reachable from the external approval service | Verify `callbackPath` is publicly accessible and matches the webhook configuration
|
|
726
|
+
| Problem | Cause | Solution |
|
|
727
|
+
| --------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
728
|
+
| `this.remember` is undefined | RememberPlugin not registered or missing `.init()` | Add `RememberPlugin.init({ type: 'memory' })` to `plugins` array |
|
|
729
|
+
| Cache not working for a tool | Tool name does not match any `toolPatterns` glob and `cache` metadata is not set | Add `cache: true` to `@Tool` decorator or add matching pattern to `toolPatterns` |
|
|
730
|
+
| Feature flag always returns false | Using `'static'` adapter with flag not in the `flags` map | Add the flag key to `flags: { 'my-flag': true }` or check adapter connection |
|
|
731
|
+
| Dashboard returns 404 | Plugin is in beta and auto-disabled in production (`NODE_ENV=production`) | Dashboard is unstable — avoid in production. For dev: set `enabled: true` explicitly |
|
|
732
|
+
| Approval webhook times out | Callback URL not reachable from the external approval service | Verify `callbackPath` is publicly accessible and matches the webhook configuration |
|
|
733
|
+
|
|
734
|
+
## Examples
|
|
735
|
+
|
|
736
|
+
| Example | Level | Description |
|
|
737
|
+
| -------------------------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
738
|
+
| [`cache-and-feature-flags`](../examples/official-plugins/cache-and-feature-flags.md) | Intermediate | Demonstrates combining the Cache plugin for tool result caching with the Feature Flags plugin for gating tools behind flags. |
|
|
739
|
+
| [`production-multi-plugin-setup`](../examples/official-plugins/production-multi-plugin-setup.md) | Advanced | Demonstrates a production-ready server configuration combining CodeCall, Remember, Approval, Cache, and Feature Flags plugins with Redis storage and external flag services. |
|
|
740
|
+
| [`remember-plugin-session-memory`](../examples/official-plugins/remember-plugin-session-memory.md) | Basic | Demonstrates installing the Remember plugin and using `this.remember` in tools to store and retrieve session memory. |
|
|
741
|
+
|
|
742
|
+
> See all examples in [`examples/official-plugins/`](../examples/official-plugins/)
|
|
709
743
|
|
|
710
744
|
## Reference
|
|
711
745
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontmcp-extensibility
|
|
3
|
+
description: 'Extend FrontMCP servers with external npm packages and libraries. Covers VectoriaDB for semantic search, and patterns for integrating third-party services into providers and tools. Use when adding search, ML, database, or external API capabilities beyond the core SDK.'
|
|
4
|
+
tags: [extensibility, vectoriadb, search, integration, npm, provider, external-services]
|
|
5
|
+
category: extensibility
|
|
6
|
+
targets: [all]
|
|
7
|
+
bundle: [full]
|
|
8
|
+
priority: 10
|
|
9
|
+
visibility: both
|
|
10
|
+
license: Apache-2.0
|
|
11
|
+
metadata:
|
|
12
|
+
docs: https://docs.agentfront.dev/frontmcp/extensibility/providers
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# FrontMCP Extensibility
|
|
16
|
+
|
|
17
|
+
Patterns and examples for extending FrontMCP servers with external npm packages. The core SDK handles MCP protocol, DI, and lifecycle — this skill shows how to integrate third-party libraries as providers and tools.
|
|
18
|
+
|
|
19
|
+
## When to Use This Skill
|
|
20
|
+
|
|
21
|
+
### Must Use
|
|
22
|
+
|
|
23
|
+
- Adding semantic search or similarity matching to your server (VectoriaDB)
|
|
24
|
+
- Integrating an external npm package as a FrontMCP provider
|
|
25
|
+
- Building tools that wrap third-party services (databases, APIs, ML models)
|
|
26
|
+
|
|
27
|
+
### Recommended
|
|
28
|
+
|
|
29
|
+
- Looking for patterns to structure external service integrations
|
|
30
|
+
- Deciding between provider-based vs direct integration for a library
|
|
31
|
+
- Adding capabilities like applescript automation, VM execution, or data processing
|
|
32
|
+
|
|
33
|
+
### Skip When
|
|
34
|
+
|
|
35
|
+
- You need to build core MCP components (see `frontmcp-development`)
|
|
36
|
+
- You need to configure auth, transport, or CORS (see `frontmcp-config`)
|
|
37
|
+
- You need to write a plugin with hooks and context extensions (see `create-plugin`)
|
|
38
|
+
|
|
39
|
+
> **Decision:** Use this skill when integrating external libraries into your FrontMCP server as providers or tools.
|
|
40
|
+
|
|
41
|
+
## Scenario Routing Table
|
|
42
|
+
|
|
43
|
+
| Scenario | Reference | Description |
|
|
44
|
+
| --------------------------------------------- | ----------------------------------------------- | -------------------------------------------------------- |
|
|
45
|
+
| Add in-memory semantic search with VectoriaDB | `references/vectoriadb.md` | TF-IDF indexing, field weighting, provider+tool pattern |
|
|
46
|
+
| Load an app from an npm package | `multi-app-composition` (in frontmcp-setup) | `App.esm('@scope/pkg@^1.0.0', 'AppName')` pattern |
|
|
47
|
+
| Connect to a remote MCP server | `multi-app-composition` (in frontmcp-setup) | `App.remote('https://...', 'ns')` pattern |
|
|
48
|
+
| Build a reusable plugin with hooks | `create-plugin-hooks` (in frontmcp-development) | `DynamicPlugin`, context extensions, lifecycle hooks |
|
|
49
|
+
| Build a custom adapter for an external source | `create-adapter` (in frontmcp-development) | `DynamicAdapter` for OpenAPI, GraphQL, or custom sources |
|
|
50
|
+
| Auto-generate tools from an OpenAPI spec | `official-adapters` (in frontmcp-development) | `OpenapiAdapter` with filtering, auth, and transforms |
|
|
51
|
+
|
|
52
|
+
## Integration Pattern
|
|
53
|
+
|
|
54
|
+
The standard pattern for integrating any external library:
|
|
55
|
+
|
|
56
|
+
1. **Create a provider** — wraps the library as a singleton or scoped service
|
|
57
|
+
2. **Register the provider** — add to `@App({ providers: [...] })` or `@FrontMcp({ providers: [...] })`
|
|
58
|
+
3. **Create tools** — expose the provider's capabilities as MCP tools via `this.get(TOKEN)`
|
|
59
|
+
4. **Optionally create resources** — expose data as MCP resources with autocompletion
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// 1. Provider wraps the library
|
|
63
|
+
@Provider({ name: 'my-search', provide: SearchToken, scope: ProviderScope.GLOBAL })
|
|
64
|
+
export class SearchProvider {
|
|
65
|
+
private client: ExternalLibrary;
|
|
66
|
+
constructor() {
|
|
67
|
+
this.client = new ExternalLibrary({
|
|
68
|
+
/* config */
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
async search(query: string) {
|
|
72
|
+
return this.client.query(query);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// 2. Tool exposes it
|
|
77
|
+
@Tool({ name: 'search', inputSchema: { query: z.string() } })
|
|
78
|
+
export default class SearchTool extends ToolContext {
|
|
79
|
+
async execute(input: { query: string }) {
|
|
80
|
+
return this.get(SearchToken).search(input.query);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Available Integrations
|
|
86
|
+
|
|
87
|
+
| Library | Purpose | Reference |
|
|
88
|
+
| -------------- | -------------------------------- | -------------------------- |
|
|
89
|
+
| **VectoriaDB** | In-memory TF-IDF semantic search | `references/vectoriadb.md` |
|
|
90
|
+
|
|
91
|
+
More integrations can be added as references (e.g., enclave-vm, applescript, database clients).
|
|
92
|
+
|
|
93
|
+
## Verification Checklist
|
|
94
|
+
|
|
95
|
+
- [ ] External library is in `dependencies` (not `devDependencies`)
|
|
96
|
+
- [ ] Provider wraps the library with proper initialization and cleanup
|
|
97
|
+
- [ ] Provider is registered in `@App` or `@FrontMcp` with a typed DI token
|
|
98
|
+
- [ ] Tools use `this.get(TOKEN)` to access the provider (not direct imports)
|
|
99
|
+
- [ ] Error handling wraps library-specific errors into MCP error classes
|
|
100
|
+
|
|
101
|
+
## Reference
|
|
102
|
+
|
|
103
|
+
- Related skills: `create-provider`, `create-tool`, `frontmcp-development`
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: product-catalog-search
|
|
3
|
+
reference: vectoriadb
|
|
4
|
+
level: advanced
|
|
5
|
+
description: 'Shows advanced VectoriaDB usage with typed document metadata, batch operations, filtered search by multiple criteria, and batch indexing of a product catalog.'
|
|
6
|
+
tags: [extensibility, vectoriadb, product, catalog, search]
|
|
7
|
+
features:
|
|
8
|
+
- 'Typed document metadata with `ProductDoc extends DocumentMetadata`'
|
|
9
|
+
- 'Batch operations with `db.addMany()` for efficient catalog indexing'
|
|
10
|
+
- 'Multi-criteria filtered search combining category, price, and stock status'
|
|
11
|
+
- '`maxDocuments` option for DoS protection on large datasets'
|
|
12
|
+
- '`FileStorageAdapter` for persisting the entire product index to disk'
|
|
13
|
+
- 'Semantic matching: "something to block office noise" finds "noise-canceling headphones"'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# VectoriaDB: Product Catalog with Typed Metadata and Batch Operations
|
|
17
|
+
|
|
18
|
+
Shows advanced VectoriaDB usage with typed document metadata, batch operations, filtered search by multiple criteria, and batch indexing of a product catalog.
|
|
19
|
+
|
|
20
|
+
## Code
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
// src/providers/product-search.provider.ts
|
|
24
|
+
import { Provider, ProviderScope } from '@frontmcp/sdk';
|
|
25
|
+
import { VectoriaDB, FileStorageAdapter } from 'vectoriadb';
|
|
26
|
+
import type { DocumentMetadata } from 'vectoriadb';
|
|
27
|
+
|
|
28
|
+
export const ProductSearch = Symbol('ProductSearch');
|
|
29
|
+
|
|
30
|
+
// Typed metadata for product documents
|
|
31
|
+
interface ProductDoc extends DocumentMetadata {
|
|
32
|
+
name: string;
|
|
33
|
+
category: string;
|
|
34
|
+
price: number;
|
|
35
|
+
inStock: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Provider({ name: 'product-search', provide: ProductSearch, scope: ProviderScope.GLOBAL })
|
|
39
|
+
export class ProductSearchProvider {
|
|
40
|
+
private db: VectoriaDB<ProductDoc>;
|
|
41
|
+
private ready: Promise<void>;
|
|
42
|
+
|
|
43
|
+
constructor() {
|
|
44
|
+
this.db = new VectoriaDB<ProductDoc>({
|
|
45
|
+
modelName: 'Xenova/all-MiniLM-L6-v2',
|
|
46
|
+
cacheDir: './.cache/transformers',
|
|
47
|
+
useHNSW: true,
|
|
48
|
+
defaultSimilarityThreshold: 0.3,
|
|
49
|
+
defaultTopK: 10,
|
|
50
|
+
maxDocuments: 100000, // DoS protection
|
|
51
|
+
storageAdapter: new FileStorageAdapter({ cacheDir: './.cache/product-vectors' }),
|
|
52
|
+
});
|
|
53
|
+
this.ready = this.db.initialize();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Batch indexing for large catalogs
|
|
57
|
+
async indexProducts(
|
|
58
|
+
products: Array<{
|
|
59
|
+
id: string;
|
|
60
|
+
description: string;
|
|
61
|
+
name: string;
|
|
62
|
+
category: string;
|
|
63
|
+
price: number;
|
|
64
|
+
inStock: boolean;
|
|
65
|
+
}>,
|
|
66
|
+
) {
|
|
67
|
+
await this.ready;
|
|
68
|
+
|
|
69
|
+
// Use addMany for efficient batch operations
|
|
70
|
+
await this.db.addMany(
|
|
71
|
+
products.map((p) => ({
|
|
72
|
+
id: p.id,
|
|
73
|
+
text: `${p.name}: ${p.description}`,
|
|
74
|
+
metadata: {
|
|
75
|
+
id: p.id,
|
|
76
|
+
name: p.name,
|
|
77
|
+
category: p.category,
|
|
78
|
+
price: p.price,
|
|
79
|
+
inStock: p.inStock,
|
|
80
|
+
},
|
|
81
|
+
})),
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
await this.db.saveToStorage();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Multi-criteria filtered search
|
|
88
|
+
async search(query: string, filters?: { category?: string; maxPrice?: number; inStockOnly?: boolean }, limit = 10) {
|
|
89
|
+
await this.ready;
|
|
90
|
+
|
|
91
|
+
return this.db.search(query, {
|
|
92
|
+
topK: limit,
|
|
93
|
+
threshold: 0.4,
|
|
94
|
+
filter: (meta) => {
|
|
95
|
+
if (filters?.category && meta.category !== filters.category) return false;
|
|
96
|
+
if (filters?.maxPrice !== undefined && meta.price > filters.maxPrice) return false;
|
|
97
|
+
if (filters?.inStockOnly && !meta.inStock) return false;
|
|
98
|
+
return true;
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// src/tools/find-products.tool.ts
|
|
107
|
+
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
108
|
+
import { z } from 'zod';
|
|
109
|
+
import { ProductSearch } from '../providers/product-search.provider';
|
|
110
|
+
|
|
111
|
+
@Tool({
|
|
112
|
+
name: 'find_products',
|
|
113
|
+
description: 'Find products using natural language (e.g., "something to block office noise")',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
query: z.string().min(1).describe('Natural language product search'),
|
|
116
|
+
category: z.string().optional().describe('Filter by category'),
|
|
117
|
+
maxPrice: z.number().positive().optional().describe('Maximum price'),
|
|
118
|
+
inStockOnly: z.boolean().default(true).describe('Only show in-stock products'),
|
|
119
|
+
limit: z.number().int().min(1).max(20).default(5).describe('Max results'),
|
|
120
|
+
},
|
|
121
|
+
outputSchema: {
|
|
122
|
+
products: z.array(
|
|
123
|
+
z.object({
|
|
124
|
+
id: z.string(),
|
|
125
|
+
name: z.string(),
|
|
126
|
+
category: z.string(),
|
|
127
|
+
price: z.number(),
|
|
128
|
+
score: z.number(),
|
|
129
|
+
inStock: z.boolean(),
|
|
130
|
+
}),
|
|
131
|
+
),
|
|
132
|
+
total: z.number(),
|
|
133
|
+
},
|
|
134
|
+
})
|
|
135
|
+
export class FindProductsTool extends ToolContext {
|
|
136
|
+
async execute(input: { query: string; category?: string; maxPrice?: number; inStockOnly: boolean; limit: number }) {
|
|
137
|
+
const search = this.get(ProductSearch);
|
|
138
|
+
|
|
139
|
+
const results = await search.search(
|
|
140
|
+
input.query,
|
|
141
|
+
{
|
|
142
|
+
category: input.category,
|
|
143
|
+
maxPrice: input.maxPrice,
|
|
144
|
+
inStockOnly: input.inStockOnly,
|
|
145
|
+
},
|
|
146
|
+
input.limit,
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
products: results.map((r) => ({
|
|
151
|
+
id: r.id,
|
|
152
|
+
name: r.metadata.name,
|
|
153
|
+
category: r.metadata.category,
|
|
154
|
+
price: r.metadata.price,
|
|
155
|
+
score: r.score,
|
|
156
|
+
inStock: r.metadata.inStock,
|
|
157
|
+
})),
|
|
158
|
+
total: results.length,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## What This Demonstrates
|
|
165
|
+
|
|
166
|
+
- Typed document metadata with `ProductDoc extends DocumentMetadata`
|
|
167
|
+
- Batch operations with `db.addMany()` for efficient catalog indexing
|
|
168
|
+
- Multi-criteria filtered search combining category, price, and stock status
|
|
169
|
+
- `maxDocuments` option for DoS protection on large datasets
|
|
170
|
+
- `FileStorageAdapter` for persisting the entire product index to disk
|
|
171
|
+
- Semantic matching: "something to block office noise" finds "noise-canceling headphones"
|
|
172
|
+
|
|
173
|
+
## Related
|
|
174
|
+
|
|
175
|
+
- See `vectoriadb` for the full configuration reference, engine comparison, and TFIDFVectoria examples
|
package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: semantic-search-with-persistence
|
|
3
|
+
reference: vectoriadb
|
|
4
|
+
level: intermediate
|
|
5
|
+
description: 'Shows how to use `VectoriaDB` for semantic search with transformer models, filtered search, and `FileStorageAdapter` for persistence across restarts.'
|
|
6
|
+
tags: [extensibility, vectoriadb, semantic-search, semantic, search, persistence]
|
|
7
|
+
features:
|
|
8
|
+
- 'Using `VectoriaDB` with transformer models for true semantic search'
|
|
9
|
+
- 'Configuring HNSW index (`useHNSW: true`) for fast O(log n) search on large datasets'
|
|
10
|
+
- 'Filtered search with a callback: `filter: (m) => m.category === category`'
|
|
11
|
+
- '`FileStorageAdapter` for persisting vectors to disk (restored without re-embedding)'
|
|
12
|
+
- 'Async initialization with `await db.initialize()` (downloads model on first run)'
|
|
13
|
+
- 'Update-or-add pattern with `db.has(id)` check'
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# VectoriaDB: Semantic ML Search with Persistence
|
|
17
|
+
|
|
18
|
+
Shows how to use `VectoriaDB` for semantic search with transformer models, filtered search, and `FileStorageAdapter` for persistence across restarts.
|
|
19
|
+
|
|
20
|
+
## Code
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
// src/providers/knowledge-base.provider.ts
|
|
24
|
+
import { Provider, ProviderScope } from '@frontmcp/sdk';
|
|
25
|
+
import { VectoriaDB, FileStorageAdapter } from 'vectoriadb';
|
|
26
|
+
import type { DocumentMetadata } from 'vectoriadb';
|
|
27
|
+
|
|
28
|
+
export const KnowledgeBase = Symbol('KnowledgeBase');
|
|
29
|
+
|
|
30
|
+
interface Article extends DocumentMetadata {
|
|
31
|
+
title: string;
|
|
32
|
+
category: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@Provider({ name: 'knowledge-base', provide: KnowledgeBase, scope: ProviderScope.GLOBAL })
|
|
36
|
+
export class KnowledgeBaseProvider {
|
|
37
|
+
private db: VectoriaDB<Article>;
|
|
38
|
+
private ready: Promise<void>;
|
|
39
|
+
|
|
40
|
+
constructor() {
|
|
41
|
+
this.db = new VectoriaDB<Article>({
|
|
42
|
+
modelName: 'Xenova/all-MiniLM-L6-v2', // Default transformer model
|
|
43
|
+
cacheDir: './.cache/transformers', // Model cache directory
|
|
44
|
+
useHNSW: true, // HNSW index for O(log n) search
|
|
45
|
+
defaultSimilarityThreshold: 0.4,
|
|
46
|
+
defaultTopK: 10,
|
|
47
|
+
storageAdapter: new FileStorageAdapter({ cacheDir: './.cache/kb-vectors' }),
|
|
48
|
+
});
|
|
49
|
+
// Initialize async — downloads model on first run
|
|
50
|
+
this.ready = this.db.initialize();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async search(query: string, options?: { category?: string; limit?: number }) {
|
|
54
|
+
await this.ready;
|
|
55
|
+
return this.db.search(query, {
|
|
56
|
+
topK: options?.limit ?? 10,
|
|
57
|
+
// Filtered search: narrow results by category
|
|
58
|
+
filter: options?.category ? (m) => m.category === options.category : undefined,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async index(id: string, text: string, metadata: Article) {
|
|
63
|
+
await this.ready;
|
|
64
|
+
// Update if exists, add if new
|
|
65
|
+
if (this.db.has(id)) {
|
|
66
|
+
await this.db.update(id, { text, metadata });
|
|
67
|
+
} else {
|
|
68
|
+
await this.db.add(id, text, metadata);
|
|
69
|
+
}
|
|
70
|
+
// Persist to disk — restored without re-embedding on next startup
|
|
71
|
+
await this.db.saveToStorage();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async loadFromDisk() {
|
|
75
|
+
await this.ready;
|
|
76
|
+
await this.db.loadFromStorage();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// src/tools/semantic-search.tool.ts
|
|
83
|
+
import { Tool, ToolContext } from '@frontmcp/sdk';
|
|
84
|
+
import { z } from 'zod';
|
|
85
|
+
import { KnowledgeBase } from '../providers/knowledge-base.provider';
|
|
86
|
+
|
|
87
|
+
@Tool({
|
|
88
|
+
name: 'semantic_search',
|
|
89
|
+
description: 'Search the knowledge base using natural language (understands meaning, not just keywords)',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
query: z.string().min(1).describe('Natural language search query'),
|
|
92
|
+
category: z.string().optional().describe('Filter by category'),
|
|
93
|
+
limit: z.number().int().min(1).max(20).default(5).describe('Max results'),
|
|
94
|
+
},
|
|
95
|
+
outputSchema: {
|
|
96
|
+
results: z.array(
|
|
97
|
+
z.object({
|
|
98
|
+
id: z.string(),
|
|
99
|
+
score: z.number(),
|
|
100
|
+
title: z.string(),
|
|
101
|
+
category: z.string(),
|
|
102
|
+
}),
|
|
103
|
+
),
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
export class SemanticSearchTool extends ToolContext {
|
|
107
|
+
async execute(input: { query: string; category?: string; limit: number }) {
|
|
108
|
+
const kb = this.get(KnowledgeBase);
|
|
109
|
+
|
|
110
|
+
const results = await kb.search(input.query, {
|
|
111
|
+
category: input.category,
|
|
112
|
+
limit: input.limit,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
results: results.map((r) => ({
|
|
117
|
+
id: r.id,
|
|
118
|
+
score: r.score,
|
|
119
|
+
title: r.metadata.title,
|
|
120
|
+
category: r.metadata.category,
|
|
121
|
+
})),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## What This Demonstrates
|
|
128
|
+
|
|
129
|
+
- Using `VectoriaDB` with transformer models for true semantic search
|
|
130
|
+
- Configuring HNSW index (`useHNSW: true`) for fast O(log n) search on large datasets
|
|
131
|
+
- Filtered search with a callback: `filter: (m) => m.category === category`
|
|
132
|
+
- `FileStorageAdapter` for persisting vectors to disk (restored without re-embedding)
|
|
133
|
+
- Async initialization with `await db.initialize()` (downloads model on first run)
|
|
134
|
+
- Update-or-add pattern with `db.has(id)` check
|
|
135
|
+
|
|
136
|
+
## Related
|
|
137
|
+
|
|
138
|
+
- See `vectoriadb` for the full configuration reference and engine comparison
|