Skip to main content

Overview

Methods

getPlugins()

Get all registered plugins.
Example:

Plugin Architecture

Plugins create nested registries for their components:
For each plugin, the registry works in this order:
  1. Build the plugin’s own provider registry from providers.
  2. Create the plugin instance. For init({ inject, useFactory }), the factory runs here with dependencies resolved from the host registry.
  3. Register the providers derived from the options (dynamicProviders(options) and init({ providers })).
  4. Build the nested plugins, adapters, tools, resources, prompts and skills. Nested plugins can inject the providers registered in step 3.
  5. Merge exports into the host registry, register hooks and context extensions, then merge the option-derived providers into the host registry and the scope registry.
The scope registry keeps only the copy of an option-derived provider from the app that merged last. Tools, resources and prompts resolve their own hierarchy’s definition first (see buildViews()), so each app still gets its own.

Plugin Registration

Plugins are registered via the @FrontMcp decorator:
Or via the @Plugin decorator for custom plugins:

Plugin Capabilities

Plugins can provide:

Tools

Additional MCP tools

Resources

Additional MCP resources

Prompts

Additional MCP prompts

Skills

Additional MCP skills

Providers

DI providers

Hooks

Flow hooks

Hook Registration

Plugins can register hooks that run during tool/resource/prompt flows:
Hooks are registered with scope-aware targeting:
  • App-scoped: Hook applies only to the app’s tools, resources, prompts and completions, including those its adapters and plugins provide. Hooks of a plugin nested inside another plugin belong to the app that installed the outer plugin.
  • Server-scoped: Hook applies to all tools in the server

Context Extensions

Plugins can extend execution contexts with new properties:
Usage in tools:

Provider Merging

Plugin providers are merged into both:
  • App registry (for app-scoped access)
  • Scope registry (for server-wide access)

Built-in Plugins

FrontMCP includes official plugins: See the Plugins documentation for details.