@frontmcp/skills 0.0.1 → 1.0.0-beta.9

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.
Files changed (84) hide show
  1. package/catalog/TEMPLATE.md +58 -13
  2. package/catalog/frontmcp-config/SKILL.md +140 -0
  3. package/catalog/frontmcp-config/references/configure-auth.md +238 -0
  4. package/catalog/frontmcp-config/references/configure-elicitation.md +178 -0
  5. package/catalog/frontmcp-config/references/configure-http.md +205 -0
  6. package/catalog/frontmcp-config/references/configure-session.md +205 -0
  7. package/catalog/frontmcp-config/references/configure-throttle.md +229 -0
  8. package/catalog/frontmcp-config/references/configure-transport.md +195 -0
  9. package/catalog/frontmcp-config/references/setup-redis.md +4 -0
  10. package/catalog/frontmcp-config/references/setup-sqlite.md +4 -0
  11. package/catalog/frontmcp-deployment/SKILL.md +124 -0
  12. package/catalog/frontmcp-deployment/references/build-for-browser.md +138 -0
  13. package/catalog/frontmcp-deployment/references/build-for-cli.md +138 -0
  14. package/catalog/{deployment/build-for-sdk/SKILL.md → frontmcp-deployment/references/build-for-sdk.md} +65 -24
  15. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +213 -0
  16. package/catalog/{deployment/deploy-to-lambda/SKILL.md → frontmcp-deployment/references/deploy-to-lambda.md} +73 -60
  17. package/catalog/{deployment/deploy-to-node/references/Dockerfile.example → frontmcp-deployment/references/deploy-to-node-dockerfile.md} +11 -2
  18. package/catalog/{deployment/deploy-to-node/SKILL.md → frontmcp-deployment/references/deploy-to-node.md} +65 -37
  19. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +60 -0
  20. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +224 -0
  21. package/catalog/frontmcp-development/SKILL.md +118 -0
  22. package/catalog/frontmcp-development/references/create-adapter.md +165 -0
  23. package/catalog/{development/create-agent/references/llm-config.md → frontmcp-development/references/create-agent-llm-config.md} +5 -5
  24. package/catalog/{development/create-agent/SKILL.md → frontmcp-development/references/create-agent.md} +82 -44
  25. package/catalog/{development/create-job/SKILL.md → frontmcp-development/references/create-job.md} +61 -19
  26. package/catalog/{plugins/create-plugin-hooks/SKILL.md → frontmcp-development/references/create-plugin-hooks.md} +63 -11
  27. package/catalog/{plugins/create-plugin/SKILL.md → frontmcp-development/references/create-plugin.md} +65 -60
  28. package/catalog/{development/create-prompt/SKILL.md → frontmcp-development/references/create-prompt.md} +62 -26
  29. package/catalog/{development/create-provider/SKILL.md → frontmcp-development/references/create-provider.md} +62 -27
  30. package/catalog/{development/create-resource/SKILL.md → frontmcp-development/references/create-resource.md} +62 -30
  31. package/catalog/{development/create-skill-with-tools/SKILL.md → frontmcp-development/references/create-skill-with-tools.md} +69 -24
  32. package/catalog/{development/create-skill/SKILL.md → frontmcp-development/references/create-skill.md} +71 -20
  33. package/catalog/{development/create-tool/SKILL.md → frontmcp-development/references/create-tool.md} +62 -26
  34. package/catalog/{development/create-workflow/SKILL.md → frontmcp-development/references/create-workflow.md} +60 -18
  35. package/catalog/{development/decorators-guide/SKILL.md → frontmcp-development/references/decorators-guide.md} +123 -34
  36. package/catalog/frontmcp-development/references/official-adapters.md +194 -0
  37. package/catalog/{plugins/official-plugins/SKILL.md → frontmcp-development/references/official-plugins.md} +68 -22
  38. package/catalog/frontmcp-guides/SKILL.md +417 -0
  39. package/catalog/frontmcp-guides/references/example-knowledge-base.md +636 -0
  40. package/catalog/frontmcp-guides/references/example-task-manager.md +512 -0
  41. package/catalog/frontmcp-guides/references/example-weather-api.md +292 -0
  42. package/catalog/frontmcp-setup/SKILL.md +127 -0
  43. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +265 -0
  44. package/catalog/{setup/multi-app-composition/SKILL.md → frontmcp-setup/references/multi-app-composition.md} +65 -23
  45. package/catalog/{setup/nx-workflow/SKILL.md → frontmcp-setup/references/nx-workflow.md} +78 -21
  46. package/catalog/frontmcp-setup/references/project-structure-nx.md +246 -0
  47. package/catalog/frontmcp-setup/references/project-structure-standalone.md +212 -0
  48. package/catalog/{setup/setup-project/SKILL.md → frontmcp-setup/references/setup-project.md} +62 -62
  49. package/catalog/{setup/setup-redis/SKILL.md → frontmcp-setup/references/setup-redis.md} +59 -86
  50. package/catalog/{setup/setup-sqlite/SKILL.md → frontmcp-setup/references/setup-sqlite.md} +64 -76
  51. package/catalog/frontmcp-testing/SKILL.md +121 -0
  52. package/catalog/{testing/setup-testing/SKILL.md → frontmcp-testing/references/setup-testing.md} +78 -67
  53. package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-tool-unit.md +1 -0
  54. package/catalog/skills-manifest.json +34 -383
  55. package/package.json +1 -1
  56. package/src/manifest.d.ts +3 -3
  57. package/src/manifest.js +1 -3
  58. package/src/manifest.js.map +1 -1
  59. package/catalog/adapters/create-adapter/SKILL.md +0 -127
  60. package/catalog/adapters/official-adapters/SKILL.md +0 -136
  61. package/catalog/auth/configure-auth/SKILL.md +0 -250
  62. package/catalog/auth/configure-session/SKILL.md +0 -201
  63. package/catalog/config/configure-elicitation/SKILL.md +0 -136
  64. package/catalog/config/configure-http/SKILL.md +0 -167
  65. package/catalog/config/configure-throttle/SKILL.md +0 -189
  66. package/catalog/config/configure-transport/SKILL.md +0 -151
  67. package/catalog/deployment/build-for-browser/SKILL.md +0 -95
  68. package/catalog/deployment/build-for-cli/SKILL.md +0 -100
  69. package/catalog/deployment/deploy-to-cloudflare/SKILL.md +0 -192
  70. package/catalog/deployment/deploy-to-vercel/SKILL.md +0 -196
  71. package/catalog/deployment/deploy-to-vercel/references/vercel.json.example +0 -60
  72. package/catalog/setup/frontmcp-skills-usage/SKILL.md +0 -200
  73. package/catalog/setup/project-structure-nx/SKILL.md +0 -186
  74. package/catalog/setup/project-structure-standalone/SKILL.md +0 -153
  75. /package/catalog/{auth/configure-auth/references/auth-modes.md → frontmcp-config/references/configure-auth-modes.md} +0 -0
  76. /package/catalog/{config/configure-throttle/references/guard-config.md → frontmcp-config/references/configure-throttle-guard-config.md} +0 -0
  77. /package/catalog/{config/configure-transport/references/protocol-presets.md → frontmcp-config/references/configure-transport-protocol-presets.md} +0 -0
  78. /package/catalog/{development/create-tool/references/tool-annotations.md → frontmcp-development/references/create-tool-annotations.md} +0 -0
  79. /package/catalog/{development/create-tool/references/output-schema-types.md → frontmcp-development/references/create-tool-output-schema-types.md} +0 -0
  80. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-auth.md +0 -0
  81. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-browser-build.md +0 -0
  82. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-cli-binary.md +0 -0
  83. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-direct-client.md +0 -0
  84. /package/catalog/{testing/setup-testing → frontmcp-testing}/references/test-e2e-handler.md +0 -0
