# MCP Server Trigger

## **Overview**

The **MCP Server Trigger** is a trigger that allows a Digibee pipeline to receive and process requests coming from an **MCP (Model Context Protocol) client**.

It acts as the entry point for events or actions initiated by external tools connected through the MCP protocol, for example, tools used by AI assistants or automation services that communicate with Digibee.

### **What it’s used for**

It’s used when you want to:

* Enable AI or external services (like an MCP-compliant assistant) to run an action, get more context or interact with a Digibee pipeline.
* Enforce business playbooks and processes to make your Agent smarter
  * Agents struggle with unstructured guidance. Digibee ensures correct step-by-step execution.
* Make sure your Agent Adhere to business rules and policies
  * You can externalize your rules into MCP pipelines. It'll guarantee deterministic and auditable decisions.

### **How it works**

1. The **MCP client** sends a request that matches the trigger configuration.
2. The **MCP Server Trigger** starts the pipeline and provides the input payload.
3. The pipeline executes its logic (transformations, integrations, and so on).
4. The result is encapsulated in a **`content` object**, as required by the official MCP protocol. This ensures that the AI ​​agent receives the information in the expected text or image format.

## **Tools configuration**

To start configuring the trigger, you must add tools. Each tool exposed by an MCP server includes a set of core fields that define its identity, purpose, permissions, and data structure.

### **Adding a new tool**

1. Go to the **MCP Server Tools** section.
2. Click **Add Tools**.
3. Fill in the fields described below.
4. After saving, the tool will appear in the **Tools List**, where you can add, edit, or delete entries.

<figure><img src="https://3591250690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEKM2LD3uNAckQgy1OUyZ%2Fuploads%2F4UXJgxa1eNN2xMwMpc5s%2Fen-add-tools-mcp-server.gif?alt=media&#x26;token=3781e333-692c-4479-b85d-ef9139fc6e5b" alt=""><figcaption></figcaption></figure>

### **Tool fields**

#### **Tool Name**

Unique identifier for the tool. It should be concise, descriptive, and typically use snake\_case.

**Example:** `search_web`

#### **Description**

Short and clear summary of what the tool does. Helps both the model and users understand its purpose.

**Example:** Performs a web search and returns the top results.

#### Scopes

Defines the permissions this tool requires at runtime. Scopes are embedded in the scoped JWT token when an agent invokes this tool. This field is optional. Type a scope and press **Enter** or **Tab** to add it as a tag.

**Example**: `read:web`, `write:logs`

{% hint style="warning" %}
Pipelines created before the January 27, 2026 release that use the MCP Server Trigger must be reconfigured due to the addition of Scopes. Open the trigger configuration and click **Save** again.

For security, we recommend generating a copy of your **Block Executions** before performing this update.
{% endhint %}

#### **Schema Configuration**

You can define how your tool handles both **input** and **output** data using JSON Schemas. These schemas describe the expected structure, data types, and validation rules.

The configuration applies to two sections:

* **Input Schema:** Defines the structure of the data received by the tool.
* **Output Schema:** (Optional) Defines the structure of the data returned by the tool.

Both can be configured in two ways:

**Option 1: Wizard**

Use the Wizard to guide your configuration by clicking **Add Property** and filling in the parameters:

* **Name:** Defines the property name within the JSON object.
* **Type:** Specifies the data type (`string`, `number`, `boolean`, `array`, or `object`).
* **Required:** Indicates whether the field is mandatory.
* **Description:** Describes the purpose or meaning of the property.
* **Enum Values:** (Applicable only to the `string` type) Lists the allowed values for the property.
* **Array Type:** (Applicable only to the `array` type) Defines the data type of the array elements (`string`, `number`, `boolean`, or `array`).
* **Object Properties:** (Applicable only to the `object` type) Defines the set of properties contained within the object.

**Example: Input Schema**

| Name  | Type   | Required | Description                             | Enum Values |
| ----- | ------ | -------- | --------------------------------------- | ----------- |
| query | string | ✅ Yes    | The search term or keywords to look up. | —           |
| limit | number | ❌ No     | Number of results to return.            | N/A         |

