You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The plugin configuration file is used to configure a set of plugins to run a
50
+
set of hook points throughout the MCP Context Forge. An example configuration
51
+
is below. It contains two main sections: `plugins` and `plugin_settings`.
52
+
49
53
Create or modify `plugins/config.yaml`:
50
54
51
55
```yaml
@@ -78,6 +82,35 @@ plugin_settings:
78
82
plugin_health_check_interval: 60
79
83
```
80
84
85
+
The `plugins` section lists the set of configured plugins that will be loaded
86
+
by the Context Forge at startup. Each plugin contains a set of standard configurations,
87
+
and then a `config` section designed for plugin specific configurations. The attributes
88
+
are defined as follows:
89
+
90
+
| Attribute | Description | Example Value |
91
+
|-----------|-------------|---------------|
92
+
| **name** | A unique name for the plugin. | MyFirstPlugin |
93
+
| **kind** | A fully qualified string representing the plugin python object. | plugins.native.content_filter.ContentFilterPlugin |
94
+
| **description** | The description of the plugin configuration. | A plugin for replacing bad words. |
95
+
| **version** | The version of the plugin configuration. | 0.1 |
96
+
| **author** | The team that wrote the plugin. | MCP Context Forge |
97
+
| **hooks** | A list of hooks for which the plugin will be executed. **Note**: currently supports two hooks: "prompt_pre_fetch", "prompt_post_fetch" | ["prompt_pre_fetch", "prompt_post_fetch"] |
98
+
| **tags** | Descriptive keywords that make the configuration searchable. | ["security", "filter"] |
99
+
| **mode** | Mode of operation of the plugin. - enforce (stops during a violation), permissive (audits a violation but doesn't stop), disabled (disabled) | permissive |
100
+
| **priority** | The priority in which the plugin will run - 0 is higher priority | 100 |
101
+
| **conditions** | A list of conditions under which a plugin is run. See section on conditions.| |
102
+
| **config** | Plugin specific configuration. This is a dictionary and is passed to the plugin on initialization. | |
103
+
104
+
The `plugin_settings` are as follows:
105
+
106
+
| Attribute | Description | Example Value |
107
+
|-----------|-------------|---------------|
108
+
| **parallel_execution_within_band** | Plugins in the same band are run in parallel (currently not implemented). | true or false |
109
+
| **plugin_timeout** | The time in seconds before stopping plugin execution (not implemented). | 30 |
110
+
| **fail_on_plugin_error** | Cause the execution of the task to fail if the plugin errors. | true or false |
111
+
| **plugin_health_check_interval** | Health check interval in seconds (not implemented). | 60 |
112
+
113
+
81
114
### 3. Execution Modes
82
115
83
116
Each plugin can operate in one of three modes:
@@ -110,6 +143,18 @@ plugins:
110
143
111
144
Plugins with the same priority may execute in parallel if `parallel_execution_within_band` is enabled.
112
145
146
+
### 5. Conditions of Execution
147
+
148
+
Users may only want plugins to be invoked on specific servers, tools, and prompts. To address this, a set of conditionals can be applied to a plugin. The attributes in a conditional combine together in as a set of `and` operations, while each attribute list item is `ored` with other items in the list. The attributes are defined as follows:
149
+
150
+
| Attribute | Description
151
+
|-----------|------------|
152
+
| **server_ids** | The list of MCP servers on which the plugin will trigger |
153
+
| **tools** | The list of tools on which the plugin will be applied. |
154
+
| **prompts** | The list of prompts on which the plugin will be applied. |
155
+
| **user_patterns** | The list of users on which the plugin will be applied. |
156
+
| **content_types** | The list of content types on which the plugin will trigger. |
0 commit comments