@@ -1,28 +1,28 @@
1
- ---
2
- name: create-workflow
3
- description: Create multi-step workflows that connect jobs into managed execution pipelines with dependencies and conditions. Use when orchestrating sequential or parallel job execution.
4
- tags: [workflow, pipeline, orchestration, steps, jobs]
5
- priority: 6
6
- visibility: both
7
- license: Apache-2.0
8
- metadata:
9
- docs: https://docs.agentfront.dev/frontmcp/servers/workflows
10
- ---
11
-
12
1
  # Creating Workflows
13
2
 
14
3
  Workflows connect multiple jobs into managed execution pipelines with step dependencies, conditions, and triggers. A workflow defines a directed acyclic graph (DAG) of steps where each step runs a named job, and the framework handles ordering, parallelism, error propagation, and trigger management.
15
4
 
16
- ## When to Use @Workflow
5
+ ## When to Use This Skill
6
+
7
+ ### Must Use
8
+
9
+ - Orchestrating multiple jobs in a defined order with explicit step dependencies (e.g., build then test then deploy)
10
+ - Building execution pipelines that require conditional branching, parallel fan-out, or diamond dependency patterns
11
+ - Defining webhook- or event-triggered multi-step automation that the framework manages end to end
12
+
13
+ ### Recommended
17
14
 
18
- Use `@Workflow` when you need to orchestrate multiple jobs in a defined order with dependencies between them. Examples include:
15
+ - CI/CD pipelines, data-processing ETL flows, or approval chains that combine three or more jobs
16
+ - Multi-stage provisioning sequences where steps need `continueOnError` or per-step retry policies
17
+ - Replacing hand-rolled orchestration code with a declarative DAG of job steps
19
18
 
20
- - CI/CD pipelines (build, test, deploy)
21
- - Data processing pipelines (extract, transform, load, verify)
22
- - Approval workflows (submit, review, approve, execute)
23
- - Multi-stage provisioning (create resources, configure, validate, notify)
19
+ ### Skip When
24
20
 
25
- If you only need a single background task, use a `@Job` instead. If you need real-time sequential tool calls guided by an AI, use a `@Skill`.
21
+ - You only need a single background task with no inter-step dependencies (see `create-job`)
22
+ - You need real-time, AI-guided sequential tool calls rather than pre-declared steps (see `create-skill-with-tools`)
23
+ - You are building a conversational prompt template with no execution logic (see `create-prompt`)
24
+
25
+ > **Decision:** Use this skill when you need a declarative, multi-step pipeline of jobs with dependency ordering, conditions, and managed error propagation.
26
26
 
27
27
  ## Class-Based Pattern
28
28
 
@@ -707,3 +707,45 @@ class CiApp {}
707
707
  })