**Resulting JSON Schema**

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The search term or keywords to look up."
    },
    "limit": {
      "type": "integer",
      "description": "Number of results to return.",
      "default": 5
    }
  },
  "required": ["query"]
}
```

**Example: Output Schema**

| Name    | Type  | Required | Description                             | Array Type |
| ------- | ----- | -------- | --------------------------------------- | ---------- |
| results | array | ❌ No     | List of URLs matching the search query. | string     |

**Resulting JSON Schema**

```json
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of URLs matching the search query."
    }
  }
}
```

**Option 2: Schema**

Alternatively, enter the JSON Schema directly in the provided field.

## **Parameters configuration**

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Description</th><th>Data type</th><th>Default value</th></tr></thead><tbody><tr><td><strong>Server Name</strong></td><td>Name of the MCP server. This is for reference purposes only.</td><td>String</td><td>N/A</td></tr><tr><td><strong>Description</strong></td><td>Short description for identifying the MCP Server.</td><td>String</td><td>N/A</td></tr><tr><td><strong>Maximum Timeout</strong></td><td>Maximum time (in milliseconds) for the pipeline to process information before returning a response. Limit: 900000 ms.</td><td>Integer</td><td><code>30000</code></td></tr><tr><td><strong>The Maximum Allowed Request Size In Mb</strong></td><td>Maximum size of the payload in megabytes. The maximum configurable size is 5 MB.</td><td>Integer</td><td><code>5</code></td></tr><tr><td><strong>External API</strong></td><td>If enabled, the MCP Server becomes accessible through Digibee’s external gateway, allowing it to communicate over the public Internet.</td><td>Boolean</td><td>True</td></tr><tr><td><strong>Internal API</strong></td><td>If enabled, exposes the MCP Server through Digibee’s internal gateway, restricting access to the internal network only. Both the <strong>External API</strong> and <strong>Internal API</strong> options can be active simultaneously.</td><td>Boolean</td><td>False</td></tr><tr><td><strong>API Key</strong></td><td>If enabled, the endpoint can only be accessed with an API key configured in the Digibee Integration Platform.</td><td>Boolean</td><td>False</td></tr><tr><td><strong>External JWT</strong></td><td>If enabled, the MCP Server validates JWT tokens from external identity providers (e.g., Auth0, Azure AD, Okta) received via the externalJWT header.</td><td>Boolean</td><td>False</td></tr><tr><td><strong>Public Key</strong></td><td>The external provider's public key. It is used to validate the token signature.</td><td>String</td><td>N/A</td></tr><tr><td><strong>JSW Algorithm (JWA)</strong></td><td>Specifies the encryption algorithm used to validate the digital signature of the JWT token.</td><td>String</td><td>ES256</td></tr><tr><td><strong>Token JWT</strong></td><td>If enabled, the endpoint can only be accessed when a JWT token generated by another endpoint is provided.<br>For more information, see the article on <a href="../../connectors/security/digibee-jwt/digibee-jwt-implementation">JWT implementation</a>.</td><td>Boolean</td><td>False</td></tr><tr><td><strong>Documentation</strong></td><td>Optional field to describe the trigger configuration and any relevant business rules.</td><td>String</td><td>N/A</td></tr></tbody></table>

## **Visual representation of the tools**

After saving the trigger configuration, a **visual representation of the tools** is displayed in the pipeline.

<figure><img src="https://3591250690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEKM2LD3uNAckQgy1OUyZ%2Fuploads%2FY5AWV7f17JTZJeLZFlfx%2Fvisual-representation-mcp-server.png?alt=media&#x26;token=a3face7c-a81b-43eb-a33f-cee10d735e5e" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Tools can only be edited through the trigger's configuration form. Any changes made are immediately reflected in the pipeline after saving.
{% endhint %}

Each tool is connected to a [**Block Execution**](https://docs.digibee.com/documentation/connectors-and-triggers/connectors/logic/block-execution) connector. This connector is designed to **logically separate the integration into different subflows**, making pipeline management easier. To complete the configuration, you must create the flows for each route within the [**OnProcess** and **OnException** subflows](https://app.gitbook.com/s/jvO5S91EQURCEhbZOuuZ/development-cycle/build-overview/pipelines/subpipelines).

Regardless of the number of tools configured, there is always a **default route** for cases where a tool is not found. You can configure this route to handle missing tools appropriately.

{% hint style="warning" %}
**Important notes:**

* If you create the flow before configuring the trigger, existing connectors will be disconnected once the trigger is saved.
* Deleting a tool from the **Tools List** will disconnect the corresponding **Block Execution** connector from the main flow.
  {% endhint %}
