Skip to main content
Plugins are powerful components that add cross-cutting functionality to your MCP servers. Instead of implementing features like caching, authentication, or observability in every tool, plugins provide reusable capabilities that work across all your tools and apps.

Why Use Plugins?

Zero Duplication

Add capabilities like caching or code execution once and apply them to all tools automatically.

Composable

Mix and match plugins to build exactly the features you need without coupling.

Cross-App

Plugins work across all apps in your server, providing consistent behavior everywhere.

Production-Ready

Battle-tested implementations for common needs like caching, rate limiting, and monitoring.

Official Plugins

These plugins are maintained by the FrontMCP team and included in @frontmcp/plugins.
More official plugins are coming soon! Authentication, rate limiting, observability, and validation plugins are in development.

Community Plugins

Community plugins are created and maintained by the FrontMCP community. While not officially supported, they extend FrontMCP’s capabilities with specialized features.
Community plugins are not maintained by the FrontMCP team. Please review the code and security practices before using them in production.

How to Find Community Plugins

1

Search npm

Search for packages tagged with frontmcp-plugin or mcp-plugin:
npm search frontmcp-plugin
2

Check GitHub Topics

Browse repositories tagged with frontmcp-plugin on GitHub.
3

Join the Community

Visit the FrontMCP Discussions to discover and share plugins.
This section is for community-contributed plugins. If you’ve created a plugin, submit a PR to add it here!

Creating Custom Plugins

You can create custom plugins to add any cross-cutting capability to FrontMCP. Plugins are TypeScript classes decorated with @Plugin that hook into the tool execution lifecycle.

Basic Plugin Structure

import { Plugin, PluginContext, ToolHooks } from '@frontmcp/sdk';

@Plugin({
  name: 'my-plugin',
  description: 'My custom plugin',
})
export default class MyCustomPlugin implements ToolHooks {
  // Called before tool execution
  async beforeToolCall(ctx: PluginContext) {
    // Add pre-execution logic (validation, auth, etc.)
    console.log(`About to execute tool: ${ctx.toolName}`);
  }

  // Called after successful tool execution
  async afterToolCall(ctx: PluginContext, result: any) {
    // Add post-execution logic (logging, caching, etc.)
    console.log(`Tool ${ctx.toolName} returned:`, result);
    return result; // Can transform the result
  }

  // Called on tool execution errors
  async onToolError(ctx: PluginContext, error: Error) {
    // Add error handling logic
    console.error(`Tool ${ctx.toolName} failed:`, error);
    throw error; // Re-throw or transform the error
  }

  // Initialize with options
  static init(options?: MyPluginOptions) {
    return new MyCustomPlugin(options);
  }
}

Plugin Best Practices

  • Keep plugin logic lightweight
  • Avoid blocking operations in hooks
  • Use async operations efficiently
  • Cache expensive computations
  • Consider performance impact on every tool call
  • Always handle errors gracefully
  • Provide clear error messages
  • Don’t swallow errors silently
  • Log failures appropriately
  • Consider fallback strategies
  • Support both plugin-level and tool-level configuration
  • Provide sensible defaults
  • Make features opt-in when possible
  • Document all configuration options
  • Validate configuration at initialization
  • Don’t assume other plugins are present
  • Avoid global state
  • Use dependency injection for shared resources
  • Document plugin interactions
  • Test with common plugin combinations
  • Provide clear usage examples
  • Document hooks and lifecycle
  • Explain performance characteristics
  • Include migration guides
  • Show integration with common tools

Publishing Your Plugin

When publishing a community plugin:
  1. Package Name: Use the pattern @yourscope/frontmcp-plugin-name or frontmcp-plugin-name
  2. Keywords: Include frontmcp, frontmcp-plugin, mcp, plugin
  3. README: Include installation, usage, examples, and performance considerations
  4. License: Use a permissive license (MIT, Apache 2.0, etc.)
  5. Tests: Include comprehensive test coverage including hook behavior
  6. TypeScript: Provide TypeScript types and declarations
package.json
{
  "name": "@yourscope/frontmcp-plugin-myfeature",
  "version": "1.0.0",
  "description": "FrontMCP plugin for MyFeature",
  "keywords": ["frontmcp", "frontmcp-plugin", "mcp", "plugin", "myfeature"],
  "peerDependencies": {
    "@frontmcp/sdk": "^0.4.0"
  }
}

Plugin Comparison

Choose the right plugin for your use case:
PluginBest ForOverheadScopeComplexity
CodeCallLarge toolsets, workflowsLowCross-appMedium
CacheExpensive operationsMinimalPer-toolLow
CustomAny cross-cutting featureVariesConfigurableMedium-High

Next Steps

Resources