708
708
  class CiServer {}
709
709
  ```
710
+
711
+ ## Common Patterns
712
+
713
+ | Pattern | Correct | Incorrect | Why |
714
+ | ----------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
715
+ | Step dependencies | `dependsOn: ['build', 'test']` (array of step IDs) | `dependsOn: 'build'` (plain string) | `dependsOn` expects a `string[]`, not a single string |
716
+ | Dynamic input | `input: (steps) => ({ artifact: steps.get('build').outputs.url })` | `input: { artifact: buildResult.url }` (captured closure variable) | Static objects cannot reference previous step outputs; use the callback form |
717
+ | Conditional steps | `condition: (steps) => steps.get('test').state === 'completed'` | `condition: (steps) => steps.get('test').outputs` (truthy check) | Always check `.state` explicitly; outputs can be truthy even on partial failure |
718
+ | Job registration | Register all referenced jobs in the `jobs` array of `@App` | Declare `jobName` in steps without registering the job class | Steps reference jobs by name; unregistered jobs cause runtime lookup failures |
719
+ | Workflow trigger | Set `trigger: 'webhook'` and provide `webhook: { path, secret }` | Set `trigger: 'webhook'` without a `webhook` config object | Webhook trigger requires the `webhook` configuration block for path and secret |
720
+
721
+ ## Verification Checklist
722
+
723
+ ### Configuration
724
+
725
+ - [ ] `@Workflow` decorator has `name` and at least one step in `steps`
726
+ - [ ] Every `jobName` in steps matches a registered `@Job` name
727
+ - [ ] `dependsOn` arrays reference valid step `id` values within the same workflow
728
+ - [ ] No circular dependencies exist in the step DAG
729
+
730
+ ### Runtime
731
+
732
+ - [ ] Workflow appears in the server's workflow registry after startup
733
+ - [ ] Steps with no dependencies execute in parallel (up to `maxConcurrency`)
734
+ - [ ] Conditional steps are correctly skipped or executed based on prior step results
735
+ - [ ] `continueOnError: true` steps allow downstream steps to proceed on failure
736
+ - [ ] Webhook-triggered workflows respond to incoming HTTP requests
737
+
738
+ ## Troubleshooting
739
+
740
+ | Problem | Cause | Solution |
741
+ | --------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
742
+ | Step never executes | `dependsOn` references a step ID that does not exist | Verify all `dependsOn` entries match actual step `id` values in the workflow |
743
+ | Workflow fails at startup with "job not found" | `jobName` references an unregistered job | Add the job class to the `jobs` array in `@App` before registering the workflow |
744
+ | Dynamic `input` callback receives undefined outputs | Dependent step was skipped or failed without `continueOnError` | Add a `condition` guard that checks `steps.get(id).state === 'completed'` before accessing outputs |
745
+ | Webhook trigger does not fire | Missing or mismatched `webhook.secret` | Ensure `webhook.secret` matches the sender's HMAC secret and `webhook.path` is correct |
746
+ | Workflow exceeds timeout | Total step execution time exceeds the default 600000 ms | Increase `timeout` at the workflow level or add per-step `timeout` overrides |
747
+
748
+ ## Reference
749
+
750
+ - [Workflows Documentation](https://docs.agentfront.dev/frontmcp/servers/workflows)
751
+ - Related skills: `create-job`, `create-skill-with-tools`, `create-tool`, `multi-app-composition`
@@ -1,21 +1,10 @@
1
- ---
2
- name: decorators-guide
3
- description: Complete reference for all FrontMCP decorators and when to use each one. Use when choosing between decorators, understanding the architecture, or looking up decorator signatures.
4
- tags: [decorators, reference, architecture, guide]
5
- priority: 10
6
- visibility: both
7
- license: Apache-2.0
8
- metadata:
9
- docs: https://docs.agentfront.dev/frontmcp/sdk-reference/decorators/overview
10
- ---
11
-
12
1
  # FrontMCP Decorators - Complete Reference
13
2
 
14
3
  ## Architecture Overview
15
4
 
16
5
  FrontMCP uses a hierarchical decorator system. The nesting order is:
17
6
 
18
- ```
7
+ ```text
19
8
  @FrontMcp (server root)
20
9
  +-- @App (application module)
21
10
  +-- @Tool (MCP tool)
@@ -35,6 +24,30 @@ FrontMCP uses a hierarchical decorator system. The nesting order is:
35
24
 
36
25
  ---
37
26
 
27
+ ## When to Use This Skill
28
+
29
+ ### Must Use
30
+
31
+ - You are building a new FrontMCP server and need to choose the correct decorator for each component
32
+ - You are reviewing or debugging decorator configuration and need to verify field names, types, or nesting hierarchy
33
+ - You are onboarding to the FrontMCP codebase and need a single reference for the full decorator architecture
34
+
35
+ ### Recommended
36
+
37
+ - You are adding a new capability (tool, resource, prompt, agent, skill) to an existing server and want to confirm the correct decorator signature
38
+ - You are designing a plugin or adapter and need to understand how it integrates with the decorator hierarchy
39
+ - You are refactoring an app's module structure and need to verify which decorators belong in `@App` vs `@FrontMcp`
40
+
41
+ ### Skip When
42
+
43
+ - You only need to write business logic inside an existing tool or resource (see `create-tool` reference)
44
+ - You are configuring authentication or session management without changing decorators (see `configure-auth` reference)
45
+ - You are working on CI/CD, deployment, or infrastructure that does not involve decorator choices
46
+
47
+ > **Decision:** Use this skill whenever you need to look up, choose, or validate a FrontMCP decorator -- skip it when the decorator is already chosen and you are only implementing internal logic.
48
+
49
+ ---
50
+
38
51
  ## 1. @FrontMcp
39
52
 
40
53
  **Purpose:** Declares the root MCP server and its global configuration.
@@ -43,27 +56,28 @@ FrontMCP uses a hierarchical decorator system. The nesting order is:
43
56
 
44
57
  **Key fields:**
45
58
 
46
- | Field | Description |
47
- | --------------- | --------------------------------------------------- |
48
- | `info` | Server name, version, and description |
49
- | `apps` | Array of `@App` classes to mount |
50
- | `redis?` | Redis connection options |
51
- | `plugins?` | Global plugins |
52
- | `providers?` | Global DI providers |
53
- | `tools?` | Standalone tools (outside apps) |
54
- | `resources?` | Standalone resources |
55
- | `skills?` | Standalone skills |
56
- | `skillsConfig?` | Skills feature configuration (enabled, cache, auth) |
57
- | `transport?` | Transport type (stdio, sse, streamable-http) |
58
- | `http?` | HTTP server options (port, host, cors) |
59
- | `logging?` | Logging configuration |
60
- | `elicitation?` | Elicitation store config |
61
- | `sqlite?` | SQLite storage config |
62
- | `pubsub?` | Pub/sub configuration |
63
- | `jobs?` | Job scheduler config |
64
- | `throttle?` | Rate limiting config |
65
- | `pagination?` | Pagination defaults |
66
- | `ui?` | UI configuration |
59
+ | Field | Description |
60
+ | --------------- | ------------------------------------------------------------------------------- |
61
+ | `info` | Server name, version, and description |
62
+ | `apps` | Array of `@App` classes to mount |
63
+ | `redis?` | Redis connection options |
64
+ | `plugins?` | Global plugins |
65
+ | `providers?` | Global DI providers |
66
+ | `tools?` | Standalone tools (outside apps) |
67
+ | `resources?` | Standalone resources |
68
+ | `skills?` | Standalone skills |
69
+ | `skillsConfig?` | Skills feature configuration (enabled, cache, auth) |
70
+ | `transport?` | Transport preset ('modern', 'legacy', 'stateless-api', 'full') or config object |
71
+ | `auth?` | Authentication mode and OAuth configuration (AuthOptionsInput) |
72
+ | `http?` | HTTP server options (port, host, cors) |
73
+ | `logging?` | Logging configuration |
74
+ | `elicitation?` | Elicitation store config |
75
+ | `sqlite?` | SQLite storage config |
76
+ | `pubsub?` | Pub/sub configuration |
77
+ | `jobs?` | Job scheduler config |
78
+ | `throttle?` | Rate limiting config |
79
+ | `pagination?` | Pagination defaults |
80
+ | `ui?` | UI configuration |
67
81
 
68
82
  ```typescript
69
83
  import { FrontMcp } from '@frontmcp/sdk';
@@ -71,7 +85,7 @@ import { FrontMcp } from '@frontmcp/sdk';
71
85
  @FrontMcp({
72
86
  info: { name: 'my-server', version: '1.0.0' },
73
87
  apps: [MainApp],
74
- transport: 'streamable-http',
88
+ transport: 'modern', // Valid presets: 'modern', 'legacy', 'stateless-api', 'full'
75
89
  http: { port: 3000 },
76
90
  plugins: [RememberPlugin],
77
91
  skillsConfig: { enabled: true },
@@ -596,3 +610,78 @@ class AuditHooks {
596
610
  | `@Job` | `JobContext` | `@App.jobs` | Background task |
597
611
  | `@Workflow` | - | `@App.workflows` | Multi-step orchestration |
598
612
  | `@Will/@Did/@Stage/@Around` | - | Entry class | Lifecycle hooks |
613
+
614
+ ---
615
+
616
+ ## Common Patterns
617
+
618
+ | Pattern | Correct | Incorrect | Why |
619
+ | --------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
620
+ | Grouping tools into modules | Place tools inside `@App({ tools: [...] })` | Register tools directly in `@FrontMcp({ tools: [...] })` for large servers | Apps provide logical grouping, scoped providers, and isolation; standalone tools in `@FrontMcp` are only appropriate for small servers or global utilities |
621
+ | Exposing data to the LLM | Use `@Resource` for fixed URIs, `@ResourceTemplate` for parameterized URIs | Using `@Tool` to return static data that never changes | Resources are the MCP-standard way to expose readable data; tools are for actions with side effects or dynamic computation |
622
+ | Cross-cutting concerns | Create a `@Plugin` with providers and context extensions | Adding logging/caching logic directly inside every tool's `execute()` method | Plugins centralize shared behavior, reduce duplication, and can be reused across servers |
623
+ | Background processing | Use `@Job` with a cron schedule for recurring work | Using `setTimeout` or manual polling inside a tool | Jobs integrate with the scheduler, support persistence, and are visible in server diagnostics |
624
+ | Multi-step orchestration | Use `@Workflow` with ordered steps referencing `@Job` classes | Chaining multiple tool calls manually from the LLM | Workflows provide built-in ordering, error handling, and rollback semantics |
625
+ | Injecting services | Use `@Provider` with `useFactory`/`useClass` and access via `this.get(Token)` | Importing singletons directly or using global state | DI providers support testability, lifecycle management, and per-scope isolation |
626
+
627
+ ---
628
+
629
+ ## Verification Checklist
630
+
631
+ ### Structure
632
+
633
+ - [ ] Server has exactly one `@FrontMcp` decorated class
634
+ - [ ] Every `@App` is listed in the `@FrontMcp({ apps: [...] })` array
635
+ - [ ] Each tool, resource, prompt, agent, and skill is registered in an `@App` (or in `@FrontMcp` for standalone use)
636
+
637
+ ### Decorator Fields
638
+
639
+ - [ ] Every `@Tool` has `name`, `description`, and `inputSchema` defined
640
+ - [ ] Every `@Resource` has `name` and `uri` with a valid scheme (e.g., `config://`, `file://`)
641
+ - [ ] Every `@ResourceTemplate` has `uriTemplate` with `{param}` placeholders matching the `read()` params argument
642
+ - [ ] Every `@Prompt` has `name` and at least one argument when it accepts input
643
+ - [ ] Every `@Agent` has `name`, `description`, and `llm` configuration
644
+
645
+ ### Inheritance
646
+
647
+ - [ ] Tool classes extend `ToolContext` and implement `execute()`
648
+ - [ ] Prompt classes extend `PromptContext` and implement `execute()`
649
+ - [ ] Resource classes extend `ResourceContext` and implement `read()`
650
+ - [ ] Agent classes extend `AgentContext` and implement `execute()`
651
+ - [ ] Job classes extend `JobContext` and implement `execute()`
652
+
653
+ ### Hooks
654
+
655
+ - [ ] Hook flow strings match valid flows (e.g., `tools:call-tool`, `resources:read-resource`)
656
+ - [ ] `@Around` hooks call `await next()` to continue the chain (unless intentionally short-circuiting)
657
+ - [ ] Hooks do not mutate `rawInput` -- use `ctx.state.set()` for flow state
658
+
659
+ ### DI and Plugins
660
+
661
+ - [ ] All `@Provider` entries specify exactly one of `useClass`, `useValue`, or `useFactory`
662
+ - [ ] Plugins are registered in `@App({ plugins: [...] })` or `@FrontMcp({ plugins: [...] })`
663
+ - [ ] Context extensions installed by plugins match the module augmentation declarations
664
+
665
+ ---
666
+
667
+ ## Troubleshooting
668
+
669
+ | Problem | Cause | Solution |
670
+ | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
671
+ | Tool does not appear in `tools/list` MCP response | Tool class is not registered in any `@App({ tools: [...] })` or `@FrontMcp({ tools: [...] })` | Add the tool class to the `tools` array of the appropriate `@App` or `@FrontMcp` decorator |
672
+ | `this.get(Token)` throws `DependencyNotFoundError` | The provider for that token is not registered or is registered in a different app scope | Add a `@Provider` for the token in the same `@App` or in `@FrontMcp({ providers: [...] })` for global access |
673
+ | Resource returns 404 / `ResourceNotFoundError` | The `uri` in `@Resource` does not match the requested URI, or `uriTemplate` parameters are misaligned | Verify the URI string exactly matches what the client requests; for templates, confirm `{param}` names match |
674
+ | Hook never fires | The `flow` string in `@Will`/`@Did`/`@Around`/`@Stage` does not match any registered flow | Check the flow string against valid flows (e.g., `tools:call-tool`, `resources:read-resource`, `resources:list-resources`) |
675
+ | Plugin context extension is `undefined` at runtime | The plugin's `installContextExtension` function was not called, or module augmentation is missing | Ensure the plugin is registered and its context extension function runs at startup; verify the `declare module` augmentation exists |
676
+ | Agent `execute()` returns empty result | LLM configuration is missing or invalid (wrong model name, missing API key) | Verify `llm.model` and `llm.provider` in `@Agent`, and ensure the provider API key is set in environment variables |
677
+
678
+ ---
679
+
680
+ ## Reference
681
+
682
+ - **Official docs:** [FrontMCP Decorators Overview](https://docs.agentfront.dev/frontmcp/sdk-reference/decorators/overview)
683
+ - **Related skills:**
684
+ - `create-tool` -- step-by-step guide for building tools with `@Tool` and `ToolContext`
685
+ - `create-resource` -- patterns for `@Resource` and `@ResourceTemplate` usage
686
+ - `create-plugin` -- creating plugins with `@Plugin`, providers, and context extensions
687
+ - `configure-auth` -- authentication and session configuration (not decorator-focused)
@@ -0,0 +1,194 @@
1
+ # Official Adapters
2
+
3
+ Adapters convert external definitions (OpenAPI specs, Lambda functions, etc.) into MCP tools, resources, and prompts automatically.
4
+
5
+ ## When to Use This Skill
6
+
7
+ ### Must Use
8
+
9
+ - Converting an OpenAPI/Swagger specification into MCP tools automatically
10
+ - Integrating a REST API that provides a public OpenAPI spec (Petstore, GitHub, Jira, Slack)
11
+ - Setting up authentication (API key, bearer token, OAuth) for an adapter-generated API integration
12
+
13
+ ### Recommended
14
+
15
+ - Registering multiple external APIs as namespaced tool sets in a single server
16
+ - Enabling spec polling to auto-refresh tool definitions when the upstream API changes
17
+ - Providing an inline OpenAPI spec for APIs without a hosted spec URL
18
+
19
+ ### Skip When
20
+
21
+ - The external API has no OpenAPI spec and uses a custom protocol (see `create-adapter`)
22
+ - You need cross-cutting behavior like caching or logging (see `create-plugin` or `official-plugins`)
23
+ - You are building tools manually without an external spec (see `create-tool`)
24
+
25
+ > **Decision:** Use this skill when you have an OpenAPI/Swagger spec and want to automatically generate MCP tools from it using `OpenApiAdapter`.
26
+
27
+ ## OpenAPI Adapter
28
+
29
+ The primary official adapter. Converts OpenAPI/Swagger specifications into MCP tools — one tool per operation.
30
+
31
+ ### Installation
32
+
33
+ ```typescript
34
+ import { OpenApiAdapter } from '@frontmcp/adapters';
35
+
36
+ @App({
37
+ name: 'MyApp',
38
+ adapters: [
39
+ OpenApiAdapter.init({
40
+ name: 'petstore',
41
+ url: 'https://petstore3.swagger.io/api/v3/openapi.json',
42
+ }),
43
+ ],
44
+ })
45
+ class MyApp {}
46
+ ```
47
+
48
+ Each OpenAPI operation becomes an MCP tool named `petstore:operationId`.
49
+
50
+ ### With Authentication
51
+
52
+ ```typescript
53
+ // API Key via static auth
54
+ OpenApiAdapter.init({
55
+ name: 'my-api',
56
+ url: 'https://api.example.com/openapi.json',
57
+ baseUrl: 'https://api.example.com',
58
+ staticAuth: {
59
+ apiKey: process.env.API_KEY!,
60
+ },
61
+ });
62
+
63
+ // API Key via additional headers
64
+ OpenApiAdapter.init({
65
+ name: 'my-api',
66
+ url: 'https://api.example.com/openapi.json',
67
+ baseUrl: 'https://api.example.com',
68
+ additionalHeaders: {
69
+ 'X-API-Key': process.env.API_KEY!,
70
+ },
71
+ });
72
+
73
+ // Bearer token via static auth
74
+ OpenApiAdapter.init({
75
+ name: 'my-api',
76
+ url: 'https://api.example.com/openapi.json',
77
+ baseUrl: 'https://api.example.com',
78
+ staticAuth: {
79
+ jwt: process.env.API_TOKEN!,
80
+ },
81
+ });
82
+
83
+ // Dynamic auth per tool using securityResolver
84
+ OpenApiAdapter.init({
85
+ name: 'my-api',
86
+ url: 'https://api.example.com/openapi.json',
87
+ baseUrl: 'https://api.example.com',
88
+ securityResolver: (tool, ctx) => {
89
+ return { jwt: ctx.authInfo?.token };
90
+ },
91
+ });
92
+ ```
93
+
94
+ ### Spec Polling
95
+
96
+ Automatically refresh the OpenAPI spec at intervals:
97
+
98
+ ```typescript
99
+ OpenApiAdapter.init({
100
+ name: 'evolving-api',
101
+ url: 'https://api.example.com/openapi.json',
102
+ polling: {
103
+ intervalMs: 300000, // Re-fetch every 5 minutes
104
+ },
105
+ });
106
+ ```
107
+
108
+ ### Inline Spec
109
+
110
+ Provide the OpenAPI spec directly instead of fetching from URL:
111
+
112
+ ```typescript
113
+ OpenApiAdapter.init({
114
+ name: 'my-api',
115
+ spec: {
116
+ openapi: '3.0.0',
117
+ info: { title: 'My API', version: '1.0.0' },
118
+ paths: { ... },
119
+ },
120
+ })
121
+ ```
122
+
123
+ ### Multiple Adapters
124
+
125
+ Register adapters from different APIs in the same app:
126
+
127
+ ```typescript
128
+ @App({
129
+ name: 'IntegrationHub',
130
+ adapters: [
131
+ OpenApiAdapter.init({ name: 'github', url: 'https://api.github.com/openapi.json' }),
132
+ OpenApiAdapter.init({ name: 'jira', url: 'https://jira.example.com/openapi.json' }),
133
+ OpenApiAdapter.init({ name: 'slack', url: 'https://slack.com/openapi.json' }),
134
+ ],
135
+ })
136
+ class IntegrationHub {}
137
+ // Tools: github:createIssue, jira:createTicket, slack:postMessage, etc.
138
+ ```
139
+
140
+ ## Adapter vs Plugin
141
+
142
+ | Aspect | Adapter | Plugin |
143
+ | ----------- | ------------------------------------ | ----------------------------------- |
144
+ | Purpose | Generate tools from external sources | Add cross-cutting behavior |
145
+ | Output | Tools, resources, prompts | Lifecycle hooks, context extensions |
146
+ | Examples | OpenAPI → MCP tools | Caching, auth, logging |
147
+ | When to use | Integrating APIs | Adding middleware |
148
+
149
+ ## Common Patterns
150
+
151
+ | Pattern | Correct | Incorrect | Why |
152
+ | -------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------- |
153
+ | Adapter registration | `OpenApiAdapter.init({ name: 'petstore', url: '...' })` in `adapters` array | Placing adapter in `plugins` array | Adapters go in `adapters`, not `plugins`; they serve different purposes |
154
+ | Tool naming | Tools auto-named as `petstore:operationId` using adapter `name` as namespace | Expecting flat names like `listPets` | Adapter name is prepended to prevent collisions across multiple adapters |
155
+ | Auth configuration | `staticAuth: { jwt: process.env.API_TOKEN! }` or `additionalHeaders` | Hardcoding secrets: `staticAuth: { jwt: 'sk-xxx' }` | Always use environment variables for secrets; never commit tokens |
156
+ | Spec source | Use `url` for hosted specs or `spec` for inline definitions | Using both `url` and `spec` simultaneously | Only one source should be provided; `spec` takes precedence and `url` is ignored |
157
+ | Multiple APIs | Register separate `OpenApiAdapter.init()` calls with unique `name` values | Using the same `name` for different adapters | Duplicate names cause tool naming collisions |
158
+
159
+ ## Verification Checklist
160
+
161
+ ### Configuration
162
+
163
+ - [ ] `@frontmcp/adapters` package is installed
164
+ - [ ] `OpenApiAdapter.init()` is in the `adapters` array of `@App`
165
+ - [ ] Adapter has a unique `name` for tool namespacing
166
+ - [ ] `url` points to a valid, reachable OpenAPI JSON/YAML endpoint (or `spec` is inline)
167
+
168
+ ### Runtime
169
+
170
+ - [ ] Generated tools appear in `tools/list` with `<name>:<operationId>` naming
171
+ - [ ] Auth headers are sent correctly on API calls
172
+ - [ ] Spec polling refreshes tool definitions at the configured interval
173
+ - [ ] Invalid spec URL produces a clear startup error
174
+
175
+ ### Production
176
+
177
+ - [ ] API tokens and secrets are loaded from environment variables
178
+ - [ ] Polling interval is appropriate for the API's update frequency
179
+ - [ ] Multiple adapter registrations use distinct names
180
+
181
+ ## Troubleshooting
182
+
183
+ | Problem | Cause | Solution |
184
+ | ---------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
185
+ | No tools generated from spec | Spec URL returns non-OpenAPI content or is unreachable | Verify URL returns valid OpenAPI 3.x JSON; check network access |
186
+ | Authentication errors on API calls | Wrong auth config or missing credentials | Configure `staticAuth` for fixed credentials, `securityResolver`/`authProviderMapper` for dynamic auth, or `additionalHeaders` for header-based tokens; verify env vars are set |
187
+ | Duplicate tool name error | Two adapters registered with the same `name` | Give each adapter a unique `name` (e.g., `'github'`, `'jira'`) |
188
+ | Stale tools after API update | Spec polling not configured | Add `polling: { intervalMs: 300000 }` to refresh every 5 minutes |
189
+ | TypeScript error importing adapter | Wrong import path | Import from `@frontmcp/adapters`: `import { OpenApiAdapter } from '@frontmcp/adapters'` |
190
+
191
+ ## Reference
192
+
193
+ - [Adapter Overview Documentation](https://docs.agentfront.dev/frontmcp/adapters/overview)
194
+ - Related skills: `create-adapter`, `create-plugin`, `create-tool`
@@ -1,18 +1,29 @@
1
- ---
2
- name: official-plugins
3
- description: Install and configure official FrontMCP plugins including CodeCall, Remember, Approval, Cache, Feature Flags, and Dashboard. Use when adding caching, memory, tool approval, feature gating, or CodeCall orchestration.
4
- tags: [plugins, codecall, remember, approval, cache, feature-flags, dashboard]
5
- priority: 9
6
- visibility: both
7
- license: Apache-2.0
8
- metadata:
9
- docs: https://docs.agentfront.dev/frontmcp/plugins/overview
10
- ---
11
-
12
1
  # Official FrontMCP Plugins
13
2
 
14
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, dashboard, and remember).
15
4
 
5
+ ## When to Use This Skill
6
+
7
+ ### Must Use
8
+
9
+ - Installing and configuring any official FrontMCP plugin (CodeCall, Remember, Approval, Cache, Feature Flags, Dashboard)
10
+ - Adding session memory, tool caching, or authorization workflows to an existing server
11
+ - Integrating feature flag services (LaunchDarkly, Split.io, Unleash) to gate tools at runtime
12
+
13
+ ### Recommended
14
+
15
+ - Setting up the Dashboard plugin for visual monitoring of server structure in development
16
+ - Configuring CodeCall for semantic tool discovery when the server has many tools
17
+ - Combining multiple official plugins in a production deployment
18
+
19
+ ### Skip When
20
+
21
+ - You need to build a custom plugin with your own providers and context extensions (see `create-plugin`)
22
+ - You only need lifecycle hooks without installing an official plugin (see `create-plugin-hooks`)
23
+ - You need to generate tools from an OpenAPI spec (see `official-adapters`)
24
+
25
+ > **Decision:** Use this skill when you need to install, configure, or customize one or more of the 6 official FrontMCP plugins.
26
+
16
27
  All plugins follow the `DynamicPlugin` pattern and are registered via `@FrontMcp({ plugins: [...] })`.
17
28
 
18
29
  ```typescript
@@ -24,7 +35,7 @@ import CachePlugin from '@frontmcp/plugin-cache';
24
35
  import FeatureFlagPlugin from '@frontmcp/plugin-feature-flags';
25
36
  import DashboardPlugin from '@frontmcp/plugin-dashboard';
26
37
 
27
- @App()
38
+ @App({ name: 'MyApp' })
28
39
  class MyApp {}
29
40
 
30
41
  @FrontMcp({
@@ -430,7 +441,7 @@ A tool is cached if it matches any pattern OR has `cache: true` (or a cache obje
430
441
 
431
442
  Send the bypass header to skip caching for a specific request:
432
443
 
433
- ```
444
+ ```text
434
445
  x-frontmcp-disable-cache: true
435
446
  ```
436
447
 
@@ -654,14 +665,49 @@ All official plugins use the static `init()` pattern inherited from `DynamicPlug
654
665
  class ProductionServer {}
655
666
  ```
656
667
 
668
+ ## Common Patterns
669
+
670
+ | Pattern | Correct | Incorrect | Why |
671
+ | ------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
672
+ | Plugin registration | `plugins: [RememberPlugin.init({ type: 'memory' })]` | `plugins: [new RememberPlugin({ type: 'memory' })]` | Official plugins use `DynamicPlugin.init()` static method; direct instantiation bypasses provider wiring |
673
+ | 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 |
674
+ | Cache TTL units | `defaultTTL: 3600` (seconds) | `defaultTTL: 3600000` (milliseconds) | Cache TTL is in seconds, not milliseconds; 3600000 = 41 days |
675
+ | 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 |
676
+ | Dashboard in production | `DashboardPlugin.init({ enabled: true, auth: { enabled: true, token: '...' } })` | `DashboardPlugin.init({})` without auth in production | Dashboard auto-disables in production; if enabled, always set auth token |
677
+
678
+ ## Verification Checklist
679
+
680
+ ### Installation
681
+
682
+ - [ ] Plugin package is installed (`@frontmcp/plugin-codecall`, `@frontmcp/plugin-remember`, etc.)
683
+ - [ ] Plugin is registered via `.init()` in the `plugins` array of `@FrontMcp`
684
+ - [ ] Required configuration options are provided (storage type, API keys, endpoints)
685
+
686
+ ### Runtime
687
+
688
+ - [ ] `this.remember` / `this.approval` / `this.featureFlags` resolves in tool context
689
+ - [ ] Cache plugin returns cached results on repeated identical calls
690
+ - [ ] Feature-flagged tools are hidden from `list_tools` when flag is off
691
+ - [ ] Dashboard is accessible at configured `basePath` (default: `/dashboard`)
692
+ - [ ] Approval plugin blocks unapproved tools and grants approval correctly
693
+
694
+ ### Production
695
+
696
+ - [ ] Redis or external storage is configured for Remember and Cache plugins
697
+ - [ ] Dashboard authentication is enabled with a secret token
698
+ - [ ] Feature flag adapter connects to external service (not `'static'`)
699
+
700
+ ## Troubleshooting
701
+
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`) | Set `enabled: true` explicitly in `DashboardPlugin.init()` options |
708
+ | Approval webhook times out | Callback URL not reachable from the external approval service | Verify `callbackPath` is publicly accessible and matches the webhook configuration |
709
+
657
710
  ## Reference
658
711
 
659
- - Plugins docs: [docs.agentfront.dev/frontmcp/plugins/overview](https://docs.agentfront.dev/frontmcp/plugins/overview)
660
- - `DynamicPlugin` base class: import from `@frontmcp/sdk`
661
- - CodeCall: `@frontmcp/plugin-codecall` — [source](https://github.com/agentfront/frontmcp/tree/main/plugins/plugin-codecall) | [docs](https://docs.agentfront.dev/frontmcp/plugins/codecall/overview)
662
- - Remember: `@frontmcp/plugin-remember` — [source](https://github.com/agentfront/frontmcp/tree/main/plugins/plugin-remember) | [docs](https://docs.agentfront.dev/frontmcp/plugins/remember-plugin)
663
- - Approval: `@frontmcp/plugin-approval` — [source](https://github.com/agentfront/frontmcp/tree/main/plugins/plugin-approval)
664
- - Cache: `@frontmcp/plugin-cache` — [source](https://github.com/agentfront/frontmcp/tree/main/plugins/plugin-cache) | [docs](https://docs.agentfront.dev/frontmcp/plugins/cache-plugin)
665
- - Feature Flags: `@frontmcp/plugin-feature-flags` — [source](https://github.com/agentfront/frontmcp/tree/main/plugins/plugin-feature-flags) | [docs](https://docs.agentfront.dev/frontmcp/plugins/feature-flags-plugin)
666
- - Dashboard: `@frontmcp/plugin-dashboard` — [source](https://github.com/agentfront/frontmcp/tree/main/plugins/plugin-dashboard)
667
- - Meta-package: `@frontmcp/plugins` (re-exports cache, codecall, dashboard, remember)
712
+ - [Plugins Overview Documentation](https://docs.agentfront.dev/frontmcp/plugins/overview)
713
+ - Related skills: `create-plugin`, `create-plugin-hooks`, `create-tool`